- Place the caret before the declaration.
- Type the opening block comment /**, and press EnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnter.
- Add meaningful description of parameters and return values.
- In a comment block, select the desired empty line and type @ character.
- Press Ctrl+SpaceCtrl+SpaceCtrl+SpaceCtrl+SpaceAlt+SlashCtrl+SpaceCtrl+SpaceCtrl+Space or Ctrl+Back SlashCtrl+SpaceControl SpaceControl SpaceControl Space, or just wait for Code Completion to display the suggestion list:

- Select a tag from the suggestion list. For example, you can specify the parameters type, or return type.
- If a certain tag has several values, press Ctrl+SpaceCtrl+SpaceCtrl+SpaceCtrl+SpaceAlt+SlashCtrl+SpaceCtrl+SpaceCtrl+Space or Ctrl+Back SlashCtrl+SpaceControl SpaceControl SpaceControl Space after the tag, and select
the desired value from the suggestion list. For example, IntelliJ IDEA suggests to select the desired parameter name.

Tip
Documentation comment can be created with the dedicated action Fix Doc Comment. It can be invoked by means of Find Action command.
Press Ctrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+ICtrl+Shift+AMeta Shift AMeta Shift AMeta 3, with the caret somewhere within a class, method, function, or field, which should be documented, and enter the action name Fix Doc String. The missing documentation stub with the corresponding tags is added. For example:
/** * * @param userInput * @return */ static boolean processRepeatConversion (@NotNull String userInput) { boolean repeatConversion = false; if (((userInput.equals("y")) || (userInput.equals("Y")))) { repeatConversion = true; } return repeatConversion; }
The next case lays with fixing problems in the existing documentation comments.
For example, if a method signature has been changed, IntelliJ IDEA highlights a tag that doesn't match the method signature, and suggests a quick fix.

Note that the action has no keyboard shortcut bound with it. You can do it as described in the section Configuring Keyboard Shortcuts.

