Community
Participate
Working Groups
I need a behavior for arrange of a diagram synchronously. Today Sirius can arrange diagram asynchronously with “org.eclipse.sirius.diagram.ui.internal.refresh.layout.SiriusCanonicalLayoutHandler.launchArrangeCommand(DiagramEditPart)“ method. This method use “Display.asyncExec” to launch arrange. In my case, I need to refresh my diagram, arrange it like when I open the diagram but without open it and after I need do some thing else with arranged diagram. This is impossible with Sirius arrange diagram API today because arrange is done after my action because of asynchronous method.
Do you remember in which called method there is this Display.asyncExec as it is not directly in SiriusCanonicalLayoutHandler.launchArrangeCommand?
The method contains “Display.asyncExec” is org.eclipse.sirius.diagram.ui.internal.refresh.layout.SiriusCanonicalLayoutCommand.doExecute()
Thanks for your detailed enhancement submit. We have currently not planned to work on it in the following releases. For information: * Referenced classes in your comment are currently not API. * The asyncExec is probably here for potentiel problem with DeferredLayoutCommand (org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand). I'm not sure we can simply call a syncExec. This needs investigation...
The same issue was reported (see Bugzilla 513145) with a diagram and an Xtext Editor. A fix has been pushed to gerrit. Once integrated, this bugzilla should be closed as duplicate.