public class ExtractMethodDialog extends RefactoringDialog implements AbstractExtractDialog
DialogWrapper.CancelAction, DialogWrapper.DialogStyle, DialogWrapper.DialogWrapperAction, DialogWrapper.DialogWrapperExitAction, DialogWrapper.DoNotAskOption, DialogWrapper.IdeModalityType, DialogWrapper.OkAction| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EXTRACT_METHOD_GENERATE_ANNOTATIONS |
javax.swing.JPanel |
myCenterPanel |
protected javax.swing.JCheckBox |
myGenerateAnnotations |
protected javax.swing.JCheckBox |
myMakeVarargs |
javax.swing.JPanel |
myParamTable |
CANCEL_EXIT_CODE, CLOSE_EXIT_CODE, DEFAULT_ACTION, DIALOG_CONTENT_PANEL_PROPERTY, ERROR_FOREGROUND_COLOR, FOCUSED_ACTION, IS_VISUAL_PADDING_COMPENSATED_ON_COMPONENT_LEVEL_KEY, myCancelAction, myCheckBoxDoNotShowDialog, myDisposable, myHelpAction, myOKAction, myPerformAction, myPreferredFocusedComponent, NEXT_USER_EXIT_CODE, OK_EXIT_CODE| Modifier | Constructor and Description |
|---|---|
protected |
ExtractMethodDialog(Project project,
PsiClass targetClass,
InputVariables inputVariables,
PsiType returnType,
PsiTypeParameterList typeParameterList,
PsiType[] exceptions,
boolean isStatic,
boolean canBeStatic,
boolean canBeChainedConstructor,
java.lang.String title,
java.lang.String helpId,
Nullability nullability,
PsiElement[] elementsToExtract,
java.util.function.Supplier<java.lang.Integer> duplicatesCountSupplier) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
areTypesDirected() |
protected void |
checkMethodConflicts(MultiMap<PsiElement,java.lang.String> conflicts) |
protected void |
checkParametersConflicts(MultiMap<PsiElement,java.lang.String> conflicts) |
protected javax.swing.JComponent |
createCenterPanel()
Factory method.
|
protected javax.swing.JComponent |
createNorthPanel()
Factory method.
|
protected javax.swing.JPanel |
createOptionsPanel() |
protected void |
createParametersPanel() |
protected ParameterTablePanel |
createParameterTableComponent() |
protected javax.swing.JComponent |
createSignaturePanel() |
protected void |
createStaticOptions(javax.swing.JPanel optionsPanel,
java.lang.String passFieldsAsParamsLabel) |
protected void |
doAction() |
protected PsiExpression[] |
findOccurrences() |
java.lang.String |
getChosenMethodName() |
VariableData[] |
getChosenParameters() |
protected java.lang.String |
getDimensionServiceKey()
Returns key for persisting dialog dimensions.
|
protected java.lang.String |
getHelpId()
Returns the help identifier, or
null if no help is available. |
javax.swing.JComponent |
getPreferredFocusedComponent() |
PsiType |
getReturnType() |
protected java.lang.String |
getSignature() |
java.lang.String |
getVisibility() |
protected boolean |
hasHelpAction() |
protected boolean |
hasPreviewButton() |
boolean |
isChainedConstructor() |
boolean |
isMakeStatic() |
protected boolean |
isOutputVariable(PsiVariable var) |
protected boolean |
isVoidReturn() |
protected java.lang.String[] |
suggestMethodNames() |
protected void |
updateSignature() |
addOpenInEditorCheckbox, areButtonsValid, canRun, closeOKAction, createActions, createDefaultActions, doOKAction, doRefactorAction, getPreviewAction, getProject, getRefactorAction, getRefactoringId, invokeRefactoring, isOpenInEditor, isPreviewUsages, setHelpTooltip, setPreviewResults, show, validateButtonsaddKeyListener, addMouseListener, addMouseListener, canRecordDialogId, centerRelativeToParent, cleanupRootPane, cleanupWindowListeners, clickDefaultButton, close, close, createButtonsPanel, createCancelAction, createContentPane, createContentPaneBorder, createDefaultBorder, createDoNotAskCheckbox, createHelpButton, createJButtonForAction, createJButtonForAction, createLeftSideActions, createPeer, createPeer, createPeer, createPeer, createPeer, createPeer, createRootLayout, createSouthAdditionalPanel, createSouthPanel, createTitlePane, dispose, disposeIfNeeded, doCancelAction, doCancelAction, doHelpAction, doValidate, doValidateAll, extractMnemonic, findInstance, findInstanceFromFocus, getButton, getCancelAction, getContentPane, getContentPanel, getDimensionKey, getDisposable, getDoNotShowMessage, getErrorTextAlignment, getExitCode, getHelpAction, getHorizontalStretch, getInitialLocation, getLocation, getOKAction, getOwner, getPeer, getPreferredSize, getRootPane, getSize, getStyle, getTitle, getTypeAheadTimeoutMs, getValidationThreadToUse, getVerticalStretch, getWindow, hasErrors, init, initValidation, isAutoAdjustable, isCenterStrictedToPreferredSize, isDisposed, isModal, isModalProgress, isMoveHelpButtonLeft, isNorthStrictedToPreferredSize, isOK, isOKActionEnabled, isProgressDialog, isResizable, isShowing, isSouthStrictedToPreferredSize, isToDispatchTypeAhead, isTypeAheadEnabled, isVisible, layoutButtonsPanel, pack, postponeValidation, processDoNotAskOnOk, repaint, setAutoAdjustable, setButtonsAlignment, setButtonsMargin, setCancelButtonIcon, setCancelButtonText, setCrossClosesWindow, setDoNotAskOption, setErrorInfoAll, setErrorText, setErrorText, setHorizontalStretch, setInitialLocationCallback, setLocation, setLocation, setModal, setOKActionEnabled, setOKButtonIcon, setOKButtonMnemonic, setOKButtonText, setOKButtonTooltip, setResizable, setSize, setTitle, setUndecorated, setValidationDelay, setVerticalStretch, shouldAddErrorNearButtons, shouldCloseOnCross, showAndGet, showAndGetOk, startTrackingValidation, toBack, toBeShown, toFront, unregisterKeyboardActions, updateErrorInfo, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisOK, isPreviewUsages, showpublic static final java.lang.String EXTRACT_METHOD_GENERATE_ANNOTATIONS
protected javax.swing.JCheckBox myMakeVarargs
protected javax.swing.JCheckBox myGenerateAnnotations
public javax.swing.JPanel myCenterPanel
public javax.swing.JPanel myParamTable
protected ExtractMethodDialog(Project project, PsiClass targetClass, InputVariables inputVariables, PsiType returnType, PsiTypeParameterList typeParameterList, PsiType[] exceptions, boolean isStatic, boolean canBeStatic, boolean canBeChainedConstructor, java.lang.String title, java.lang.String helpId, Nullability nullability, PsiElement[] elementsToExtract, java.util.function.Supplier<java.lang.Integer> duplicatesCountSupplier)
protected java.lang.String[] suggestMethodNames()
protected boolean areTypesDirected()
public boolean isMakeStatic()
isMakeStatic in interface AbstractExtractDialogpublic boolean isChainedConstructor()
isChainedConstructor in interface AbstractExtractDialogprotected boolean hasPreviewButton()
hasPreviewButton in class RefactoringDialogprotected boolean hasHelpAction()
hasHelpAction in class RefactoringDialogpublic java.lang.String getChosenMethodName()
getChosenMethodName in interface AbstractExtractDialogpublic VariableData[] getChosenParameters()
getChosenParameters in interface AbstractExtractDialogpublic javax.swing.JComponent getPreferredFocusedComponent()
getPreferredFocusedComponent in class DialogWrapperprotected java.lang.String getHelpId()
DialogWrappernull if no help is available.getHelpId in class DialogWrapperprotected void doAction()
doAction in class RefactoringDialogprotected javax.swing.JComponent createNorthPanel()
DialogWrappernull
value. In this case there will be no input panel.createNorthPanel in class DialogWrapperprotected boolean isVoidReturn()
protected PsiExpression[] findOccurrences()
protected javax.swing.JPanel createOptionsPanel()
protected void createStaticOptions(javax.swing.JPanel optionsPanel,
java.lang.String passFieldsAsParamsLabel)
public java.lang.String getVisibility()
getVisibility in interface AbstractExtractDialogprotected javax.swing.JComponent createCenterPanel()
DialogWrappernull
value. In this case there will be no options panel.createCenterPanel in class DialogWrapperprotected boolean isOutputVariable(PsiVariable var)
protected void createParametersPanel()
protected ParameterTablePanel createParameterTableComponent()
protected javax.swing.JComponent createSignaturePanel()
protected void updateSignature()
protected java.lang.String getSignature()
protected java.lang.String getDimensionServiceKey()
DialogWrappernull (no persisting).getDimensionServiceKey in class DialogWrapperprotected void checkMethodConflicts(MultiMap<PsiElement,java.lang.String> conflicts)
protected void checkParametersConflicts(MultiMap<PsiElement,java.lang.String> conflicts)
public PsiType getReturnType()
getReturnType in interface AbstractExtractDialog