public class IntroduceParameterProcessor extends BaseRefactoringProcessor implements IntroduceParameterData
Modifier and Type | Class and Description |
---|---|
class |
IntroduceParameterProcessor.AnySameNameVariables |
static class |
IntroduceParameterProcessor.AnySupers |
BaseRefactoringProcessor.ConflictsInTestsException, BaseRefactoringProcessor.UnknownReferenceTypeException
IntroduceParameterData.ExpressionWrapper<RealExpression extends PsiElement>
myPrepareSuccessfulSwingThreadCallback, myProject, myRefactoringScope
Constructor and Description |
---|
IntroduceParameterProcessor(Project project,
PsiMethod methodToReplaceIn,
PsiMethod methodToSearchFor,
PsiExpression parameterInitializer,
PsiExpression expressionToSearch,
PsiLocalVariable localVariable,
boolean removeLocalVariable,
java.lang.String parameterName,
boolean replaceAllOccurrences,
int replaceFieldsWithGetters,
boolean declareFinal,
boolean generateDelegate,
PsiType forcedType,
TIntArrayList parametersToRemove)
if expressionToSearch is null, search for localVariable
|
createConflictsDialog, customizeUsagesView, doRun, execute, getElementsToWrite, getTransaction, getUndoConfirmationPolicy, isGlobalUndoAction, isPreviewUsages, isPreviewUsages, isToBeChanged, performPsiSpoilingRefactoring, prepareConflictsDialog, prepareSuccessful, previewRefactoring, processConflicts, refreshElements, run, runWithDisabledPreview, setPrepareSuccessfulSwingThreadCallback, setPreviewUsages, shouldDisableAccessChecks, showConflicts, showConflicts, skipNonCodeUsages
public IntroduceParameterProcessor(Project project, PsiMethod methodToReplaceIn, PsiMethod methodToSearchFor, PsiExpression parameterInitializer, PsiExpression expressionToSearch, PsiLocalVariable localVariable, boolean removeLocalVariable, java.lang.String parameterName, boolean replaceAllOccurrences, int replaceFieldsWithGetters, boolean declareFinal, boolean generateDelegate, PsiType forcedType, TIntArrayList parametersToRemove)
public void setParameterInitializer(PsiExpression parameterInitializer)
protected UsageViewDescriptor createUsageViewDescriptor(UsageInfo [] usages)
createUsageViewDescriptor
in class BaseRefactoringProcessor
public PsiType getForcedType()
getForcedType
in interface IntroduceParameterData
public int getReplaceFieldsWithGetters()
getReplaceFieldsWithGetters
in interface IntroduceParameterData
public void setReplaceFieldsWithGetters(int replaceFieldsWithGetters)
protected UsageInfo [] findUsages()
BaseRefactoringProcessor
findUsages
in class BaseRefactoringProcessor
protected PsiElement[] getOccurrences()
public boolean hasConflicts()
protected boolean preprocessUsages(Ref<UsageInfo[]> refUsages)
BaseRefactoringProcessor
preprocessUsages
in class BaseRefactoringProcessor
refUsages
- usages to be filteredprotected java.lang.String getRefactoringId()
getRefactoringId
in class BaseRefactoringProcessor
protected RefactoringEventData getBeforeData()
getBeforeData
in class BaseRefactoringProcessor
protected RefactoringEventData getAfterData(UsageInfo [] usages)
getAfterData
in class BaseRefactoringProcessor
protected void performRefactoring(UsageInfo [] usages)
BaseRefactoringProcessor
performRefactoring
in class BaseRefactoringProcessor
protected boolean isReplaceDuplicates()
protected java.lang.String getCommandName()
getCommandName
in class BaseRefactoringProcessor
public PsiMethod getMethodToReplaceIn()
getMethodToReplaceIn
in interface IntroduceParameterData
public PsiMethod getMethodToSearchFor()
getMethodToSearchFor
in interface IntroduceParameterData
public JavaExpressionWrapper getParameterInitializer()
getParameterInitializer
in interface IntroduceParameterData
public java.lang.String getParameterName()
getParameterName
in interface IntroduceParameterData
public boolean isDeclareFinal()
isDeclareFinal
in interface IntroduceParameterData
public boolean isGenerateDelegate()
isGenerateDelegate
in interface IntroduceParameterData
public TIntArrayList getParametersToRemove()
getParametersToRemove
in interface IntroduceParameterData
public Project getProject()
getProject
in interface IntroduceParameterData