创建类时自动生成注释:
windows-->preference
Java-->Code Style-->Code Templates
code-->new Java files
编辑它
${filecomment}
${package_declaration}
/**
* @author 作者 E-mail:
* @version 创建时间:${date} ${time}
* 类说明
*/
${typecomment}
${type_declaration}
自动生成注释:
Window->Preferences->Java->Code Style在这个界面上有 CheckBox [ Automatically add comments for new methods and types ]这个选项,你只要打钩,应用就可以了。
也可以在eclipse菜单栏中的source中选择手动生成:
快捷键是alt+shift+j,将光标放在方法名上,按快捷键。具体内容还是要自己填写。