STS或者Eclipse修改@author及其他默认备注的信息的方法

论坛 期权论坛 脚本     
匿名技术用户   2020-12-28 15:37   32   0

原文地址:http://blog.csdn.net/yangnianbing110/article/details/7608217

修改@author及其他默认备注的信息的方法:

1. 在eclipse.ini中添加
-vmargs
-Duser.name={author name}
记得一定要在-vmargs之后,否则无效。

2. 设置eclipse参数
windows-->preference
Java-->Code Style-->Code Templates
code-->new Java files
原来的内容是:
${filecomment}
${package_declaration}

${typecomment}
${type_declaration}
添加自定义内容,添加之后内容如下:
${filecomment}
${package_declaration}
/**
* @author 作者 E-mail:
* @version 创建时间:${date} ${time}
* 类说明
*/
${typecomment}
${type_declaration}

3. 设置eclipse参数
windows-->preference
Java-->Code Style-->Code Templates
Comments-->files
按照需要修改配置,并且保证上面项的配置中有${filecomment}这项。
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP