Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo + GMF] Diagram and model element handling
[Teneo + GMF] Diagram and model element handling [message #619260] Thu, 19 June 2008 09:20
Matthias Treitler is currently offline Matthias TreitlerFriend
Messages: 117
Registered: July 2009
Senior Member
Hello Martin and Teneo users!

For my application I want to give the user the possibilty to create and
also undo/redo/copy/paste (summed up mostly all capabilities which
emf.edit provides out of the box) diagram instances.
My current solution works but I am not really satisfied (and you probably
too when you read this post :) ).

Every Diagram "container" model instance (in your tutorial the "Map")
relates to the GMF "Diagram" model instance. With this rule in mind I do
the following:
I tell you which step I perform when creating my "Map" + "Diagram"
instance:
I create and initialize the "Map" on the command stack. Then I save the
resource so that the ID attribute gets filled and has an unique value.
Then I create the "Diagram" instance on the command stack and set the name
to the id of the "Map". So now I have a very simple reference between the
"Map" and the "Diagram" that I need when opening the diagram editor. Then
I save the resource again.
When opening the diagram I use the following query: "query1=from
Map&query2=from Diagram where name='[Map Id that should be opened]'".

As you can see undo and redo is not really possible, also the same for
deleting, copy and paste, because the Map is not really referenced to the
Diagram.

The rest of my code is nearly exactly the same as used in the Tutorial.

So how would you do it when you want to open serveral different diagram
instances?!?

Thank you for your answers!
Matthias
Previous Topic:[Announce] EMFT COMPARE 0.8.0RC5 is available
Next Topic:Collide ID validation error
Goto Forum:
  


Current Time: Thu Apr 25 01:41:56 GMT 2024

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

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

Back to the top