Layout nodes in container in tree programmatically [message #1724316] |
Tue, 23 February 2016 04:58 |
Nguyen Xuan Nhan Messages: 11 Registered: February 2016 |
Junior Member |
|
|
Hi all,
+ I'm new in Sirius. I want to arrange elements in diagram in tree layout, programmatically.
In my sample project, I have some nodes. Connection between nodes from bordered node to other border node. Please, see the figure 1 .
When User click sample button e.g arrange button, nodes will be arranged in tree layout as figure 2 .
+ I've tried some methods but I still stuck to resolve my problem
Method 1:
Using Ordered Tree Layout by Sirius, add Ordered Tree Layout to VSM file.
In my understand, these nodes in diagram cannot be layout in tree layout because of connection between nodes is from bordered node to bordered node. Ordered Tree Layout algorithm find children to layout based on edge connection between nodes.
Other disadvantage, I want to arrange nodes, programmatically, this method may not suitable.
link: https://github.com/mbats/sirius-blog/blob/master/tree-layout/blog/Tree_Layout.textile
Method 2:
Using extension layout provider. Based on tutorial from below link, by using GridLayoutProvider, all nodes are arranged in 1 column only. At least, I want to arrange nodes in multiple rows and columns
link: https://www.eclipse.org/sirius/doc/developer/extensions-provide_custom-arrange-all.html
+ As my understand, to make new algorithm to arrange nodes is very difficult task. Do you have any suggestion to resolve my problem?
Thank you very much
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03684 seconds