public class SafeDeleteProcessor extends BaseRefactoringProcessor
BaseRefactoringProcessor.ConflictsInTestsException, BaseRefactoringProcessor.UnknownReferenceTypeException
myPrepareSuccessfulSwingThreadCallback, myProject, myRefactoringScope
Modifier and Type | Method and Description |
---|---|
static void |
addNonCodeUsages(PsiElement element,
SearchScope searchScope,
java.util.List<? super UsageInfo> usages,
Condition<? super PsiElement> insideElements,
boolean searchNonJava,
boolean searchInCommentsAndStrings) |
static SafeDeleteProcessor |
createInstance(Project project,
java.lang.Runnable prepareSuccessfulCallback,
PsiElement[] elementsToDelete,
boolean isSearchInComments,
boolean isSearchNonJava) |
static SafeDeleteProcessor |
createInstance(Project project,
java.lang.Runnable prepareSuccessfulCallBack,
PsiElement[] elementsToDelete,
boolean isSearchInComments,
boolean isSearchNonJava,
boolean askForAccessors) |
protected UsageViewDescriptor |
createUsageViewDescriptor(UsageInfo [] usages) |
static void |
findGenericElementUsages(PsiElement element,
java.util.List<? super UsageInfo> usages,
PsiElement[] allElementsToDelete) |
static void |
findGenericElementUsages(PsiElement element,
java.util.List<? super UsageInfo> usages,
PsiElement[] allElementsToDelete,
SearchScope scope) |
protected UsageInfo [] |
findUsages()
Is called inside atomic action.
|
protected RefactoringEventData |
getBeforeData() |
protected java.lang.String |
getCommandName() |
static Condition<PsiElement> |
getDefaultInsideDeletedCondition(PsiElement[] elements) |
PsiElement[] |
getElements() |
protected java.lang.String |
getRefactoringId() |
static boolean |
isInside(PsiElement place,
PsiElement ancestor) |
protected boolean |
isPreviewUsages(UsageInfo [] usages)
Is called inside atomic action.
|
boolean |
isSearchInCommentsAndStrings() |
boolean |
isSearchNonJava() |
protected boolean |
isToBeChanged(UsageInfo usageInfo) |
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 |
refreshElements(PsiElement [] elements)
is called when usage search is re-run.
|
void |
setAfterRefactoringCallback(java.lang.Runnable afterRefactoringCallback) |
void |
setSearchInCommentsAndStrings(boolean searchInCommentsAndStrings) |
void |
setSearchNonJava(boolean searchNonJava) |
protected boolean |
skipNonCodeUsages() |
static boolean |
validElement(PsiElement element) |
createConflictsDialog, customizeUsagesView, doRun, execute, getAfterData, getElementsToWrite, getTransaction, getUndoConfirmationPolicy, isGlobalUndoAction, isPreviewUsages, performPsiSpoilingRefactoring, prepareConflictsDialog, prepareSuccessful, previewRefactoring, processConflicts, run, runWithDisabledPreview, setPrepareSuccessfulSwingThreadCallback, setPreviewUsages, shouldDisableAccessChecks, showConflicts, showConflicts
protected UsageViewDescriptor createUsageViewDescriptor(UsageInfo [] usages)
createUsageViewDescriptor
in class BaseRefactoringProcessor
public static boolean isInside(PsiElement place, PsiElement ancestor)
protected UsageInfo [] findUsages()
BaseRefactoringProcessor
findUsages
in class BaseRefactoringProcessor
public static Condition<PsiElement> getDefaultInsideDeletedCondition(PsiElement[] elements)
public static void findGenericElementUsages(PsiElement element, java.util.List<? super UsageInfo> usages, PsiElement[] allElementsToDelete, SearchScope scope)
public static void findGenericElementUsages(PsiElement element, java.util.List<? super UsageInfo> usages, PsiElement[] allElementsToDelete)
protected boolean preprocessUsages(Ref<UsageInfo[]> refUsages)
BaseRefactoringProcessor
preprocessUsages
in class BaseRefactoringProcessor
refUsages
- usages to be filteredpublic PsiElement[] getElements()
protected void refreshElements(PsiElement [] elements)
BaseRefactoringProcessor
refreshElements
in class BaseRefactoringProcessor
elements
- - refreshed elements that are returned by UsageViewDescriptor.getElements()protected boolean isPreviewUsages(UsageInfo [] usages)
BaseRefactoringProcessor
isPreviewUsages
in class BaseRefactoringProcessor
protected RefactoringEventData getBeforeData()
getBeforeData
in class BaseRefactoringProcessor
protected java.lang.String getRefactoringId()
getRefactoringId
in class BaseRefactoringProcessor
protected void performRefactoring(UsageInfo [] usages)
BaseRefactoringProcessor
performRefactoring
in class BaseRefactoringProcessor
protected java.lang.String getCommandName()
getCommandName
in class BaseRefactoringProcessor
public static void addNonCodeUsages(PsiElement element, SearchScope searchScope, java.util.List<? super UsageInfo> usages, Condition<? super PsiElement> insideElements, boolean searchNonJava, boolean searchInCommentsAndStrings)
protected boolean isToBeChanged(UsageInfo usageInfo)
isToBeChanged
in class BaseRefactoringProcessor
public static boolean validElement(PsiElement element)
public static SafeDeleteProcessor createInstance(Project project, java.lang.Runnable prepareSuccessfulCallback, PsiElement[] elementsToDelete, boolean isSearchInComments, boolean isSearchNonJava)
public static SafeDeleteProcessor createInstance(Project project, java.lang.Runnable prepareSuccessfulCallBack, PsiElement[] elementsToDelete, boolean isSearchInComments, boolean isSearchNonJava, boolean askForAccessors)
public boolean isSearchInCommentsAndStrings()
public void setSearchInCommentsAndStrings(boolean searchInCommentsAndStrings)
public boolean isSearchNonJava()
public void setSearchNonJava(boolean searchNonJava)
protected boolean skipNonCodeUsages()
skipNonCodeUsages
in class BaseRefactoringProcessor
public void setAfterRefactoringCallback(java.lang.Runnable afterRefactoringCallback)