|
Re: How to reuse the same layout provider recursively on a diagram [message #1766241 is a reply to message #1766017] |
Mon, 19 June 2017 08:26 |
|
Hi,
There is no direct support for this, but if your algorithm is invoked from the diagram's root edit, you should be able to walk inside the diagram's recursive structure by yourself and invoke your algorithm on each relevant container.
You'll need to use EditPart.getChildren() to walk inside the structure. Sirius EditParts are all instances of org.eclipse.sirius.diagram.ui.edit.api.part.IDiagramElementEditPart, from which you can easily obtain the underlying semantic element (resolveTargetSemanticElement) and the Sirius graphical element (resolveDiagramElement). From a DDiagramElement, getMapping() will tell you what kind of element it corresponds to in your VSM. From all this you should be able to determine on which edit parts your algorithm should be invoked.
Regards,
Pierre-Charles David
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.02883 seconds