public MPSFileBasedIndexProjectHandler(
      final Project project,
      final ProjectRootManagerEx rootManager,
      ProjectManager projectManager,
      FileBasedIndex index,
      StartupModuleMaker maker) {
    super(project);
    myRootManager = rootManager;
    myProjectManager = projectManager;
    myIndex = index;

    final MPSUnindexedFilesUpdater updater = new MPSUnindexedFilesUpdater(myIndex, myRootManager);

    final StartupManagerEx startupManager =
        (StartupManagerEx) StartupManager.getInstance(myProject);
    if (startupManager == null) return;

    startupManager.registerPreStartupActivity(
        new Runnable() {
          public void run() {
            startupManager.registerCacheUpdater(updater);
            myIndex.registerIndexableSet(MPSFileBasedIndexProjectHandler.this, myProject);
            DumbServiceImpl.getInstance(myProject)
                .queueCacheUpdate(Collections.<CacheUpdater>singletonList(updater));
          }
        });
  }
  public void updateBreakpointsUI() {
    if (myProject.isDefault()) return;

    Runnable runnable =
        new DumbAwareRunnable() {
          @Override
          public void run() {
            for (XLineBreakpointImpl breakpoint : myBreakpoints.keySet()) {
              breakpoint.updateUI();
            }
          }
        };

    if (ApplicationManager.getApplication().isUnitTestMode()
        || myStartupManager.startupActivityPassed()) {
      runnable.run();
    } else {
      myStartupManager.registerPostStartupActivity(runnable);
    }
  }
  @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);
    }
  }