Class RenameResourceElementsOperation
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
org.aspectj.org.eclipse.jdt.internal.core.MoveResourceElementsOperation
org.aspectj.org.eclipse.jdt.internal.core.RenameResourceElementsOperation
- All Implemented Interfaces:
SuffixConstants
,org.eclipse.core.resources.IWorkspaceRunnable
,org.eclipse.core.runtime.ICoreRunnable
,org.eclipse.core.runtime.IProgressMonitor
This operation renames resources (Package fragments and compilation units).
Notes:
- When a compilation unit is renamed, its main type and the constructors of the main type are renamed.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
JavaModelOperation.IPostAction
-
Field Summary
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.CopyResourceElementsOperation
createdElements, deltasPerProject, parser
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.MultiOperation
insertBeforeElements, newParents, renamings, renamingsList
Fields inherited from class 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
Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor
UNKNOWN
Fields inherited from interface 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
-
Constructor Summary
ConstructorDescriptionRenameResourceElementsOperation(IJavaElement[] elements, IJavaElement[] destinations, String[] newNames, boolean force)
When executed, this operation will rename the specified elements with the given names in the corresponding destinations. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Returns the name to be used by the progress monitor.protected boolean
isRename()
Returnstrue
if this operation represents a rename,false
if this operation represents a copy or move.protected void
verify(IJavaElement element)
This method is called for eachIJavaElement
beforeprocessElement
.Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.MoveResourceElementsOperation
isMove
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.CopyResourceElementsOperation
getSchedulingRule, prepareDeltas, processDeltas, processElement, processElements, verify
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.MultiOperation
error, executeOperation, getDestinationParent, getNewNameFor, setInsertBefore, setRenamings, verifyDestination, verifyRenaming, verifySibling
Methods inherited from class 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.core.runtime.IProgressMonitor
clearBlocked, setBlocked, slice
-
Constructor Details
-
RenameResourceElementsOperation
public RenameResourceElementsOperation(IJavaElement[] elements, IJavaElement[] destinations, String[] newNames, boolean force)When executed, this operation will rename the specified elements with the given names in the corresponding destinations.
-
-
Method Details
-
getMainTaskName
Description copied from class:MultiOperation
Returns the name to be used by the progress monitor.- Overrides:
getMainTaskName
in classMoveResourceElementsOperation
- See Also:
MultiOperation
-
isRename
protected boolean isRename()Description copied from class:MultiOperation
Returnstrue
if this operation represents a rename,false
if this operation represents a copy or move.- Overrides:
isRename
in classMultiOperation
- See Also:
MultiOperation.isRename()
-
verify
Description copied from class:MultiOperation
This method is called for eachIJavaElement
beforeprocessElement
. It should check that thiselement
can be processed.- Overrides:
verify
in classCopyResourceElementsOperation
- Throws:
JavaModelException
- See Also:
MultiOperation
-