private static @NotNull BooleanRunnable handleCommitWithoutPsi(@NotNull CommitTask task,
                                                                 @NotNull PsiDocumentManagerBase documentManager) {
    return () -> {
      if (!task.isStillValid() || documentManager.getCachedViewProvider(task.document) != null) {
        return false;
      }

      documentManager.handleCommitWithoutPsi(task.document);
      return true;
    };
  }
private static @NotNull BooleanRunnable handleCommitWithoutPsi(@NotNull CommitTask task,
                                                                 @NotNull PsiDocumentManagerBase documentManager)