public class DisableInspectionToolAction extends IntentionAndQuickFixAction implements Iconable
Iconable.IconFlags, Iconable.LastComputedIcon
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
EMPTY_ARRAY
EMPTY_ARRAY
Constructor and Description |
---|
DisableInspectionToolAction(HighlightDisplayKey key) |
DisableInspectionToolAction(LocalInspectionTool tool) |
Modifier and Type | Method and Description |
---|---|
void |
applyFix(Project project,
PsiFile file,
Editor editor) |
java.lang.String |
getFamilyName()
Returns the name of the family of intentions.
|
javax.swing.Icon |
getIcon(int flags) |
java.lang.String |
getName() |
static java.lang.String |
getNameText() |
boolean |
isAvailable(Project project,
Editor editor,
PsiFile file)
In general case will be called if invoked as IntentionAction.
|
boolean |
startInWriteAction()
Indicate whether this action should be invoked inside write action.
|
applyFix, getText, invoke
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getElementToMakeWritable
public DisableInspectionToolAction(LocalInspectionTool tool)
public DisableInspectionToolAction(HighlightDisplayKey key)
public java.lang.String getName()
getName
in interface QuickFix<ProblemDescriptor>
getName
in class IntentionAndQuickFixAction
public java.lang.String getFamilyName()
IntentionAction
getFamilyName
in interface IntentionAction
getFamilyName
in interface QuickFix<ProblemDescriptor>
getFamilyName
in class IntentionAndQuickFixAction
QuickFix.getName()
.IntentionManager.registerIntentionAndMetaData(IntentionAction, String...)
public boolean isAvailable(Project project, Editor editor, PsiFile file)
IntentionAndQuickFixAction
isAvailable
in interface IntentionAction
isAvailable
in class IntentionAndQuickFixAction
project
- the project in which the availability is checked.editor
- the editor in which the intention will be invoked.file
- the file open in the editor.true
if the intention is available, false
otherwise.public void applyFix(Project project, PsiFile file, Editor editor)
applyFix
in class IntentionAndQuickFixAction
public boolean startInWriteAction()
WriteActionAware
false
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 IntentionAction
startInWriteAction
in interface WriteActionAware
startInWriteAction
in class IntentionAndQuickFixAction
true
if the action requires a write action (default), false
otherwise.public static java.lang.String getNameText()