Creating a sub root node for root node in the tree viewer
Hi,
Is there any way to add a root node from another root node in the tree viewer .I have a requirement of adding a root node under another root node
I have root node called 'package' and I want to add set of root nodes ('Class') under the package from the Tree Viewer.
For example if I right click on Model ,I can add a new root node 'Package' and by right clicking on the 'Package' ,I can add number of 'Class' root nodes under the Package Node .
Is there any way to add a root node from another root node in the tree viewer .I have a requirement of adding a root node under another root node
I have root node called 'package' and I want to add set of root nodes ('Class') under the package from the Tree Viewer.
For example if I right click on Model ,I can add a new root node 'Package' and by right clicking on the 'Package' ,I can add number of 'Class' root nodes under the Package Node .
Please sign in to leave a comment.
For scenarios like the one you describe with packages grouping classes, MPS provides virtual packages. Maybe they could help you resolve your issue?
In order to handle right-clicking on a node, you'll need to create your own Action and ActionGroup and hook it into the NodeActions action group. As an example for inspiration, you may take the "TextPreviewGroup".
The documentation is to be found at https://confluence.jetbrains.com/display/MPSD32/Plugin
Additionally, you perhaps need to change the settings of the Project View panel by enabling "Show node structure" in order to see the child nodes in the tree viewer.