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

0
6 comments
Avatar
Permanently deleted user

etienne wrote:

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


The method getNavigationElement() should help.

Bas

0

Works like a charm and the getNavigationElement() Javadoc explains it all.

1
Avatar
Permanently deleted user

etienne wrote:

Works like a charm and the getNavigationElement() Javadoc explains it all.


The JavaDoc is getting pretty good, isn't it? I'm happy you got it working.

Bas

0

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

0

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 ?

0

Please sign in to leave a comment.