public class IntroduceConstantHandler extends BaseExpressionToFieldHandler
BaseExpressionToFieldHandler.ConvertToFieldRunnable, BaseExpressionToFieldHandler.InitializationPlace, BaseExpressionToFieldHandler.Settings, BaseExpressionToFieldHandler.TargetDestination| Modifier and Type | Field and Description |
|---|---|
protected InplaceIntroduceConstantPopup |
myInplaceIntroduceConstantPopup |
| Constructor and Description |
|---|
IntroduceConstantHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
accept(ElementToWorkOn elementToWorkOn) |
protected OccurrenceManager |
createOccurrenceManager(PsiExpression selectedExpr,
PsiClass parentClass) |
protected java.lang.String |
getHelpID() |
AbstractInplaceIntroducer |
getInplaceIntroducer() |
PsiClass |
getParentClass(PsiExpression initializerExpression) |
protected java.lang.String |
getRefactoringName() |
static java.lang.String |
getRefactoringNameText() |
void |
invoke(Project project,
Editor editor,
PsiFile file,
DataContext dataContext)
Invokes refactoring action from editor.
|
void |
invoke(Project project,
PsiExpression[] expressions) |
protected boolean |
invokeImpl(Project project,
PsiLocalVariable localVariable,
Editor editor) |
protected BaseExpressionToFieldHandler.Settings |
showRefactoringDialog(Project project,
Editor editor,
PsiClass parentClass,
PsiExpression expr,
PsiType type,
PsiExpression[] occurrences,
PsiElement anchorElement,
PsiElement anchorElementIfAll) |
protected boolean |
validClass(PsiClass parentClass,
Editor editor) |
getElementProcessor, getEnclosingConstructor, getParentClass, getPhysicalElement, invokeImpl, isStaticFinalInitializer, setModifiersacceptLocalVariable, invoke, invoke, isAvailableForQuickListprotected InplaceIntroduceConstantPopup myInplaceIntroduceConstantPopup
protected java.lang.String getHelpID()
getHelpID in class BaseExpressionToFieldHandlerpublic void invoke(Project project, PsiExpression[] expressions)
public void invoke(Project project, Editor editor, PsiFile file, DataContext dataContext)
RefactoringActionHandlerproject - the project in which the refactoring is invoked.editor - editor that refactoring is invoked infile - file should correspond to editordataContext - 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, PsiLocalVariable localVariable, Editor editor)
invokeImpl in class IntroduceHandlerBaseeditor - editor to highlight stuff in. Should accept nullprotected BaseExpressionToFieldHandler.Settings showRefactoringDialog(Project project, Editor editor, PsiClass parentClass, PsiExpression expr, PsiType type, PsiExpression[] occurrences, PsiElement anchorElement, PsiElement anchorElementIfAll)
showRefactoringDialog in class BaseExpressionToFieldHandlerprotected java.lang.String getRefactoringName()
getRefactoringName in class BaseExpressionToFieldHandlerpublic AbstractInplaceIntroducer getInplaceIntroducer()
getInplaceIntroducer in class IntroduceHandlerBaseprotected OccurrenceManager createOccurrenceManager(PsiExpression selectedExpr, PsiClass parentClass)
createOccurrenceManager in class BaseExpressionToFieldHandlerpublic PsiClass getParentClass(PsiExpression initializerExpression)
getParentClass in class BaseExpressionToFieldHandlerprotected boolean accept(ElementToWorkOn elementToWorkOn)
accept in class BaseExpressionToFieldHandlerprotected boolean validClass(PsiClass parentClass, Editor editor)
validClass in class BaseExpressionToFieldHandlerpublic static java.lang.String getRefactoringNameText()