Skip to main content



      Home
Home » Eclipse Projects » Sirius » Copy Representation loses element positions
Copy Representation loses element positions [message #1717628] Tue, 15 December 2015 06:21 Go to next message
Eclipse UserFriend
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 08:20] by Moderator

Re: Copy Representation loses element positions [message #1717898 is a reply to message #1717628] Thu, 17 December 2015 09:58 Go to previous message
Eclipse UserFriend
Hello,

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
org.eclipse.sirius.viewpoint.DRepresentation.getOwnedAnnotationEntries()
feature. Can you check in the aird model if the GMF Diagram is properly
copied ?

Regards,

--
Florian - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Problem to Enter eclips
Next Topic:SiriusAwarePropertiesEditingComponent cannot be resolved to a type
Goto Forum:
  


Current Time: Thu Jul 24 20:57:56 EDT 2025

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

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

Back to the top