Logical view: how to add a node or customize the project node?

I would like to add an additional node to the logical view, like ‘Modules Pool’ but containing some modules of my own, can I do that? How?

Also, is it possible to add additional nodes within the project node? E.g. add ‘links’ to related modules for a module?

MPS does not provide any DSL for modifying Project View, instead the standard extension point of IJPL treeStructureProvider should be used.

The class com.intellij.ide.projectView.TreeStructureProvider is used to modify the list of children shown for a node in the Project View, allowing you to filter, group, or insert new nodes.

All classes comprising MPS’s Project View are defined in jetbrains.mps.ide.projectPane.logicalview package and inherit LogicalProjectViewNode class. The class TopHierarchyProjectViewNode.TopProjectViewNode corresponds to the top project node.

To change the appearance (icon, color, or text attributes) of an existing node without changing the structure, you should use the separate projectViewNodeDecorator extension point, which is simpler for presentation-only changes.

The official guide for implementing Project View structural modifications, including registration in plugin.xml and code examples, is:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.