public class IntroduceParameterHandler extends IntroduceHandlerBase
Constructor and Description |
---|
IntroduceParameterHandler() |
Modifier and Type | Method and Description |
---|---|
static PsiMethod |
chooseEnclosingMethod(PsiMethod method) |
static PsiElement [] |
getElementsInCopy(Project project,
PsiFile file,
PsiElement [] elements) |
static PsiElement [] |
getElementsInCopy(Project project,
PsiFile file,
PsiElement [] elements,
boolean reuseNonPhysical) |
static java.util.List<PsiMethod> |
getEnclosingMethods(PsiMethod nearest) |
AbstractInplaceIntroducer |
getInplaceIntroducer() |
boolean |
introduceStrategy(Project project,
Editor editor,
PsiFile file,
PsiElement [] elements) |
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 |
invokeImpl(Project project,
PsiExpression tempExpr,
Editor editor) |
protected boolean |
invokeImpl(Project project,
PsiLocalVariable localVariable,
Editor editor) |
acceptLocalVariable, invoke, isAvailableForQuickList
public void invoke(Project project, Editor editor, PsiFile file, DataContext dataContext)
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
)protected boolean invokeImpl(Project project, PsiExpression tempExpr, Editor editor)
invokeImpl
in class IntroduceHandlerBase
editor
- editor to highlight stuff in. Should accept null
protected boolean invokeImpl(Project project, PsiLocalVariable localVariable, Editor editor)
invokeImpl
in class IntroduceHandlerBase
editor
- editor to highlight stuff in. Should accept null
public void invoke(Project project, PsiElement [] elements, DataContext dataContext)
RefactoringActionHandler
invoke
in interface RefactoringActionHandler
invoke
in class IntroduceHandlerBase
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 AbstractInplaceIntroducer getInplaceIntroducer()
getInplaceIntroducer
in class IntroduceHandlerBase
public boolean introduceStrategy(Project project, Editor editor, PsiFile file, PsiElement [] elements)
public static PsiElement [] getElementsInCopy(Project project, PsiFile file, PsiElement [] elements)
public static PsiElement [] getElementsInCopy(Project project, PsiFile file, PsiElement [] elements, boolean reuseNonPhysical)