use of com.sun.javadoc.SeeTag in project RoboBinding by RoboBinding.
the class InlineLinkTagTranslator method translate.
public String translate(String text, Tag containingTag, Doc doc, TagletWriterImpl tagletWriterImpl) {
StrBuilder sb = new StrBuilder(text);
List<SeeTag> inlineLinkTags = getInlineLinkTags(containingTag);
for (SeeTag inlineLinkTag : inlineLinkTags) {
String inlineLinkContent = "{@link " + inlineLinkTag.text() + "}";
if (sb.contains(inlineLinkContent)) {
TagletOutput tagletOutput = tagletWriterImpl.seeTagOutput(doc, new SeeTag[] { inlineLinkTag });
String seeAlsoText = tagletOutput.toString();
sb.replaceAll(inlineLinkContent, seeAlsoText.split("</span></dt><dd>")[1]);
}
}
return sb.toString();
}
use of com.sun.javadoc.SeeTag in project markdown-doclet by Abnaxos.
the class DocCommentProcessor method renderSeeTag.
private void renderSeeTag(MarkdownDoclet doclet, StringBuilder tagBlock, PsiDocTag docTag) {
final String seeText = toString(docTag, false);
if (seeText.startsWith("\"")) {
SeeTag tag = new SeeTag() {
@Override
public String label() {
return null;
}
@Override
public PackageDoc referencedPackage() {
return null;
}
@Override
public String referencedClassName() {
return null;
}
@Override
public ClassDoc referencedClass() {
return null;
}
@Override
public String referencedMemberName() {
return null;
}
@Override
public MemberDoc referencedMember() {
return null;
}
@Override
public String name() {
return "@see";
}
@Override
public Doc holder() {
return null;
}
@Override
public String kind() {
return "@see";
}
@Override
public String text() {
return seeText;
}
@Override
public Tag[] inlineTags() {
return new Tag[0];
}
@Override
public Tag[] firstSentenceTags() {
return new Tag[0];
}
@Override
public SourcePosition position() {
return null;
}
};
SeeTagRenderer.INSTANCE.render(tag, tagBlock, doclet);
} else {
tagBlock.append("\n@").append(docTag.getName());
tagBlock.append(' ').append(seeText);
}
}
use of com.sun.javadoc.SeeTag in project com.revolsys.open by revolsys.
the class DocletUtil method description.
public static void description(final XmlWriter writer, final ClassDoc containingClass, final Tag[] tags) {
if (tags != null && tags.length > 0) {
for (final Tag tag : tags) {
final String kind = tag.kind();
if (tag instanceof SeeTag) {
final SeeTag seeTag = (SeeTag) tag;
seeTag(writer, containingClass, seeTag);
} else if ("Text".equals(kind)) {
writer.write(tag.text());
}
}
}
}
use of com.sun.javadoc.SeeTag in project wso2-axis2-transports by wso2.
the class ResourceInfoDoclet method getFirstSentence.
private static String getFirstSentence(Doc doc) {
Tag[] tags = doc.firstSentenceTags();
if (tags.length == 0) {
return null;
}
StringBuilder buffer = new StringBuilder();
for (Tag tag : tags) {
if (tag instanceof SeeTag) {
buffer.append("{");
buffer.append(tag.name());
buffer.append(" ");
buffer.append(((SeeTag) tag).referencedClassName());
buffer.append("}");
} else {
buffer.append(tag.text());
}
}
return buffer.toString();
}
use of com.sun.javadoc.SeeTag in project RoboBinding by RoboBinding.
the class InlineLinkTagTranslator method getInlineLinkTags.
private List<SeeTag> getInlineLinkTags(Tag containingTag) {
List<SeeTag> linkTags = new ArrayList<SeeTag>();
Tag[] inlineTags = containingTag.inlineTags();
for (Tag tag : inlineTags) {
if ("@link".equals(tag.name())) {
linkTags.add((SeeTag) tag);
}
}
return linkTags;
}
Aggregations