void (@NotNull Runnable command, @Nullable ModalityState modalityState, @NotNull Project project) { if (modalityState == null) modalityState = ModalityState.defaultModalityState(); ModalityUiUtil.invokeLaterIfNeeded(modalityState, project.getDisposed(), command); }