|Copy & Paste for GMF Editors (Mindmap-Example) [message #506666]
||Fri, 08 January 2010 15:38
| Johannes Michler
Registered: July 2009
I'm implementing an RCP+GMF-Modeling-Application. We're using GMF and
generated a graphical editor. For this editor we'd like to have
copy/paste support for modelling elements.
For better understanding, I'll describe what I want and what problems
arise based on the mindmap-rcp-example.
I first checked out org.eclipse.gmf.examples.mindmap.rcp.diagram (with
..edit plugin) from the cvs-examples. When starting the example, I
created a new mindmap diagram with a first topic. This results in a
..model-file with one topic and a diagram-file with one graphical
representation of this model.
When copying my topic and pasting it again in the same diagram, first
everything seems fine. But actually only the diagram-code gets
duplicated (now having two views for my topic). So only the
diagram-file gets changed. When I change the name of one topic in the
gmf-editor, the second gets changed accordingly. (Well of cause, this
are just 2 references to 1 model). Furthermore, when closing the
diagram and reopening it again, the second reference is gone, the
diagram is marked dirty and when saving, the second reference gets
deleted from the diagram-file.
What I'd like to have is, that copy- and pasting a topic results in the
creation of a new topic in model AND diagram. It would be best if I
could copy/paste a topic from one diagram to another one (in
copy-by-value not -by-reference-style). Is there a way to achieve this?
In addition: I think the current behaviour is a bug. Copying just the
graphical notation may be okay, but I think after closing and reopening
the editor the diagram should still be the same, shouldn't it?
any help would be highly appreciated,
Powered by FUDForum
. Page generated in 0.02486 seconds