Copy Representation loses element positions [message #1717628] |
Tue, 15 December 2015 11:21 |
Koen Staal Messages: 70 Registered: October 2014 |
Member |
|
|
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 |
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03736 seconds