Eclipse Code Templates

1、Files

/**
 * All rights Reserved, Designed By domain
 * @package ${package_name}
 * @title ${file_name}
 * @date ${date}
 */

2、Types

/**
 * TODO
 * @author ${user}
 * @version 1.0
 * ${tags}
 */

需要注意的是,在使用javadoc生成文档时,类描述使用的是Types描述。

当配置完成后,有时会发现新创建的文件,并不会生成注释,这里是因为不同版本的Eclipse使模板文件生效,可能需要在不同的地方勾选。

1.在模板配置时,会有Automatically add comments for new methods and types 的勾选

2.在创建文件时,会有 Generate comments的勾选

原文地址:https://www.cnblogs.com/bashenandi/p/eclipse-code-templates.html