int lastTagCategory = lastText.getHtmlTagID(); boolean lastSingleTag = lastTagCategory <= JAVADOC_SINGLE_TAGS_ID; boolean lastTextCanHaveChildren = lastText.isHtmlTag() && !lastText.isClosingHtmlTag() && !lastSingleTag; if (lastText.depth == htmlDepth || // found same html tag level => use it lastText.htmlNodesPtr == -1) { // no more sub-levels => add one if (lastText.isHtmlTag()) { if (text != null && text.isHtmlTag() && !text.isClosingHtmlTag() && text.getHtmlTagIndex() == lastText.getHtmlTagIndex() && !lastText.isClosingHtmlTag()) { lastText.closeTag(); return textHierarchy; if (lastTextCanHaveChildren || (htmlDepth == 0 && !lastText.isHtmlTag() && text != null && !text.isHtmlTag())) { if (textHierarchy == null) textHierarchy = new FormatJavadocText[htmlDepth+1]; textHierarchy[ptr] = lastText;
int lastTagCategory = lastText.getHtmlTagID(); boolean lastSingleTag = lastTagCategory <= JAVADOC_SINGLE_TAGS_ID; boolean lastTextCanHaveChildren = lastText.isHtmlTag() && !lastText.isClosingHtmlTag() && !lastSingleTag; if (lastText.depth == htmlDepth || // found same html tag level => use it lastText.htmlNodesPtr == -1) { // no more sub-levels => add one if (lastText.isHtmlTag()) { if (text != null && text.isHtmlTag() && !text.isClosingHtmlTag() && text.getHtmlTagIndex() == lastText.getHtmlTagIndex() && !lastText.isClosingHtmlTag()) { lastText.closeTag(); return textHierarchy; if (lastTextCanHaveChildren || (htmlDepth == 0 && !lastText.isHtmlTag() && text != null && !text.isHtmlTag())) { if (textHierarchy == null) textHierarchy = new FormatJavadocText[htmlDepth+1]; textHierarchy[ptr] = lastText;
int lastTagCategory = lastText.getHtmlTagID(); boolean lastSingleTag = lastTagCategory <= JAVADOC_SINGLE_TAGS_ID; boolean lastTextCanHaveChildren = lastText.isHtmlTag() && !lastText.isClosingHtmlTag() && !lastSingleTag; if (lastText.depth == htmlDepth || // found same html tag level => use it lastText.htmlNodesPtr == -1) { // no more sub-levels => add one if (lastText.isHtmlTag()) { if (text != null && text.isHtmlTag() && !text.isClosingHtmlTag() && text.getHtmlTagIndex() == lastText.getHtmlTagIndex() && !lastText.isClosingHtmlTag()) { lastText.closeTag(); return textHierarchy; if (lastTextCanHaveChildren || (htmlDepth == 0 && !lastText.isHtmlTag() && text != null && !text.isHtmlTag())) { if (textHierarchy == null) textHierarchy = new FormatJavadocText[htmlDepth+1]; textHierarchy[ptr] = lastText;
void appendText(FormatJavadocText text) { text.immutable = this.immutable; if (this.depth == text.depth) { addSeparator(text); this.sourceEnd = text.sourceEnd; if (text.isClosingHtmlTag()) { // close the tag this.htmlTagIndex = text.htmlTagIndex; } } else { appendNode(text); } if (text.isHtmlTag()) { switch (text.htmlTagIndex & JAVADOC_TAGS_ID_MASK) { case JAVADOC_CODE_TAGS_ID: text.linesBefore = this.htmlNodesPtr == -1 ? 0 : 2; break; case JAVADOC_SEPARATOR_TAGS_ID: text.linesBefore = 1; break; case JAVADOC_SINGLE_BREAK_TAG_ID: if (!text.isClosingHtmlTag()) text.linesBefore = 1; break; case JAVADOC_BREAK_TAGS_ID: if (!text.isClosingHtmlTag()) text.linesBefore = 1; } } } void appendNode(FormatJavadocNode node) {
void appendText(FormatJavadocText text) { text.immutable = this.immutable; if (this.depth == text.depth) { addSeparator(text); this.sourceEnd = text.sourceEnd; if (text.isClosingHtmlTag()) { // close the tag this.htmlTagIndex = text.htmlTagIndex; } } else { appendNode(text); } if (text.isHtmlTag()) { switch (text.htmlTagIndex & JAVADOC_TAGS_ID_MASK) { case JAVADOC_CODE_TAGS_ID: text.linesBefore = this.htmlNodesPtr == -1 ? 0 : 2; break; case JAVADOC_SEPARATOR_TAGS_ID: text.linesBefore = 1; break; case JAVADOC_SINGLE_BREAK_TAG_ID: if (!text.isClosingHtmlTag()) text.linesBefore = 1; break; case JAVADOC_BREAK_TAGS_ID: if (!text.isClosingHtmlTag()) text.linesBefore = 1; } } } void appendNode(FormatJavadocNode node) {
void appendText(FormatJavadocText text) { text.immutable = this.immutable; if (this.depth == text.depth) { addSeparator(text); this.sourceEnd = text.sourceEnd; if (text.isClosingHtmlTag()) { // close the tag this.htmlTagIndex = text.htmlTagIndex; } } else { appendNode(text); } if (text.isHtmlTag()) { switch (text.htmlTagIndex & JAVADOC_TAGS_ID_MASK) { case JAVADOC_CODE_TAGS_ID: text.linesBefore = this.htmlNodesPtr == -1 ? 0 : 2; break; case JAVADOC_SEPARATOR_TAGS_ID: text.linesBefore = 1; break; case JAVADOC_SINGLE_BREAK_TAG_ID: if (!text.isClosingHtmlTag()) text.linesBefore = 1; break; case JAVADOC_BREAK_TAGS_ID: if (!text.isClosingHtmlTag()) text.linesBefore = 1; } } } void appendNode(FormatJavadocNode node) {
if (text.isHtmlTag()) { switch (text.getHtmlTagID()) { case JAVADOC_CODE_TAGS_ID:
if (text.isHtmlTag()) { switch (text.getHtmlTagID()) { case JAVADOC_CODE_TAGS_ID:
if (text.isHtmlTag()) { switch (text.getHtmlTagID()) { case JAVADOC_CODE_TAGS_ID:
} else if (text.isHtmlTag()) { printJavadocHtmlTag(text, block, newLines>0); } else {
} else if (text.isHtmlTag()) { printJavadocHtmlTag(text, block, newLines>0); } else {
} else if (text.isHtmlTag()) { printJavadocHtmlTag(text, block, newLines>0); } else {
if (text.isHtmlTag()) { if (text.getHtmlTagID() == JAVADOC_SINGLE_BREAK_TAG_ID) {
if (text.isHtmlTag()) { if (text.getHtmlTagID() == JAVADOC_SINGLE_BREAK_TAG_ID) {
if (text.isHtmlTag()) { if (text.getHtmlTagID() == JAVADOC_SINGLE_BREAK_TAG_ID) {