private void doPerformInDumbMode(@NotNull ProgressIndicator indicator) {
    myIndex.loadIndexes(); // make sure that indexes are loaded, because we can get here without scanning (e.g., from VFS refresh)
    if (!IndexInfrastructure.hasIndices()) {
      return;
    }
    ProjectDumbIndexingHistoryImpl projectDumbIndexingHistory = new ProjectDumbIndexingHistoryImpl(myProject);
    IndexDiagnosticDumper.getInstance().onDumbIndexingStarted(projectDumbIndexingHistory);
    ScanningRequestToken token = myProject.getService(ProjectIndexingDependenciesService.class).newScanningToken();
    trackSuspends(ProgressSuspender.getSuspender(indicator), this,
                  () -> projectDumbIndexingHistory.suspendStages(Instant.now()),
                  () -> projectDumbIndexingHistory.stopSuspendingStages(Instant.now()));

    try {
      ((GistManagerImpl)GistManager.getInstance()).
        runWithMergingDependentCacheInvalidations(() -> indexFiles(projectDumbIndexingHistory, indicator));
    }
    catch (Throwable e) {
      token.markUnsuccessful();
      projectDumbIndexingHistory.setWasInterrupted();
      if (e instanceof ControlFlowException) {
        LOG.info("Cancelled indexing of " + myProject.getName());
      }
      throw e;
    }
    finally {
      IndexDiagnosticDumper.getInstance().onDumbIndexingFinished(projectDumbIndexingHistory);
      ProjectIndexingDependenciesService service = myProject.getServiceIfCreated(ProjectIndexingDependenciesService.class);
      if (service != null) {
        service.completeToken(token, false);
      }
    }
  }
private void doPerformInDumbMode(@NotNull ProgressIndicator indicator)