Updating existing diagrams when model changes [message #1004231] |
Tue, 22 January 2013 16:02  |
Eclipse User |
|
|
|
Hi all,
I have a model I have been working on for awhile, and I've discovered that I needed to nest the current diagram root inside another class, which is now the diagram root. The model and diagram are in a single file, so I see a lot of references to 'xmi:id's that appear to be generated (UI?) IDs.
Is there a scriptable way to update existing diagrams that still have the old diagram root to insert this new element as the diagram root?
If it helps for context, the previous models do not use diagram partitioning, but the new one does (hence the need for the new root element).
Thanks,
-Stephen
|
|
|
Re: Updating existing diagrams when model changes [message #1014470 is a reply to message #1004231] |
Mon, 25 February 2013 17:06  |
Eclipse User |
|
|
|
Hi Stephen,
yes, the Ids are generated uuids to identify every notation and domain element within a resource.
What you are trying to achieve is a very tricky task, since you want to migrate existing diagrams.
The problem is that GMF has a generated type-hierarchy of your notation elements, that correspond to your domain elements. (the many id-references)
Changing this hierarchy would mean require migrating the type hierarchy with the code.
If had to do similar things a couple of times and was glad when it worked out at the end.
You could do the following to identify, whether what you are trying to do is possible at all.
Keep a diagram-file of your old structure (a).
Apply the changes to your gmf-generated plugins and create a new diagram in accordance with (a) in the new structure.
Compare both xml.
If you'd like to post the different diagram files, we might be able to assist in a possible transformation.
Regards Thomas
|
|
|
Powered by
FUDForum. Page generated in 0.03261 seconds