Grabbing Javadoc from library class
Hi
I have a reference to a PsiMethod which is part of a library. For example, java.util.List.size(). Calling PsiMethod.getDocComment() for it returns null.
How can I grab the PsiMethod's corresponding Javadoc if
a) source code for that class has been attached to the library
b) javadoc has been attached to that library
Thanks in advance for any hints.
etienne
Please sign in to leave a comment.
etienne wrote:
The method getNavigationElement() should help.
Bas
Thanks Bas.
Works like a charm and the getNavigationElement() Javadoc explains it all.
etienne wrote:
The JavaDoc is getting pretty good, isn't it? I'm happy you got it working.
Bas
Yep, the JavaDoc is getting pretty good, at least the one I have come across! Typically, I now ask myself more often "where do I find that API?" rather than "what does this API do?". And the "where" question is often answered by very nice people in these forums.
etienne
getNavigationElement() does work fine but only when you have the sources configured but it doesn't solve the use case where you have the javadoc URL configured and not the sources.
Any ideas on this ?