private static String parseComment(PsiField field) { if(field == null){ return StringUtils.EMPTY; } PsiElement[] children = field.getChildren(); for (PsiElement child : children) { String text = child.getText(); if(child instanceof PsiDocCommentImpl || child instanceof PsiCommentImpl){ return formatText(text); } } return StringUtils.EMPTY; }
@Override public ASTNode createNode(final CharSequence text) { return new PsiDocCommentImpl(text); }