Bug 507026 - Need synchronous support of arrange diagram API
Summary: Need synchronous support of arrange diagram API
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on: 513145
Blocks:
  Show dependency tree
 
Reported: 2016-11-04 06:19 EDT by Olivier Haegi CLA
Modified: 2017-04-10 10:44 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Haegi CLA 2016-11-04 06:19:54 EDT
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.
Comment 1 Steve Monnier CLA 2016-11-04 11:04:59 EDT
Do you remember in which called method there is this Display.asyncExec as it is not directly in SiriusCanonicalLayoutHandler.launchArrangeCommand?
Comment 2 Olivier Haegi CLA 2016-11-04 11:22:05 EDT
The method contains “Display.asyncExec” is org.eclipse.sirius.diagram.ui.internal.refresh.layout.SiriusCanonicalLayoutCommand.doExecute()
Comment 3 Laurent Redor CLA 2016-11-08 04:06:11 EST
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...
Comment 4 Steve Monnier CLA 2017-04-10 10:44:23 EDT
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.