SuppressQuickFix[] (PsiElement element) { return ContainerUtil.map(super.getBatchSuppressActions(element), action -> new SuppressQuickFix() { @NotNull @Override public String getName() { return action.getName(); } @Override public boolean isAvailable(@NotNull Project project, @NotNull PsiElement context) { return context.isValid(); } @Override public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement element1 = descriptor.getPsiElement(); PsiFile file = element1 == null ? null : element1.getContainingFile(); if (file == null || file.getFileType() != XmlFileType.INSTANCE) return; action.applyFix(project, descriptor); } @Override @NotNull public String getFamilyName() { return action.getFamilyName(); } @Override public boolean isSuppressAll() { return action.isSuppressAll(); } }, SuppressQuickFix.EMPTY_ARRAY); }