public class AnonymousToInnerHandler extends java.lang.Object implements RefactoringActionHandler
Modifier and Type | Field and Description |
---|---|
protected boolean |
myMakeStatic |
protected java.lang.String |
myNewClassName |
protected VariableInfo[] |
myVariableInfos |
Constructor and Description |
---|
AnonymousToInnerHandler() |
Modifier and Type | Method and Description |
---|---|
static PsiAnonymousClass |
findAnonymousClass(PsiFile file,
int offset) |
static PsiElement |
findTargetContainer(PsiAnonymousClass anonClass) |
void |
invoke(Project project,
Editor editor,
PsiAnonymousClass anonymousClass) |
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).
|
boolean |
needsThis() |
protected boolean |
showRefactoringDialog() |
protected java.lang.String myNewClassName
protected VariableInfo[] myVariableInfos
protected boolean myMakeStatic
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, 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, Editor editor, PsiAnonymousClass anonymousClass)
protected boolean showRefactoringDialog()
public static PsiAnonymousClass findAnonymousClass(PsiFile file, int offset)
public static PsiElement findTargetContainer(PsiAnonymousClass anonClass)
public boolean needsThis()