Community
Participate
Working Groups
Created attachment 159535 [details] This file contains the layout provider, the action, the editPolicy that should be modified to support this behavior, the classes used in the layout and the plugin.xml with the necessary extensions I have implemented a new layout to relocate and resize all the nodes placed in a diagram, in order to improve the legibility of the diagram. This layout, uses a tree structure to know the nodes to be changed their position/size, and resizes them to the minimum size that lets to show the contents property without showing the scroll of the compartments. If a node hasn't children, its size hasn't been modified. Once calculated all the sizes, the layout relocate the nodes next to each other horizontally by default. I plan to change this behavior by customizing the arrangement: horizontally, vertically, x nº of columns, x nº of rows... I allow to execute this arrange with an action in the diagram contextual menu. I attach the necessary files to execute this layout. Don't hesitate to ask me about any questions about the implementation. I think this arrangement should be useful.
Hi Marc, Thanks for the contribution. Please see this bug 260828 which is quite a similar contribution with the arrangement features you plan to implement. Could you provide screenshots to see how you layout behaves ? Regards, Mariot
Hello Mariot! I see your screenshots in the other bug, and I think there exists a little difference between each layouts. It seems you only take in count the nodes placed in the top level, not the children. Perhaps I'm wrong... As you can see in the screenshots I have attached now, my layout resizes all the Nodes while they havn't children. If a Node hasn't any children, it hasn't be resized, but it's relocated into their parent in order to take up the minor space as possible. Thanks!!! Marc
Created attachment 159607 [details] An image of the diagram before the arrangement
Created attachment 159608 [details] An image of the diagram before the arrangement
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug