diff --git a/plugins/devkit/devkit-core/src/navigation/structure/PluginDescriptorStructureUtil.java b/plugins/devkit/devkit-core/src/navigation/structure/PluginDescriptorStructureUtil.java
index eafbda08c543..0e2987f89b68 100644
--- a/plugins/devkit/devkit-core/src/navigation/structure/PluginDescriptorStructureUtil.java
+++ b/plugins/devkit/devkit-core/src/navigation/structure/PluginDescriptorStructureUtil.java
@@ -112,6 +112,9 @@ public class PluginDescriptorStructureUtil {
return null;
}
+ if (element instanceof PluginModule) {
+ return getPluginModuleLocation((PluginModule)element);
+ }
if (element instanceof IdeaVersion) {
return getIdeaVersionLocation((IdeaVersion)element);
}
@@ -152,6 +155,9 @@ public class PluginDescriptorStructureUtil {
return guessTagLocation(element);
}
+ private static String getPluginModuleLocation(PluginModule pluginModule) {
+ return pluginModule.getValue().getStringValue();
+ }
@Nullable
private static String getIdeaVersionLocation(IdeaVersion element) {
diff --git a/plugins/devkit/devkit-java-tests/testData/navigation/structure/plugin.xml b/plugins/devkit/devkit-java-tests/testData/navigation/structure/plugin.xml
index c6616e4eda52..bd397b1ec8d1 100644
--- a/plugins/devkit/devkit-java-tests/testData/navigation/structure/plugin.xml
+++ b/plugins/devkit/devkit-java-tests/testData/navigation/structure/plugin.xml
@@ -19,6 +19,8 @@
com.intellij.javaee
+
+
diff --git a/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/navigation/structure/PluginDescriptorStructureTest.java b/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/navigation/structure/PluginDescriptorStructureTest.java
index 1d2e05674773..0b90393bbd84 100644
--- a/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/navigation/structure/PluginDescriptorStructureTest.java
+++ b/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/navigation/structure/PluginDescriptorStructureTest.java
@@ -50,23 +50,23 @@ public class PluginDescriptorStructureTest extends JavaCodeInsightFixtureTestCas
myFixture.testStructureView(component -> {
TreeElementWrapper root = (TreeElementWrapper)TreeUtil.getUserObject(component.getTree().getModel().getRoot());
TreeElement[] topLevelNodes = root.getValue().getChildren();
- assertSize(13, topLevelNodes);
+ assertSize(14, topLevelNodes);
String[] expectedTopLevelNames = new String[] {"ID", "Name", "Version", "Vendor", "Description", "Change Notes",
- "Depends", "Depends", "IDEA Version", "Extensions", "Extension Points", "Application Components", "Actions"};
+ "Depends", "Depends", "IDEA Version", "Module", "Extensions", "Extension Points", "Application Components", "Actions"};
String[] actualTopLevelNames = Stream.of(topLevelNodes)
.map(treeElement -> treeElement.getPresentation().getPresentableText())
.toArray(String[]::new);
assertArrayEquals(expectedTopLevelNames, actualTopLevelNames);
String[] expectedTopLevelLocations = new String[] {"plugin.id", "MyPlugin", "1.0", "YourCompany", null, null,
- "com.intellij.java-i18n", "com.intellij.javaee [optional]", "125.5 - 130.0", "plugin.id", "plugin.id", null, null};
+ "com.intellij.java-i18n", "com.intellij.javaee [optional]", "125.5 - 130.0", "myModule", "plugin.id", "plugin.id", null, null};
String[] actualTopLevelLocations = Stream.of(topLevelNodes)
.map(treeElement -> treeElement.getPresentation().getLocationString())
.toArray(String[]::new);
assertArrayEquals(expectedTopLevelLocations, actualTopLevelLocations);
- TreeElement[] extensionNodes = topLevelNodes[9].getChildren();
+ TreeElement[] extensionNodes = topLevelNodes[10].getChildren();
assertSize(5, extensionNodes);
String[] expectedExtensionNames = new String[] {"Tool Window", "Project Configurable", "File Editor Provider",
"Mock Application Service", "DOM | Extender"};
@@ -82,7 +82,7 @@ public class PluginDescriptorStructureTest extends JavaCodeInsightFixtureTestCas
.toArray(String[]::new);
assertArrayEquals(expectedExtensionLocations, actualExtensionLocations);
- TreeElement[] epNodes = topLevelNodes[10].getChildren();
+ TreeElement[] epNodes = topLevelNodes[11].getChildren();
assertSize(6, epNodes);
String[] expectedEpNames = new String[] {"someExtensionPoint", "toolWindow", "projectConfigurable", "fileEditorProvider",
@@ -99,7 +99,7 @@ public class PluginDescriptorStructureTest extends JavaCodeInsightFixtureTestCas
.toArray(String[]::new);
assertArrayEquals(expectedEpLocations, actualEpLocations);
- TreeElement applicationComponentNode = assertOneElement(topLevelNodes[11].getChildren());
+ TreeElement applicationComponentNode = assertOneElement(topLevelNodes[12].getChildren());
assertEquals("Component", applicationComponentNode.getPresentation().getPresentableText());
assertEquals("SomeApplicationComponentImplementation", applicationComponentNode.getPresentation().getLocationString());
@@ -111,7 +111,7 @@ public class PluginDescriptorStructureTest extends JavaCodeInsightFixtureTestCas
assertEquals("Implementation Class", implementationClass.getPresentation().getPresentableText());
assertEquals("com.jetbrains.test.SomeApplicationComponentImplementation", implementationClass.getPresentation().getLocationString());
- TreeElement[] actionNodes = topLevelNodes[12].getChildren();
+ TreeElement[] actionNodes = topLevelNodes[13].getChildren();
assertSize(2, actionNodes);
TreeElement groupNode = actionNodes[0];
assertEquals("Group", groupNode.getPresentation().getPresentableText());