org.eclipse.gmf.runtime.emf.clipboard.core
Class CopyOperation
java.lang.Object
org.eclipse.gmf.runtime.emf.clipboard.core.ClipboardOperation
org.eclipse.gmf.runtime.emf.clipboard.core.CopyOperation
-
Direct Known Subclasses:
-
OverrideCopyOperation
-
public class CopyOperation
- extends
ClipboardOperation
The default copy operation. Extensibility is provided by the callback
methods of the
IClipboardSupport
implementation for the specific
EMF metamodel.
Note that this class is not intended to be extended "directly"
by clients. Clients may not instantiate it. Clients that need to extend
or override this default copy operation should extend the
OverrideCopyOperation
class, instead.
-
See Also:
-
OverrideCopyOperation
Field Summary
|
static java.lang.String
|
COPY
String constant for the value "copy". |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
COPY
public static final java.lang.String COPY
- String constant for the value "copy".
-
See Also:
-
Constant Field Values
CopyOperation
public CopyOperation(
IProgressMonitor monitor,
IClipboardSupport clipboardSupport,
java.util.Collection eObjects,
java.util.Map hintMap)
- Initializes me.
-
Parameters:
-
monitor
- the optional progress monitor (can be null
) -
clipboardSupport
- the clipboard support for the EMF metamodel -
eObjects
- the EObject
s to copy -
hintMap
- the map of copy hints, possibly empty. Hints are defined
by the
ClipboardUtil
class -
See Also:
-
ClipboardUtil.RECYCLE_HINT_ID
,
ClipboardUtil.IGNORE_RECYCLE_HINT_ID
getEObjectsHintMap
protected java.util.Map getEObjectsHintMap()
- Obtains my hint map.
-
-
Returns:
- my hint map
copy
public java.lang.String copy()
throws java.lang.Exception
- Performs the copy operation.
-
-
Returns:
- the serialized form of the copied objects, suitable for placing
on the system clipboard for later pasting
-
Throws:
-
java.lang.Exception
- if anything goes wrong in performing the copy
doCopy
protected java.lang.String doCopy()
throws java.lang.Exception
-
-
Throws:
-
java.lang.Exception
getCombinedCopyAlwaysSet
public java.util.Set getCombinedCopyAlwaysSet()
- Obtains my complete set of objects that must always be copied, that are
related to the original selection but not of it.
-
-
Returns:
- my combined set of "copy always" objects; may be empty
getAuxiliaryObjects
protected
CopyObjects getAuxiliaryObjects()
-
getEObjects
protected java.util.Collection getEObjects()
-
-
Returns:
- Returns the eObjectList.
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.