public class VariableInplaceRenameHandler extends java.lang.Object implements RenameHandler
EP_NAME
Constructor and Description |
---|
VariableInplaceRenameHandler() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkAvailable(PsiElement elementToRename,
Editor editor,
DataContext dataContext) |
protected VariableInplaceRenamer |
createRenamer(PsiElement elementToRename,
Editor editor) |
InplaceRefactoring |
doRename(PsiElement elementToRename,
Editor editor,
DataContext dataContext) |
static java.lang.String |
getInitialName() |
void |
invoke(Project project,
Editor editor,
PsiFile file,
DataContext dataContext)
Invokes refactoring action from editor.
|
void |
invoke(Project project,
PsiElement [] elements,
DataContext dataContext)
Invokes refactoring action from elsewhere (not from editor).
|
protected boolean |
isAvailable(PsiElement element,
Editor editor,
PsiFile file) |
boolean |
isAvailableOnDataContext(DataContext dataContext) |
protected static void |
performDialogRename(PsiElement elementToRename,
Editor editor,
DataContext dataContext,
java.lang.String initialName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isRenaming
public final boolean isAvailableOnDataContext(DataContext dataContext)
isAvailableOnDataContext
in interface RenameHandler
protected boolean isAvailable(PsiElement element, Editor editor, PsiFile file)
public void invoke(Project project, Editor editor, PsiFile file, DataContext dataContext)
RefactoringActionHandler
invoke
in interface RefactoringActionHandler
project
- the project in which the refactoring is invoked.editor
- editor that refactoring is invoked infile
- file should correspond to editor
dataContext
- can be null
for some but not all of refactoring action handlers
(it is recommended to pass DataManager.getDataContext()
instead of null
)public void invoke(Project project, PsiElement [] elements, DataContext dataContext)
RefactoringActionHandler
invoke
in interface RefactoringActionHandler
project
- the project in which the refactoring is invoked.elements
- list of elements that refactoring should work on. Refactoring-dependent.dataContext
- can be null
for some but not all of refactoring action handlers
(it is recommended to pass DataManager.getDataContext()
instead of null
)protected boolean checkAvailable(PsiElement elementToRename, Editor editor, DataContext dataContext)
public InplaceRefactoring doRename(PsiElement elementToRename, Editor editor, DataContext dataContext)
protected static void performDialogRename(PsiElement elementToRename, Editor editor, DataContext dataContext, java.lang.String initialName)
public static java.lang.String getInitialName()
protected VariableInplaceRenamer createRenamer(PsiElement elementToRename, Editor editor)