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')} 
 */ 

  

有任何需要沟通交流的联系QQ群:276483863 加好友备注【博客园技术交流】
原文地址:https://www.cnblogs.com/JoePotter/p/15416288.html