如何在Eclipse中如何自动添加注释和自定义注释风格

2025-03-24 15:54:10
推荐回答(1个)
回答1:

  方法如下:

  1. 打开eclipse,选择windows-->preference 

  2. 选择Java-->Code Style-->Code Templates 

  3. 点击code-->new Java files 

  4. 编辑里面的代码为下面代码,点击OK即可

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