Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Copy Representation loses element positions
Copy Representation loses element positions [message #1717628] Tue, 15 December 2015 11:21 Go to next message
Koen Staal is currently offline Koen StaalFriend
Messages: 70
Registered: October 2014
This post can be closed/deleted. The new representation returned from copy function Does keep the position and other custom data. The code was creating a new diagram to copy from.

When i use DialectManager.INSTANCE.copyRepresentation the new diagram loses the position of all elements, all elements are stacked and need to be re arranged

Is this intended? Or do i need to somehow save the locations and set them in the new diagram. And is this even possible?

[Updated on: Tue, 15 December 2015 13:20]

Report message to a moderator

Re: Copy Representation loses element positions [message #1717898 is a reply to message #1717628] Thu, 17 December 2015 14:58 Go to previous message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 262
Registered: August 2010
Senior Member

That should keep the location since it makes a copy by using
EcoreUtil.Copier.copy. The GMF model which contains the views and their
bounds should also be copied since the DDiagram references the GMF
diagram through the
feature. Can you check in the aird model if the GMF Diagram is properly
copied ?


Florian - Obeo

Need training or professional services for Sirius?
Previous Topic:Problem to Enter eclips
Next Topic:SiriusAwarePropertiesEditingComponent cannot be resolved to a type
Goto Forum:

Current Time: Thu Feb 25 12:56:26 GMT 2021

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

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

Back to the top