public static boolean isIntelliJPlatformProject(@Nullable Project project) {
    if (project == null) {
      return false;
    }

    Boolean flag = project.getUserData(IDEA_PROJECT);
    if (flag == null) {
      flag = false;
      ModuleManager moduleManager = ModuleManager.getInstance(project);
      for (String moduleName : IDEA_PROJECT_MARKER_MODULE_NAMES) {
        if (moduleManager.findModuleByName(moduleName) != null) {
          flag = true;
          break;
        }
      }
      project.putUserData(IDEA_PROJECT, flag);
    }

    return flag;
  }
public static boolean isIntelliJPlatformProject(@Nullable Project project)