public class VariableInplaceRenamer extends InplaceRefactoring
Modifier and Type | Field and Description |
---|---|
static LanguageExtension<ResolveSnapshotProvider> |
INSTANCE |
protected Language |
myLanguage |
INPLACE_RENAMER, INTRODUCE_RESTART, LOG, myAdvertisementText, myBalloon, myBeforeRevert, myCaretRangeMarker, myEditor, myElementToRename, myInitialName, myInsertedName, myMarkAction, myNameSuggestions, myOldName, myProject, myRenameOffset, myScope, myTarget, myTitle, OTHER_VARIABLE_NAME, ourRenamersStack, PRIMARY_VARIABLE_NAME
Constructor and Description |
---|
VariableInplaceRenamer(PsiNamedElement elementToRename,
Editor editor) |
VariableInplaceRenamer(PsiNamedElement elementToRename,
Editor editor,
Project project) |
VariableInplaceRenamer(PsiNamedElement elementToRename,
Editor editor,
Project project,
java.lang.String initialName,
java.lang.String oldName) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
appendAdditionalElement(java.util.Collection<PsiReference> refs,
java.util.Collection<Pair<PsiElement,TextRange>> stringUsages) |
protected void |
beforeTemplateStart() |
protected boolean |
buildTemplateAndStart(java.util.Collection<PsiReference> refs,
java.util.Collection<Pair<PsiElement,TextRange>> stringUsages,
PsiElement scope,
PsiFile containingFile) |
protected void |
collectAdditionalElementsToRename(java.util.List<Pair<PsiElement,TextRange>> stringUsages) |
protected VariableInplaceRenamer |
createInplaceRenamerToRestart(PsiNamedElement variable,
Editor editor,
java.lang.String initialName) |
void |
finish(boolean success) |
protected java.lang.String |
getCommandName()
Returns the name of the command performed by the refactoring.
|
protected java.lang.String |
getRefactoringId() |
boolean |
performInplaceRename() |
protected void |
performOnInvalidIdentifier(java.lang.String newName,
java.util.LinkedHashSet<java.lang.String> nameSuggestions) |
protected boolean |
performRefactoring() |
protected void |
performRefactoringRename(java.lang.String newName,
StartMarkAction markAction) |
protected void |
renameSynthetic(java.lang.String newName) |
protected int |
restoreCaretOffset(int offset) |
protected void |
restoreSelection() |
protected void |
revertStateOnFinish() |
protected boolean |
shouldCreateSnapshot() |
protected boolean |
shouldSelectAll() |
protected boolean |
startsOnTheSameElement(RefactoringActionHandler handler,
PsiElement element) |
acceptReference, addAdditionalVariables, addHighlights, addReferenceAtCaret, adjustBalloon, canStartAnotherRefactoring, checkCleared, checkLocalScope, collectRefs, createLookupExpression, createPreviewComponent, createTemplateExpression, getActiveInplaceRenamer, getComponent, getInitialName, getNameIdentifier, getRangeToRename, getRangeToRename, getReferencesSearchScope, getSelectedInEditorElement, getTopLevelVirtualFile, getVariable, isIdentifier, isReferenceAtCaret, isRestart, isShowBalloonInHeadlessMode, moveOffsetAfter, navigateToAlreadyStarted, notSameFile, performCleanup, performInplaceRefactoring, releaseIfNotRestart, releaseResources, revertState, setAdvertisementText, setElementToRename, setShowBalloonInHeadlessMode, shouldStopAtLookupExpression, showBalloon, showBalloonInEditor, showDialogAdvertisement, startRename, startsOnTheSameElements, stopIntroduce, stopIntroduce, unableToStartWarning
public static final LanguageExtension<ResolveSnapshotProvider> INSTANCE
protected Language myLanguage
public VariableInplaceRenamer(PsiNamedElement elementToRename, Editor editor)
public VariableInplaceRenamer(PsiNamedElement elementToRename, Editor editor, Project project)
public VariableInplaceRenamer(PsiNamedElement elementToRename, Editor editor, Project project, java.lang.String initialName, java.lang.String oldName)
protected boolean startsOnTheSameElement(RefactoringActionHandler handler, PsiElement element)
startsOnTheSameElement
in class InplaceRefactoring
public boolean performInplaceRename()
protected void collectAdditionalElementsToRename(java.util.List<Pair<PsiElement,TextRange>> stringUsages)
collectAdditionalElementsToRename
in class InplaceRefactoring
protected boolean buildTemplateAndStart(java.util.Collection<PsiReference> refs, java.util.Collection<Pair<PsiElement,TextRange>> stringUsages, PsiElement scope, PsiFile containingFile)
buildTemplateAndStart
in class InplaceRefactoring
protected boolean appendAdditionalElement(java.util.Collection<PsiReference> refs, java.util.Collection<Pair<PsiElement,TextRange>> stringUsages)
protected boolean shouldCreateSnapshot()
protected java.lang.String getRefactoringId()
protected void beforeTemplateStart()
beforeTemplateStart
in class InplaceRefactoring
protected void restoreSelection()
restoreSelection
in class InplaceRefactoring
protected int restoreCaretOffset(int offset)
restoreCaretOffset
in class InplaceRefactoring
protected boolean shouldSelectAll()
shouldSelectAll
in class InplaceRefactoring
protected VariableInplaceRenamer createInplaceRenamerToRestart(PsiNamedElement variable, Editor editor, java.lang.String initialName)
protected void performOnInvalidIdentifier(java.lang.String newName, java.util.LinkedHashSet<java.lang.String> nameSuggestions)
protected void renameSynthetic(java.lang.String newName)
protected void performRefactoringRename(java.lang.String newName, StartMarkAction markAction)
protected java.lang.String getCommandName()
InplaceRefactoring
getCommandName
in class InplaceRefactoring
protected boolean performRefactoring()
performRefactoring
in class InplaceRefactoring
public void finish(boolean success)
finish
in class InplaceRefactoring
protected void revertStateOnFinish()