DataNode<ProjectData> (@NotNull ProjectSystemId systemId, @NotNull ExternalProjectPojo rootProject, @NotNull Collection<? extends ExternalProjectPojo> childProjects) { ProjectData projectData = new ProjectData(systemId, rootProject.getName(), rootProject.getPath(), rootProject.getPath()); DataNode<ProjectData> projectDataNode = new DataNode<>(PROJECT, projectData, null); for (ExternalProjectPojo childProject : childProjects) { String moduleConfigPath = childProject.getPath(); ModuleData moduleData = new ModuleData(childProject.getName(), systemId, ModuleTypeId.JAVA_MODULE, childProject.getName(), moduleConfigPath, moduleConfigPath); projectDataNode.createChild(MODULE, moduleData); } return projectDataNode; }