@SuppressWarnings("deprecation")
  @RequiresEdt
  public static @NotNull ModalityState current() {
    return ApplicationManager.getApplication().getCurrentModalityState();
  }
@SuppressWarnings("deprecation")
  @RequiresEdt
  public static @NotNull ModalityState current()