void () { ApplicationManager.getApplication().invokeAndWait(() -> { StoreReloadManager.Companion.getInstance(myProject).blockReloadingProjectOnExternalChanges(); FileDocumentManager.getInstance().saveAllDocuments(); SaveAndSyncHandler saveAndSyncHandler = SaveAndSyncHandler.getInstance(); saveAndSyncHandler.blockSaveOnFrameDeactivation(); saveAndSyncHandler.blockSyncOnFrameActivation(); }); }