First, comments
1. Annotation types
[A]. Single-line Comment
// single-line comment " single-line comment ";
[b]. Multiline comment
/* */" Multiline comment ";
[c]. Documentation Comments
/**/Publicclass dummy{}
2. Shortcut keys
[A]. Add/Cancel a single line comment: ctrl+/
[b]. Add a document comment for the class: ctrl+shift+j
Second, the note template
role: defines the default annotation format for files, classes, and methods, reducing the amount of manual input.
1. Set the entry for the comment template: click window->preference->java->code style->code Template , and then expand The comments node .
2. The elements under the comments node are described below:
file Node (document comment label)
/* * * @Title: ${file_name} * @Package ${package_name} * @Description: ${todo} (describe the file in a word) * @author Fsjohnhuang * @date ${date} ${time} * @version V1.0 */
Types Node (class comment label)
/**/
Fields node (field comment label)
/**/
constructor Node (constructor comment label)
/**/
method Node (Methods comment label)
/* * * @Title: ${enclosing_method} * @Description: ${todo} (here is a word describing the function of this method) * @param ${tags} parameter description * @return ${return_ Type} * /
overriding Methods node (override method Comment label)
/**/
Delegate Methods Node (Proxy method comment label)
/**/
Getter Node (Getter Method Comment label)
/**/
Setter Node (Setter method Comment label)
/**/
3. Import and Export comment templates
Export comment templates can be imported under the window->preference->java->code style->code template.
respect the original, reprint please indicate from:http://www.cnblogs.com/fsjohnhuang/p/3988883.html ^_^ Fat Boy John
Java Magic Hall: annotations and Comment templates