1. Eclipse User name settings:
Under Eclipse's installation path, open the Eclipse.ini configuration file, as shown in the following figure:
Add under-vmargs:-duser.name= your Name
2. Annotation format and various major profiles
(1). Single line (single-line) Note: "//..."
(2). Block Comment: "/*......*/"
(3). Documentation Comment: "/**......*/"
(4). Javadoc Annotation Label Syntax
@author the description of the class indicates the author who developed the class module
@version the description of the class indicates the version of the class module
@see references to classes, attributes, and methods, which are related topics
@param description of the method for a parameter in the method
@return description of the method to return the value of the method
@exception the description of the method to the exception that the method might throw
@return_type return type
@date Date
@time Time
3 Annotation Additions to classes, methods, overriding methods, and so on
Call: Window->preference->java->code style->code Template and then expand the Comments node, select the type of annotation you want to add,
Then click Edit, which is all the elements you want to set the annotation on. Each element is described individually:
After clicking Edit, press CTRL + "/" in the pattern to select the kind you want to add, such as date, author, time, return type, etc. ...
When set, the corresponding code is generated in the pattern above, as shown in the following illustration:
(1) document (files) Comment Label:
Not currently used, you can not use the settings. (2) type (Types) Comment Label (note for Class):
Specification:
/**
* Description of the class
* @authoryourname
* @Time 2012-11-20 14:49:01
*
*/
Pattern of annotations:
/**
* @Description: ${todo}
* @author: ${user}
* @time: ${date} ${time}
* /(3) field (Fields) annotation Label:
/**
* @Description: ${field}: ${todo} (describe what this variable represents in one sentence)
*/
Not for a while.
(4) constructor tag (constructor):
Specification:
/**
* Description of the construction method
* @param Name
* The text displayed on the button
*/
Pattern:
/**
* @Description: ${todo}
* ${tags}
*/ (5) method (Methods) Label: (Interface and its implementation of the class method, should be annotated)
Annotation specification:
/**
* Add color to the button
*@param Color
The color of the button
* @return
* @exception (with abnormal method)
* @author Administrator
* @Time 2012-11-20 15:02:29
*/
Pattern:
/**
* @Description: ${todo}
* ${tags}
* ${return_type}
* @exception:
* @author: ${user}
* @time: ${date} ${time}
* * (6) Coverage method (overriding Methods) Label: (7) representative method (Delegate Methods) Label:
(8) Getter Method Label: (9) Setter method Label:
These are temporarily undefined, and you can add comments in your own way.