PsiElementVisitor (@NotNull final ProblemsHolder holder, final boolean isOnTheFly) { return new XmlElementVisitor() { @Override public void visitXmlAttributeValue(@NotNull XmlAttributeValue value) { checkRefs(value, holder); } @Override public void visitXmlDoctype(@NotNull XmlDoctype xmlDoctype) { checkRefs(xmlDoctype, holder); } @Override public void visitXmlTag(@NotNull XmlTag tag) { checkRefs(tag, holder); } }; }