public class RenameElementsOperation extends MoveElementsOperation
Notes:
JavaModelOperation.IPostActioninsertBeforeElements, newParents, renamings, renamingsListactions, 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, TRUEEXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, 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 and Description |
|---|
RenameElementsOperation(IJavaElement[] elements,
IJavaElement[] destinations,
java.lang.String[] newNames,
boolean force)
When executed, this operation will rename the specified elements with the given names in the
corresponding destinations.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getMainTaskName()
Returns the
String to use as the main task name
for progress monitoring. |
protected boolean |
isRename()
Returns
true if this operation represents a rename, false
if this operation represents a copy or move. |
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 each
IJavaElement before
processElement. |
isMovegetNestedOperation, isRenamingMainType, processElementerror, executeOperation, getDestinationParent, getNewNameFor, processElements, setInsertBefore, setRenamings, verifyDestination, verifyRenaming, verifySiblingaddAction, addDelta, addReconcileDelta, applyTextEdit, beginTask, canModifyRoots, checkCanceled, commonVerify, copyResources, createFile, createFolder, deleteEmptyPackageFragment, deleteResource, deleteResources, done, equalsOneOf, executeNestedOperation, firstActionWithID, getAttribute, getCompilationUnitFor, getCurrentOperationStack, getDocument, getElementToProcess, getJavaModel, getNestedFolders, getParentElement, getParentElements, getResultElements, getSchedulingRule, getSubProgressMonitor, hasModifiedResource, internalWorked, isCanceled, isReadOnly, isTopLevelOperation, moveResources, newJavaElementDelta, popOperation, postAction, prefixesOneOf, pushOperation, removeAllPostAction, removeReconcileDelta, run, runOperation, runPostActions, setAttribute, setCanceled, setNested, setTaskName, subTask, workedpublic RenameElementsOperation(IJavaElement[] elements, IJavaElement[] destinations, java.lang.String[] newNames, boolean force)
protected java.lang.String getMainTaskName()
MoveElementsOperationString to use as the main task name
for progress monitoring.getMainTaskName in class MoveElementsOperationMultiOperationprotected boolean isRename()
MultiOperationtrue if this operation represents a rename, false
if this operation represents a copy or move.isRename in class MultiOperationMultiOperation.isRename()protected IJavaModelStatus verify()
CopyElementsOperationverify in class CopyElementsOperationMultiOperationprotected void verify(IJavaElement element) throws JavaModelException
MultiOperationIJavaElement before
processElement. It should check that this element
can be processed.verify in class CopyElementsOperationJavaModelExceptionMultiOperation