fixing copy & paste issues [message #77229] |
Mon, 13 November 2006 17:04 |
Eclipse User |
|
|
|
Originally posted by: vcciubot.uwaterloo.ca
In GMF developer's guide -> tutorials -> Clipboard Tutorial it's said:
One important prerequisite for EMF clipboard support is that the resources that will
contain EObjects to be copied and/or pasted must support UUID(Universally
Unique IDs) URIs for the EObjects. EMF clipboard will use these UUIDs to
discover whether another EObject is the original EObject and should be
overwritten with the clipboard contents. EMF's XMIResourceImpl does not
normally use UUIDs.
To ensure EMF will use a compatible resource, we will create a new
subclass of the XMIResourceImpl so that our resource is serialized as XMI
but with UUIDs.
I added this to my plugin.xml and it works, but otherwise just follow the
tutorial:
<extension point="org.eclipse.emf.ecore.extension_parser">
<parser
type="bluenose2_diagram"
class=" org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactor y ">
</parser>
<parser
type="bluenose2"
class=" org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactor y ">
</parser>
</extension>
|
|
|
Powered by
FUDForum. Page generated in 0.02806 seconds