String (@NotNull MavenProject project, @NotNull MavenProjectsTree projectsTree, @NotNull Map<MavenProject, String> moduleNameMap) { String moduleName = moduleNameMap.get(project); if (moduleName != null) return moduleName; moduleName = project.getMavenId().getArtifactId(); if (moduleName == null) { return ""; } if (project.getParentId() != null) { MavenProject parentProject = projectsTree.findProject(project.getParentId()); if (parentProject != null) { String parentName = getModuleName(parentProject, projectsTree, moduleNameMap); if (StringUtil.isNotEmpty(parentName)) { moduleName = parentName + "." + moduleName; } } } moduleNameMap.put(project, moduleName); return moduleName; }