654

In Eclipse, when hovering over a method, variable, etc. a tooltip is displayed with the corresponding JavaDocs. Is there such a feature in IntelliJ?

Danny Bullis
  • 2,232
  • 1
  • 20
  • 29
Steve Kuo
  • 58,491
  • 75
  • 189
  • 247

21 Answers21

927

For IntelliJ 13, there is a checkbox in Editor's page in IDE Settings

enter image description here

EDIT: For IntelliJ 14, the option has been moved to Editor > General page. It's the last option in the "Other" group. (For Mac the option is under the menu "IntelliJ Idea" > "Preferences").

EDIT: For IntelliJ 16, it's the second-to-last option in Editor > General > Other.

EDIT: For IntelliJ Ultimate 2016.1, it's been moved to Editor > General > Code Completion. enter image description here

EDIT: For IntelliJ Ultimate 2017.2, aka IntelliJ IDEA 2017.2.3, there are actually two options:

  1. In Editor > General > Other (section) > Show quick documentation on mouse move - delay 500 ms
  • Select this check box to show quick documentation for the symbol at caret. The quick documentation pop-up window appears after the specified delay.
  1. In Editor > General > Code Completion (sub-item) > Autopopup documention in 1000 ms, for explicitly invoked completion
  • Select this check box to have IntelliJ IDEA automatically show a pop-up window with the documentation for the class, method, or field currently highlighted in the lookup list. If this check box is not selected, use Ctrl+Q to show quick documentation for the element at caret.
  • Quick documentation window will automatically pop up with the specified delay in those cases only, when code completion has been invoked explicitly. For the automatic code completion list, documentation window will only show up on pressing Ctrl+Q.

EDIT: For IntelliJ Ultimate 2020.3, the first option is now located under Editor > Code Editing > Quick Documentation > Show quick documentation on mouse move

Per Lundberg
  • 2,931
  • 1
  • 29
  • 39
