Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Set the position of the node when it is copied
Set the position of the node when it is copied [message #1781693] Mon, 12 February 2018 09:31 Go to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 3
Registered: February 2018
Junior Member

I need to set the position of the node when it is copied (action Paste). The clipboard contains DNode nodes (DDiagramElement) However, LayoutConstraint can only be set to Node type node (org.eclipse.gmf.runtime.notation.Node). When I try to find a Node from DNode when I copy using SiriusGMFHelper.getGmfNode(diagramElement), it returns null. Is it possible to set the position of the DNode node?

Thanks for every advice.

Re: Set the position of the node when it is copied [message #1781721 is a reply to message #1781693] Mon, 12 February 2018 14:33 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 554
Registered: July 2009
Senior Member

This is not directly supported. Bug contains in attachment an example of a workaround, which uses a Java service calling on internal Sirius APIs to associate "layout data" to the DNode that will (should) by used when the view (GMF Node) will be created later. You can try and have a look, but be aware that this is not officially supported and there is no documentation beside what is in the ticket.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
Previous Topic:Can't edit labels in table element
Next Topic:The font representation problem of text label in Sirius
Goto Forum:

Current Time: Mon Jan 25 23:20:48 GMT 2021

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

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

Back to the top