`

eclipse注释模板

阅读更多

 

 

选择 window-->Preferences-->JAVA-->Code-->Code Templates
选择 Comments --> Files --> Edit

添加


/**  
* Filename:    ${file_name}  
* Description:   
* Copyright:   Copyright (c)2011-
* Company:    company 
* @author:     author name
* @version:    1.0  
* Create at:   ${date} ${time}  
*  
* Modification History:  
* Date         Author      Version     Description  
* ------------------------------------------------------------------  
* ${date}    xiejiangbo  1.0         create

*/  

Modification History: 每次修改版本,需要添加修改记录和说明

将下面的 Automatically add comments for new methods and types 选中

选择 Comments --> Methods --> Edit

添加


/**

* {方法的功能/动作描述}
* @param      {引入参数名}   {引入参数说明}
* @return      {返回参数名}   {返回参数说明}
* @exception   {说明在某情况下,将发生什么异常}
*/

这样在新增java类文件时,可以自动加载注释模板,生成后需要稍微调整一下注释的位置。

对于方法注释的添加,可以在要添加的注释处,单击右键 选择 Source-->Generate Element Comment 即可生成方法注释,填充注释内容

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics