public class GuavaInspection.MigrateGuavaTypeFix extends LocalQuickFixAndIntentionActionOnPsiElement implements BatchQuickFix<CommonProblemDescriptor>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FAMILY_NAME |
LOG, myEndElement, myStartElement
EMPTY_ARRAY
EMPTY_ARRAY
Modifier and Type | Method and Description |
---|---|
void |
applyFix(Project project,
CommonProblemDescriptor [] descriptors,
java.util.List<PsiElement> psiElementsToIgnore,
java.lang.Runnable refreshViews)
Called to apply the cumulative fix.
|
java.lang.String |
getFamilyName()
Returns the name of the family of intentions.
|
java.lang.String |
getText()
Returns text to be shown in the list of available actions, if this action
is available.
|
void |
invoke(Project project,
PsiFile file,
Editor editor,
PsiElement startElement,
PsiElement endElement)
Performs the action.
|
protected boolean |
isAvailable() |
boolean |
startInWriteAction()
Indicate whether this action should be invoked inside write action.
|
invoke, invoke, isAvailable, isAvailable
applyFix, applyFix, getEndElement, getName, getStartElement, isAvailable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getElementToMakeWritable
public static final java.lang.String FAMILY_NAME
public void invoke(Project project, PsiFile file, Editor editor, PsiElement startElement, PsiElement endElement)
LocalQuickFixAndIntentionActionOnPsiElement
invoke
in class LocalQuickFixAndIntentionActionOnPsiElement
editor
- the editor where the action is invoked or null
if it's invoked from batch inspections results' tool window.protected boolean isAvailable()
isAvailable
in class LocalQuickFixOnPsiElement
public java.lang.String getText()
IntentionAction
getText
in interface IntentionAction
getText
in class LocalQuickFixOnPsiElement
IntentionAction.isAvailable(Project, Editor, PsiFile)
public java.lang.String getFamilyName()
IntentionAction
getFamilyName
in interface IntentionAction
getFamilyName
in interface QuickFix<ProblemDescriptor>
IntentionManager.registerIntentionAndMetaData(IntentionAction, String...)
public boolean startInWriteAction()
IntentionAction
false
if, e.g., a 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 IntentionAction
startInWriteAction
in interface WriteActionAware
startInWriteAction
in class LocalQuickFixAndIntentionActionOnPsiElement
true
if the intention requires a write action, false
otherwise.public void applyFix(Project project, CommonProblemDescriptor [] descriptors, java.util.List<PsiElement> psiElementsToIgnore, java.lang.Runnable refreshViews)
BatchQuickFix
applyFix
in interface BatchQuickFix<CommonProblemDescriptor>
project
- Project
descriptors
- problem reported by the tool on which fix should workpsiElementsToIgnore
- elements to be excluded from view during post-refreshrefreshViews
- post-refresh inspection results view; would remove collected elements from the view