Sir. Hedgehog
Sir. Hedgehog

Reputation: 1290

How to fix Eclipse generating Empty Javadoc comments for Overriden methods

I have just realized that when trying to add an auto generated Javadoc (by typing /** and then enter on top of a method) on methods that have the @Override annotation on them Eclipse only adds an empty Javadoc.

/**
 * 
 */

Whereas if the method doesnt have the @Override annotation Eclipse adds the default comment which I have specified through the settings (Window - Preferences - Java - Code Style - Code Templates - Comments - Types - Edit)

/**
 * @author 
 *
 * ${tags}
 *
 */

I havent added any new plug ins, and I get the same output even if I restore to default the Pattern of the Javadoc.

Upvotes: 0

Views: 685

Answers (1)

greg-449
greg-449

Reputation: 111142

There is a separate "Overriding methods" template for overridden methods. "Methods" is used for normal methods ("Types" is for classes).

All in Preferences > Java > Code Style > Code Templates', 'Comments' section.

Upvotes: 1

Related Questions