58

Is it possible, when you mouse hover on method/class so you can see Javadoc in NetBeans 7?

I want similar to Eclipse, when you just mouse hover on String and you can read Java API documentation about it.

Maybe there is some hot key for that...

informatik01
  • 16,038
  • 10
  • 74
  • 104
VextoR
  • 5,087
  • 22
  • 74
  • 109

4 Answers4

62

You can view the javadoc in Netbeans by clicking on the method and press Ctrl + Shift + Space
(Command + Shift + Space on Mac) You can also see the various shortkeys in the help menu>keyboard shortcuts card.

UPDATE:

You can instead open a "javadoc" window from the menu Window>IDE Tools>Javadoc Documentation. This will show the javadoc in a window near the output window for that method when you click on the method or object

TheKarateKid
  • 772
  • 11
  • 19
Rakesh
  • 4,264
  • 4
  • 32
  • 58
  • 4
    Is there anyway to automate this for a hover? – j will Mar 26 '14 at 03:05
  • 4
    I don't think you can do that, but instead you can open a "javadoc" window from the menu Window>other>javadoc This will show the javadoc for that method when you click on the method or object. – Rakesh Mar 26 '14 at 05:22
  • 1
    @Rakesh From 8.0 it is Windows/IDE tools/javadoc. BUT! It shows the javadoc for the function you are in, not for the variable or field you are hovering over. – Gangnus Oct 08 '14 at 11:41
  • The answer is totally wrong now. Neither this shortcut works, nor the appropriate shortcut (ctrl+space) is present in the shortcut table. Checked for 8.0 version. – Gangnus Oct 08 '14 at 11:45
  • The answer was posted 3 years ago! If the shortcuts have changed in newer versions then please take a look at the "keyboard shourtcuts card" in the menu `help>keyboard shortcuts card` in your netbeans IDE. – Rakesh Oct 09 '14 at 08:10
  • 6
    For the NetBeans IDE **8.0.2** the above shortcut (*Ctrl+Shift+Space*) still **works**, although is not mentioned in the "Keyboard Shortcuts Card". – informatik01 Feb 20 '15 at 22:25
  • 1
    For the NetBeans IDE `8.2` the above shortcut (Ctrl+Shift+Space) works, and it is not mentioned in the "Keyboard Shortcuts Card". There also is another shortcut, (Ctrl+Shift+Back_Slash). – Michael Oct 15 '16 at 13:24
  • How do I see values of compile time constants? When I am not in debug mode, I thought I can hover mouse over constant (final) and look at the value. But not value is not displayed. Looked at https://netbeans.org/bugzilla/show_bug.cgi?id=95691 and the issue is close to this problem. But don't this this is fixed in 8.2 release. – Rajesh Dec 09 '17 at 05:55
39

I know that in netbeans 8.0 you can hold down the ctrl button and hover over the class or method, etc. and the javadoc window would appear.

Anwuna
  • 1,077
  • 11
  • 18
  • In Netbeans it is even better and carefully than on Adroid Studio as on-hover docs drain cpu resources all the time. – CodeToLife Apr 21 '17 at 19:48
19

Javadoc won't show up with just a mouse hover, but you can click on a word (method/class/field/variable/whatever name) and press ctrl+space. Javadoc should show up.

Mr. Radical
  • 1,847
  • 1
  • 19
  • 29
Aurelien Ribon
  • 7,548
  • 3
  • 43
  • 54
8

You can even open Javadoc window and you can see the javadoc in that. I prefer this way

Window >> Other >> javadoc.

Now you can see both your code and respective javadoc.

Update for Netbeans 8:

Window >> IDE Tools >> Javadoc Documentation

Wasif Hossain
  • 3,900
  • 1
  • 18
  • 20
Raju Penumatsa
  • 403
  • 2
  • 5
  • 12
  • 2
    Its a workaround that 1) consumes valuable real estate and 2) is not as convenient as a mouse hover feature. This should be a netbeans feature request – Steven Magana-Zook Jul 17 '14 at 22:22
  • 1
    @StevenMagana-Zook I disagree. It doesn't always consume real estate. Here's an image of NetBeans with open javadoc: http://i.imgur.com/f43m2nx.png and here is the same with closed javadoc: http://i.imgur.com/xRWx0bf.png. As you can see, you can minimize it anytime, and just click on anything that you want help with, and it's there. I mean, pressing F1 would be slower. – cst1992 Feb 23 '16 at 07:08