Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see JavaDoc in IntelliJ IDEA? [duplicate]

I just switched from Eclipse to IntelliJ. IntelliJ lacks one feature from Eclipse - when you put your mouse over a method, Eclipse shows javadoc info. I think the way to show it is to use a shortcut - command+J, but when I click it, I get something wrong as on the screen shot below. Please advise me on how I can quickly get javadoc information. I need to at least know what type a method returns.

enter image description here

like image 872
Eugene Avatar asked Jun 15 '12 14:06

Eugene


People also ask

How do I find my javadoc in IntelliJ?

View Javadocs in the editorHover the mouse over the necessary symbol in the editor. Place the caret at the symbol and press Ctrl+Q (View | Quick Documentation). Press Ctrl+Q again to open this documentation in the Documentation tool window.

How do I find the generated javadoc?

Accessing the Javadoc from NetbeansSelect the desired package, class or method name, right-click and select Show Javadoc. This will launch your default web browser and navigate to the Javadoc for the selected item.

How do I open javadoc jar in IntelliJ?

Here are two fast and easy ways to add Javadoc to IntelliJ so you can see it using the "Quick Documentation" feature: simply hover your mouse on any piece of code or use the Quick Documentation shortcut key, Ctrl+Q for Linux or Windows and F1 on macOS!

Where do javadoc comments for a method go?

Writing Javadoc Comments In general, Javadoc comments are any multi-line comments (" /** ... */ ") that are placed before class, field, or method declarations. They must begin with a slash and two stars, and they can include special tags to describe characteristics like method parameters or return values.


2 Answers

Alternatively you can position your cursor on the item and show JavaDoc using

CTRL+Q

which is the default shortcut.

Edit: As Methical mentioned on Mac the shortcut is

CTRL+j (^+j not +j)

like image 41
Dropout Avatar answered Oct 01 '22 10:10

Dropout


Use View | Quick Documentation or the corresponding keyboard shortcut (by default: Ctrl+Q on Windows/Linux and Ctrl+J on macOS or F1 in the recent IDE versions). See the documentation for more information.

It's also possible to enable automatic JavaDoc popup on explicit (invoked by a shortcut) code completion in Settings | Editor | General | Code completion (Autopopup documentation):

autopopup documentation

Yet another way to see the quick doc is on mouse move:

on mouse move

like image 185
CrazyCoder Avatar answered Oct 01 '22 08:10

CrazyCoder