【轉】Eclipse 注釋模板的說明及設置
原文:https://blog.csdn.net/qq_44438941/article/details/132213813
1.在eclipse中點擊Window——>java——>Code Style——>CodeTemplates——>Comments

2.常用Variable

3. 我的注釋模板
①Files 文件
/**
* @Title: ${file_name}
* @Description: ${todo}
* @author Jeremy
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
②Types 類
/**
* @ClassName: ${type_name}
* @Description: ${todo}
* @author Jeremy
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
④Constructors 構造函數
/**
* @Constructor: ${enclosing_type}
* @Description: ${enclosing_type}構造函數
* @author Jeremy
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
⑤Methods 方法
/**
* @MethodName: ${enclosing_method}
* @Description: ${todo}
* @author Jeremy
* ${tags} ${return_type}
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
⑥Overriding methods 重寫方法
/**
* @MethodName: ${enclosing_method}
* @Description: ${todo}
* @author Jeremy
* ${tags}
* ${see_to_overridden}
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
4.如何使用注釋
選中類、方法名 用快捷鍵Alt+Shift+J 快速添加注釋
————————————————
版權聲明:本文為博主原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。
原文鏈接:https://blog.csdn.net/qq_44438941/article/details/132213813

浙公網安備 33010602011771號