static void invokeAndWait(@NotNull Runnable runnable, ModalityState modalityState) {
    try {
      submit(runnable, modalityState).get();
    }
    catch (InterruptedException ignore) {
    }
    catch (ExecutionException e) {
      ExceptionUtil.rethrowUnchecked(e.getCause());
    }
  }
static void invokeAndWait(@NotNull Runnable runnable, ModalityState modalityState)