}
NodeLocator locator = new NodeLocator(element.getNameOffset());
AstNode nameNode = locator.searchWithin(unit);
while (nameNode != null) {
if (nameNode instanceof AnnotatedNode) {
Comment comment = ((AnnotatedNode) nameNode).getDocumentationComment();
if (comment == null) {
return null;
}
StringBuilder builder = new StringBuilder();
Token[] tokens = comment.getTokens();
for (int i = 0; i < tokens.length; i++) {
if (i > 0) {
builder.append("\n");
}
builder.append(tokens[i].getLexeme());