Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Getting the LayoutConstraint of a Node without opening a session?
Getting the LayoutConstraint of a Node without opening a session? [message #1847125] Fri, 15 October 2021 11:07 Go to next message
Matei Gabriel Anita is currently offline Matei Gabriel AnitaFriend
Messages: 2
Registered: September 2021
Junior Member
I need to modify a node's size, however I am not able to open a session at this point. Is this achievable?

[Updated on: Fri, 15 October 2021 11:07]

Report message to a moderator

Re: Getting the LayoutConstraint of a Node without opening a session? [message #1847137 is a reply to message #1847125] Fri, 15 October 2021 15:43 Go to previous message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 296
Registered: July 2009
Senior Member
Hi,
There is no API to manipulate the node size outside of a session. At the end, when you resize a node (with the mouse), a org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand is called. You can do the same, but you need at least a TransactionalEditingDomain, where the aird resource is loaded, and the node to resize, in the IAdaptable parameter (usually a org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter).
Moreover, it sounds risky. Changing the size of the node could have consequences on other elements (the edge routing for example).
Regards,
Laurent


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Create an edge label in the Edge Creation Tool
Next Topic:Sirius Web DSL
Goto Forum:
  


Current Time: Wed Sep 28 15:50:12 GMT 2022

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

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

Back to the top