public abstract class IntroduceHandlerBase extends java.lang.Object implements RefactoringActionHandler, ContextAwareActionHandler
Constructor and Description |
---|
IntroduceHandlerBase() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptLocalVariable() |
abstract AbstractInplaceIntroducer |
getInplaceIntroducer() |
void |
invoke(Project project,
PsiElement [] elements,
DataContext dataContext)
Invokes refactoring action from elsewhere (not from editor).
|
void |
invoke(Project project,
PsiElement element,
Editor editor) |
protected abstract boolean |
invokeImpl(Project project,
PsiExpression tempExpr,
Editor editor) |
protected abstract boolean |
invokeImpl(Project project,
PsiLocalVariable localVariable,
Editor editor) |
boolean |
isAvailableForQuickList(Editor editor,
PsiFile file,
DataContext dataContext)
Handlers could provide useful hints when they are actually not available, e.g.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invoke
public boolean isAvailableForQuickList(Editor editor, PsiFile file, DataContext dataContext)
ContextAwareActionHandler
isAvailableForQuickList
in interface ContextAwareActionHandler
protected boolean acceptLocalVariable()
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
)public void invoke(Project project, PsiElement element, Editor editor)
protected abstract boolean invokeImpl(Project project, PsiExpression tempExpr, Editor editor)
editor
- editor to highlight stuff in. Should accept null
protected abstract boolean invokeImpl(Project project, PsiLocalVariable localVariable, Editor editor)
editor
- editor to highlight stuff in. Should accept null
public abstract AbstractInplaceIntroducer getInplaceIntroducer()