Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Create Diagram with initial Content
Create Diagram with initial Content [message #664663] Mon, 11 April 2011 10:40 Go to next message
Eclipse UserFriend
I want to create an editor, which contains a couple of elements after startup. So i modified the method xxxDiagramEditorUtil.createInitialModel(), but my problem is that the elements are only stored in the domain model but not in the notational model. If i add another element to the diagram, everything works fine.

So i think that i have to create nodes for each element i add in the createInitialModel by using the ViewService.createNode(...) - method. But i am not able to managed this correctly. Can someone plz help me ??

Another point i do not really understand is that if i add a getCreateCommand() - method in a generated EditPolicy which extends the normal BaseItemSemanticPolicy nothing happens. The method is not called. Is there another point where i have to define that it should be possible to add an element ??

I hope my points are understandable, because englisch is not my foreign language.
Thanks for help
Re: Create Diagram with initial Content [message #664683 is a reply to message #664663] Mon, 11 April 2011 11:14 Go to previous messageGo to next message
Eclipse UserFriend
Check out this tutorial: http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutoria l7#diagram_initialization

I think this is what you are looking for.
Re: Create Diagram with initial Content [message #664685 is a reply to message #664663] Mon, 11 April 2011 11:22 Go to previous message
Eclipse UserFriend
Thanks for answering, but this is not what i am looking for.
I used the ideas of this tutorial, but if you open the diagram and close the whole eclipse runtime instance without changing anything in the diagram, then after opening the diagram once again all elements are gone and this is the problem i want to solve now
Previous Topic:Connections and Expression Labels
Next Topic:Shortcuts are gone after reopening the diagram file
Goto Forum:
  


Current Time: Wed Nov 12 08:29:42 EST 2025

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

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

Back to the top