void (@NotNull Runnable command, @Nullable ModalityState modalityState) { if (modalityState == null) modalityState = ModalityState.defaultModalityState(); ApplicationManager.getApplication().invokeAndWait(command, modalityState); }