mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
restore xml suppressions until EL, etc would provide its own suppressor
This commit is contained in:
@@ -26,14 +26,25 @@ import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class XmlSuppressableInspectionTool extends LocalInspectionTool {
|
||||
public abstract class XmlSuppressableInspectionTool extends LocalInspectionTool implements BatchSuppressableTool {
|
||||
@NonNls static final String ALL = "ALL";
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SuppressQuickFix[] getBatchSuppressActions(@Nullable PsiElement element) {
|
||||
return getSuppressFixes(getID());
|
||||
}
|
||||
|
||||
public static SuppressQuickFix[] getSuppressFixes(final String shortName) {
|
||||
final String id = HighlightDisplayKey.find(shortName).getID();
|
||||
return new SuppressQuickFix[]{new SuppressTagStatic(id), new SuppressForFile(id), new SuppressAllForFile()};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSuppressedFor(@NotNull final PsiElement element) {
|
||||
return XmlSuppressionProvider.isSuppressed(element, getID());
|
||||
}
|
||||
|
||||
public class SuppressTag extends SuppressTagStatic {
|
||||
public SuppressTag() {
|
||||
super(getID());
|
||||
|
||||
Reference in New Issue
Block a user