public abstract class AbstractBatchSuppressByNoInspectionCommentFix extends java.lang.Object implements ContainerBasedSuppressQuickFix, InjectionAwareSuppressQuickFix, Iconable
Iconable.IconFlags, Iconable.LastComputedIcon
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
myID |
EMPTY_ARRAY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
Constructor and Description |
---|
AbstractBatchSuppressByNoInspectionCommentFix(java.lang.String ID,
boolean replaceOtherSuppressionIds) |
Modifier and Type | Method and Description |
---|---|
void |
applyFix(Project project,
ProblemDescriptor descriptor)
Called to apply the fix.
|
protected void |
createSuppression(Project project,
PsiElement element,
PsiElement container) |
protected Language |
getCommentLanguage(PsiElement element) |
protected java.util.List<? extends PsiElement> |
getCommentsFor(PsiElement container) |
abstract PsiElement |
getContainer(PsiElement context) |
java.lang.String |
getFamilyName() |
javax.swing.Icon |
getIcon(int flags) |
java.lang.String |
getName() |
java.lang.String |
getText() |
void |
invoke(Project project,
PsiElement element) |
boolean |
isAvailable(Project project,
PsiElement context) |
ThreeState |
isShouldBeAppliedToInjectionHost() |
boolean |
isSuppressAll() |
protected void |
replaceSuppressionComment(PsiElement comment) |
protected boolean |
replaceSuppressionComments(PsiElement container) |
void |
setShouldBeAppliedToInjectionHost(ThreeState shouldBeAppliedToInjectionHost) |
protected void |
setText(java.lang.String text) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getElementToMakeWritable
startInWriteAction
public AbstractBatchSuppressByNoInspectionCommentFix(java.lang.String ID, boolean replaceOtherSuppressionIds)
ID
- Inspection IDreplaceOtherSuppressionIds
- Merge suppression policy. If false new tool id will be append to the end
otherwise replace other idspublic abstract PsiElement getContainer(PsiElement context)
getContainer
in interface ContainerBasedSuppressQuickFix
public void setShouldBeAppliedToInjectionHost(ThreeState shouldBeAppliedToInjectionHost)
setShouldBeAppliedToInjectionHost
in interface InjectionAwareSuppressQuickFix
public ThreeState isShouldBeAppliedToInjectionHost()
isShouldBeAppliedToInjectionHost
in interface InjectionAwareSuppressQuickFix
public java.lang.String getName()
getName
in interface QuickFix<ProblemDescriptor>
public java.lang.String getText()
protected void setText(java.lang.String text)
public java.lang.String toString()
toString
in class java.lang.Object
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
- Project
descriptor
- problem reported by the tool which provided this quick fix actionpublic boolean isSuppressAll()
isSuppressAll
in interface SuppressQuickFix
protected final void replaceSuppressionComment(PsiElement comment)
protected void createSuppression(Project project, PsiElement element, PsiElement container) throws IncorrectOperationException
IncorrectOperationException
protected Language getCommentLanguage(PsiElement element)
element
- quickfix target or existing comment elementpublic boolean isAvailable(Project project, PsiElement context)
isAvailable
in interface SuppressQuickFix
public void invoke(Project project, PsiElement element) throws IncorrectOperationException
IncorrectOperationException
protected boolean replaceSuppressionComments(PsiElement container)
protected java.util.List<? extends PsiElement> getCommentsFor(PsiElement container)
public java.lang.String getFamilyName()
getFamilyName
in interface QuickFix<ProblemDescriptor>
QuickFix.getName()
.