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.

Bug 23467 - Show Javadoc action doesn't use mounted Javadoc
Summary: Show Javadoc action doesn't use mounted Javadoc
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker with 5 votes (vote)
Assignee: issues@editor
URL:
Keywords:
: 24225 26254 27385 30687 34100 37095 (view as bug list)
Depends on:
Blocks: 25053
  Show dependency tree
 
Reported: 2002-05-14 14:37 UTC by _ rkubacki
Modified: 2007-11-05 13:44 UTC (History)
6 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
external editor lib patch (for modules/ext/nb-editor.jar) (14.97 KB, application/octet-stream)
2003-06-19 13:57 UTC, Martin Roskanin
Details
module part patch (18.54 KB, application/octet-stream)
2003-06-19 13:59 UTC, Martin Roskanin
Details
Patch.txt (680 bytes, patch)
2003-06-24 16:07 UTC, ehartmann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2002-05-14 14:37:21 UTC
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.
Comment 1 Miloslav Metelka 2002-05-14 15:12:17 UTC
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.
Comment 2 _ rkubacki 2002-05-15 08:07:06 UTC
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.
Comment 3 Martin Roskanin 2002-05-30 09:10:04 UTC
*** Issue 24225 has been marked as a duplicate of this issue. ***
Comment 4 Marek Grummich 2002-07-22 09:55:46 UTC
Set target milestone to TBD
Comment 5 Marek Grummich 2002-07-22 09:58:32 UTC
Set target milestone to TBD
Comment 6 Jesse Glick 2002-08-05 15:11:40 UTC
*** Issue 26254 has been marked as a duplicate of this issue. ***
Comment 7 Jesse Glick 2002-09-01 19:57:07 UTC
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.)
Comment 8 Martin Roskanin 2002-09-17 14:39:16 UTC
*** Issue 27385 has been marked as a duplicate of this issue. ***
Comment 9 Martin Roskanin 2003-06-03 10:33:12 UTC
*** Issue 34100 has been marked as a duplicate of this issue. ***
Comment 10 Jesse Glick 2003-06-03 14:24:35 UTC
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.
Comment 11 Martin Roskanin 2003-06-05 07:20:24 UTC
Jesse, feel free to change this to a defect with appropriate priority.
Comment 12 Martin Roskanin 2003-06-11 10:06:13 UTC
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
Comment 13 K.C. Baltz 2003-06-11 16:40:08 UTC
Thanks for fixing this.

What's the chance of this being put into a patch format we could apply
to 3.5?
Comment 14 Martin Roskanin 2003-06-12 08:20:11 UTC
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.
Comment 15 Martin Roskanin 2003-06-17 14:16:28 UTC
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
Comment 16 Martin Roskanin 2003-06-19 13:57:36 UTC
Created attachment 10735 [details]
external editor lib patch (for modules/ext/nb-editor.jar)
Comment 17 Martin Roskanin 2003-06-19 13:59:24 UTC
Created attachment 10736 [details]
module part patch
Comment 18 Martin Roskanin 2003-06-19 14:16:20 UTC
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.


Comment 19 ehartmann 2003-06-24 16:06:30 UTC
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.

Comment 20 ehartmann 2003-06-24 16:07:50 UTC
Created attachment 10787 [details]
Patch.txt
Comment 21 Jesse Glick 2003-06-24 17:05:29 UTC
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. :-)
Comment 22 Martin Roskanin 2003-06-25 09:47:09 UTC
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
Comment 23 Petr Jiricka 2003-07-04 09:54:57 UTC
*** Issue 30687 has been marked as a duplicate of this issue. ***
Comment 24 _ pkuzel 2003-11-08 18:15:47 UTC
*** Issue 37095 has been marked as a duplicate of this issue. ***
Comment 25 Marek Grummich 2004-01-22 10:08:01 UTC
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.