public static @NotNull ModalityStateEx getCurrentModalityState() {
    ThreadingAssertions.assertEventDispatchThread();
    synchronized (ourModalityStack) {
      return ourModalityStack.peek();
    }
  }
public static @NotNull ModalityStateEx getCurrentModalityState()