public class TypeMigrationProcessor extends BaseRefactoringProcessor
BaseRefactoringProcessor.ConflictsInTestsException, BaseRefactoringProcessor.UnknownReferenceTypeException| Modifier and Type | Field and Description |
|---|---|
static boolean |
ourSkipFailedConversionInTestMode |
myPrepareSuccessfulSwingThreadCallback, myProject, myRefactoringScope| Constructor and Description |
|---|
TypeMigrationProcessor(Project project,
PsiElement[] roots,
Function<PsiElement,PsiType> rootTypes,
TypeMigrationRules rules,
boolean allowDependentRoots) |
| Modifier and Type | Method and Description |
|---|---|
static void |
change(UsageInfo[] usages,
TypeMigrationLabeler labeler,
Project project) |
protected UsageViewDescriptor |
createUsageViewDescriptor(UsageInfo [] usages) |
UsageInfo [] |
findUsages()
Is called inside atomic action.
|
protected java.lang.String |
getCommandName() |
TypeMigrationLabeler |
getLabeler() |
static java.lang.String |
getPresentation(PsiElement element) |
boolean |
hasFailedConversions() |
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 |
previewRefactoring(UsageInfo [] usages) |
protected void |
refreshElements(PsiElement [] elements)
is called when usage search is re-run.
|
static void |
runHighlightingTypeMigration(Project project,
Editor editor,
TypeMigrationRules rules,
PsiElement[] roots,
Function<PsiElement,PsiType> migrationTypeFunction,
boolean optimizeImports,
boolean allowDependentRoots) |
static void |
runHighlightingTypeMigration(Project project,
Editor editor,
TypeMigrationRules rules,
PsiElement root,
PsiType migrationType) |
static void |
runHighlightingTypeMigration(Project project,
Editor editor,
TypeMigrationRules rules,
PsiElement root,
PsiType migrationType,
boolean optimizeImports,
boolean allowDependentRoots) |
createConflictsDialog, customizeUsagesView, doRun, execute, getAfterData, getBeforeData, getElementsToWrite, getRefactoringId, getTransaction, getUndoConfirmationPolicy, isGlobalUndoAction, isPreviewUsages, isPreviewUsages, isToBeChanged, performPsiSpoilingRefactoring, prepareConflictsDialog, prepareSuccessful, processConflicts, run, runWithDisabledPreview, setPrepareSuccessfulSwingThreadCallback, setPreviewUsages, shouldDisableAccessChecks, showConflicts, showConflicts, skipNonCodeUsagespublic static volatile boolean ourSkipFailedConversionInTestMode
public TypeMigrationProcessor(Project project, PsiElement[] roots, Function<PsiElement,PsiType> rootTypes, TypeMigrationRules rules, boolean allowDependentRoots)
public static void runHighlightingTypeMigration(Project project, Editor editor, TypeMigrationRules rules, PsiElement root, PsiType migrationType)
public static void runHighlightingTypeMigration(Project project, Editor editor, TypeMigrationRules rules, PsiElement root, PsiType migrationType, boolean optimizeImports, boolean allowDependentRoots)
public static void runHighlightingTypeMigration(Project project, Editor editor, TypeMigrationRules rules, PsiElement[] roots, Function<PsiElement,PsiType> migrationTypeFunction, boolean optimizeImports, boolean allowDependentRoots)
protected UsageViewDescriptor createUsageViewDescriptor(UsageInfo [] usages)
createUsageViewDescriptor in class BaseRefactoringProcessorprotected boolean preprocessUsages(Ref<UsageInfo[]> refUsages)
BaseRefactoringProcessorpreprocessUsages in class BaseRefactoringProcessorrefUsages - usages to be filteredpublic boolean hasFailedConversions()
protected void previewRefactoring(UsageInfo [] usages)
previewRefactoring in class BaseRefactoringProcessorpublic static java.lang.String getPresentation(PsiElement element)
public UsageInfo [] findUsages()
BaseRefactoringProcessorfindUsages in class BaseRefactoringProcessorprotected void refreshElements(PsiElement [] elements)
BaseRefactoringProcessorrefreshElements in class BaseRefactoringProcessorelements - - refreshed elements that are returned by UsageViewDescriptor.getElements()public void performRefactoring(UsageInfo [] usages)
BaseRefactoringProcessorperformRefactoring in class BaseRefactoringProcessorpublic static void change(UsageInfo[] usages, TypeMigrationLabeler labeler, Project project)
public TypeMigrationLabeler getLabeler()
protected java.lang.String getCommandName()
getCommandName in class BaseRefactoringProcessor