public class RenameJavaMethodProcessor extends RenameJavaMemberProcessor
DEFAULT, EP_NAME
Constructor and Description |
---|
RenameJavaMethodProcessor() |
Modifier and Type | Method and Description |
---|---|
boolean |
canProcessElement(PsiElement element) |
UsageInfo |
createUsageInfo(PsiElement element,
PsiReference ref,
PsiElement referenceElement) |
void |
findCollisions(PsiElement element,
java.lang.String newName,
java.util.Map<? extends PsiElement,java.lang.String> allRenames,
java.util.List<UsageInfo> result) |
void |
findExistingNameConflicts(PsiElement element,
java.lang.String newName,
MultiMap<PsiElement,java.lang.String> conflicts) |
java.util.Collection<PsiReference> |
findReferences(PsiElement element,
SearchScope searchScope,
boolean searchInCommentsAndStrings) |
java.lang.String |
getHelpID(PsiElement element) |
boolean |
isToSearchForTextOccurrences(PsiElement element) |
boolean |
isToSearchInComments(PsiElement psiElement) |
void |
prepareRenaming(PsiElement element,
java.lang.String newName,
java.util.Map<PsiElement,java.lang.String> allRenames,
SearchScope scope) |
protected PsiElement |
processRef(PsiReference ref,
java.lang.String newName)
handles rename of refs
|
void |
renameElement(PsiElement psiElement,
java.lang.String newName,
UsageInfo [] usages,
RefactoringElementListener listener) |
void |
setToSearchForTextOccurrences(PsiElement element,
boolean enabled) |
void |
setToSearchInComments(PsiElement element,
boolean enabled) |
PsiElement |
substituteElementToRename(PsiElement element,
Editor editor)
Returns the element to be renamed instead of the element on which the rename refactoring was invoked (for example, a super method
of an inherited method).
|
void |
substituteElementToRename(PsiElement element,
Editor editor,
Pass<PsiElement> renameCallback)
Substitutes element to be renamed and initiate rename procedure.
|
createMemberReference, createQualifiedMemberReference, findCollisionsAgainstNewName, findMemberHidesOuterMemberCollisions, qualifyMember, qualifyMember, qualifyOuterMemberReferences, qualifyStaticImportReferences
allForElement, createRenameDialog, findExistingNameConflicts, findReferences, findReferences, forcesShowPreview, forElement, getElementToSearchInStringsAndComments, getPostRenameCallback, getQualifiedNameAfterRename, getTextOccurrenceSearchStrings, isInplaceRenameSupported, prepareRenaming, showRenamePreviewButton
public boolean canProcessElement(PsiElement element)
canProcessElement
in class RenamePsiElementProcessor
public void renameElement(PsiElement psiElement, java.lang.String newName, UsageInfo [] usages, RefactoringElementListener listener) throws IncorrectOperationException
renameElement
in class RenamePsiElementProcessor
IncorrectOperationException
protected PsiElement processRef(PsiReference ref, java.lang.String newName)
ref
- newName
- public java.util.Collection<PsiReference> findReferences(PsiElement element, SearchScope searchScope, boolean searchInCommentsAndStrings)
findReferences
in class RenamePsiElementProcessor
public void findCollisions(PsiElement element, java.lang.String newName, java.util.Map<? extends PsiElement,java.lang.String> allRenames, java.util.List<UsageInfo> result)
findCollisions
in class RenamePsiElementProcessor
public void findExistingNameConflicts(PsiElement element, java.lang.String newName, MultiMap<PsiElement,java.lang.String> conflicts)
findExistingNameConflicts
in class RenamePsiElementProcessor
public void prepareRenaming(PsiElement element, java.lang.String newName, java.util.Map<PsiElement,java.lang.String> allRenames, SearchScope scope)
prepareRenaming
in class RenamePsiElementProcessor
public java.lang.String getHelpID(PsiElement element)
getHelpID
in class RenamePsiElementProcessor
public boolean isToSearchInComments(PsiElement psiElement)
isToSearchInComments
in class RenamePsiElementProcessor
public void setToSearchInComments(PsiElement element, boolean enabled)
setToSearchInComments
in class RenamePsiElementProcessor
public PsiElement substituteElementToRename(PsiElement element, Editor editor)
RenamePsiElementProcessor
substituteElementToRename
in class RenamePsiElementProcessor
element
- the element on which the refactoring was invoked.editor
- the editor in which the refactoring was invoked.public void substituteElementToRename(PsiElement element, Editor editor, Pass<PsiElement> renameCallback)
RenamePsiElementProcessor
substituteElementToRename
in class RenamePsiElementProcessor
element
- the element on which refactoring was invokededitor
- the editor in which inplace refactoring was invokedrenameCallback
- rename procedure which should be called on the chosen substitutionpublic boolean isToSearchForTextOccurrences(PsiElement element)
isToSearchForTextOccurrences
in class RenamePsiElementProcessor
public void setToSearchForTextOccurrences(PsiElement element, boolean enabled)
setToSearchForTextOccurrences
in class RenamePsiElementProcessor
public UsageInfo createUsageInfo(PsiElement element, PsiReference ref, PsiElement referenceElement)
createUsageInfo
in class RenamePsiElementProcessor