Java 类com.intellij.psi.search.ProjectScopeBuilder 实例源码

项目:intellij    文件:BlazeAndroidModelTest.java   
@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);
}
项目:intellij-ce-playground    文件:CoreProjectEnvironment.java   
public CoreProjectEnvironment(@NotNull Disposable parentDisposable, @NotNull CoreApplicationEnvironment applicationEnvironment) {
  myParentDisposable = parentDisposable;
  myEnvironment = applicationEnvironment;
  myProject = createProject(myEnvironment.getApplication().getPicoContainer(), myParentDisposable);

  preregisterServices();

  myFileIndexFacade = createFileIndexFacade();
  myMessageBus = MessageBusFactory.newMessageBus("CoreProjectEnvironment");

  PsiModificationTrackerImpl modificationTracker = new PsiModificationTrackerImpl(myProject);
  myProject.registerService(PsiModificationTracker.class, modificationTracker);
  myProject.registerService(FileIndexFacade.class, myFileIndexFacade);
  myProject.registerService(ResolveCache.class, new ResolveCache(myMessageBus));

  myPsiManager = new PsiManagerImpl(myProject, null, null, myFileIndexFacade, myMessageBus, modificationTracker);
  ((FileManagerImpl) myPsiManager.getFileManager()).markInitialized();
  registerProjectComponent(PsiManager.class, myPsiManager);
  myProject.registerService(SmartPointerManager.class, SmartPointerManagerImpl.class);
  registerProjectComponent(PsiDocumentManager.class, new CorePsiDocumentManager(myProject, myPsiManager,
                                                                                myMessageBus,
                                                                                new MockDocumentCommitProcessor()));

  myProject.registerService(ResolveScopeManager.class, createResolveScopeManager(myPsiManager));

  myProject.registerService(PsiFileFactory.class, new PsiFileFactoryImpl(myPsiManager));
  myProject.registerService(CachedValuesManager.class, new CachedValuesManagerImpl(myProject, new PsiCachedValuesFactory(myPsiManager)));
  myProject.registerService(PsiDirectoryFactory.class, new PsiDirectoryFactoryImpl(myPsiManager));
  myProject.registerService(ProjectScopeBuilder.class, createProjectScopeBuilder());
  myProject.registerService(DumbService.class, new MockDumbService(myProject));
  myProject.registerService(CoreEncodingProjectManager.class, CoreEncodingProjectManager.class);
}
项目:intellij    文件:BlazeRenderErrorContributorTest.java   
@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();
}
项目:tools-idea    文件:CoreProjectEnvironment.java   
public CoreProjectEnvironment(Disposable parentDisposable, CoreApplicationEnvironment applicationEnvironment) {
  myParentDisposable = parentDisposable;
  myEnvironment = applicationEnvironment;
  myProject = new MockProject(myEnvironment.getApplication().getPicoContainer(), myParentDisposable);

  preregisterServices();

  myFileIndexFacade = createFileIndexFacade();
  myMessageBus = new MessageBusImpl("CoreProjectEnvironment", null);

  PsiModificationTrackerImpl modificationTracker = new PsiModificationTrackerImpl(myProject);
  myProject.registerService(PsiModificationTracker.class, modificationTracker);
  myProject.registerService(FileIndexFacade.class, myFileIndexFacade);
  myProject.registerService(ResolveCache.class, new ResolveCache(myMessageBus));

  registerProjectExtensionPoint(PsiTreeChangePreprocessor.EP_NAME, PsiTreeChangePreprocessor.class);
  myPsiManager = new PsiManagerImpl(myProject, null, null, myFileIndexFacade, myMessageBus, modificationTracker);
  ((FileManagerImpl) myPsiManager.getFileManager()).markInitialized();
  registerProjectComponent(PsiManager.class, myPsiManager);

  myProject.registerService(ResolveScopeManager.class, createResolveScopeManager(myPsiManager));

  myProject.registerService(PsiFileFactory.class, new PsiFileFactoryImpl(myPsiManager));
  myProject.registerService(CachedValuesManager.class, new CachedValuesManagerImpl(myProject, new PsiCachedValuesFactory(myPsiManager)));
  myProject.registerService(PsiDirectoryFactory.class, new PsiDirectoryFactoryImpl(myPsiManager));
  myProject.registerService(ProjectScopeBuilder.class, createProjectScopeBuilder());
  myProject.registerService(DumbService.class, new MockDumbService(myProject));
}
项目:consulo    文件:CoreProjectEnvironment.java   
public CoreProjectEnvironment(Disposable parentDisposable, CoreApplicationEnvironment applicationEnvironment) {
  myParentDisposable = parentDisposable;
  myEnvironment = applicationEnvironment;
  myProject = new MockProject(myEnvironment.getApplication().getPicoContainer(), myParentDisposable);

  preregisterServices();

  myFileIndexFacade = createFileIndexFacade();
  myMessageBus = (MessageBusImpl)myProject.getMessageBus();

  PsiModificationTrackerImpl modificationTracker = new PsiModificationTrackerImpl(myProject);
  myProject.registerService(PsiModificationTracker.class, modificationTracker);
  myProject.registerService(FileIndexFacade.class, myFileIndexFacade);
  myProject.registerService(ResolveCache.class, new ResolveCache(myMessageBus));

  registerProjectExtensionPoint(PsiTreeChangePreprocessor.EP_NAME, PsiTreeChangePreprocessor.class);
  myPsiManager = new PsiManagerImpl(myProject, null, null, myFileIndexFacade, myMessageBus, modificationTracker);
  ((FileManagerImpl)myPsiManager.getFileManager()).markInitialized();
  registerProjectComponent(PsiManager.class, myPsiManager);

  registerProjectComponent(PsiDocumentManager.class, new CorePsiDocumentManager(myProject, myPsiManager, myMessageBus, new MockDocumentCommitProcessor()));

  myProject.registerService(ResolveScopeManager.class, createResolveScopeManager(myPsiManager));

  myProject.registerService(PsiFileFactory.class, new PsiFileFactoryImpl(myPsiManager));
  myProject.registerService(CachedValuesManager.class, new CachedValuesManagerImpl(myProject, new PsiCachedValuesFactory(myPsiManager)));
  myProject.registerService(ProjectScopeBuilder.class, createProjectScopeBuilder());
  myProject.registerService(DumbService.class, new MockDumbService(myProject));
}
项目:intellij-ce-playground    文件:CoreProjectEnvironment.java   
@NotNull
protected ProjectScopeBuilder createProjectScopeBuilder() {
  return new CoreProjectScopeBuilder(myProject, myFileIndexFacade);
}
项目:tools-idea    文件:CoreProjectEnvironment.java   
protected ProjectScopeBuilder createProjectScopeBuilder() {
  return new CoreProjectScopeBuilder(myProject, myFileIndexFacade);
}
项目:consulo    文件:CoreProjectEnvironment.java   
protected ProjectScopeBuilder createProjectScopeBuilder() {
  return new CoreProjectScopeBuilder(myProject, myFileIndexFacade);
}