|Rearranging shapes according to EMF model [message #1731465]
||Thu, 05 May 2016 15:51
| Alex Kravets
Registered: November 2009
In EMF model I have three elements defined:|
Order of elements matters and so in the XMI these elements are entered in the order defined in the model. However, when I add these elements in Graphiti editor, I use my own ILayoutFeature to position these elements as well as resize containers of these elements and so these Shapes are added to the bottom of the element list, for example, E2, E1, E3 or E3,E1,E2 - like a reverse queue.
I need to keep the order of the elements as defined in the model in Graphiti editor as well. I wanted to check if I am missing something obvious, a helper class perhaps that would allow me to "sync" Graphiti model with EMF model, before I write my own code.
If I need to write my own logic, the idea is to layout all elements (E1, E2, E3) when one is added and change elements' y-coordinate as needed. But key question is how do I know the order at which elements are inserted, how do I know that it's E1, E2, E3? Looks like EMF TreeViewer knows this and inserts model elements at their needed positions.
Powered by FUDForum
. Page generated in 0.02123 seconds