use of com.google.idea.blaze.base.bazel.BazelBuildSystemProvider in project intellij by bazelbuild.
the class BuildTargetFinderTest method initTest.
@Override
protected void initTest(Container applicationServices, Container projectServices) {
super.initTest(applicationServices, projectServices);
applicationServices.register(FileOperationProvider.class, fileOperationProvider);
applicationServices.register(ExperimentService.class, new MockExperimentService());
applicationServices.register(BlazeImportSettingsManager.class, mock(BlazeImportSettingsManager.class));
ExtensionPoint<BuildSystemProvider> extensionPoint = registerExtensionPoint(BuildSystemProvider.EP_NAME, BuildSystemProvider.class);
extensionPoint.registerExtension(new BazelBuildSystemProvider());
}
use of com.google.idea.blaze.base.bazel.BazelBuildSystemProvider in project intellij by bazelbuild.
the class BlazeConfigurationResolverTest method initTest.
@Override
protected void initTest(Container applicationServices, Container projectServices) {
super.initTest(applicationServices, projectServices);
applicationServices.register(BlazeExecutor.class, new MockBlazeExecutor());
CPPEnvironmentAdapter.registerForTest(applicationServices.getPicoContainer());
applicationServices.register(ExperimentService.class, new MockExperimentService());
compilerVersionChecker = new MockCompilerVersionChecker("1234");
applicationServices.register(CompilerVersionChecker.class, compilerVersionChecker);
applicationServices.register(ProgressManager.class, new ProgressManagerImpl());
applicationServices.register(VirtualFileManager.class, mock(VirtualFileManager.class));
mockFileSystem = mock(LocalFileSystem.class);
applicationServices.register(VirtualFileSystemProvider.class, mock(VirtualFileSystemProvider.class));
when(VirtualFileSystemProvider.getInstance().getSystem()).thenReturn(mockFileSystem);
projectServices.register(BlazeImportSettingsManager.class, new BlazeImportSettingsManager());
BuildSystemProvider buildSystemProvider = new BazelBuildSystemProvider();
registerExtensionPoint(BuildSystemProvider.EP_NAME, BuildSystemProvider.class).registerExtension(buildSystemProvider);
BlazeImportSettingsManager.getInstance(getProject()).setImportSettings(new BlazeImportSettings("", "", "", "", buildSystemProvider.buildSystem()));
context.addOutputSink(IssueOutput.class, errorCollector);
resolver = new BlazeConfigurationResolver(project);
resolverResult = BlazeConfigurationResolverResult.empty(project);
}
use of com.google.idea.blaze.base.bazel.BazelBuildSystemProvider in project intellij by bazelbuild.
the class BlazeResolveConfigurationEquivalenceTest method initTest.
@Override
protected void initTest(Container applicationServices, Container projectServices) {
super.initTest(applicationServices, projectServices);
applicationServices.register(BlazeExecutor.class, new MockBlazeExecutor());
CPPEnvironmentAdapter.registerForTest(applicationServices.getPicoContainer());
applicationServices.register(ExperimentService.class, new MockExperimentService());
applicationServices.register(CompilerVersionChecker.class, new MockCompilerVersionChecker("1234"));
applicationServices.register(ProgressManager.class, new ProgressManagerImpl());
applicationServices.register(VirtualFileManager.class, mock(VirtualFileManager.class));
mockFileSystem = mock(LocalFileSystem.class);
applicationServices.register(VirtualFileSystemProvider.class, mock(VirtualFileSystemProvider.class));
when(VirtualFileSystemProvider.getInstance().getSystem()).thenReturn(mockFileSystem);
projectServices.register(PsiManager.class, new MockPsiManager(project));
projectServices.register(BlazeImportSettingsManager.class, new BlazeImportSettingsManager());
BuildSystemProvider buildSystemProvider = new BazelBuildSystemProvider();
registerExtensionPoint(BuildSystemProvider.EP_NAME, BuildSystemProvider.class).registerExtension(buildSystemProvider);
BlazeImportSettingsManager.getInstance(getProject()).setImportSettings(new BlazeImportSettings("", "", "", "", buildSystemProvider.buildSystem()));
context.addOutputSink(IssueOutput.class, errorCollector);
resolver = new BlazeConfigurationResolver(project);
resolverResult = BlazeConfigurationResolverResult.empty(project);
}
use of com.google.idea.blaze.base.bazel.BazelBuildSystemProvider in project intellij by bazelbuild.
the class BlazeKotlinSyncPluginTest method initTest.
@Override
protected void initTest(@NotNull Container applicationServices, @NotNull Container projectServices) {
super.initTest(applicationServices, projectServices);
ExtensionPointImpl<BuildSystemProvider> buildSystems = registerExtensionPoint(BuildSystemProvider.EP_NAME, BuildSystemProvider.class);
buildSystems.registerExtension(new BazelBuildSystemProvider());
ExtensionPointImpl<BlazeSyncPlugin> syncPlugins = registerExtensionPoint(BlazeSyncPlugin.EP_NAME, BlazeSyncPlugin.class);
syncPlugins.registerExtension(new BlazeJavaSyncPlugin());
syncPlugins.registerExtension(new BlazeKotlinSyncPlugin());
context = new BlazeContext();
context.addOutputSink(IssueOutput.class, errorCollector);
}
use of com.google.idea.blaze.base.bazel.BazelBuildSystemProvider in project intellij by bazelbuild.
the class ExecutionRootPathResolverTest method initTest.
@Override
protected void initTest(Container applicationServices, Container projectServices) {
ExtensionPoint<BuildSystemProvider> extensionPoint = registerExtensionPoint(BuildSystemProvider.EP_NAME, BuildSystemProvider.class);
extensionPoint.registerExtension(new BazelBuildSystemProvider());
pathResolver = new ExecutionRootPathResolver(BuildSystem.Bazel, WORKSPACE_ROOT, new File(EXECUTION_ROOT), new WorkspacePathResolverImpl(WORKSPACE_ROOT));
}
Aggregations