本文整理了Java中org.eclipse.jdt.core.dom.Javadoc.getAST()
方法的一些代码示例,展示了Javadoc.getAST()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Javadoc.getAST()
方法的具体详情如下:
包路径:org.eclipse.jdt.core.dom.Javadoc
类名称:Javadoc
方法名:getAST
暂无
代码示例来源:origin: eclipse/eclipse.jdt.ls
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);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
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);
}
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
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);
}
}
}
代码示例来源:origin: forge/roaster
@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;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
/**
* 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;
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* 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;
}
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
/**
* 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;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* 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;
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
/**
* 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;
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
/**
* 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;
}
}
代码示例来源:origin: forge/roaster
@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;
}
内容来源于网络,如有侵权,请联系作者删除!