public static void swingInvokeLater(@Nullable final Project project, @NotNull final Runnable runnable) {
    if (project == null) {
      return;
    }

    SwingUtilities.invokeLater(() -> {
      if (!project.isDisposed()) {
        ReadAction.run(() -> runnable.run());
      }
    });
  }
public static void swingInvokeLater(@Nullable final Project project, @NotNull final Runnable runnable)