Search in sources :

Example 1 with BlazeBuildService

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

the class BlazeAndroidModelTest 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());
    projectServices.register(ProjectScopeBuilder.class, new ProjectScopeBuilderImpl(project));
    projectServices.register(ProjectViewManager.class, new MockProjectViewManager());
    projectServices.register(BlazeProjectDataManager.class, new BlazeProjectDataManagerImpl(project));
    BlazeImportSettingsManager manager = new BlazeImportSettingsManager();
    manager.setImportSettings(new BlazeImportSettings("", "", "", "", BuildSystem.Blaze));
    projectServices.register(BlazeImportSettingsManager.class, manager);
    facade = new MockJavaPsiFacade(project, new MockPsiManager(project), ImmutableList.of("com.google.example.Modified", "com.google.example.NotModified"));
    projectServices.register(JavaPsiFacade.class, facade);
    module = new MockModule(() -> {
    });
    model = new BlazeAndroidModel(project, module, null, mock(SourceProvider.class), null, "", 0);
}
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) BlazeProjectDataManagerImpl(com.google.idea.blaze.base.sync.data.BlazeProjectDataManagerImpl) MockFileTypeManager(com.intellij.openapi.fileTypes.MockFileTypeManager) MockPsiManager(com.intellij.mock.MockPsiManager) MockModule(com.intellij.mock.MockModule) BlazeBuildService(com.google.idea.blaze.base.actions.BlazeBuildService) ProjectScopeBuilderImpl(com.intellij.psi.search.ProjectScopeBuilderImpl)

Aggregations

BlazeBuildService (com.google.idea.blaze.base.actions.BlazeBuildService)1 BlazeImportSettings (com.google.idea.blaze.base.settings.BlazeImportSettings)1 BlazeImportSettingsManager (com.google.idea.blaze.base.settings.BlazeImportSettingsManager)1 BlazeProjectDataManagerImpl (com.google.idea.blaze.base.sync.data.BlazeProjectDataManagerImpl)1 MockFileDocumentManagerImpl (com.intellij.mock.MockFileDocumentManagerImpl)1 MockModule (com.intellij.mock.MockModule)1 MockPsiManager (com.intellij.mock.MockPsiManager)1 MockFileTypeManager (com.intellij.openapi.fileTypes.MockFileTypeManager)1 VirtualFileManager (com.intellij.openapi.vfs.VirtualFileManager)1 ProjectScopeBuilderImpl (com.intellij.psi.search.ProjectScopeBuilderImpl)1