The Eclipse Comment template on the web, here to sort out some of the more commonly used.
How to edit a comment template: Window->preference->java->code style->code template and then expand the Comments node is all the elements that need to be annotated. Each of these elements is now introduced:
1. Document (files) Note tags:
[HTML]View PlainCopyprint?
- /**
- * All rights Reserved, designed by Android_robot
- * @Title: ${file_name}
- * @Package ${package_name}
- * @Description: ${todo} (describe what the file does in a word)
- * @author: Android_robot
- * @date: ${date} ${time}
- * @version V1.0
- */
2. Type (Types) Comment Label (note for Class):
[HTML]View PlainCopyprint?
- /**
- * @ClassName: ${type_name}
- * @Description: ${todo} (here is a word describing the role of this class)
- * @author: Android_robot
- * @date: ${date} ${time}
- *
- * ${tags}
- */
3. Field Comment Label:
[HTML]View PlainCopyprint?
- /**
- * @Fields ${field}: ${todo} (describe what this variable means in a sentence)
- */
4. Constructor Tags:
[HTML]View PlainCopyprint?
- /**
- * @Title: ${enclosing_type}
- * @Description: ${todo} (here is a word describing the effect of this method)
- * @param: ${tags}
- * @throws
- */
5. Method (Methods) Tags:
[HTML]View PlainCopyprint?
- /**
- * @Title: ${enclosing_method}
- * @Description: ${todo} (here is a word describing the effect of this method)
- * @param: ${tags}
- * @return: ${return_type}
- * @throws
- */
6. Overlay method (overriding Methods) Label:
[HTML]View PlainCopyprint?
- /**
- * <p>title: ${enclosing_method}</p>
- * <p>description: </P>
- * ${tags}
- * ${see_to_overridden}
- */
7. Delegate method (Delegate Methods) Label:
[HTML]View PlainCopyprint?
- /**
- * ${tags}
- * ${see_to_target}
- */
8.getter Method Label:
[HTML]View PlainCopyprint?
- /**
- * @Title: ${enclosing_method} <BR>
- * @Description: Please write your Description <BR>
- * @return: ${field_type} <BR>
- */
9.setter Method Label:
[HTML]View PlainCopyprint?
- /**
- * @Title: ${enclosing_method} <BR>
- * @Description: Please write your Description <BR>
- * @return: ${field_type} <BR>
- */
The rest is the default, ^_^
Eclipse Comment Template