Bug 107880 - ClipboardUtil should support copying of resource roots
Summary: ClipboardUtil should support copying of resource roots
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: All Windows XP
: P2 normal
Target Milestone: ---   Edit
Assignee: Christian Vogt CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-08-24 11:45 EDT by Chris McGee CLA
Modified: 2010-07-19 12:24 EDT (History)
0 users

See Also:


Attachments
zip containing patches and new test module (org.eclipse.gmf.tests.runtime.emf.clipboard.core) (37.50 KB, application/x-zip-compressed)
2005-10-31 14:39 EST, Christian Vogt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris McGee CLA 2005-08-24 11:45:46 EDT
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.
Comment 1 Christian Vogt CLA 2005-10-31 14:39:55 EST
Created attachment 29022 [details]
zip containing patches and new test module (org.eclipse.gmf.tests.runtime.emf.clipboard.core)
Comment 2 Christian Vogt CLA 2005-10-31 15:02:05 EST
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.
Comment 3 Eclipse Webmaster CLA 2010-07-19 12:24:23 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime EMF was the original product and component for this bug