Eclipse中关于添加注释的各种方法(转载)

(1)多行注释 Ctrl+/

(2)在方法名之前/**,然后回车,如果方法已经写实现了,就不会自动出来了

(3)在方法名之前 按Alt+Shift+J 可以添加Javadoc 注释

(4)选中要注释的代码,Ctrl+Shift+/,去除注释的快捷键是Ctrl+Shift+\

方法一:Eclipse中设置在创建新类时自动生成注释

windows-->preference
Java-->Code Style-->Code Templates
code-->new Java files
编辑它

${filecomment}
${package_declaration}
/**
* @author 作者 E-mail:
* @version 创建时间:${date} ${time}
* 类说明
*/
${typecomment}
${type_declaration}

原文地址:http://blog.micro-studios.com/?p=626

猜你喜欢

转载自wupaa246.iteye.com/blog/1872226