Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to disable the auto triggered arrange action after a new semantic is added to the model?
How to disable the auto triggered arrange action after a new semantic is added to the model? [message #1835140] Wed, 25 November 2020 13:28 Go to next message
Yufei Zhou is currently offline Yufei ZhouFriend
Messages: 44
Registered: March 2020
Member
Hi,

I found that when I use java service to add a new semantic element into the model, for example:
FuncUnit unit = MetamodelFactory.eINSTANCE.createFuncUnit();
chip.getFuncUnits().add(unit); // chip is a semantic element already in the model, which holds a bunch of function units

after the service is called, an arrange action will be triggered automatically, due to the executeLayoutDueToExternalChanges() in SiriusCanonicalLayoutCommand. I'm working on create a semantic by java service and set its location and size by directly change its basis gmf node, but the auto triggered arrange action ruins my previous steps of setting the gmf node's location and size.

So is there any way to prevent the arrange action from auto trigger? I cannot use SiriusLayoutDataManager because besides location and size I also had to set its style and other graphical informations. Just need a hint about how to disable the auto arrange from SiriusCanonicalLayoutCommand. Any advice helps a lot.

Thanks.
Yufei Zhou
Re: How to disable the auto triggered arrange action after a new semantic is added to the model? [message #1835218 is a reply to message #1835140] Fri, 27 November 2020 10:37 Go to previous messageGo to next message
Nicolas Vannier is currently offline Nicolas VannierFriend
Messages: 4
Registered: April 2020
Junior Member
Hi,

Maybe you can add a fixed layout to the diagram or even a custom layout if nothing else works, I believe that there shouldn't be an automatic arrangement that way.
Re: How to disable the auto triggered arrange action after a new semantic is added to the model? [message #1835305 is a reply to message #1835218] Mon, 30 November 2020 13:34 Go to previous message
Yufei Zhou is currently offline Yufei ZhouFriend
Messages: 44
Registered: March 2020
Member
Thanks Nicolas, I've managed to solve this problem.
Previous Topic:Cant add custom class to Services method
Next Topic:Custom style shapes
Goto Forum:
  


Current Time: Tue Apr 23 14:49:06 GMT 2024

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

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

Back to the top