在eclipse中新建Class资料时生成注释
在eclipse中新建Class文件时生成注释
在eclipse中新建Class文件时生成自己想要的注释,闲话少说,操作步骤如下:
1、点击工具栏中的"Window"-> Preferences, 弹出Preferences窗口;
2、找到 "Java" -> "Code Style" -> "Code Templates" ;
3、选择右边上方文本域中的"Code" -> "New Java files", 下面文本域中显示当前模板信息,如下:
${filecomment}
${package_declaration}
${typecomment}
${type_declaration}
4、点击右则的"Edit..." 按钮,修改弹出窗口中的信息,如下:
${filecomment}
${package_declaration}
/**
*
* @author yourName
* @version ${date}
*/
${typecomment}
${type_declaration}
5、最后点击"OK",就大功告成,祝您工作愉快!
案例图如下: