/** * Add the index comment. * * @param member the member being documented * @param contentTree the content tree to which the comment will be added */ protected void addIndexComment(Doc member, Content contentTree) { addIndexComment(member, member.firstSentenceTags(), contentTree); }
/** * Adds the summary content. * * @param doc the doc for which the summary will be generated * @param htmltree the documentation tree to which the summary will be added */ public void addSummaryComment(Doc doc, Content htmltree) { addSummaryComment(doc, doc.firstSentenceTags(), htmltree); }
public void printSummaryComment( Doc doc ) { printSummaryComment( doc, doc.firstSentenceTags() ); }
public void printSummaryDeprecatedComment( Doc doc ) { printCommentTags( doc, doc.firstSentenceTags(), true, true ); }
protected void printIndexComment(Doc member) { printIndexComment(member, member.firstSentenceTags()); }
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(); }
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(); }
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(); }
/** * Renders all the help text required for a given name. * @param resourceText resource text properties * @param elementName element name to use as the key * @param element Doc element to process. */ private void renderHelpText(final Properties resourceText, final String elementName, final Doc element) { StringBuilder summaryBuilder = new StringBuilder(); for(Tag tag: element.firstSentenceTags()) summaryBuilder.append(tag.text()); String summary = summaryBuilder.toString(); String description = element.commentText(); // this might seem unnecessary, but the GATK command line program uses this tag to determine the version when running if(absoluteVersion != null) resourceText.setProperty(String.format("%s.%s",elementName,VERSION_TAGLET_NAME),absoluteVersion); // Write out an alternate element summary, if exists. resourceText.setProperty(String.format("%s.%s",elementName,SUMMARY_TAGLET_NAME),formatText(summary)); // Write out an alternate description, if present. resourceText.setProperty(String.format("%s.%s",elementName,DESCRIPTION_TAGLET_NAME),formatText(description)); }
DocFinder.search(new DocFinder.Input((MethodDoc) member)); if (inheritedDoc.holder != null && inheritedDoc.holder.firstSentenceTags().length > 0) { firstSentenceTags = inheritedDoc.holder.firstSentenceTags();
DocFinder.search(new DocFinder.Input((MethodDoc) member)); if (inheritedDoc.holder != null && inheritedDoc.holder.firstSentenceTags().length > 0) { firstSentenceTags = inheritedDoc.holder.firstSentenceTags();
/** * @return The "description" text for a javadoc-ish summary table; composed from the first sentence of the doc * comment and its (optional) "{@code @deprecated}" tags */ public String summaryDescription(Doc doc, RootDoc rootDoc) { Tag[] dts = doc.tags("@deprecated"); try { if (dts.length == 0) { return this.fromTags(doc.firstSentenceTags(), doc, rootDoc); } else { return ( "<div class=\"block\"><strong>Deprecated.</strong><div class=\"block\"><i>" + this.fromTags(dts[0].inlineTags(), doc, rootDoc) + "</i></div></div>" ); } } catch (Longjump e) { return "???"; } } }
/** * @return The "description" text for a javadoc-ish summary table; composed from the first sentence of the doc * comment and its (optional) "{@code @deprecated}" tags */ public String summaryDescription(Doc doc, RootDoc rootDoc) { Tag[] dts = doc.tags("@deprecated"); try { if (dts.length == 0) { return this.fromTags(doc.firstSentenceTags(), doc, rootDoc); } else { return ( "<div class=\"block\"><strong>Deprecated.</strong><div class=\"block\"><i>" + this.fromTags(dts[0].inlineTags(), doc, rootDoc) + "</i></div></div>" ); } } catch (Longjump e) { return "???"; } } }