Eclipse comments and eclipse comments
The entry for setting the annotation Template: Window-> Preference-> Java-> Code Style-> Code Template. Then, expand the Comments node to set all the elements for annotation. We will introduce each element one by one:
File (Files) annotation label:
/**
* @ Title: $ {file_name}
* @ Package $ {package_name}
* @ Description: $ {todo} (describe the file in one sentence)
* @ Author A18ccms A18ccms_gmail_com
* @ Date $ {date }$ {time}
* @ Version V1.0
*/
Type (Types) annotation label (class annotation ):
/**
* @ ClassName: $ {type_name}
* @ Description: $ {todo} (Here we use a sentence to describe the role of this class)
* @ Author A18ccms a18ccms_gmail_com
* @ Date $ {date }$ {time}
*
* $ {Tags}
*/
Field (Fields) annotation label:
/**
* @ Fields $ {field }:$ {todo} (describe in one sentence what this variable represents)
*/
Constructor Tag:
/**
* <P> Title: </p>
* <P> Description: </p>
* $ {Tags}
*/
Method (Constructor & Methods) label:
/**
* @ Title: $ {enclosing_method}
* @ Description: $ {todo} (Here we use a sentence to describe the role of this method)
* @ Param $ {tags} setting file
* @ Return $ {return_type} return type
* @ Throws
*/
Overriding Methods labels:
/* (Non-Javadoc)
* <P> Title :$ {enclosing_method} </p>
* <P> Description: </p>
* $ {Tags}
* $ {See_to_overridden}
*/
Method label:
/**
* $ {Tags}
* $ {See_to_target}
*/
Getter method label:
/**
* @ Return $ {bare_field_name}
*/
Setter method label:
/**
* @ Param $ {param} the $ {bare_field_name} To be set}
*/