Skip to main content



      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 07:07 Go to next message
Eclipse UserFriend
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 07:07] by Moderator

Re: Getting the LayoutConstraint of a Node without opening a session? [message #1847137 is a reply to message #1847125] Fri, 15 October 2021 11:43 Go to previous message
Eclipse UserFriend
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
Previous Topic:Create an edge label in the Edge Creation Tool
Next Topic:Sirius Web DSL
Goto Forum:
  


Current Time: Sun Jul 06 07:41:36 EDT 2025

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

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

Back to the top