public interface RefactoringQuickFix extends LocalQuickFix
EMPTY_ARRAY| Modifier and Type | Method and Description |
|---|---|
default void |
applyFix(Project project,
ProblemDescriptor descriptor)
Called to apply the fix.
|
default void |
doFix(PsiElement element) |
default DataContext |
enhanceDataContext(DataContext context) |
default PsiElement |
getElementToRefactor(PsiElement element) |
RefactoringActionHandler |
getHandler()
Usually a call to com.intellij.refactoring.RefactoringActionHandlerFactory or a language specific factory like
com.intellij.refactoring.JavaRefactoringActionHandlerFactory.
|
default RefactoringActionHandler |
getHandler(DataContext context)
Override if preferred handler can be chosen based on context
|
default boolean |
startInWriteAction()
Indicate whether this action should be invoked inside write action.
|
getFamilyName, getNamegetElementToMakeWritabledefault boolean startInWriteAction()
WriteActionAwarefalse if e.g. modal dialog is shown inside the action.
If false is returned the action itself is responsible for starting write action
when needed, by calling Application.runWriteAction(Runnable).startInWriteAction in interface WriteActionAwaretrue if the action requires a write action (default), false otherwise.RefactoringActionHandler getHandler()
default RefactoringActionHandler getHandler(DataContext context)
default PsiElement getElementToRefactor(PsiElement element)
default void doFix(PsiElement element)
default void applyFix(Project project, ProblemDescriptor descriptor)
QuickFix
Please call com.intellij.profile.codeInspection.ProjectInspectionProfileManager#fireProfileChanged() if inspection profile is changed as result of fix.
applyFix in interface QuickFix<ProblemDescriptor>project - Projectdescriptor - problem reported by the tool which provided this quick fix actiondefault DataContext enhanceDataContext(DataContext context)
SimpleDataContext