|
Re: Arrange all [message #1794024 is a reply to message #1794009] |
Wed, 22 August 2018 14:47 |
|
Hello,
Why do you want to do that? You should be able to do it by calling the LayoutProvider like this LayoutService.getProvider(diagramEditPart).getLayoutNodeProvider(diagramEditPart).layoutEditParts(diagramEditPart, layoutHint) but I don't think it would be recommanded from a Service.
Regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Arrange all [message #1794090 is a reply to message #1794087] |
Thu, 23 August 2018 11:59 |
|
My bad, LayoutService is not API.
You need to direcly perform an ArrangeRequest on the DiagramEditPart as follows:
ArrangeRequest arrangeRequest = new ArrangeRequest(ActionIds.ACTION_ARRANGE_ALL);
arrangeRequest.setPartsToArrange(Collections.singletonList(editorPart));
editorPart.getDiagramEditPart().performRequest(arrangeRequest);
But once again, why do you want to execute an arrange All from a service? What is your scenario?
Regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Arrange all [message #1794135 is a reply to message #1794127] |
Fri, 24 August 2018 08:36 |
|
Ok I see your point. What I fear is that you may end up in a situation where the user has to look for elements that keeps moving around . Imagine a scenario where he creates a new instance. The service launches the arrange all resulting in the user having to look around where the new instance has gone. It may even be out of the viewport (the area of the diagram that is currently visible if the diagram is big enough to not be entirely visible at once without zooming out), forcing the user to scroll in order to find it. Furthermore, depending on how the processes are connected between each other, the automatic arrange all may "shuffle" the elements each time you work on a new instance.
It may be easier to have different styles (imagine a border with a different color) if a process is evaluated as "new", "under work", "completed"...
Regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04543 seconds