This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Currently it is available only if the Javadoc can be mined from Java source. This is unusable for most of cases like JDK API and most of libraries. It is quite normal situation to have library (JAR file) and documentation. This probably needs some level of cooperation between javadoc and editor because there is no API but IMO this feature is not complete without this.
This is valuable enhancement but not defect as the functionality you are requesting was not in the original feature specification. Changing to ENHANCEMENT. IMO many users including me have the JDK sources mounted to allow Goto Class to work with JDK sources.
I am OK with RFE unless it means that you will not implement it. Given that we have feature freeze for 3.4 what is the estimation to implement it? I do the same with sources but IMO many != most in that case and the result is that the feature is not working out of the box. I would expect that JDK documentation is automatically mounted if it is present in its default location and used also for this purpose. What about Servlet API, JDBC API or whole J2EE? It is common that you don't have sources for these classes.
*** Issue 24225 has been marked as a duplicate of this issue. ***
Set target milestone to TBD
*** Issue 26254 has been marked as a duplicate of this issue. ***
An attempt to clarify the meaning of this bug: Even if you have Javadoc mounted, it is not used during code completion. You have to mount sources in order for the code completion popup to show Javadoc. However if you have Javadoc mounted, and the code completion database built, but no sources mount, you can still use "Show Javadoc" in the popup menu in the editor to open the web browser on the appropriate page. (I just tried it in a dev build, it worked - using DocumentRange, for which the XML module supplies code completion and Javadoc, yet I have no sources mounted - JDK 1.4 does not include it.)
*** Issue 27385 has been marked as a duplicate of this issue. ***
*** Issue 34100 has been marked as a duplicate of this issue. ***
BTW I consider this issue a defect, not an enhancement. If the original feature specification did not require a better impl, the feature spec was misguided - users clearly have an expectation for when Javadoc tips should be shown, i.e. when they have specified the location of their Javadoc, and that expectation is not being met.
Jesse, feel free to change this to a defect with appropriate priority.
implemented in [maintrunk] /cvs/editor/libsrc/org/netbeans/editor/ext/CompletionJavaDoc.java,v <-- CompletionJavaDoc.java new revision: 1.21; previous revision: 1.20 /cvs/editor/libsrc/org/netbeans/editor/ext/ScrollJavaDocPane.java,v <-- ScrollJavaDocPane.java new revision: 1.8; previous revision: 1.7 /cvs/editor/src/org/netbeans/modules/editor/java/NbCompletionJavaDoc.java,v <-- NbCompletionJavaDoc.java new revision: 1.29; previous revision: 1.28 /cvs/editor/src/org/netbeans/modules/editor/java/NbScrollJavaDocPane.java,v <-- NbScrollJavaDocPane.java new revision: 1.5; previous revision: 1.4
Thanks for fixing this. What's the chance of this being put into a patch format we could apply to 3.5?
Yes, I intend to do this. The patch will be available in several days. I would like to let this feature to be tested properly in [maintrunk] before.
implemented into [prj40_prototype] also /cvs/editor/libsrc/org/netbeans/editor/ext/CompletionJavaDoc.java,v <-- CompletionJavaDoc.java new revision: 1.12.46.3.2.3; previous revision: 1.12.46.3.2.2 /cvs/editor/libsrc/org/netbeans/editor/ext/ScrollJavaDocPane.java,v <-- ScrollJavaDocPane.java new revision: 1.6.22.1; previous revision: 1.6 /cvs/java/editor/src/org/netbeans/modules/editor/java/Attic/NbCompletionJavaDoc.java,v <-- NbCompletionJavaDoc.java new revision: 1.1.2.1.2.1.2.6; previous revision: 1.1.2.1.2.1.2.5 /cvs/java/editor/src/org/netbeans/modules/editor/java/Attic/NbScrollJavaDocPane.java,v <-- NbScrollJavaDocPane.java new revision: 1.1.2.1.4.2; previous revision: 1.1.2.1.4.1
Created attachment 10735 [details] external editor lib patch (for modules/ext/nb-editor.jar)
Created attachment 10736 [details] module part patch
How to install the patches: There are two attached patches. One is for editor module part patching, the second patch if for standalone editor lib. Module part patching: Create a subfolder "org-netbeans-modules-editor" in the folder <ide install dir>/modules/patches and copy attached module part patch "javadocSrc.jar" into created subfolder. Standalone editor lib patching: (I don't know better way of patching than simple replacing of the affected classes.) You can find the patch classes in attached "javadocLibsrc.jar". Replace appropriate classes in <ide install dir>/modules/ext/nb-editor.jar file.
Thanks for this fix Martin. But it seems that this fix is not working with javadoc mounted with an http:// url. The skip(offset) method seems to skip less bytes than asked (tested on linux JDK 1.4.2-beta) but this behaviour is correct according to JDK documentation (http://java.sun.com/j2se/1.4.1/docs/api/java/io/InputStream.html#skip(long)). It seems also that the buffer is created with too much bytes (startOffset+len) instead of len. I'll attach a small patch.
Created attachment 10787 [details] Patch.txt
Eric - to avoid confusion and make sure your work is not lost or ignored, always open a fresh issue report when you see a new thing that is wrong with an existing fix - especially when you have a patch. If you like, you can make your new issue "block" this one, to track the relationship between them. NB developers freely create as many issue reports as they need to exactly track what is done and what is left to do. Also be sure to add yourself as a CC to any issue that you add comments to (unless you reported it)! Otherwise someone might respond to your comment (e.g. "I don't understand", "I don't agree", ...) and you would never know. Issuezilla does *not* automatically add you to the CC list, I am afraid. Martin - if you accept the patch, don't forget to credit Eric in core/release/README.html. :-)
implemented in [maintrunk] /cvs/editor/src/org/netbeans/modules/editor/java/NbCompletionJavaDoc.java,v <-- NbCompletionJavaDoc.java new revision: 1.31; previous revision: 1.30 Uff. I didn't test the feature with the HTTP mounted javadoc before. I even didn't notice there is such possibility in IDE. :-) Eric, thank you for the patch. Javadoc works fine using it. I have added you to CREDITS.html. (I have used ehartmann@netbeans.org email. Let me know, if you would like to change it.) Thanks a lot for your contribution, Mato
*** Issue 30687 has been marked as a duplicate of this issue. ***
*** Issue 37095 has been marked as a duplicate of this issue. ***
Verified in build 200401201900 - I tried it with jelly2-nb.jar (sources) and jemmy-jelly2-nb-javadoc.zip (documentation). Documentaion isn't displayed in code completion, until appropriate jar is added to the Javadoc Manageru.