Bug 500405 - [javadoc] No Javadoc shown with code completion
Summary: [javadoc] No Javadoc shown with code completion
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-29 05:47 EDT by Mickael Istria CLA
Modified: 2022-11-20 15:00 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2016-08-29 05:47:43 EDT
In some conditions (I didn't manage to identify yet), I see some cases where I have the hover dialog on a method saying there nothing to show, but the completion for the same method at the same location is able to find the javadoc for this method's completion proposal.
I would expect the hover dialog to be able to show javadoc whenever the completion can do it (and vice-versa).
Comment 1 Noopur Gupta CLA 2016-08-30 07:28:13 EDT
(In reply to Mickael Istria from comment #0)
> In some conditions (I didn't manage to identify yet), I see some cases where
> I have the hover dialog on a method saying there nothing to show, but the
> completion for the same method at the same location is able to find the
> javadoc for this method's completion proposal.

> I would expect the hover dialog to be able to show javadoc whenever the
> completion can do it (and vice-versa).

Yes, that's correct. Please provide a reproducible test case when you encounter this again.
Comment 2 Mickael Istria CLA 2016-08-31 08:32:03 EDT
I managed to reproduce a similar issue e) using the CompletableFuture API. Some methods (thenRun) do not show javadoc in hover nor completion, although opening the JavaDoc view and selecting them shows the JavaDoc for this method.
In another file, I get javadoc on hover for thenRun, but not on completion...
The JavaDoc view always seems to be accurate.
I am wondering whether this could be a pure UI issue, something related to the location or the size of the javadoc popup.

However, it's still different from the initial one, which was clearly stating no javadoc was found in the hover (showing it anyway).
Comment 3 Noopur Gupta CLA 2016-08-31 09:30:59 EDT
I can reproduce the case where no Javadoc is shown with completion info, but we get the Javadoc on hover and in Javadoc view.

To reproduce:
- Create a Java project using 1.8 JRE (not JDK i.e. no source attached to rt.jar).
- Paste the following method in a class:

	public static void main(String[] args) {
		CompletableFuture<String> cc = new CompletableFuture<>();
		cc.thenRun(null);
		cc.completeExceptionally(null);
	}
- Press Ctrl+space within "completeExceptionally" - we get the Info Javadoc.
- Press Ctrl+space within "thenRun" - we don't get the Info Javadoc.

Both the cases call JavadocContentAccess2#getHTMLContent with IJavaElement as a BinaryMethod. But IJavaElement#getAttachedJavadoc does not return any Javadoc for "thenRun". Moving to JDT/Core for investigation.
Comment 4 Eclipse Genie CLA 2020-06-30 17:31:12 EDT
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.
Comment 5 Eclipse Genie CLA 2022-11-20 15:00:06 EST
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.