@RequiresEdt
  public void executeAndTryWait(@NotNull Function<? super ProgressIndicator, ? extends Runnable> backgroundTask,
                                @Nullable Runnable onSlowAction,
                                long waitMillis) {
    executeAndTryWait(backgroundTask, onSlowAction, waitMillis, false);
  }
@RequiresEdt
  public void executeAndTryWait(@NotNull Function<? super ProgressIndicator, ? extends Runnable> backgroundTask,
                                @Nullable Runnable onSlowAction,
                                long waitMillis)