void cleanupTools() {
    myProgressIndicator.cancel();
    for (GlobalInspectionContextExtension<?> extension : myExtensions.values()) {
      extension.cleanup();
    }

    // allow to call cleanupTools() even when initializeTools() wasn't called: suspicious but this is how launchInspections() works - by calling cleanupTools() first
    if (myTools != null) {
      for (Tools tools : myTools.values()) {
        for (ScopeToolState state : tools.getTools()) {
          InspectionToolWrapper<?,?> toolWrapper = state.getTool();
          toolWrapper.cleanup(myProject);
        }
      }
      myTools = null;
    }

    EntryPointsManager entryPointsManager = getProject().isDisposed() ? null : EntryPointsManager.getInstance(getProject());
    if (entryPointsManager != null) {
      entryPointsManager.cleanup();
    }

    if (myRefManager != null) {
      ((RefManagerImpl)myRefManager).cleanup();
      myRefManager = null;
      if (myCurrentScope != null){
        myCurrentScope.invalidate();
        myCurrentScope = null;
      }
    }
    myJobDescriptors.clear();
  }
void cleanupTools()