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, skipNonCodeUsages
public 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 BaseRefactoringProcessor
protected boolean preprocessUsages(Ref<UsageInfo[]> refUsages)
BaseRefactoringProcessor
preprocessUsages
in class BaseRefactoringProcessor
refUsages
- usages to be filteredpublic boolean hasFailedConversions()
protected void previewRefactoring(UsageInfo [] usages)
previewRefactoring
in class BaseRefactoringProcessor
public static java.lang.String getPresentation(PsiElement element)
public UsageInfo [] findUsages()
BaseRefactoringProcessor
findUsages
in class BaseRefactoringProcessor
protected void refreshElements(PsiElement [] elements)
BaseRefactoringProcessor
refreshElements
in class BaseRefactoringProcessor
elements
- - refreshed elements that are returned by UsageViewDescriptor.getElements()public void performRefactoring(UsageInfo [] usages)
BaseRefactoringProcessor
performRefactoring
in class BaseRefactoringProcessor
public static void change(UsageInfo[] usages, TypeMigrationLabeler labeler, Project project)
public TypeMigrationLabeler getLabeler()
protected java.lang.String getCommandName()
getCommandName
in class BaseRefactoringProcessor