IDEA-219117 Project with old grouping settings doesn't show all modules gradle tool window

GitOrigin-RevId: 494fbac9436f0ef39dc5df08c0f3b1e03bbe9b36
This commit is contained in:
alexey.afanasiev
2019-08-28 07:42:12 +00:00
committed by intellij-monorepo-bot
parent f0ecabf47e
commit a367440722
2 changed files with 7 additions and 5 deletions
@@ -106,7 +106,7 @@ public class ModuleNode extends ExternalSystemNode<ModuleData> {
}
ProjectNode parentProject = findParent(ProjectNode.class);
if (parentProject != null) {
return StringUtil.equals(parentProject.getIdeGrouping(), getIdeParentGrouping());
return StringUtil.equals(parentProject.getName(), getIdeParentGrouping());
}
}
return super.isVisible();
@@ -233,12 +233,14 @@ public class BaseGradleProjectResolverExtension implements GradleProjectResolver
@NotNull
protected String[] getIdeModuleGroup(String moduleName, IdeaModule gradleModule) {
String[] moduleGroup;
final String gradlePath = gradleModule.getGradleProject().getPath();
final String rootName = gradleModule.getProject().getName();
final boolean isRootModule = StringUtil.isEmpty(gradlePath) || ":".equals(gradlePath);
moduleGroup = isRootModule ? new String[]{moduleName} : (rootName + gradlePath).split(":");
return moduleGroup;
if (StringUtil.isEmpty(gradlePath) || ":".equals(gradlePath)) {
return rootName.equals(moduleName) ? new String[]{moduleName} : new String[]{rootName, moduleName};
}
else {
return (rootName + gradlePath).split(":");
}
}
@Nullable