public void checkModulesNames(ProjectStructureProblemsHolder problemsHolder) {
    final ModifiableModuleModel moduleModel = myContext.getModulesConfigurator().getModuleModel();
    final Module[] all = moduleModel.getModules();
    if (!ArrayUtil.contains(myModule, all)) {
      return;//module has been deleted
    }

    String myContextRealName = myContext.getRealName(myModule);
    for (Module each : all) {
      if (each != myModule && myContext.getRealName(each).equals(myContextRealName)) {
        problemsHolder.registerProblem(JavaUiBundle.message("project.roots.module.duplicate.name.message"), null,
                                       ProjectStructureProblemType.error("duplicate-module-name"), createPlace(),
                                       null);
        break;
      }
    }
  }
public void checkModulesNames(ProjectStructureProblemsHolder problemsHolder)