Collection<IdeaModule> (ProjectImportAction.AllModels allModels, DefaultProjectResolverContext resolverCtx, DataNode<ProjectData> projectDataNode) { if (resolverCtx.getSettings() != null && !resolverCtx.getSettings().getExecutionWorkspace().getBuildParticipants().isEmpty()) { return Collections.emptyList(); } CompositeBuildData compositeBuildData; List<IdeaModule> gradleIncludedModules = new SmartList<>(); List<Build> includedBuilds = allModels.getIncludedBuilds(); if (!includedBuilds.isEmpty()) { ProjectData projectData = projectDataNode.getData(); compositeBuildData = new CompositeBuildData(projectData.getLinkedExternalProjectPath()); for (Build build : includedBuilds) { if (!build.getProjects().isEmpty()) { IdeaProject ideaProject = allModels.getModel(build, IdeaProject.class); if (ideaProject != null) { gradleIncludedModules.addAll(ideaProject.getModules()); } String rootProjectName = build.getName(); BuildParticipant buildParticipant = new BuildParticipant(); String projectPath = toCanonicalPath(build.getBuildIdentifier().getRootDir().getPath()); String parentPath = build.getParentBuildIdentifier() != null ? toCanonicalPath(build.getParentBuildIdentifier().getRootDir().getPath()) : null; buildParticipant.setRootProjectName(rootProjectName); buildParticipant.setRootPath(projectPath); buildParticipant.setParentRootPath(parentPath); if (ideaProject != null) { for (IdeaModule module : ideaProject.getModules()) { String modulePath = toCanonicalPath(module.getGradleProject().getProjectDirectory().getPath()); buildParticipant.getProjects().add(modulePath); } } compositeBuildData.getCompositeParticipants().add(buildParticipant); } } projectDataNode.createChild(CompositeBuildData.KEY, compositeBuildData); } return gradleIncludedModules; }