Search in sources :

Example 11 with BlazeSyncPlugin

use of com.google.idea.blaze.base.sync.BlazeSyncPlugin in project intellij by bazelbuild.

the class BlazeDartSyncPluginTest method initTest.

@Override
protected void initTest(@NotNull Container applicationServices, @NotNull Container projectServices) {
    super.initTest(applicationServices, projectServices);
    ExtensionPointImpl<BlazeSyncPlugin> ep = registerExtensionPoint(BlazeSyncPlugin.EP_NAME, BlazeSyncPlugin.class);
    ep.registerExtension(new BlazeDartSyncPlugin());
    // add java, because we need at least one WorkspaceType available.
    ep.registerExtension(new BlazeSyncPlugin() {

        @Override
        public ImmutableList<WorkspaceType> getSupportedWorkspaceTypes() {
            return ImmutableList.of(WorkspaceType.JAVA);
        }

        @Override
        public Set<LanguageClass> getSupportedLanguagesInWorkspace(WorkspaceType workspaceType) {
            return ImmutableSet.of(LanguageClass.JAVA);
        }

        @Override
        public WorkspaceType getDefaultWorkspaceType() {
            return WorkspaceType.JAVA;
        }
    });
    context = new BlazeContext();
    context.addOutputSink(IssueOutput.class, errorCollector);
}
Also used : BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) WorkspaceType(com.google.idea.blaze.base.model.primitives.WorkspaceType) ImmutableSet(com.google.common.collect.ImmutableSet) Set(java.util.Set) ProjectViewSet(com.google.idea.blaze.base.projectview.ProjectViewSet) ImmutableList(com.google.common.collect.ImmutableList) BlazeSyncPlugin(com.google.idea.blaze.base.sync.BlazeSyncPlugin)

Example 12 with BlazeSyncPlugin

use of com.google.idea.blaze.base.sync.BlazeSyncPlugin in project intellij by bazelbuild.

the class BlazeJavascriptSyncPluginTest method initTest.

@Override
protected void initTest(Container applicationServices, Container projectServices) {
    super.initTest(applicationServices, projectServices);
    ExtensionPointImpl<BlazeSyncPlugin> ep = registerExtensionPoint(BlazeSyncPlugin.EP_NAME, BlazeSyncPlugin.class);
    ep.registerExtension(new BlazeJavascriptSyncPlugin());
    ep.registerExtension(new BlazeSyncPlugin() {

        @Override
        public WorkspaceType getDefaultWorkspaceType() {
            return WorkspaceType.JAVA;
        }
    });
    context = new BlazeContext();
    context.addOutputSink(IssueOutput.class, errorCollector);
}
Also used : BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) WorkspaceType(com.google.idea.blaze.base.model.primitives.WorkspaceType) BlazeSyncPlugin(com.google.idea.blaze.base.sync.BlazeSyncPlugin)

Example 13 with BlazeSyncPlugin

use of com.google.idea.blaze.base.sync.BlazeSyncPlugin in project intellij by bazelbuild.

the class BlazeTypescriptSyncPluginTest method initTest.

@Override
protected void initTest(@NotNull Container applicationServices, @NotNull Container projectServices) {
    super.initTest(applicationServices, projectServices);
    ExtensionPointImpl<BlazeSyncPlugin> ep = registerExtensionPoint(BlazeSyncPlugin.EP_NAME, BlazeSyncPlugin.class);
    ep.registerExtension(new BlazeTypescriptSyncPlugin());
    // add java, because we need at least one WorkspaceType available.
    ep.registerExtension(new BlazeSyncPlugin() {

        @Override
        public ImmutableList<WorkspaceType> getSupportedWorkspaceTypes() {
            return ImmutableList.of(WorkspaceType.JAVA);
        }

        @Override
        public Set<LanguageClass> getSupportedLanguagesInWorkspace(WorkspaceType workspaceType) {
            return ImmutableSet.of(LanguageClass.JAVA);
        }

        @Override
        public WorkspaceType getDefaultWorkspaceType() {
            return WorkspaceType.JAVA;
        }
    });
    context = new BlazeContext();
    context.addOutputSink(IssueOutput.class, errorCollector);
}
Also used : BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) WorkspaceType(com.google.idea.blaze.base.model.primitives.WorkspaceType) ImmutableSet(com.google.common.collect.ImmutableSet) Set(java.util.Set) ProjectViewSet(com.google.idea.blaze.base.projectview.ProjectViewSet) ImmutableList(com.google.common.collect.ImmutableList) BlazeSyncPlugin(com.google.idea.blaze.base.sync.BlazeSyncPlugin)

Aggregations

BlazeSyncPlugin (com.google.idea.blaze.base.sync.BlazeSyncPlugin)13 BlazeContext (com.google.idea.blaze.base.scope.BlazeContext)9 WorkspaceType (com.google.idea.blaze.base.model.primitives.WorkspaceType)7 Set (java.util.Set)6 ImmutableList (com.google.common.collect.ImmutableList)5 ImmutableSet (com.google.common.collect.ImmutableSet)5 ProjectViewSet (com.google.idea.blaze.base.projectview.ProjectViewSet)5 BlazeLibrary (com.google.idea.blaze.base.model.BlazeLibrary)2 BlazeJavaSyncPlugin (com.google.idea.blaze.java.sync.BlazeJavaSyncPlugin)2 Objects (java.util.Objects)2 Nullable (javax.annotation.Nullable)2 Lists (com.google.common.collect.Lists)1 Sets (com.google.common.collect.Sets)1 BazelBuildSystemProvider (com.google.idea.blaze.base.bazel.BazelBuildSystemProvider)1 BuildSystemProvider (com.google.idea.blaze.base.bazel.BuildSystemProvider)1 BlazeProjectData (com.google.idea.blaze.base.model.BlazeProjectData)1 LibraryKey (com.google.idea.blaze.base.model.LibraryKey)1 LanguageClass (com.google.idea.blaze.base.model.primitives.LanguageClass)1 PrintOutput (com.google.idea.blaze.base.scope.output.PrintOutput)1 ArtifactLocationDecoder (com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder)1