Bug 303293 - New layout for the diagram
Summary: New layout for the diagram
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.2   Edit
Hardware: PC Windows 7
: P3 enhancement
Target Milestone: ---   Edit
Assignee: Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-19 06:26 EST by Marc CLA
Modified: 2010-07-19 12:29 EDT (History)
2 users (show)

See Also:


Attachments
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 (10.60 KB, application/zip)
2010-02-19 06:26 EST, Marc CLA
no flags Details
An image of the diagram before the arrangement (172.44 KB, image/jpeg)
2010-02-19 14:35 EST, Marc CLA
no flags Details
An image of the diagram before the arrangement (164.38 KB, image/jpeg)
2010-02-19 14:36 EST, Marc CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc CLA 2010-02-19 06:26:25 EST
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.
Comment 1 Mariot Chauvin CLA 2010-02-19 07:16:08 EST
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
Comment 2 Marc CLA 2010-02-19 14:34:32 EST
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
Comment 3 Marc CLA 2010-02-19 14:35:54 EST
Created attachment 159607 [details]
An image of the diagram before the arrangement
Comment 4 Marc CLA 2010-02-19 14:36:49 EST
Created attachment 159608 [details]
An image of the diagram before the arrangement
Comment 5 Eclipse Webmaster CLA 2010-07-19 12:29:41 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug