@Override
    public void run() {
      Application app = ApplicationManager.getApplication();
      if (app == null) {
        return;
      }

      try {
        FileBasedIndex fileBasedIndex = app.getServiceIfCreated(FileBasedIndex.class);
        if (fileBasedIndex instanceof FileBasedIndexImpl fileBasedIndexImpl) {
          fileBasedIndexImpl.performShutdown(false, "IDE shutdown");
        }
      }
      finally {
        if (!myTermination && !app.isUnitTestMode()) {
          StorageDiagnosticData.dumpOnShutdown();
        }
      }
    }
@Override
    public void run()