1.
Open the Eclipse/myeclipse tool, open or create a Java project, click the menu window->preferences Pop-up Preferences window
2.
Expand the list of Java->code style->code template options on the left to see all the elements that need to be annotated
3.
Expand right-side template options comments to see the types of comment templates you can set, including Files,types,fields,constructors,methods, and more
4.
Click Types, the pattern section below displays the contents of the Class Comment template, click the Edit button on the right to modify the content of the comment template
steps to read 5.
For example: I am accustomed to the following annotation format:/*** <p>title: </p>* <p>description: </p>* <p>company: </p> * @ Author * @date * *
So enter the above content in the pattern area
6,
Place your mouse behind the title, click the Insert Variable button below, and in the list of variables that pops up, select TypeName
7.
Similarly, enter ${user} after @author, enter ${date} ${time} variable after @date, and such annotations are defined.
8.
In the actual development process, after a new class, by entering/**, and then enter automatically follow the definition of the Comment template format to fill the comment content, you can also press Shift+alt+j shortcut key to complete the action
Eclipse/myeclipse How to set up a personalized code comment template