void (ProjectStructureProblemsHolder problemsHolder) { final ModifiableModuleModel moduleModel = myContext.getModulesConfigurator().getModuleModel(); final Module[] all = moduleModel.getModules(); if (!ArrayUtil.contains(myModule, all)) { return;//module has been deleted } for (Module each : all) { if (each != myModule && myContext.getRealName(each).equals(myContext.getRealName(myModule))) { problemsHolder.registerProblem(JavaUiBundle.message("project.roots.module.duplicate.name.message"), null, ProjectStructureProblemType.error("duplicate-module-name"), createPlace(), null); break; } } }