private static <T> T computeSlowOperationsSafeInBgThread(@NotNull Project project,
                                                           @NlsContexts.DialogTitle @NotNull String progressDialogTitle,
                                                           @NotNull Callable<T> callable) {

    return ProgressManager.getInstance().run(new Task.WithResult<>(project, progressDialogTitle, true) {
      @Override
      protected T compute(@NotNull ProgressIndicator indicator) throws RuntimeException {
        return ReadAction.nonBlocking(callable).executeSynchronously();
      }
    });
  }
private static <T> T computeSlowOperationsSafeInBgThread(@NotNull Project project,
                                                           @NlsContexts.DialogTitle @NotNull String progressDialogTitle,
                                                           @NotNull Callable<T> callable)