6

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?

Jeffmagma
  • 452
  • 2
  • 8
  • 20
kmccoy
  • 2,761
  • 3
  • 25
  • 29

1 Answers1

16

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

Tom Seidel
  • 9,525
  • 1
  • 26
  • 38
  • 4
    Actually you can add JavaDoc to all missing methods in a class. From the package explorer view, expand the class that you wish to generate JavaDoc on. Select all of the methods and press Alt-Shift-J. This will generate Javadoc for all of the methods in that one class. If however you want to do it on a package or project level, I would point you at the responses to this question: http://stackoverflow.com/questions/2530043/any-way-to-auto-generate-all-javadoc-comments-in-eclipse – Phil Jan 24 '13 at 12:21