void () { 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(); } } }