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

Thanks Alex, see below...

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>
This means UUID support is switched on for *.taipan_diagram resoruces (diagram files). To make cut/copy/paste functionality working you have to switch on this support for *.taipan resources too.
You're right, of course!
Enabling UUID support for *.taipan did not solve the problem though (I checked model file, UUIDs are used now). Same problem as before.


With RCP version (org.eclipse.gmf.examples.taipan.gmf.editor.rcp) it even raises an exception now when I try to copy a node.
Not sure how to debug this, I paused the application in the error dialog which provides no stacktrace and looked into the exception, so the following stacktrace is handwritten :)


java.lang.NullPointerException
at org.eclipse.gmf.runtime.common.ui.util.StatusLineUtil.getStatusLineManager(StatusLineUtil.java:90)
at org.eclipse.gmf.runtime.common.ui.util.StatusLineUtil.outputErrorMessage(StatusLineUtil.java:48)
at
org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.run(AbstractActionHandler.java:357)
at org.eclipse.gmf.runtime.common.ui.action.ActionManager$1.run(ActionManager.java:225)
at org.eclipse.swt.custom.BusyIndicator(BusyIndicator.java:70)
at org.eclipse.gmf.runtime.common.ui.action.ActionManager(ActionManager.java:223)
at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler(AbstractActionHandler.java
[...]


Can you reproduce this?
Simple add UUID-support to the TaiPan RCP example and run, then copy a node.

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.
Is it something like "edit/duplicate" action from the popup menu?
Yes, duplication seems to be the same Ctrl+DnD. I was not even aware of that function. This could be sufficient for some requirements, but not for all...

Am I doing something wrong, or does Copy&Paste simply not work with split model/diagram files?

If so, is there anything I can do?

Regards, Peter