Search in sources :

Example 1 with TransitiveDependencyMap

use of com.google.idea.blaze.base.targetmaps.TransitiveDependencyMap in project intellij by bazelbuild.

the class BlazeRenderErrorContributorTest method initTest.

@Override
protected void initTest(Container applicationServices, Container projectServices) {
    super.initTest(applicationServices, projectServices);
    applicationServices.register(FileTypeManager.class, new MockFileTypeManager());
    projectServices.register(ProjectFileIndex.class, mock(ProjectFileIndex.class));
    projectServices.register(BuildReferenceManager.class, new MockBuildReferenceManager(project));
    projectServices.register(TransitiveDependencyMap.class, new TransitiveDependencyMap(project));
    projectServices.register(ProjectScopeBuilder.class, new ProjectScopeBuilderImpl(project));
    projectServices.register(AndroidResourceModuleRegistry.class, new AndroidResourceModuleRegistry());
    BlazeImportSettingsManager importSettingsManager = new BlazeImportSettingsManager();
    BlazeImportSettings settings = new BlazeImportSettings("", "", "", "", BuildSystem.Blaze);
    importSettingsManager.setImportSettings(settings);
    projectServices.register(BlazeImportSettingsManager.class, importSettingsManager);
    createPsiClassesAndSourceToTargetMap(projectServices);
    projectDataManager = new MockBlazeProjectDataManager();
    projectServices.register(BlazeProjectDataManager.class, projectDataManager);
    ExtensionPoint<RenderErrorContributor.Provider> extensionPoint = registerExtensionPoint(ExtensionPointName.create("com.android.rendering.renderErrorContributor"), RenderErrorContributor.Provider.class);
    extensionPoint.registerExtension(new RenderErrorContributor.Provider());
    extensionPoint.registerExtension(new BlazeRenderErrorContributor.BlazeProvider());
    module = new MockModule(project, () -> {
    });
    // For the isApplicable tests.
    provider = new BlazeRenderErrorContributor.BlazeProvider();
}
Also used : BlazeImportSettingsManager(com.google.idea.blaze.base.settings.BlazeImportSettingsManager) BlazeImportSettings(com.google.idea.blaze.base.settings.BlazeImportSettings) RenderErrorContributor(com.android.tools.idea.rendering.RenderErrorContributor) AndroidResourceModuleRegistry(com.google.idea.blaze.android.sync.model.AndroidResourceModuleRegistry) MockFileTypeManager(com.intellij.openapi.fileTypes.MockFileTypeManager) TransitiveDependencyMap(com.google.idea.blaze.base.targetmaps.TransitiveDependencyMap) MockModule(com.intellij.mock.MockModule) ProjectFileIndex(com.intellij.openapi.roots.ProjectFileIndex) ProjectScopeBuilderImpl(com.intellij.psi.search.ProjectScopeBuilderImpl)

Aggregations

RenderErrorContributor (com.android.tools.idea.rendering.RenderErrorContributor)1 AndroidResourceModuleRegistry (com.google.idea.blaze.android.sync.model.AndroidResourceModuleRegistry)1 BlazeImportSettings (com.google.idea.blaze.base.settings.BlazeImportSettings)1 BlazeImportSettingsManager (com.google.idea.blaze.base.settings.BlazeImportSettingsManager)1 TransitiveDependencyMap (com.google.idea.blaze.base.targetmaps.TransitiveDependencyMap)1 MockModule (com.intellij.mock.MockModule)1 MockFileTypeManager (com.intellij.openapi.fileTypes.MockFileTypeManager)1 ProjectFileIndex (com.intellij.openapi.roots.ProjectFileIndex)1 ProjectScopeBuilderImpl (com.intellij.psi.search.ProjectScopeBuilderImpl)1