Klasse CopyResourceElementsOperation
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
org.aspectj.org.eclipse.jdt.internal.core.MultiOperation
org.aspectj.org.eclipse.jdt.internal.core.CopyResourceElementsOperation
- Alle implementierten Schnittstellen:
SuffixConstants
,org.eclipse.core.resources.IWorkspaceRunnable
,org.eclipse.core.runtime.ICoreRunnable
,org.eclipse.core.runtime.IProgressMonitor
- Bekannte direkte Unterklassen:
MoveResourceElementsOperation
This operation copies/moves/renames a collection of resources from their current
container to a new container, optionally renaming the
elements.
Notes:
- If there is already an resource with the same name in the new container, the operation either overwrites or aborts, depending on the collision policy setting. The default setting is abort.
- When a compilation unit is copied to a new package, the package declaration in the compilation unit is automatically updated.
- The collection of elements being copied must all share the same type of container.
- This operation can be used to copy and rename elements within the same container.
- This operation only copies compilation units and package fragments. It does not copy package fragment roots - a platform operation must be used for that.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
JavaModelOperation.IPostAction
-
Feldübersicht
Modifizierer und TypFeldBeschreibungprotected ArrayList
The list of new resources created during this operation.protected Map
Table specifying deltas for elements being copied/moved/renamed.protected ASTParser
TheASTParser
used to manipulate the source code ofICompilationUnit
.Von Klasse geerbte Felder org.aspectj.org.eclipse.jdt.internal.core.MultiOperation
insertBeforeElements, newParents, renamings, renamingsList
Von Klasse geerbte Felder org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
actions, actionsEnd, actionsStart, APPEND, attributes, elementsToProcess, force, HAS_MODIFIED_RESOURCE_ATTR, isNested, KEEP_EXISTING, NO_ELEMENTS, OPERATION_STACKS, parentElements, POST_ACTION_VERBOSE, progressMonitor, REMOVEALL_APPEND, resultElements, TRUE
Von Schnittstelle geerbte Felder org.eclipse.core.runtime.IProgressMonitor
UNKNOWN
Von Schnittstelle geerbte Felder org.aspectj.org.eclipse.jdt.internal.compiler.util.SuffixConstants
EXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, EXTENSION_jmod, EXTENSION_JMOD, SUFFIX_aj, SUFFIX_AJ, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_aj, SUFFIX_STRING_AJ, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVA
-
Konstruktorübersicht
KonstruktorBeschreibungCopyResourceElementsOperation
(IJavaElement[] resourcesToCopy, IJavaElement[] destContainers, boolean force) When executed, this operation will copy the given resources to the given containers. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected String
Returns the name to be used by the progress monitor.protected org.eclipse.core.runtime.jobs.ISchedulingRule
protected void
prepareDeltas
(IJavaElement sourceElement, IJavaElement destinationElement, boolean isMove, boolean overWriteCU) Sets the deltas to register the changes resulting from this operation for this source element and its destination.protected void
Process all of the changed deltas generated by this operation.protected void
processElement
(IJavaElement element) Subclasses must implement this method to process a givenIJavaElement
.protected void
Processes all theIJavaElement
s in turn, collecting errors and updating the progress monitor.protected IJavaModelStatus
verify()
Possible failures: NO_ELEMENTS_TO_PROCESS - no elements supplied to the operation INDEX_OUT_OF_BOUNDS - the number of renamings supplied to the operation does not match the number of elements that were supplied.protected void
verify
(IJavaElement element) This method is called for eachIJavaElement
beforeprocessElement
.Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.MultiOperation
error, executeOperation, getDestinationParent, getNewNameFor, isMove, isRename, setInsertBefore, setRenamings, verifyDestination, verifyRenaming, verifySibling
Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
addAction, addDelta, addReconcileDelta, applyTextEdit, beginTask, canModifyRoots, checkCanceled, commonVerify, copyResources, createFile, createFolder, deleteEmptyPackageFragment, deleteResource, deleteResources, done, equalsOneOf, executeNestedOperation, firstActionWithID, getAttribute, getCompilationUnitFor, getCurrentOperationStack, getDocument, getElementToProcess, getJavaModel, getLatestASTLevel, getNestedFolders, getParentElement, getParentElements, getResultElements, getSubProgressMonitor, hasModifiedResource, internalWorked, isCanceled, isReadOnly, isTopLevelOperation, moveResources, newJavaElementDelta, popOperation, postAction, prefixesOneOf, pushOperation, removeAllPostAction, removeReconcileDelta, run, runOperation, runPostActions, setAttribute, setCanceled, setNested, setTaskName, subTask, worked
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von Schnittstelle geerbte Methoden org.eclipse.core.runtime.IProgressMonitor
clearBlocked, setBlocked, slice
-
Felddetails
-
createdElements
The list of new resources created during this operation. -
deltasPerProject
Table specifying deltas for elements being copied/moved/renamed. Keyed by elements' project(s), and values are the corresponding deltas. -
parser
TheASTParser
used to manipulate the source code ofICompilationUnit
.
-
-
Konstruktordetails
-
CopyResourceElementsOperation
public CopyResourceElementsOperation(IJavaElement[] resourcesToCopy, IJavaElement[] destContainers, boolean force) When executed, this operation will copy the given resources to the given containers. The resources and destination containers must be in the correct order. If there is > 1 destination, the number of destinations must be the same as the number of resources being copied/moved.
-
-
Methodendetails
-
getMainTaskName
Beschreibung aus Klasse kopiert:MultiOperation
Returns the name to be used by the progress monitor.- Angegeben von:
getMainTaskName
in KlasseMultiOperation
- Siehe auch:
-
getSchedulingRule
protected org.eclipse.core.runtime.jobs.ISchedulingRule getSchedulingRule()- Setzt außer Kraft:
getSchedulingRule
in KlasseJavaModelOperation
-
prepareDeltas
protected void prepareDeltas(IJavaElement sourceElement, IJavaElement destinationElement, boolean isMove, boolean overWriteCU) Sets the deltas to register the changes resulting from this operation for this source element and its destination. If the operation is a cross project operation- On a copy, the delta should be rooted in the dest project
- On a move, two deltas are generated
- one rooted in the source project
- one rooted in the destination project
- When a CU is being overwritten, the delta on the destination will be of type F_CONTENT
-
processDeltas
protected void processDeltas()Process all of the changed deltas generated by this operation. -
processElement
Beschreibung aus Klasse kopiert:MultiOperation
Subclasses must implement this method to process a givenIJavaElement
.- Angegeben von:
processElement
in KlasseMultiOperation
- Löst aus:
JavaModelException
- Siehe auch:
-
processElements
Beschreibung aus Klasse kopiert:MultiOperation
Processes all theIJavaElement
s in turn, collecting errors and updating the progress monitor.- Setzt außer Kraft:
processElements
in KlasseMultiOperation
- Löst aus:
JavaModelException
- if one or several operation(s) was unable to be completed.- Siehe auch:
-
verify
Possible failures:- NO_ELEMENTS_TO_PROCESS - no elements supplied to the operation
- INDEX_OUT_OF_BOUNDS - the number of renamings supplied to the operation does not match the number of elements that were supplied.
- Setzt außer Kraft:
verify
in KlasseJavaModelOperation
- Siehe auch:
-
verify
Beschreibung aus Klasse kopiert:MultiOperation
This method is called for eachIJavaElement
beforeprocessElement
. It should check that thiselement
can be processed.- Angegeben von:
verify
in KlasseMultiOperation
- Löst aus:
JavaModelException
- Siehe auch:
-