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