public static class ExternalAnnotatorInspectionVisitor.LocalQuickFixBackedByIntentionAction extends java.lang.Object implements LocalQuickFix, Iconable
Iconable.IconFlags, Iconable.LastComputedIconEMPTY_ARRAYICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY| Constructor and Description |
|---|
LocalQuickFixBackedByIntentionAction(IntentionAction action) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyFix(Project project,
ProblemDescriptor descriptor)
Called to apply the fix.
|
boolean |
equals(java.lang.Object o) |
PsiElement |
getElementToMakeWritable(PsiFile file)
Controls whether this intention/fix is going to modify the current file.
|
java.lang.String |
getFamilyName() |
javax.swing.Icon |
getIcon(int flags) |
java.lang.String |
getName() |
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitstartInWriteActionpublic LocalQuickFixBackedByIntentionAction(IntentionAction action)
public java.lang.String getName()
getName in interface QuickFix<ProblemDescriptor>public java.lang.String getFamilyName()
getFamilyName in interface QuickFix<ProblemDescriptor>QuickFix.getName().public 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 actionpublic PsiElement getElementToMakeWritable(PsiFile file)
FileModifier@NotNull, and the current file is read-only,
it will be made writable (honoring version control integration) before the intention/fix is invoked.
By default, as a heuristic, returns the same as WriteActionAware.startInWriteAction().
If the action is going to modify multiple files, or the set of the files is unknown in advance, please
don't bother overriding this method, return false from WriteActionAware.startInWriteAction(), and call FileModificationService methods in the implementation, and take write actions yourself as needed.getElementToMakeWritable in interface FileModifierfile - the same file where intention would be invoked (for LocalQuickFix it would be the containing file of ProblemDescriptor.getPsiElement())public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object