private void completeTypeVarName(Element forElement, String prefix, int substitutionOffset) {
if (prefix.length() > 0) {
if (prefix.charAt(0) == '<') {
prefix = prefix.substring(1, prefix.length());
} else {
// not type param
return;
}
}
List<? extends TypeParameterElement> tparams = (forElement.getKind().isClass() || forElement.getKind().isInterface())
? ((TypeElement) forElement).getTypeParameters()
: ((ExecutableElement) forElement).getTypeParameters();
for (TypeParameterElement typeVariable : tparams) {
String name = typeVariable.getSimpleName().toString();
if (name.startsWith(prefix)) {
items.add(JavadocCompletionItem.createNameItem(
'<' + name + '>', substitutionOffset));
}
}
}
JavadocCompletionQuery.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录