|
|
|
Re: ELK nodes [message #1807128 is a reply to message #1807104] |
Thu, 23 May 2019 09:05 |
Pierre Guilet Messages: 250 Registered: June 2017 |
Senior Member |
|
|
Hi Pedro,
If I understand well you should have a LayoutMapping as entry point of your custom layouting.
In this element you can access the graph map by using mapping.getGraphMap()
that will be of real type BiMap<ElkGraphElement, IGraphicalEditPart>.
So for each ELK element you have its associated edit part. You will have to cast it because the map is of type BiMap<ElkGraphElement, Object> when you have it.
First use the mapping to retrieve the edit part.
Then from graphical edit part you have to do the following to retrieve the semantic element behind: ((DDiagramElement)((View)editPart.getModel()).getElement()).getTarget()
Regards,
Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
[Updated on: Thu, 23 May 2019 09:06] Report message to a moderator
|
|
|
|
|
|
|
Re: ELK nodes [message #1808306 is a reply to message #1808113] |
Fri, 21 June 2019 09:35 |
Pierre Guilet Messages: 250 Registered: June 2017 |
Senior Member |
|
|
Hi,
I am a little bit confused with what you want.
Layouting is a very complex matter.
You have two solutions:
- Either you use current algorithms available in Sirius and play with available options in odesign by following the documentation to get the optimum result you can have. But its unlikely you will have the perfect result you want.
However there is currently a bug and algorithm options are only applied on top node so their effects are very limited. The bug will be fixed in next version: https://bugs.eclipse.org/bugs/show_bug.cgi?id=547306#
- Or you provide you own layout algorithm to ELK and use it in Sirius odesign. That what I thought you were doing but you currently cannot access semantic element. So you are stuck for now.
Regards,
Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.05150 seconds