Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 95691 - javadoc as a mouse tooltip
javadoc as a mouse tooltip
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Editor
-FFJ-
All All
: P2 with 5 votes (vote)
: 8.0
Assigned To: Dusan Balek
issues@java
:
: 61050 67774 71805 150638 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-15 15:18 UTC by Tomas Mysik
Modified: 2014-02-12 14:55 UTC (History)
10 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Proposed patch (1.35 KB, patch)
2013-10-03 20:23 UTC, markiewb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2007-02-15 15:18:41 UTC
it would be nice to show javadoc of any element in editor (property, method, 
class, ...) as a mouse tooltip
it's very helpful, see eclipse
Comment 1 Vitezslav Stejskal 2007-02-15 20:32:43 UTC
That would be absolutely wicked! I always find myself pointing the mouse cursor
on a method name and waiting for the IDE to show some information. After a while
I realize that this particular IDE won't show anything :-(. No matter how many
times I've forced myself to remember that there are no tooltips on method names
in Netbeans I keep doing the same thing over and over again. Could we please add
tooltips? My forehead is aching... Thank you.
Comment 2 Vitezslav Stejskal 2007-02-15 20:41:26 UTC
There is an Alt-Shift-Space shortcut for poping up a javadoc info. It is likely
to be changed to something else, see issue #91122. While clicking into a
document and pressing a shortcut is much more complicated that just hovering a
mouse it can still be useful.
Comment 3 Tomas Mysik 2007-02-16 09:41:53 UTC
yes, I know about ALT+SHIFT+SPACE but it's very annoying I think... when 
you're reading some sources it's "really slow, unpleasant etc." - I'm sure you 
know what I mean... (once more, try eclipse, you'll find out what I'm speaking 
about)
Comment 4 Petr Jiricka 2007-03-09 15:18:01 UTC
Absolutely agree this is needed.
Comment 5 Petr Hrebejk 2007-04-11 06:52:10 UTC
I agree with Vita, I would hate it too. Based on where my mouse is, which is
very random when I edit, the editor would show some arbitrary Javadoc. 
Sometimes maybe in pretty large popup and will hide parts of my editor.

I see that eclipse lovers will argue about this a lot. Therefor may please HIE
look at this issue and decide. 
Comment 6 Tomas Mysik 2007-04-11 08:27:18 UTC
In eclipse this is *not* random process - when you are typing no javadoc 
appears - you have to move your mouse again. I agree that javadoc (or any 
other mouse tooltips) should not show during typing.
Comment 7 jrojcek 2007-04-23 16:30:09 UTC
Just an idea: Maybe show the tooltip only when Ctrl is pressed. This works nicely with the "inspection" and 
"navigation" use case. The user wants to know what a method is about, she clicks Ctrl and hovers the 
mouse over the method, she reads the Javadoc which shows up immediately (if Ctrl is clicked). If the 
javadoc info is not enough she clicks the method link to see the implementation.

Not very discoverable, but once the user finds it, I think it would work nicely. 
Comment 8 Jiri Prox 2008-10-20 10:15:39 UTC
*** Issue 150638 has been marked as a duplicate of this issue. ***
Comment 9 markiewb 2012-11-28 22:22:44 UTC
*** Bug 61050 has been marked as a duplicate of this bug. ***
Comment 10 markiewb 2013-02-03 17:41:12 UTC
*** Bug 67774 has been marked as a duplicate of this bug. ***
Comment 11 markiewb 2013-08-10 14:17:17 UTC
*** Bug 71805 has been marked as a duplicate of this bug. ***
Comment 12 markiewb 2013-10-03 20:23:46 UTC
Created attachment 140777 [details]
Proposed patch

I like to propose a patch to solve this issue. 

@Dusan: Please review this patch. It is more like a proof-of-concept, because it some caveats:
* hovering is slowed down by resolving the javadoc data
* not all HTML tags in the javadoc are rendered properly because internally the FastHTMLRenderer (?) is used
* tooltip get very large if you display large javadoc text (f.e. of java.util.HashMap)
Comment 13 markiewb 2013-10-03 20:27:10 UTC
(In reply to markiewb from comment #12)
> * tooltip get very large if you display large javadoc text (f.e. of
> java.util.HashMap)

-> related to https://netbeans.org/bugzilla/show_bug.cgi?id=217324
Comment 14 Dusan Balek 2013-10-04 09:03:03 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/c0d35747e100
Comment 15 mprentice 2014-02-12 14:43:32 UTC
How can I tell which version of NetBeans 8 contains this fix? I'm currently using NetBeans IDE 8.0 Beta (Build 201401141042) on Ubuntu 13.10 x64.

Does this fix include hover support? The issues duplicated to this one appear to all require hover support. So it must be included.

There is a mention about Ctrl hovering but that doesn't appear to work, nor does simply hovering over a method.

I've looked through the menus and Editor settings but I can't find any way to turn this on.
Comment 16 mprentice 2014-02-12 14:55:31 UTC
OK, this does appear to work, but has some room for improvement. Holding down Ctrl does indeed enable this feature. 

Mousing over a method and pressing Ctrl does not work however. You need to actually move the mouse to get the tooltip to appear. So holding Ctrl and then moving the mouse is more effective.

Performance could certainly use a bit of a boost as the tooltips often take 0.5-2s longer than expected to appear.

Thanks for getting this much implemented, it should be quite useful!


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo