Bug 98154 - Code assist from Javadoc
Summary: Code assist from Javadoc
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.2 M4   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 84750 110173
Blocks:
  Show dependency tree
 
Reported: 2005-06-02 14:09 EDT by prabhu CLA
Modified: 2005-12-12 10:51 EST (History)
2 users (show)

See Also:


Attachments
Proposed fix (1.18 KB, patch)
2005-11-10 13:29 EST, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description prabhu CLA 2005-06-02 14:09:49 EDT
We are using third party libs in our application. The libs have html javadoc 
but no source code. It will be helpful if the code assist feature can make use 
of the javadoc in html files for displaying the java doc information if source 
code is not available. They currently require source files for java doc 
display. I believe this is a common problem and it will be really nice to have 
this feature builtin eclipse.
Comment 1 Tom Hofmann CLA 2005-06-03 02:29:05 EDT
I believe you talk about the additional info popup at the side of the code
assist window, where you would like to see javadoc information.

Then this is a dup of 41421.

*** This bug has been marked as a duplicate of 41421 ***
Comment 2 Dani Megert CLA 2005-06-03 02:53:03 EDT
JDT Text might in the future extract the Javadoc for the hovers from the Javadoc
files (though also that could be regarded as a JDT Core job) however, code
assist is definitely a JDT Core feature and hence they have to comment about
this PR.
Comment 3 Tom Hofmann CLA 2005-06-03 03:10:58 EDT
Ok. The only thing I could think that core could retrieve from javadoc (instead
of source) is the parameter names of methods.
Comment 4 David Audel CLA 2005-06-03 05:15:16 EDT
As says by tom (comment 3) the only thing that jdtcore could need from javadoc
is parameter names of methods.

Perhaps in the future, jdtcore CompletionProposal could give the javadoc of the
proposed element.
Comment 5 Olivier Thomann CLA 2005-11-10 13:08:53 EST
Now that we have fixed 110173, this is doable.
Comment 6 Olivier Thomann CLA 2005-11-10 13:18:24 EST
I don't think there is anything to do here once the method getParameterNames()
returns the names from the attached javadoc. We simply need to ensure that this
method is called even if no source is attached.
This is about the only change I see.
Comment 7 Olivier Thomann CLA 2005-11-10 13:29:29 EST
Created attachment 29720 [details]
Proposed fix

With this change, the getParameterNames() method is called for a binary method
even if the no source is attached. This allows the method to return names from
the attached javadoc if any.
Comment 8 Jerome Lanneluc CLA 2005-11-15 07:38:40 EST
David, please review patch and apply.
Comment 9 David Audel CLA 2005-11-18 04:42:45 EST
The patch is good.

Fixed and test added
  CompletionTests#testParameterNames1()
Comment 10 Jerome Lanneluc CLA 2005-12-12 10:51:40 EST
Verified for 3.2 M4 using build I20051212-0010