use of com.intellij.psi.impl.JvmPsiConversionHelperImpl 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());
projectFileIndex = mock(ProjectFileIndex.class);
projectServices.register(ProjectFileIndex.class, projectFileIndex);
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());
ExtensionPointImpl<Provider> kindProvider = registerExtensionPoint(Kind.Provider.EP_NAME, Kind.Provider.class);
kindProvider.registerExtension(new AndroidBlazeRules());
applicationServices.register(Kind.ApplicationState.class, new Kind.ApplicationState());
BlazeImportSettingsManager importSettingsManager = new BlazeImportSettingsManager(project);
BlazeImportSettings settings = new BlazeImportSettings("", "", "", "", BuildSystemName.Blaze);
importSettingsManager.setImportSettings(settings);
projectServices.register(BlazeImportSettingsManager.class, importSettingsManager);
projectServices.register(JvmPsiConversionHelper.class, new JvmPsiConversionHelperImpl());
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();
}
use of com.intellij.psi.impl.JvmPsiConversionHelperImpl 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(() -> {
});
}
use of com.intellij.psi.impl.JvmPsiConversionHelperImpl 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());
BlazeProjectDataManager mockProjectDataManager = new MockBlazeProjectDataManager(MockBlazeProjectDataBuilder.builder().build());
projectServices.register(BlazeProjectDataManager.class, mockProjectDataManager);
BlazeImportSettingsManager manager = new BlazeImportSettingsManager(project);
manager.setImportSettings(new BlazeImportSettings("", "", "", "", BuildSystem.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(() -> {
});
model = new BlazeAndroidModel(project, null, mock(SourceProvider.class), null, 0, false);
}
Aggregations