vikasing
  • 11,112
  • 2
  • 22
  • 25
  • 8
    This worked perfectly for me, and was exactly what I was looking for when I googled my issue. This seems to be the most up-to-date solution. – Andrei Bârsan Feb 19 '14 at 15:39
  • 26
    File/Settings | IDE Settings / Editor. Check "Show quick doc on mouse move" – Martin Wickman Mar 31 '14 at 10:28
  • 34
    Thanks it works on 13.1 but Jesus, that is not intuitive at all. – Cristiano Fontes May 28 '14 at 12:03
  • 30
    Can anyone comment on why this isn't enabled _by default_? I thought that IntelliJ simply didn't have the feature. It should be opt-out, enabled by default. – Naftuli Kay Aug 29 '14 at 18:46
  • Anybody know where it is in IntelliJ 14? The Editor page only has links to its subpages, and the option doesn't seem to be in any of them. – einsteinsci Dec 22 '14 at 19:06
  • 15
    The problem is, it doesn't STICK! As soon as I move the mouse away, it disappears. This is unlike Eclipse, where I can move into the doc pop-up and make it stick - very useful for reading longer docs and navigating. How can I get IntelliJ doc pop-up to stick?! Starting to hate the fact that Android Studio is now official... – ADTC Mar 21 '15 at 05:26
  • 1
    It can't compare to eclipses, simply garbage compared to. Also if you edit String resources and copy text from somewhere else it will pop up and take focus so you have to click inside studio again, (and again and again). Can be extremly anoing, and drive me to disable it T_T – Warpzit May 25 '15 at 11:00
  • 3
    That's one ugly popup X-( – Niks Sep 03 '15 at 06:26
  • 7
    To fix the disappearing immediately on mouse move problem, hold down Ctrl while on your way to the popup. That makes it stick around for me on Linux IntelliJ 14 – neric Sep 24 '15 at 15:14
  • 1
    It should be enabled by default. – Jacek Obarymski Mar 29 '16 at 11:14
  • @ADTC I discovered how to stick the pop up. Find my answer (with images) in [How to keep popup on one screen in Intellij IDEA?](http://stackoverflow.com/a/36448311/1983854). The key here is using the pin! – fedorqui 'SO stop harming' Apr 16 '16 at 13:16
  • As we are talking about "hovering" it should be called "hover" or so, so that it become searchable in preferences. I spent quite sometime offline searching for this setting. Had to go online and google up this... – Anders Eriksson Sep 01 '16 at 06:32
  • 6
    **UPDATE** For IntelliJ IDEA **2016.3.3** this setting is located in _Settings > Editor > General_, scroll down to "_Other_" section and check "**Show quick documentation on mouse move**". – informatik01 Jan 24 '17 at 15:21
  • The above screenshot also applies for version 2017.1.x – Dan Whitehouse Apr 25 '17 at 12:05
  • 2
    [Ctrl]+[Shift]+[A] and type "Show quick doc on mouse move". You'll be redirect to the settings panel, mark the corresponding option – Enrico Giurin May 05 '17 at 10:40
  • @MartinWickman What is the difference between this one and "Show quick doc on mouse move"? – Serob_b May 26 '17 at 17:21
  • 2
    This very basic feature doesn't work well at all in IntelliJ. It overlays exceptions and other messages, and if you hit Esc it removes everything... :-( – Gruber Jun 20 '17 at 09:21
  • I found that enabling this option caused my IntelliJ to get INCREDIBLY slow. Be warned, if you enable this option and you later notice a big slowdown. – Mike Aug 23 '17 at 15:29
  • 1
    Is there any way to disable the pop-up when hovering over an error or warning? The documentation goes on top of error/warning message. – Alexandru Severin Mar 08 '18 at 11:58
  • 1
    The problem with enabling it by default is that it can mess up your typing. When it popped up in eclipse it didn't seem so intrusive, with intellij it actually does something strange Haven't spent a lot of time playing with it, I just know I don't like it enough that I re-disabled it. :) – Bill K Jul 11 '18 at 16:12
  • 5
    **IntelliJ 2018.2.4 (Community Edition):** `Preferences > Editor > General: Other (subsection) > Show quick documentation on mouse move` – Danny Bullis Sep 25 '18 at 16:37
  • Danny Bullis comment ^ works on **2018.3.4CE** as well – cellepo Feb 18 '19 at 23:35
  • in case where "show quick docs on mouse move" Editor -> General and on right hand you have to : **SCROLL THE PANE DOWN**! – CodeToLife Jan 30 '20 at 10:08
145

Up until IntelliJ version 11, no, not just by hovering over it. If the cursor is inside the method- or attribute name, then CTRL+Q will show the JavaDoc on *nix and Windows. On MacOSX, this is CTRL+J.

Quote: "No, the only way to see the full javadoc is to use Quick Doc (Ctrl-Q)." -- http://devnet.jetbrains.net/thread/121174

EDIT

Since IntelliJ 12.1, this is possible. See @ADNow's answer.

Bart Kiers
  • 153,868
  • 34
  • 276
  • 272
100

It is possible in 12.1.

Find idea.properties in the BIN folder inside of wherever your IDE is installed, e.g. C:\Program Files (x86)\JetBrains\IntelliJ\bin

Add a new line to the end of that file:

auto.show.quick.doc=true

Start IDEA and just hover your mouse over something:

enter image description here

AFD
  • 7,667
  • 6
  • 36
  • 38
28

After doing CTRL+Q, you can

  1. Pin the tooltip (top right corner)
  2. Check Docked Mode (under gear in top right after pinning)
  3. Size as desired
  4. Click icon for Auto show documentation for selected item

Then when you move your cursor, the documentation will appear in this box. It costs you a little screen real estate, but I find it's worth it.

I'd post a screenshot but SO won't let me post images.

Ilya
  • 27,538
  • 18
  • 104
  • 148
liberty
  • 413
  • 5
  • 9
24

In Intellij13, you can use Editor configuration like below: enter image description here

Matthew Chen
  • 1,374
  • 10
  • 11
24

For Intellij 15, use the checkbox in File > Settings > Editor > General option Show quick documentation on mouse move.

enter image description here

You can also get there by typing "quick" or something similar in the search box:

enter image description here

fedorqui 'SO stop harming'
  • 228,878
  • 81
  • 465
  • 523
  • 1
    This one works. But what "Autopopup documentation in in(ms)" in other answers stands for? – Serob_b May 26 '17 at 17:19
  • 1
    @Serob_b I am not sure what you mean here. – fedorqui 'SO stop harming' May 26 '17 at 22:15
  • In my version of Intellij (2017.1.3) there is an option that you are talking about, but also "Autopopup documentation in(ms):" option in Editor > General > Code Completion (as accepted answer informs). So, what is the difference between these two? Just checking the second one (Autopopup) didn't solve the problem. – Serob_b May 27 '17 at 13:34
  • @Serob_b they are the same. I asked it in [What is the difference between Quick documentation and Autopopup documentation in Intellij IDEA?](https://stackoverflow.com/q/44326900/1983854). – fedorqui 'SO stop harming' Jun 05 '17 at 09:13
  • 1
    Thanks. I've actually figured out that "Autopopup documentation in (ms)" is for ctrl + space and has nothing to do with mouse hover, and of course "Show quick documentation on mouse move" is what shows docs on hover. In Intellij 2017 – Serob_b Jun 05 '17 at 20:07
14

IntelliJ IDEA 14.0.3 Ultimate:

Press Ctrl+Alt+S, then choose Editor\General choose Show quick domentation on mouse move

enter image description here

Tips: Look at the top right conner (gear icon) at JavaDoc pop-up window, You can choose:
- Show Toolbar
- Pinded Mode
- Docked Mode
- Floatting Mode
- Split Mode

enter image description here

Do Nhu Vy
  • 33,131
  • 37
  • 143
  • 202
9

Adding on to what ADNow said. On the Macintosh:

  1. Right click on IntelliJ IDEA 12
  2. Click on the Show Package Contents menu option
  3. Open the bin folder
  4. Open idea.properties
  5. Add the line:

    auto.show.quick.doc=true

meoww-
  • 1,762
  • 2
  • 20
  • 28
8

The easiest way, at least for me, was:

  • Ctrl+Shift+A
  • Type: show document
  • Show quick documentation on mouse move (set it to ON)
Paul Roub
  • 35,100
  • 27
  • 72
  • 83
Enrico Giurin
  • 1,627
  • 24
  • 22
6

From IntelliJ Ultimate 2018.1.5, aka IntelliJ IDEA 2018.1.5, till 2019.3 , there are actually two options under File -> Preferences:

  1. In Editor > General > Other (section) > Show quick documentation on mouse move - delay 500 ms
    • Select this check box to show quick documentation for the symbol at caret. The quick documentation pop-up window appears after the specified delay.
  2. In Editor > General > Code Completion (sub-item) > Auto-display documentation in 1000 ms
    • Select this check box to have IntelliJ IDEA automatically show a pop-up window with the documentation for the class, method, or field currently highlighted in the lookup list. If this check box is not selected, use Ctrl+Q to show quick documentation for the element at caret.
    • Quick documentation window will automatically pop up with the specified delay in those cases only, when code completion has been invoked explicitly. For the automatic code completion list, documentation window will only show up on pressing Ctrl+Q.
Leviand
  • 2,567
  • 3
  • 24
  • 35
3

In IntelliJ IDEA 14, it has moved to: File -> Settings -> Editor -> General -> "Show quick doc on mouse move"

Jonas Pedersen
  • 484
  • 6
  • 10
3

In Intellij 2019, I did: File > Settings > Editor > General option Show quick documentation on mouse move.

Slimane Deb
  • 133
  • 2
  • 10
2

File-->Settings-->Editor

Check "Show quick doc on mouse"

Now when you put the mouse over a method a tooltip with the documentation will appear. Sometimes the tooltip size is too small and you will have to resize it moving the mouse down to the bottom of the tooltip.

Amap
  • 151
  • 1
  • 3
1

IDEA has "find action":

Open "Help" menu, type "doc", move cursor to "Quick Documentation" it will be highlighted.

Also "find action" can be called from hot key (you can find it in settings->hotkeys)

Cjkjvfnby
  • 106
  • 3
1

On mac in IntelliJ Ultimate (trial) 14 I have mine under Settings > Editor > General > Code completion. The tooltip short is F1 on my laptop.

It's called "Autopopup documentation in (ms):"

enter image description here

Gemtastic
  • 5,673
  • 6
  • 29
  • 48
1

A note for Android Studio (2.3.3 at least) users, because this page came up for my google search "android studio hover javadoc", and android studio is based on Intellij:

See File->Settings->Editor->General: "show quick documentation on mouse moves", rather than File->Settings->Editor->General->Code Completion "Autopopup documentation in (ms) for explicitly invoked completion" and "Autopopup in (ms)", which has been previously talked about.

ozzylee
  • 131
  • 1
  • 13
1

I tried many ways mentioned here, especially the preference - editor - general - code completion - show documentation popup in.. isn't working in version 2019.2.2

Finally, i am just using F1 while caret is on the type/method and it displays the documentation nicely. This is not ideal but helpful.

p_champ
  • 865
  • 1
  • 11
  • 20
1

In 2020.1 there is in editor javadocs rendering has been added. Screen shots borrowed from intellij documentation.

enter image description here

enter image description here enter image description here

enter image description here

s7vr
  • 63,888
  • 5
  • 68
  • 99
0

On my IntelliJ U on Mac I need to point with cursor on some method, variable etc. and press [cntrl] or [cmd] key. Then click on the link inside popup window which appeared to see JavaDocs

Michal
  • 2,966
  • 1
  • 23
  • 41
0

All of the above methods are useful but one basic thing missing you need to have src.zip in your JDK (C:\Program Files\Java\jdk1.8.0_171). I assumed it comes preinstalled but for some reason, it was not present in my installation. Another thing to check is if your project is using the specified (1.8.0_171 in this case) JDK.

avp
  • 1,888
  • 23
  • 27
-1

The answer is CTRL + P (NOT CTRL + Q)

Someone else posted this answer on JetBrains forum: The idea is a different IDE. Try to discover its features and try to make the best of it, rather than trying to emulate whatever you used before. For the most part, Idea has very high usability (much better than Eclipse IMHO) and is streamlined for supporting code editing as best as possible (rather than relying on wizards too much for example).

  • Javadoc: Ctrl-Q
  • A quick view of the implementation: Ctrl-Shift-I
  • Show context: Alt-Q
  • Show parameters (in a method call): Ctrl-P
  • Show error description. Ctrl-F1

... plus many more shortcuts to navigate in code and different idea views.

I think it rather nice that you can see just the specific bit of information you are interested in with a simple keystroke. Have a look at the menus which will also show the possibly modified shortcuts for your keymap.

0 Avatar Jens Voß Created June 12, 2008, 09:26 And, elsandros, in addition to what Stephen writes: Since you seem to be interested in IDEA's keyboard shortcuts, I highly recommend the "Key Promoter" plugin which helps you memorize the relevant shortcuts quickly.

Also very useful is the "Goto Action" feature, invoked by Ctrl-Shift-A. In the popup, you can enter a keyword (e.g. "Javadoc"), and the IDE tells you the available actions matching your search, along with keyboard shortcuts and the containing action groups (which often also give you a clue about how to navigate to the action using the menu).

Cœur
  • 32,421
  • 21
  • 173
  • 232
pcxpert
  • 1
  • 1
  • The best answer is: eg. Mercedes Sara= new Mercedes(); 1. put your cursor in (). 2. Press ctrl + P 3. Press alt + P result: now all variables are auto-formatted and you can type the values while reading the variables. (build 2018) – pcxpert Feb 09 '18 at 19:18
  • Disagree that this is the best answer. The question was for a mouse hover over a symbol, which is provided OOTB in Eclipse. What I typically find is that I'm interested in something that's on the screen, but not under the cursor. So, to move the cursor to the symbol (mouse movement), type a short cut (keyboard), and then mouse back to where I was editing (another mouse movement) is too much work. A single mouse movement to get the information I need is perfect, as I can resume typing immediately. – chaserb Jun 19 '18 at 18:11