1. Class annotations
Window->preference->java->code Style->code Template
Alt+shift+j the default shortcut key or
First knock "/" in two * *, then ENTER
/**
* @Description Learn to use Sikuli
* @author Administrator
* @Date July 13, 2016
* @Time 9:57:02
*/
If the time is set to @Date ${date}${time}, the time effect is as follows
@Date July 13, 2016 9:58:40
2. Method notes
Shortcut keys:
First knock "/" in two * *, then ENTER
A ${tags} will show all, parameters will be displayed, and exceptions will be obtained if an exception is thrown.
Ps:
As shown, when we click on the submenu under comments, the following pattern shows the header comment of the Java file.
The following is a detailed description of each of the subkeys:
Comments-->files (Java file comment)
Comments-->types (Java class comment)
Comments-->fields (class field comment)
Comments-->constructors (constructor comment)
Comments-->methods (Java method Comment)
Comments-->overriding methods (override method Comment)
Comments-->delegate methods (Proxy method Comment)
Comments-->getters (Java getter method Comment)
Comments-->setters (Java Setters method Comment)
Description of sub-menu under code:
code-->new Java files (new Java file Code template)
Code-->method body (method body template)
Code-->constructor body (constructor template)
Code-->getter Body (field Getter method template)
Code-->setter Body (field Setter method template)
Code-->catch Block Body (Exception Catch code block template)
The purpose of the code templates is to unify the format of the various annotations and the template of the code so that we can easily generate our own custom annotations by using Eclipse after setting up code templates.
Code comments in Eclipse