How get PsiMethod block comment?
Hi,
I have a class with some methods in them.
I now want to find the block comment for the PsiMethod I found but it gives me null when I use method.getDocComment().
What do I have to do to extract the comment from the below method?
I found the annotation(s), name etc.
/*
* This is an example of a deprecated method
*/
@Deprecated
public boolean isDeprated() {
return true;
}
Please sign in to leave a comment.
PsiClass.accept(new JavaRecursiveElementVisitor(){....} can help.
Override the functions for the elements you want to detect.
I found a snippet of code doing the below, anything wrong with that (it seems to work)?