private void saveAndBlockInAwt() {
    ApplicationManager.getApplication().invokeAndWait(() -> {
      StoreReloadManager.Companion.getInstance(myProject).blockReloadingProjectOnExternalChanges();
      FileDocumentManager.getInstance().saveAllDocuments();

      SaveAndSyncHandler saveAndSyncHandler = SaveAndSyncHandler.getInstance();
      saveAndSyncHandler.blockSaveOnFrameDeactivation();
      saveAndSyncHandler.blockSyncOnFrameActivation();
    });
  }
private void saveAndBlockInAwt()