Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #547598 +++ The ELK algorithm configuration maybe not enough to layout correctly some diagrams. Sometimes semantic aspects could be considered. For this, I think that it will be a good idea to allow specifier to made changes before the layout and before applying the changes. Currently the code in org.eclipse.sirius.diagram.elk.ELKLayoutNodeProvider.layoutEditParts(List, IAdaptable) is LayoutMapping layoutMapping = connector.buildLayoutGraph(diagramEditPart, selectedObjects); connector.layout(layoutMapping); connector.transferLayout(layoutMapping); return connector.getApplyCommand(layoutMapping); Maybe we can add new methods in the connector. For example LayoutMapping layoutMapping = connector.buildLayoutGraph(diagramEditPart, selectedObjects); connector.preLayout(layoutMapping); connector.layout(layoutMapping); connector.preTransferLayout(layoutMapping); connector.transferLayout(layoutMapping); connector.postTransferLayout(layoutMapping); return connector.getApplyCommand(layoutMapping); And these methods should call an extension point implemented by the specifier.
New Gerrit change created: https://git.eclipse.org/r/148204
Gerrit change https://git.eclipse.org/r/148204 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ee761f5c4f768f0c7e3946938cc8500c9556aea9
To validate, use the scenario of cloned bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=547598#c8
Validated with steps to reproduce from https://bugs.eclipse.org/bugs/show_bug.cgi?id=547598#c8 (but with an additional step to disable the "snap to..." feature). Validated on a ODCE 11.3.0 "it2".
Available in Sirius 6.3.0, see https://wiki.eclipse.org/Sirius/6.3.0