Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Updating existing diagrams when model changes
Updating existing diagrams when model changes [message #1004231] Tue, 22 January 2013 21:02 Go to next message
Stephen Slaboda is currently offline Stephen SlabodaFriend
Messages: 8
Registered: November 2012
Junior Member
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 22:06 Go to previous message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 55
Registered: February 2013
Member
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
Previous Topic:Delete Connection of a Node Programmatically
Next Topic:NPE on diagram close
Goto Forum:
  


Current Time: Tue Mar 19 07:48:29 GMT 2024

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

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

Back to the top