Java 类com.intellij.psi.impl.search.IndexPatternBuilder 实例源码

项目:intellij-ce-playground    文件:DaemonAnalyzerTestCase.java   
@Override
protected void setUp() throws Exception {
  super.setUp();

  final LocalInspectionTool[] tools = configureLocalInspectionTools();

  CodeInsightTestFixtureImpl.configureInspections(tools, getProject(), Collections.<String>emptyList(),
                                                  getTestRootDisposable());

  DaemonCodeAnalyzerImpl daemonCodeAnalyzer = (DaemonCodeAnalyzerImpl)DaemonCodeAnalyzer.getInstance(getProject());
  daemonCodeAnalyzer.prepareForTest();
  final StartupManagerImpl startupManager = (StartupManagerImpl)StartupManagerEx.getInstanceEx(getProject());
  startupManager.runStartupActivities();
  startupManager.startCacheUpdate();
  startupManager.runPostStartupActivities();
  DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(false);

  if (isPerformanceTest()) {
    IntentionManager.getInstance().getAvailableIntentionActions();  // hack to avoid slowdowns in PyExtensionFactory
    PathManagerEx.getTestDataPath(); // to cache stuff
    ReferenceProvidersRegistry.getInstance(); // pre-load tons of classes
    InjectedLanguageManager.getInstance(getProject()); // zillion of Dom Sem classes
    LanguageAnnotators.INSTANCE.allForLanguage(JavaLanguage.INSTANCE); // pile of annotator classes loads
    LanguageAnnotators.INSTANCE.allForLanguage(StdLanguages.XML);
    ProblemHighlightFilter.EP_NAME.getExtensions();
    Extensions.getExtensions(ImplicitUsageProvider.EP_NAME);
    Extensions.getExtensions(XmlSchemaProvider.EP_NAME);
    Extensions.getExtensions(XmlFileNSInfoProvider.EP_NAME);
    Extensions.getExtensions(ExternalAnnotatorsFilter.EXTENSION_POINT_NAME);
    Extensions.getExtensions(IndexPatternBuilder.EP_NAME);
  }
}