parent.appendChild(deprecatedTag);
}
}
protected void appendTag(InterfaceDeclaration decl, Element parent, Document document) {
Tag annotationTag = decl.getAnnotation(Tag.class);
if (annotationTag != null) {
checkDuplicates(annotationTag.name());
resetAttributeDuplicateList();
// TODO configure replacement
String className =
decl.getQualifiedName().substring(0, decl.getQualifiedName().length() - "Declaration".length());
if (decl.getAnnotation(UIComponentTag.class) != null) {
className = "org.apache.myfaces.tobago.internal.taglib." + StringUtils.capitalize(annotationTag.name()) + "Tag";
}
//decl.getQualifiedName().replaceAll("Declaration", "");
String msg = "Replacing: " + decl.getQualifiedName() + " -> " + className;
getEnv().getMessager().printNotice(msg);
Element tag = createTag(decl, annotationTag, className, document, false);
addAttributes(decl, tag, document);
parent.appendChild(tag);
if (annotationTag.deprecatedName() != null&&annotationTag.deprecatedName().length() > 0) {
Element deprecatedTag = createTag(decl, annotationTag, className, document, true);
addAttributes(decl, deprecatedTag, document);
parent.appendChild(deprecatedTag);
}
}