void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement element = descriptor.getPsiElement(); XmlTag xml = null; if (element instanceof XmlTag) { xml = (XmlTag)element; } else if (element instanceof XmlAttributeValue) { PsiElement parent = element.getParent(); xml = parent instanceof XmlAttribute ? ((XmlAttribute)parent).getParent() : null; } if (xml == null) return; doFix(project, Collections.singletonList(xml)); }