void (@Nullable Project project) { if (project != null) { DumbService.getInstance(project).waitForSmartMode(); } else { for (Project openProject : ProjectManager.getInstance().getOpenProjects()) { DumbService.getInstance(openProject).waitForSmartMode(); } } }