void (@NotNull PsiElement psiElement, @NotNull AnnotationHolder holder) { if (!(psiElement instanceof XmlFile)) { return; } PsiFile file = holder.getCurrentAnnotationSession().getFile(); Project project = file.getProject(); DomManager domManager = DomManager.getDomManager(project); DomFileDescription<?> description = file instanceof XmlFile ? domManager.getDomFileDescription((XmlFile)file) : null; if (description != null) { psiElement.accept(new XmlRecursiveElementWalkingVisitor(){ @Override public void visitXmlElement(@NotNull XmlElement element) { DomElement domElement = getDomElement(element, domManager); if (domElement != null) { DomFileElement<DomElement> root = DomUtil.getFileElement(domElement); DomElementsInspection<DomElement> inspection = getAnnotationsManager(project).getMockInspection(root); if (inspection != null) { runInspection(inspection, root, holder); } } else { super.visitXmlElement(element); } } }); } }