Community
Participate
Working Groups
Created attachment 279184 [details] Javadoc could not be found int the attached Javadoc I want to display Japanese Javadoc API documentation, so I removed the source attachment and specified the external Japanese Javadoc API documentation URL. jre_definition.png en: https://docs.oracle.com/en/java/javase/11/docs/api/ ja: http://docs.oracle.com/javase/jp/11/docs/api/ Unexpectedly, the hover on the editor displays "Javadoc could not be found int the attached Javadoc". javadoc_hover.png In Java 8 and earlier versions, this setting will display without problems. Of course, in Java 11, if I specify src.zip for source attachment, it will be displayed without problems. However, I want to specify a Japanese Javadoc URL in order to display Japanese documents.
Created attachment 279185 [details] JRE Definition
It looks like getAttachedJavadoc of org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2 class is returning null.
Someone else reported the same problem to STS here: https://github.com/spring-projects/sts4/issues/428 I should also mention that, as far as I can remember (many years), Eclipse seems to *only* extract javadoc from sources. I am not sure whether this is a bug or by design. Never thought too much about it to be honest as, since I usually want the sources anyways, this rarely affects me personally. However, whether by desing or not, users who report this 'bug' are rightfully confused. Given that it is *possible* to point Eclipse explicitly to JavaDoc attachements, it is at least an awkward design. I.e. why can we specify JavaDoc locations at all, if Eclipse doesn't ever use them?
I'm the author of the ticket on STS bugtracker cited in the comment above. I can confirm that even with standard localization Javadoc, Eclipse doesn't show anything in popup on hover nor in Javadoc view. I tried pointing to Javadoc both system-wide (Window→Preference...) both per-project. I tested with online docs URL, local URI and local archive. Everyone passes the validation and gets recognized and shown by internal browser, but popup and Javadoc View always return: java.lang Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc. Everything works if I attach source to the library. Eclipse 4.15 OpenJdk 11.0.6.u10 Arch Linux
Possible regression from bug 41421
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
The bug still exists in version 2023-06 (4.28.0). The UI still presents a field where the Javadoc URL/path can be specified, but then this is not used anywhere, and the Javadoc view uses the comments pulled from sources instead (if they exist). This applies to all jars in a project's build path, not just JDKs. The UI should at least be changed to make it clear that setting the Javadoc path does not actually do anything other than make the "Open attached Javadoc in a browser" button work. This is not the expected behavior. The ideal expected behavior would be for the HTML Javadoc to be parsed and shown in the Javadoc window (the yellow window in Eclipse).
Sorry for double-commenting, but I realized something. Eclipse is in fact reading the HTML Javadoc from the given Javadoc JAR, for classes and for class methods, but is not reading constructors and interface methods. For these last two, all that the yellow Javadoc view shows is: > Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc.