Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA - Show method help/description

I was wondering if there is a way to see the description/help of a method on the list of suggestions like in Eclipse. And going to the class and looking up the help manually isn't an option.

Example in Eclipse:

enter image description here

like image 543
Lorenzo Avatar asked Jul 26 '14 02:07

Lorenzo


People also ask

How do I find the definition of a method in IntelliJ?

In IntelliJ IDEA, you can see where and how symbols, such as tags, classes, fields, methods, or functions are defined in your project. For this purpose, the IDE features the Quick Definition popup. To view definition of a symbol, select it in the editor and press Ctrl+Shift+I (or click View | Quick Definition).

How do I show method arguments in IntelliJ?

In IDEA, clicks on the method name, press CTRL + Q to show the method signature on a pop up. Alternatively, press CTRL + P to show the available parameters.

How do I create a method description in IntelliJ?

From the main menu, select Tools | Generate JavaDoc. In the dialog that opens, select a scope — a set of files or directories for which you want to generate the reference, and set the output directory where the generated documentation will be placed.

How do I list methods in IntelliJ?

In IntelliJ IDEA you can do it by calling the Method Hierarchy action, available via Ctrl + Shift + H (Cmd + Shift + H for OS X). This action may help you figure out which of the classes you may want to navigate to.


2 Answers

If you select an item in the suggestion list and want to see its documentation, press Ctrl+Q (Q = quick information) or Alt+Button2 Click. The popup will be updated automatically if you select another item in the list.

Quick info

Similar you can press Ctrl+Shift+I to see its quick definition, that is its code. Very handy.

For that to work, add the path to the JavaDoc in the project settings. Here I have set it to the online Java 7 documentation:

Doc path

like image 80
sina72 Avatar answered Sep 28 '22 07:09

sina72


Press F1 and IntelliJ will present a popup with detailed information about whatever the current cursor is on. For a method, that will include things like a general description, parameters, and errors thrown. enter image description here

like image 33
Umang Sharma Avatar answered Sep 28 '22 06:09

Umang Sharma