Generating Javadoc Comments in Source Code

See Also

You can use editor hints to automatically generate basic Javadoc comments for code elements in your source files. The generated comments include required tags for the particular code element. For example, if a method takes a parameter, a @param tag is inserted. You can also use hints to generate corrections to Javadoc comments, such as when the comments contain incorrect tags.

You are notified of an editor hint by a lightbulb icon that appears in the left margin of the Source Editor. You can read the hint by clicking the lightbulb icon or by pressing Alt-Enter. You can generate the code suggested by the hint by clicking the hint or by pressing Enter.

The hints for Javadoc generation are turned off by default.

To turn on hints for Javadoc comments:

  1. Choose Tools > Options > Editor > Hints.
  2. On the Hints tab, select Java from the Language drop-down list.
  3. Select the Javadoc checkbox or expand it to fine-tune your choice.

By default, the Javadoc hints work for protected elements and public elements. If you would like to change the scope of the hints, expand the Javadoc node and select one of the subnodes. Then choose the radio button for the scope to which you would like the hints to apply.

For more information about Javadoc tags, see:

For information on how to write Javadoc comments, see:

See Also
Generating Javadoc Documentation
Adding a Javadoc Library to a Project

Legal Notices