void (@NotNull Runnable runnable) { if (project.isDefault()) { return; } StartupManagerEx.getInstanceEx(project).runAfterOpened(() -> { ModalityUiUtil.invokeLaterIfNeeded(ModalityState.defaultModalityState(), project.getDisposed(), runnable); }); }