Search in sources :

Example 1 with TagletOutput

use of com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput 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();
}
Also used : SeeTag(com.sun.javadoc.SeeTag) StrBuilder(org.apache.commons.lang3.text.StrBuilder) TagletOutput(com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput)

Example 2 with TagletOutput

use of com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput in project abstools by abstools.

the class SequenceTaglet method getTagletOutput.

/**
 * @see com.sun.tools.doclets.internal.toolkit.taglets.Taglet#getTagletOutput(com.sun.javadoc.Doc,
 *      com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter)
 */
public TagletOutput getTagletOutput(Doc holder, TagletWriter writer) throws IllegalArgumentException {
    if (diagramDirectory == null) {
        setDestinationDirectory(writer.configuration().destDirName);
    }
    TagletOutput out = writer.getTagletOutputInstance();
    Tag[] tags = holder.tags(getName());
    if (tags.length == 0) {
        return null;
    }
    out.setOutput(toString(tags, writer));
    return out;
}
Also used : Tag(com.sun.javadoc.Tag) TagletOutput(com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput)

Example 3 with TagletOutput

use of com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput in project abstools by abstools.

the class SequenceTaglet method getTagletOutput.

/**
 * @see com.sun.tools.doclets.internal.toolkit.taglets.Taglet#getTagletOutput(com.sun.javadoc.Tag,
 *      com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter)
 */
public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) throws IllegalArgumentException {
    if (diagramDirectory == null) {
        setDestinationDirectory(writer.configuration().destDirName);
    }
    TagletOutput out = writer.getTagletOutputInstance();
    out.setOutput(toString(tag, writer));
    return out;
}
Also used : TagletOutput(com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput)

Aggregations

TagletOutput (com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput)3 SeeTag (com.sun.javadoc.SeeTag)1 Tag (com.sun.javadoc.Tag)1 StrBuilder (org.apache.commons.lang3.text.StrBuilder)1