public static boolean patchJavaCommandLineParamsUnderProgress(@NotNull Project project,
                                                                ThrowableRunnable<? extends ExecutionException> patch) throws ExecutionException {
    AtomicReference<ExecutionException> ex = new AtomicReference<>();
    if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> {
      try {
        patch.run();
      }
      catch (ProcessCanceledException ignore) {}
      catch (ExecutionException e) {
        ex.set(e);
      }
    }, ExecutionBundle.message("progress.title.patch.java.command.line.parameters"), true, project)) {
      return false;
    }
    if (ex.get() != null) throw ex.get();
    return true;
  }
public static boolean patchJavaCommandLineParamsUnderProgress(@NotNull Project project,
                                                                ThrowableRunnable<? extends ExecutionException> patch)