public abstract class MakeMethodOrClassStaticProcessor<T extends PsiTypeParameterListOwner> extends BaseRefactoringProcessor
BaseRefactoringProcessor.ConflictsInTestsException, BaseRefactoringProcessor.UnknownReferenceTypeException
Modifier and Type | Field and Description |
---|---|
protected T |
myMember |
protected Settings |
mySettings |
myPrepareSuccessfulSwingThreadCallback, myProject, myRefactoringScope
Constructor and Description |
---|
MakeMethodOrClassStaticProcessor(Project project,
T member,
Settings settings) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
changeExternalUsage(UsageInfo usage,
PsiElementFactory factory) |
protected abstract void |
changeInternalUsage(com.intellij.refactoring.makeStatic.InternalUsageInfo usage,
PsiElementFactory factory) |
protected abstract void |
changeSelf(PsiElementFactory factory,
UsageInfo[] usages) |
protected abstract void |
changeSelfUsage(SelfUsageInfo usageInfo) |
protected UsageViewDescriptor |
createUsageViewDescriptor(UsageInfo [] usages) |
protected boolean |
findAdditionalMembers(java.util.Set<UsageInfo> toMakeStatic) |
protected void |
findExternalReferences(PsiMethod method,
java.util.ArrayList<UsageInfo> result) |
protected abstract void |
findExternalUsages(java.util.ArrayList<UsageInfo> result) |
protected UsageInfo [] |
findUsages()
Is called inside atomic action.
|
protected RefactoringEventData |
getAfterData(UsageInfo [] usages) |
protected RefactoringEventData |
getBeforeData() |
protected java.lang.String |
getCommandName() |
protected MultiMap<PsiElement,java.lang.String> |
getConflictDescriptions(UsageInfo[] usages) |
T |
getMember() |
protected java.lang.String |
getRefactoringId() |
Settings |
getSettings() |
protected boolean |
makeClassParameterFinal(UsageInfo[] usages) |
protected static boolean |
makeFieldParameterFinal(PsiField field,
UsageInfo[] usages) |
protected void |
performRefactoring(UsageInfo [] usages)
Is called in a command and inside atomic action.
|
protected boolean |
preprocessUsages(Ref<UsageInfo[]> refUsages)
Is called inside atomic action.
|
protected void |
processExternalReference(PsiElement element,
PsiMethod method,
java.util.ArrayList<UsageInfo> result) |
protected void |
setupTypeParameterList(T member) |
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
protected T extends PsiTypeParameterListOwner myMember
protected Settings mySettings
protected UsageViewDescriptor createUsageViewDescriptor(UsageInfo [] usages)
createUsageViewDescriptor
in class BaseRefactoringProcessor
protected 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 final boolean preprocessUsages(Ref<UsageInfo[]> refUsages)
BaseRefactoringProcessor
preprocessUsages
in class BaseRefactoringProcessor
refUsages
- usages to be filteredprotected boolean findAdditionalMembers(java.util.Set<UsageInfo> toMakeStatic)
protected MultiMap<PsiElement,java.lang.String> getConflictDescriptions(UsageInfo[] usages)
protected UsageInfo [] findUsages()
BaseRefactoringProcessor
findUsages
in class BaseRefactoringProcessor
protected abstract void findExternalUsages(java.util.ArrayList<UsageInfo> result)
protected void findExternalReferences(PsiMethod method, java.util.ArrayList<UsageInfo> result)
protected void processExternalReference(PsiElement element, PsiMethod method, java.util.ArrayList<UsageInfo> result)
protected void setupTypeParameterList(T member) throws IncorrectOperationException
IncorrectOperationException
protected boolean makeClassParameterFinal(UsageInfo[] usages)
protected static boolean makeFieldParameterFinal(PsiField field, UsageInfo[] usages)
protected java.lang.String getCommandName()
getCommandName
in class BaseRefactoringProcessor
public T getMember()
public Settings getSettings()
protected void performRefactoring(UsageInfo [] usages)
BaseRefactoringProcessor
performRefactoring
in class BaseRefactoringProcessor
protected abstract void changeSelf(PsiElementFactory factory, UsageInfo[] usages) throws IncorrectOperationException
IncorrectOperationException
protected abstract void changeSelfUsage(SelfUsageInfo usageInfo) throws IncorrectOperationException
IncorrectOperationException
protected abstract void changeInternalUsage(com.intellij.refactoring.makeStatic.InternalUsageInfo usage, PsiElementFactory factory) throws IncorrectOperationException
IncorrectOperationException
protected abstract void changeExternalUsage(UsageInfo usage, PsiElementFactory factory) throws IncorrectOperationException
IncorrectOperationException