Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Trigger 'Arrange All' (Trigger 'Arrange All' )
Trigger 'Arrange All' [message #1834378] Mon, 09 November 2020 11:45 Go to next message
Alexandra Tritean is currently offline Alexandra TriteanFriend
Messages: 37
Registered: March 2020

Is there a way in which 'Arrange All' can be automatically triggered after activating a layer/using a filter?

Thank you!

Kind Regards,

Re: Trigger 'Arrange All' [message #1834460 is a reply to message #1834378] Tue, 10 November 2020 16:51 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member

You can perform an arrange all by sending an arrange request by using diagramEditPart.performRequest(arrangeRequest). See for instance.
To perform this action after layer activation, I suggest you to register a ResourceSetListenerImpl as a post commit listener on the Sirius session editing domain ( . You can filter notifications concerning the layer activation.

Best regards,

Re: Trigger 'Arrange All' [message #1836659 is a reply to message #1834460] Mon, 11 January 2021 13:13 Go to previous messageGo to next message
Razvan Prisca is currently offline Razvan PriscaFriend
Messages: 2
Registered: January 2021
Junior Member
Hi Florian,

I have a question related with your suggestion to filter notifications concerning the layer activation. I was able to create a custom NotificationFilter, something like:

public NotificationFilter getFilter() {
NotificationFilter filter = new NotificationFilter.Custom() {
public boolean matches(Notification notification) {
Object oldValue = notification.getOldValue();
Object newValue = notification.getNewValue();
if(oldValue instanceof AdditionalLayerSpec || newValue instanceof AdditionalLayerSpec) {
return true;
return false;
return filter;

The problem is that, when I return the filter and I am going to trigger arrange all, I am getting the current elements from the editor, not the elements after the layer activation. Is there a way to get the notification after the layer changed the diagram? So, not to trigger the arrange all with the current diagram elements, but, with the elements after the layer activation?

Kind Regards,
Re: Trigger 'Arrange All' [message #1839052 is a reply to message #1836659] Thu, 11 March 2021 23:18 Go to previous message
waqas junaid is currently offline waqas junaidFriend
Messages: 3
Registered: March 2021
Junior Member
Hi Florian Barbin
I have made mine eclipse Sirius project and install the ELK for it to make auto layout of it.
But we I click on the arrange all button nothing is happening.
Previous Topic:Reused sub-node mapping elements in a container import disappear when layer is deactivated
Next Topic:How do I get this ELK layout in Sirius?
Goto Forum:

Current Time: Mon Oct 03 21:41:51 GMT 2022

Powered by FUDForum. Page generated in 0.03110 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top