@Override
  public void annotate(DomElement element, final DomElementAnnotationHolder holder) {
    element.accept(new AntDomRecursiveVisitor() {

      @Override
      public void visitTypeDef(AntDomTypeDef typedef) {
        final List<String> errors = typedef.getErrorDescriptions();
        if (!errors.isEmpty()) {
          @Nls final StringBuilder builder = new StringBuilder();
          builder.append(AntBundle.message("failed.to.load.types")).append(":");
          for (String error : errors) {
            builder.append("\n").append(error);
          }
          createAnnotationOnTag(typedef, builder.toString(), holder);
        }
        super.visitTypeDef(typedef);
      }

      @Override
      public void visitAntDomCustomElement(AntDomCustomElement custom) {
        if (custom.getDefinitionClass() == null) {
          final AntDomNamedElement declaringElement = custom.getDeclaringElement();
          if (declaringElement instanceof AntDomTypeDef) {
            String failedMessage = AntBundle.message("using.definition.which.type.failed.to.load");
            final String error = custom.getLoadError();
            if (error != null) {
              failedMessage = failedMessage + ": " + error;
            }
            createAnnotationOnTag(custom, failedMessage, holder);
          }
        }
        super.visitAntDomCustomElement(custom);
      }
    });
  }
@Override
  public void annotate(DomElement element, final DomElementAnnotationHolder holder)