public class InplaceIntroduceConstantPopup extends AbstractInplaceIntroduceFieldPopup
myFieldRangeStart, myOccurrenceManager
myTypeSelectorManager
ACTIVE_INTRODUCE, myExprText, myFinished, myLocalMarker, myLocalVariable, myWholePanel
myExpr, myExprMarker, myOccurrenceMarkers, myOccurrences
INPLACE_RENAMER, INTRODUCE_RESTART, LOG, myAdvertisementText, myBalloon, myBeforeRevert, myCaretRangeMarker, myEditor, myElementToRename, myInitialName, myInsertedName, myMarkAction, myNameSuggestions, myOldName, myProject, myRenameOffset, myScope, myTarget, myTitle, OTHER_VARIABLE_NAME, ourRenamersStack, PRIMARY_VARIABLE_NAME
Constructor and Description |
---|
InplaceIntroduceConstantPopup(Project project,
Editor editor,
PsiClass parentClass,
PsiExpression expr,
PsiLocalVariable localVariable,
PsiExpression[] occurrences,
TypeSelectorManagerImpl typeSelectorManager,
PsiElement anchorElement,
PsiElement anchorElementIfAll,
OccurrenceManager occurrenceManager) |
Modifier and Type | Method and Description |
---|---|
protected PsiVariable |
createFieldToStartTemplateOn(java.lang.String[] names,
PsiType psiType) |
protected java.lang.String |
getActionName()
Returns ID of the action the shortcut of which is used to show the non-in-place refactoring dialog.
|
protected javax.swing.JComponent |
getComponent() |
protected java.lang.String |
getRefactoringId() |
protected VariableKind |
getVariableKind() |
boolean |
isReplaceAllOccurrences() |
protected void |
performIntroduce() |
protected boolean |
performRefactoring() |
protected void |
saveSettings(PsiVariable psiVariable) |
void |
setReplaceAllOccurrences(boolean allOccurrences) |
protected boolean |
startsOnTheSameElement(RefactoringActionHandler handler,
PsiElement element) |
protected boolean |
startsOnTheSameElements(Editor editor,
RefactoringActionHandler handler,
PsiElement[] elements) |
protected java.lang.String[] |
suggestNames(PsiType defaultType,
java.lang.String propName) |
checkLocalScope, getAnchorElement, getAnchorElementIfAll, getParentClass, getReferencesSearchScope, getVariable
appendUnresolvedExprName, chooseName, correctExpression, createExpression, createFieldToStartTemplateOn, getType, restoreExpression, restoreExpression, restoreState, suggestNames
addHighlights, addReferenceAtCaret, adjustHighlightsStartOffset, collectAdditionalElementsToRename, deleteTemplateField, ensureValid, finish, getActiveIntroducer, getBeforeExpr, getCaretOffset, getExpressionText, getInputName, getLocalVariable, getPreviewComponent, getPreviewEditor, moveOffsetAfter, performPostIntroduceTasks, releaseResources, restartInplaceIntroduceTemplate, restoreSelection, revalidate, setPreviewText, shouldSelectAll, showBalloon, startInplaceIntroduceTemplate, startRename, startsOnTheSameElement, updateTitle, updateTitle
createLookupExpression, createMarker, getCommandName, getExpr, getExprMarker, getOccurrenceMarkers, getOccurrences, initOccurrencesMarkers, setExprMarker, setOccurrenceMarkers
acceptReference, addAdditionalVariables, adjustBalloon, beforeTemplateStart, buildTemplateAndStart, canStartAnotherRefactoring, checkCleared, collectRefs, createPreviewComponent, createTemplateExpression, getActiveInplaceRenamer, getInitialName, getNameIdentifier, getRangeToRename, getRangeToRename, getSelectedInEditorElement, getTopLevelVirtualFile, isIdentifier, isReferenceAtCaret, isRestart, isShowBalloonInHeadlessMode, navigateToAlreadyStarted, notSameFile, performCleanup, performInplaceRefactoring, releaseIfNotRestart, restoreCaretOffset, revertState, setAdvertisementText, setElementToRename, setShowBalloonInHeadlessMode, shouldStopAtLookupExpression, showBalloonInEditor, showDialogAdvertisement, stopIntroduce, stopIntroduce, unableToStartWarning
public InplaceIntroduceConstantPopup(Project project, Editor editor, PsiClass parentClass, PsiExpression expr, PsiLocalVariable localVariable, PsiExpression[] occurrences, TypeSelectorManagerImpl typeSelectorManager, PsiElement anchorElement, PsiElement anchorElementIfAll, OccurrenceManager occurrenceManager)
protected PsiVariable createFieldToStartTemplateOn(java.lang.String[] names, PsiType psiType)
createFieldToStartTemplateOn
in class AbstractJavaInplaceIntroducer
protected java.lang.String[] suggestNames(PsiType defaultType, java.lang.String propName)
suggestNames
in class AbstractJavaInplaceIntroducer
protected VariableKind getVariableKind()
getVariableKind
in class AbstractJavaInplaceIntroducer
public boolean isReplaceAllOccurrences()
isReplaceAllOccurrences
in class AbstractInplaceIntroducer<PsiVariable,PsiExpression>
public void setReplaceAllOccurrences(boolean allOccurrences)
setReplaceAllOccurrences
in class AbstractInplaceIntroducer<PsiVariable,PsiExpression>
protected void saveSettings(PsiVariable psiVariable)
saveSettings
in class AbstractJavaInplaceIntroducer
protected boolean performRefactoring()
performRefactoring
in class AbstractInplaceIntroducer<PsiVariable,PsiExpression>
protected java.lang.String getRefactoringId()
getRefactoringId
in class AbstractInplaceIntroducer<PsiVariable,PsiExpression>
protected boolean startsOnTheSameElement(RefactoringActionHandler handler, PsiElement element)
startsOnTheSameElement
in class AbstractInplaceIntroduceFieldPopup
protected boolean startsOnTheSameElements(Editor editor, RefactoringActionHandler handler, PsiElement[] elements)
startsOnTheSameElements
in class InplaceRefactoring
protected void performIntroduce()
performIntroduce
in class AbstractInplaceIntroducer<PsiVariable,PsiExpression>
protected javax.swing.JComponent getComponent()
getComponent
in class AbstractInplaceIntroducer<PsiVariable,PsiExpression>
protected java.lang.String getActionName()
AbstractInplaceIntroducer
getActionName
in class AbstractInplaceIntroducer<PsiVariable,PsiExpression>