private static @NotNull Future<Void> submit(@NotNull Runnable runnable, ModalityState modalityState) {
    return submit(() -> {
      runnable.run();
      return null;
    }, modalityState);
  }
private static @NotNull Future<Void> submit(@NotNull Runnable runnable, ModalityState modalityState)