return new XmlElementVisitor() {
@Override
public void visitXmlAttribute(XmlAttribute attribute) {
super.visitXmlAttribute(attribute);
if (Constants.WICKET_ID.equals(attribute.getName())) {
XmlAttributeValue attributeValue = attribute.getValueElement();
if (attributeValue != null && attributeValue.getTextLength() > 0) {
for (PsiReference reference : attributeValue.getReferences()) {
if (reference instanceof MarkupWicketIdReference && ((MarkupWicketIdReference) reference).multiResolve(false).length == 0) {
holder.registerProblem(holder.getManager().createProblemDescriptor(attributeValue, "Wicket id reference problem",
(LocalQuickFix) null, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, true));
}
}