public static @NotNull ModalityState stateForComponent(@NotNull Component component) {
    return ApplicationManager.getApplication().getModalityStateForComponent(component);
  }
public static @NotNull ModalityState stateForComponent(@NotNull Component component)