kmccoy
kmccoy

Reputation: 2861

Eclipse: How can I find all (public) classes/methods without Javadoc comments?

In Eclipse, is there a way to find all (public) classes/methods which do not currently have any Javadoc comments?

Additionally, would it be possible to automatically add a basic Javadoc comment such as:

/**
 * TODO Javadoc
 * @param i
 * @return
 */

so that these methods without Javadoc would also be added to my TODO list?

Upvotes: 6

Views: 4861

Answers (1)

Tom Seidel
Tom Seidel

Reputation: 9535

See Window -> Preferences -> Java -> Compiler -> JavaDoc

Change the missing JavaDoc tags preference to Warning.

After all projects have been rebuilt, you can switch to the Problems View and all methods with missing JavaDoc are listed.

HTH Tom

Edit: Unfortunately there is no way to add a JavaDoc-template to all missing methods in one single step. The fastest way is to insert a JavaDoc is to set the cursor on the method-declaration and then using the shortcut Shift+Alt+J

Upvotes: 16

Related Questions