2

I am writing to write JavaDoc for my classes in eclipse and the automatic generation process does not seem to work.

If I try /** and enter, it creates the surrounding comment block but fails to add any @param or @return tags. Any ideas what might be wrong here?

EDIT: it seems to have this behaviour only for interfaces or classes implementing user defined interfaces.

Slow Trout
  • 492
  • 3
  • 13
  • your eclipse configuration, perhaps? normally this can all be configured somewhere in eclipse. – Stultuske May 05 '15 at 12:55
  • I was thinking about that -- but to be honest, Eclipse doesn't have the most user-friendly interface. – Slow Trout May 05 '15 at 12:56
  • 1
    You may want to check this thread: http://stackoverflow.com/questions/2612633/how-do-i-change-the-javadocs-template-generated-in-eclipse – Stultuske May 05 '15 at 13:00
  • Late to the party but just in case someone is reading: I'm using Eclipse Oxygen and the javadoc tags are not being generated when typing /** followed by enter if the method you're commenting implements an interface. Maybe the same behavior if redefining a method from a base class (didn't check) but it will work for the method stub in the interface, or for new methods in the class you're working on. – Alain Mar 16 '18 at 18:30

1 Answers1

1

Typing /** and pressing Enter only helps complete the comment. If you want to generate a boilerplate JavaDoc comment, select the method and use the Source context menu to generate the boilerplate.

nitind
  • 19,089
  • 4
  • 34
  • 43