@Override
      public void runTask() {
        if (shouldSaveDocuments()) {
          ApplicationManager.getApplication().invokeAndWait(
            () -> ((FileDocumentManagerImpl)FileDocumentManager.getInstance()).saveAllDocuments(false)
          );
        }
      }
@Override
      public void runTask()