private void handleExceptionTags(List<TagElement> tags, List<String> exceptionNames, CharSequence[] exceptionDescriptions) { if (tags.size() == 0 && containsOnlyNull(exceptionNames)) { return; } handleBlockTagTitle(JavaDoc2HTMLTextReader_throws_section); fBuf.append(BLOCK_TAG_START); for (Iterator<TagElement> iter = tags.iterator(); iter.hasNext();) { TagElement tag = iter.next(); fBuf.append(BlOCK_TAG_ENTRY_START); handleThrowsTag(tag); fBuf.append(BlOCK_TAG_ENTRY_END); } for (int i = 0; i < exceptionDescriptions.length; i++) { CharSequence description = exceptionDescriptions[i]; String name = exceptionNames.get(i); if (name != null) { fBuf.append(BlOCK_TAG_ENTRY_START); handleLink(Collections.singletonList(fJavadoc.getAST().newSimpleName(name))); if (description != null) { fBuf.append(JavaElementLabels.CONCAT_STRING); fBuf.append(description); } fBuf.append(BlOCK_TAG_ENTRY_END); } } fBuf.append(BLOCK_TAG_END); }
private void handleExceptionTags(List<TagElement> tags, List<String> exceptionNames, CharSequence[] exceptionDescriptions) { if (tags.size() == 0 && containsOnlyNull(exceptionNames)) return; handleBlockTagTitle(JavaDocMessages.JavaDoc2HTMLTextReader_throws_section); for (Iterator<TagElement> iter= tags.iterator(); iter.hasNext(); ) { TagElement tag= iter.next(); fBuf.append(BlOCK_TAG_ENTRY_START); handleThrowsTag(tag); fBuf.append(BlOCK_TAG_ENTRY_END); } for (int i= 0; i < exceptionDescriptions.length; i++) { CharSequence description= exceptionDescriptions[i]; String name= exceptionNames.get(i); if (name != null) { fBuf.append(BlOCK_TAG_ENTRY_START); handleLink(Collections.singletonList(fJavadoc.getAST().newSimpleName(name))); if (description != null) { fBuf.append(JavaElementLabels.CONCAT_STRING); fBuf.append(description); } fBuf.append(BlOCK_TAG_ENTRY_END); } } }
private void handleExceptionTags(List<TagElement> tags, List<String> exceptionNames, CharSequence[] exceptionDescriptions) { if (tags.size() == 0 && containsOnlyNull(exceptionNames)) return; handleBlockTagTitle(JavaDocMessages.JavaDoc2HTMLTextReader_throws_section); for (Iterator<TagElement> iter= tags.iterator(); iter.hasNext(); ) { TagElement tag= iter.next(); fBuf.append(BlOCK_TAG_ENTRY_START); handleThrowsTag(tag); fBuf.append(BlOCK_TAG_ENTRY_END); } for (int i= 0; i < exceptionDescriptions.length; i++) { CharSequence description= exceptionDescriptions[i]; String name= exceptionNames.get(i); if (name != null) { fBuf.append(BlOCK_TAG_ENTRY_START); handleLink(Collections.singletonList(fJavadoc.getAST().newSimpleName(name))); if (description != null) { fBuf.append(JavaElementLabels.CONCAT_STRING); fBuf.append(description); } fBuf.append(BlOCK_TAG_ENTRY_END); } } }
@Override public JavaDocSource<O> addTagValue(String tagName, String tagValue) { Assert.notNull(tagName, TAG_NAME_CANNOT_BE_NULL); TagElement tagElement = javadoc.getAST().newTagElement(); TextElement textElement = javadoc.getAST().newTextElement(); tagElement.setTagName(tagName); textElement.setText(tagValue); tagElement.fragments().add(textElement); javadoc.tags().add(tagElement); return this; }
/** * Return whether the deprecated comment strings of the given java doc are equals. * <p> * Note the only purpose of this method is to hide deprecated warnings. * @deprecated mark deprecated to hide deprecated usage */ private boolean compareDeprecatedComment(Javadoc first, Javadoc second) { if (first.getAST().apiLevel == AST.JLS2_INTERNAL) { return safeEquals(first.getComment(), second.getComment()); } else { return true; } }
/** * Return whether the deprecated comment strings of the given java doc are equals. * <p> * Note the only purpose of this method is to hide deprecated warnings. * @deprecated mark deprecated to hide deprecated usage */ private boolean compareDeprecatedComment(Javadoc first, Javadoc second) { if (first.getAST().apiLevel == AST.JLS2_INTERNAL) { return safeEquals(first.getComment(), second.getComment()); } else { return true; } }
/** * Return whether the deprecated comment strings of the given java doc are equals. * <p> * Note the only purpose of this method is to hide deprecated warnings. * @deprecated mark deprecated to hide deprecated usage */ private boolean compareDeprecatedComment(Javadoc first, Javadoc second) { if (first.getAST().apiLevel == AST.JLS2_INTERNAL) { return safeEquals(first.getComment(), second.getComment()); } else { return true; } }
/** * Return whether the deprecated comment strings of the given java doc are equals. * <p> * Note the only purpose of this method is to hide deprecated warnings. * @deprecated mark deprecated to hide deprecated usage */ private boolean compareDeprecatedComment(Javadoc first, Javadoc second) { if (first.getAST().apiLevel == AST.JLS2_INTERNAL) { return safeEquals(first.getComment(), second.getComment()); } else { return true; } }
/** * Return whether the deprecated comment strings of the given java doc are equals. * <p> * Note the only purpose of this method is to hide deprecated warnings. * @deprecated mark deprecated to hide deprecated usage */ private boolean compareDeprecatedComment(Javadoc first, Javadoc second) { if (first.getAST().apiLevel == AST.JLS2_INTERNAL) { return safeEquals(first.getComment(), second.getComment()); } else { return true; } }
/** * Return whether the deprecated comment strings of the given java doc are equals. * <p> * Note the only purpose of this method is to hide deprecated warnings. * @deprecated mark deprecated to hide deprecated usage */ private boolean compareDeprecatedComment(Javadoc first, Javadoc second) { if (first.getAST().apiLevel == AST.JLS2_INTERNAL) { return safeEquals(first.getComment(), second.getComment()); } else { return true; } }
@Override public JavaDocSource<O> setText(String text) { TagElement tagElement = null; List<TagElement> tags = javadoc.tags(); for (TagElement tagElementItem : tags) { if (tagElementItem.getTagName() == null) { tagElement = tagElementItem; break; } } if (tagElement == null) { tagElement = javadoc.getAST().newTagElement(); javadoc.tags().add(0, tagElement); } tagElement.fragments().clear(); TextElement textElement = javadoc.getAST().newTextElement(); textElement.setText(text); tagElement.fragments().add(textElement); return this; }