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_ARRAYICON_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, waitgetElementToMakeWritablestartInWriteActionpublic 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 ContainerBasedSuppressQuickFixpublic void setShouldBeAppliedToInjectionHost(ThreeState shouldBeAppliedToInjectionHost)
setShouldBeAppliedToInjectionHost in interface InjectionAwareSuppressQuickFixpublic ThreeState isShouldBeAppliedToInjectionHost()
isShouldBeAppliedToInjectionHost in interface InjectionAwareSuppressQuickFixpublic 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.Objectpublic 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 boolean isSuppressAll()
isSuppressAll in interface SuppressQuickFixprotected final void replaceSuppressionComment(PsiElement comment)
protected void createSuppression(Project project, PsiElement element, PsiElement container) throws IncorrectOperationException
IncorrectOperationExceptionprotected Language getCommentLanguage(PsiElement element)
element - quickfix target or existing comment elementpublic boolean isAvailable(Project project, PsiElement context)
isAvailable in interface SuppressQuickFixpublic void invoke(Project project, PsiElement element) throws IncorrectOperationException
IncorrectOperationExceptionprotected 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().