Search in sources :

Example 1 with BlazeBuildService

use of com.google.idea.blaze.base.build.BlazeBuildService in project intellij by bazelbuild.

the class BlazeClassJarProviderTest method initTest.

@Override
protected void initTest(Container applicationServices, Container projectServices) {
    applicationServices.register(FileTypeManager.class, new MockFileTypeManager());
    applicationServices.register(FileDocumentManager.class, new MockFileDocumentManagerImpl(null, null));
    applicationServices.register(VirtualFileManager.class, mock(VirtualFileManager.class));
    applicationServices.register(BlazeBuildService.class, new BlazeBuildService(project));
    projectServices.register(ProjectScopeBuilder.class, new ProjectScopeBuilderImpl(project));
    projectServices.register(ProjectViewManager.class, new MockProjectViewManager());
    BlazeProjectDataManager mockProjectDataManager = new MockBlazeProjectDataManager(MockBlazeProjectDataBuilder.builder().build());
    projectServices.register(BlazeProjectDataManager.class, mockProjectDataManager);
    BlazeImportSettingsManager manager = new BlazeImportSettingsManager(project);
    manager.setImportSettings(new BlazeImportSettings("", "", "", "", BuildSystemName.Blaze));
    projectServices.register(BlazeImportSettingsManager.class, manager);
    projectServices.register(JvmPsiConversionHelper.class, new JvmPsiConversionHelperImpl());
    facade = new MockJavaPsiFacade(project, ImmutableList.of("com.google.example.Modified", "com.google.example.NotModified"));
    projectServices.register(JavaPsiFacade.class, facade);
    module = new MockModule(() -> {
    });
}
Also used : BlazeImportSettingsManager(com.google.idea.blaze.base.settings.BlazeImportSettingsManager) MockFileDocumentManagerImpl(com.intellij.mock.MockFileDocumentManagerImpl) BlazeImportSettings(com.google.idea.blaze.base.settings.BlazeImportSettings) VirtualFileManager(com.intellij.openapi.vfs.VirtualFileManager) MockBlazeProjectDataManager(com.google.idea.blaze.base.model.MockBlazeProjectDataManager) BlazeProjectDataManager(com.google.idea.blaze.base.sync.data.BlazeProjectDataManager) MockFileTypeManager(com.intellij.openapi.fileTypes.MockFileTypeManager) MockModule(com.intellij.mock.MockModule) BlazeBuildService(com.google.idea.blaze.base.build.BlazeBuildService) JvmPsiConversionHelperImpl(com.intellij.psi.impl.JvmPsiConversionHelperImpl) MockBlazeProjectDataManager(com.google.idea.blaze.base.model.MockBlazeProjectDataManager) ProjectScopeBuilderImpl(com.intellij.psi.search.ProjectScopeBuilderImpl)

Aggregations

BlazeBuildService (com.google.idea.blaze.base.build.BlazeBuildService)1 MockBlazeProjectDataManager (com.google.idea.blaze.base.model.MockBlazeProjectDataManager)1 BlazeImportSettings (com.google.idea.blaze.base.settings.BlazeImportSettings)1 BlazeImportSettingsManager (com.google.idea.blaze.base.settings.BlazeImportSettingsManager)1 BlazeProjectDataManager (com.google.idea.blaze.base.sync.data.BlazeProjectDataManager)1 MockFileDocumentManagerImpl (com.intellij.mock.MockFileDocumentManagerImpl)1 MockModule (com.intellij.mock.MockModule)1 MockFileTypeManager (com.intellij.openapi.fileTypes.MockFileTypeManager)1 VirtualFileManager (com.intellij.openapi.vfs.VirtualFileManager)1 JvmPsiConversionHelperImpl (com.intellij.psi.impl.JvmPsiConversionHelperImpl)1 ProjectScopeBuilderImpl (com.intellij.psi.search.ProjectScopeBuilderImpl)1