[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Copy & Paste, CopyPaste, Duplication

I know there are lots of threads and bugzillas addressing this issue (and I guess I've read most of them), but I did not get it to work.

https://bugs.eclipse.org/263226
 [CopyPaste] Copy action does not work anymore

https://bugs.eclipse.org/176007
 Edit/(Duplication | Copy&PasteDuplication) corrupts notation model

I tried it with Taipan application (split model/diagram files):
- Create new Ship
- Copy/Paste Ship
- Delete new Ship from Model

The model is broken, and when I save it and try to load again, it will even welcome me with a nice exception:
java.lang.ClassCastException: org.eclipse.emf.ecore.util.EObjectContainmentEList cannot be cast to java.lang.String


As far as I can see, UUIDs should be enabled in ..taipan.gmf.editor.rcp/plugin.xml, but that does not seem to have an effect:
<extension point="org.eclipse.emf.ecore.extension_parser">
<?gmfgen generated="true"?>
<parser
type="taipan_diagram"
class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory">
</parser>
</extension>


Another strange thing is, that it works as expected when I drag/drop the node pressing Ctrl. A deep copy of the node is created.
XxxClipboardSupport does not seem to get used for this, except for notifying (sendCreateNotification).


Can I maybe make use of this behavior?

Has anyone managed to get Copy&Paste working with split model/diagram files?

Will a custom ClipboardSupport help me at all?

Any help highly appreciated, thanks in advance!