Community
Participate
Working Groups
When copying one of the roots of a resource, the ClipboardUtil.copyElementsToString() method will return null. There are likely legitimate use cases where a client would like to copy a whole root in a multi-rooted resource.
Created attachment 29022 [details] zip containing patches and new test module (org.eclipse.gmf.tests.runtime.emf.clipboard.core)
Added support to EMF clipboard for copying roots of a resource and for pasting into a resource to add new roots. Pasting into a resource is done in the same way as pasting into an EObject. Simply pass the Resource, as oppose to an EObject, as the target to the ClipboardUtil.pasteElementsFromString(..) method: public static Collection pasteElementsFromString(String string, Resource targetElement, final Map hints, IProgressMonitor monitor) { ... } A new test module, org.eclipse.gmf.tests.runtime.emf.clipboard.core, was added along with regression tests for this bug. As a result of this, further enhancements to the EMF clipboard could be looked into for adding functionality to IClipboardSupport to handle clipboard paste operations on the resource.
[GMF Restructure] Bug 319140 : product GMF and component Runtime EMF was the original product and component for this bug