Issue
I'm using Eclipse Neon. I have updated Window -> Preferences -> Java -> Code Style -> Code Templates -> Comments -> Types to include a copyright notice in the class javadoc:
/**
* @author My Company ${year}
*
* ${tags}
*/
Under Code Templates -> Code -> New Java files it has:
${filecomment}
${package_declaration}
${typecomment}
${type_declaration}
However, when I create a new Java class via the New wizard (either right click the package or from the File -> New menu, it doesn't insert the class javadoc.
Can I set Eclipse to add this when a new class is created?
Solution
There is a 'Generate comments' check box on the New Class dialog that controls if the comments are added.
The default for this check box come from the 'Java > Code Style > Code Templates' preference page - the 'Automatically add comments to new methods and types' check box at the bottom of the page.
Answered By - greg-449