在eclipse中新建类时@auther自填充:
1. auther直接写死:
操作:Preferences->java->Code Style->Code Templates->Comments->Types
/**
* @author ${user}
*
* ${tags}
*/
直接将${user}替换成要改的username。
2. 修改定义文件:
操作:Preferences->java->Code Style->Code Templates->Code->New Java files
${filecomment}
${package_declaration}
/**
* @author username
*/
${typecomment}
${type_declaration}
中间加上作者名。
参照:http://keating.iteye.com/blog/786713
1. auther直接写死:
操作:Preferences->java->Code Style->Code Templates->Comments->Types
/**
* @author ${user}
*
* ${tags}
*/
直接将${user}替换成要改的username。
2. 修改定义文件:
操作:Preferences->java->Code Style->Code Templates->Code->New Java files
${filecomment}
${package_declaration}
/**
* @author username
*/
${typecomment}
${type_declaration}
中间加上作者名。
参照:http://keating.iteye.com/blog/786713
本文详细介绍了如何在Eclipse中通过配置代码模板来实现新建类时自动填充@auther属性的功能,包括直接写死方式和修改定义文件方式,并提供了实例链接以供参考。
1246

被折叠的 条评论
为什么被折叠?



