11. 设置注释模版

设置路径: preferences - java - code style - code template -comments

1、文件(Files)注释标签

/**
 * Copyright © 2016 XXXXXXXX有限责任公司. All rights reserved.
 *
 * @Title: ${file_name}
 * @Project-Bundle: ${project_name}
 * @Package: ${package_name}
 * @Description: 控制层
 * @author: XXX.XX
 * @version: V1.0
 * @date: ${date} ${time}
 * Modification  History:
 * Date         Author        Version        Discription
 * ---------------------------------------------------------------------------
 * ${date}     xxx.xx       1.0             1.0
 */

 2、类型(Types)注释标签(类的注释):

/**
 * @ClassName: ${type_name}
 * @Description: ${todo}(这里用一句话描述这个类的作用)
 * @author
 * @date ${date} ${time}
 * ${tags}
 */

3、字段(Fields)注释标签:

/**
 * @Fields ${field} : ${todo}(用一句话描述这个变量表示什么)
 */

4、构造函数(Constructor)注释标签:

/**
 * @Title: ${enclosing_type}
 * @Description: ${todo}
 * @param ${tags}
 * @throws
 */

5. preferences - java - code style - code template -comments - methods

/**
 * @Title: ${enclosing_method}
 * @Description: ${todo}(这里用一句话描述这个方法的作用)
 * @param ${tags}    参数说明
 * @return ${return_type}    返回类型
 * @throws
 */

6、覆盖方法(Overriding Methods)标签:

/**
 * @Title: ${enclosing_method}
 * @Description:
 * ${tags}
 * ${see_to_overridden}
 */

7、代表方法(Delegate Methods)标签:

/**
 * ${tags}
 * ${see_to_target}
 */

8、getter方法标签:

/**
 * @Title: ${enclosing_method}
 * @Description: ${todo}
 * @return: ${field_type}
 */

9、setter方法标签:

/**
 * @Title: ${enclosing_method}
 * @Description: ${todo}
 * @return: ${field_type}
 */


 
 
原文地址:https://www.cnblogs.com/zkx4213/p/9089224.html