|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.emf.clipboard.core.ClipboardOperation
org.eclipse.gmf.runtime.emf.clipboard.core.BasePasteOperation
public abstract class BasePasteOperation
Abstract specification of all paste operations, providing common behaviours and enforcing certain protocols.
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 the default paste operation should extend the
OverridePasteChildOperation
class, instead. Clients may also extend
the PostPasteChildOperation
.
OverridePasteChildOperation
,
PostPasteChildOperation
Field Summary | |
---|---|
static java.lang.String |
PASTE
A constant whose value is "paste". |
Fields inherited from class org.eclipse.gmf.runtime.emf.clipboard.core.ClipboardOperation |
---|
TOTAL_WORK, WORK_UNIT |
Constructor Summary | |
---|---|
BasePasteOperation(BasePasteOperation spawningPasteOperation)
Initializes me with a superordinate paste operation that has created me. |
|
BasePasteOperation(IProgressMonitor monitor,
java.util.Map loadOptionsMap,
org.eclipse.gmf.runtime.emf.clipboard.core.internal.ResourceInfo resourceInfo,
IClipboardSupport clipboardSupport)
Initializes me. |
Method Summary | |
---|---|
protected void |
addCriticalResolveFailure(org.eclipse.emf.ecore.EObject nonResolvedObject)
Adds a critical resolution failure to my set and the overall failures set for the bigger paste operation. |
protected void |
addMergedElementEntry(org.eclipse.emf.ecore.EObject mergedObject,
org.eclipse.gmf.runtime.emf.clipboard.core.internal.MergedEObjectInfo mergedEObjectInfo)
Adds a merged element to my map and the overall merges map for the bigger paste operation. |
protected void |
addPastedElement(org.eclipse.emf.ecore.EObject pastedElement)
Adds a successfully pasted element to my set and the overall pasted elements set for the bigger paste operation. |
protected void |
addPasteFailuresObject(org.eclipse.emf.ecore.EObject eObject)
Adds an element that did not successfully paste to my set and the overall paste failures set for the bigger paste operation. |
java.util.Set |
getAllCriticalResolveFailuresSet()
Obtains the overall set of all critical resolution failures for the bigger paste operation, of which my own are a subset. |
java.util.Map |
getAllMergedElementsMap()
Obtains the overall map of all merged elements for the bigger paste operation, of which my own are a subset. |
java.util.Set |
getAllPastedElementSet()
Obtains the overall set of all elements pasted by the bigger paste operation, of which my own are a subset. |
java.util.Set |
getAllPasteFailuresObjectSet()
Obtains my failed pastes, or my parent operation's if I have one. |
java.util.Set |
getCriticalResolveFailuresSet()
Obtains my own subset of critical resolution failures. |
protected java.util.Map |
getLoadOptionsMap()
Obtains the EMF resource load options that are used to deserialize the resource that was copied to the clipboard. |
java.util.Map |
getMergedElementsMap()
Obtains my own subset map of merged elements. |
java.util.Set |
getPastedElementSet()
Obtains my own subset of pasted elements. |
java.util.Set |
getPasteFailuresObjectSet()
Obtains my own subset of objects that failed to paste. |
protected org.eclipse.gmf.runtime.emf.clipboard.core.internal.ResourceInfo |
getResourceInfo()
Obtains my resource meta-data structure. |
BasePasteOperation |
getSpawningPasteOperation()
Obtains the superordinate paste operation that created me, if any. |
abstract void |
paste()
Performs the paste operation. |
protected void |
removeCriticalResolveFailure(org.eclipse.emf.ecore.EObject newlyResolvedObject)
Removes a critical resolution failure from my set and the overall failures set for the bigger paste operation, for an object which has turned out resolvable after all. |
protected void |
throwCancelException()
Throws an operation cancel exception to end a paste process. |
Methods inherited from class org.eclipse.gmf.runtime.emf.clipboard.core.ClipboardOperation |
---|
catchException, getClipboardOperationHelper, getProgressMonitor, isCancelled, throwCancelException, throwException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PASTE
Constructor Detail |
---|
public BasePasteOperation(IProgressMonitor monitor, java.util.Map loadOptionsMap, org.eclipse.gmf.runtime.emf.clipboard.core.internal.ResourceInfo resourceInfo, IClipboardSupport clipboardSupport)
monitor
- an optional monitor to track paste progressloadOptionsMap
- map of EMF resource load options for
deserialization of the resource that was copied to the clipboardresourceInfo
- the resource information data structure to fill in
when deserializing the copied resourceclipboardSupport
- the clipboard support object governing this
copy/paste operationpublic BasePasteOperation(BasePasteOperation spawningPasteOperation)
spawningPasteOperation
- the paste operation that created meMethod Detail |
---|
protected final org.eclipse.gmf.runtime.emf.clipboard.core.internal.ResourceInfo getResourceInfo()
protected final java.util.Map getLoadOptionsMap()
public abstract void paste() throws java.lang.Exception
java.lang.Exception
- if anything goes wrong in pastingpublic BasePasteOperation getSpawningPasteOperation()
null
if I am the
root operationpublic final java.util.Set getAllCriticalResolveFailuresSet()
getCriticalResolveFailuresSet()
public final java.util.Map getAllMergedElementsMap()
getMergedElementsMap()
public final java.util.Set getAllPastedElementSet()
getPastedElementSet()
public final java.util.Set getCriticalResolveFailuresSet()
getAllCriticalResolveFailuresSet()
protected void addCriticalResolveFailure(org.eclipse.emf.ecore.EObject nonResolvedObject)
nonResolvedObject
- an unresolvable objectprotected void removeCriticalResolveFailure(org.eclipse.emf.ecore.EObject newlyResolvedObject)
newlyResolvedObject
- an object that did resolvepublic final java.util.Map getMergedElementsMap()
getMergedElementsMap()
protected void addMergedElementEntry(org.eclipse.emf.ecore.EObject mergedObject, org.eclipse.gmf.runtime.emf.clipboard.core.internal.MergedEObjectInfo mergedEObjectInfo)
mergedObject
- a merged object (key)mergedEObjectInfo
- the information about the merge (value)public final java.util.Set getPastedElementSet()
getAllPastedElementSet()
protected void addPastedElement(org.eclipse.emf.ecore.EObject pastedElement)
pastedElement
- an element that was successfully pastedpublic final java.util.Set getPasteFailuresObjectSet()
getAllPasteFailuresObjectSet()
protected void addPasteFailuresObject(org.eclipse.emf.ecore.EObject eObject)
eObject
- an element that was not successfully pastedpublic final java.util.Set getAllPasteFailuresObjectSet()
getPasteFailuresObjectSet()
protected void throwCancelException()
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.