Home> Products> IntelliJ IDEA> Features & Screenshots> Code Documentation

Code Documentation

Auto-Generating JavaDoc stubs

screenshot

If you type /** before the method declaration and press Enter, the javadoc comment block will be generated automatically, with parameter and return attributes already inserted as necessary.

to the top

Code completion in JavaDoc comments

screenshot

Code completion is available within javadoc comments. For example, having typed @ and pressed Ctrl + Space, you will get a lookup window with possible javadoc attributes to be inserted.

to the top

JavaDoc popup tooltips

screenshot

You can press Ctrl + Q on any element in the code to see JavaDoc for the current symbol. If you have JavaDoc comments in your source code, IntelliJ IDEA will generate documentation on the fly and show it in the lookup.

This feature also works in code completion and GoTo lookup lists.

to the top

Opening JavaDocs in an external browser

IntelliJ IDEA allows you to browse JavaDocs for classes, methods, fields, or any other symbols directly from the code. Pressing Shift + F1 on a usage of any class, method or field immediately opens a browser and navigates to the corresponding place in the JavaDoc. When configuring JavaDoc in project settings, you can specify URLs as JavaDoc paths.

to the top

Generating JavaDoc

screenshot

IntelliJ IDEA integrates with the standard JavaDoc tool from JDK to help you generate javadoc documentation for existing classes.

to the top

JavaDoc error highlighting and code inspections

screenshot

IntelliJ IDEA provides a set of javadoc code inspections that help you to quickly discover the following problems:

  • no javadoc where it is required
  • required tag is missing (you can define the set of required tags)
  • invalid or incomplete tag
  • javadoc description is missing or incomplete
  • unresolved references in javadocs

Found problems are highlighted as errors or warnings and accompanied by the intelligent quick fixes.

Read more about IntelliJ IDEA code inspections and static code analysis ».

to the top