void () { for (MavenProject each : myAllProjects) { Module module = myFileToModuleMapping.get(each.getFile()); if (module != null) { myMavenProjectToModule.put(each, module); } } Map<VirtualFile, String> existingMavenProjectToModuleName = new HashMap<>(); for (var projectToModule : myMavenProjectToModule.entrySet()) { var module = projectToModule.getValue(); if (null != module) { existingMavenProjectToModuleName.put(projectToModule.getKey().getFile(), module.getName()); } } myMavenProjectToModuleName.putAll(MavenModuleNameMapper.mapModuleNames(myAllProjects, existingMavenProjectToModuleName)); MavenModulePathMapper.resolveModulePaths(myAllProjects, myMavenProjectToModule, myMavenProjectToModuleName, myMavenProjectToModulePath, myImportingSettings.getDedicatedModuleDir()); }