This tutorial shows multiple examples of Javadoc in IntelliJ IDEA.

IntelliJ shows the JavaDocs tooltip on the mouse over

In Eclipse, if you mouse hover over a method class, or variable, a tooltip with Javadoc information is displayed. In IntelliJ, It does not show automatically with mouseover.

There are two ways to enable quick documentation.

  • Open Settings window
  • Select Editors -> Code Editing -> Quick Documentation -> Show Quick Documentation on mouse move option.

You can check the checkbox to show the popup window.

You can also use the shortcuts below.

  • Move the mouse cursor to method, classes, and variables
  • Use Ctrl + Q to show Javadoc popup, use Ctrl + J on MacOS.

Second way, Go to Settings -> Editor -> Code Complete -> Autopopup Documentation

The third way, using the file

Add or update the below property in the file.

Restart Intelli IDEA to start the server.

Render Javados on Editor

  • Use shortcut Ctrl + Alt + S or Go to Settings -> preferences
  • Editor -> General -> Appearance ->Enable Render Documents Comments
  • It opens two views for documentation comments
  • Regular View or Rendered View

Generate Javadoc for methods and classes in IntelliJ

  • Go to Find Actions Menu( use Ctrl + Shift + A)
  • Generate Javadoc action
  • It opens and generates with the default template stub

Configure Javadoc template in IntelliJ IDEA

  • Go to File -> Settings -> LiveTemplate
  • Add a new template
  • Select setter or getter Abbreviation
  • Change template text to new template text
  • Applicable in Java: declaration.