public class IntroduceFunctionalVariableHandler extends IntroduceVariableHandler
IntroduceVariableBase.JavaReplaceChoice, IntroduceVariableBase.Validator
NEED_PARENTHESIS
Constructor and Description |
---|
IntroduceFunctionalVariableHandler() |
Modifier and Type | Method and Description |
---|---|
void |
invoke(Project project,
Editor editor,
PsiFile file,
DataContext dataContext)
Invokes refactoring action from editor.
|
protected void |
setupProcessorWithoutDialog(ExtractMethodProcessor processor,
InputVariables inputVariables) |
protected void |
showErrorMessage(Project project,
Editor editor,
java.lang.String message) |
acceptLocalVariable, getSettings, invoke, reportConflicts
canBeExtractedWithoutExplicitType, checkAnchorBeforeThisOrSuper, checkAnchorStatement, checkInLoopCondition, chooseAnchor, collectExpressions, collectExpressions, collectExpressions, createFinals, createVarType, expandDiamondsAndReplaceExplicitTypeWithVar, findStatementsAtOffset, getErrorMessage, getInplaceIntroducer, getOccurrencesChoice, getRefactoringName, getSelectedExpression, getSuggestedName, getSuggestedName, highlightReplacedOccurrences, invokeImpl, invokeImpl, isChooserNeeded, isInplaceAvailableInTestMode, isPreferStatements, preferredSelection, replace, selectLineAtCaret, simplifyVariableInitializer, simplifyVariableInitializer
invoke, invoke, isAvailableForQuickList
public void invoke(Project project, Editor editor, PsiFile file, DataContext dataContext)
RefactoringActionHandler
invoke
in interface RefactoringActionHandler
invoke
in class IntroduceVariableBase
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 void showErrorMessage(Project project, Editor editor, java.lang.String message)
showErrorMessage
in class IntroduceVariableHandler
protected void setupProcessorWithoutDialog(ExtractMethodProcessor processor, InputVariables inputVariables)