Fork me on Gitee

Eclipse中添加注释模板

在写代码的时候会对相关文件进行说明和描述,因此在代码中添加注释模板是必要的。下面是我整理的注释模板,欢迎使用!

 

步骤

1、选中Eclipse的Windows——>Preferences——>Java——>Code Style——>Code Template——>Comments
选中Edit进行编辑

 

 

 

 

 

 

Files

/**  
 * @Title: ${file_name}
 * @Description: TODO(描述)
 * @author OriginalCoder
 * @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')} 
 */  

 

Types

/**  
 * @ClassName: ${type_name}
 * @Description: TODO(描述)
 * ${tags}
 * @author OriginalCoder
 * @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')} 
*/  

 

Fields

/**  
 * @Fields ${field} : TODO(描述)
 * @author OriginalCoder
 * @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')} 
 */  

 

Constructors

/**  
 * @Title: ${enclosing_type}
 * @Description: ${enclosing_type}构造函数
 * ${tags}
 * @author OriginalCoder
 * @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')} 
 */  

  

Methods

/**  
 * @Title: ${enclosing_method}
 * @Description: TODO(描述)
 * ${tags}
 * @author OriginalCoder
 * @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')} 
 */  

  

Overriding methods

/**  
 * @Title: ${enclosing_method}
 * @Description: TODO(描述)
 * ${tags} 
 * ${see_to_overridden} 
 * @author OriginalCoder
 * @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')} 
 */ 

  

 

posted @ 2021-10-17 10:29  JoePotter  阅读(214)  评论(0编辑  收藏  举报
``