ramlife

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

一。 类注释

/**
 * @description: 
 * @author:  ${USER}
 * @email:   xxx@163.com 
 * @date :   ${DATE} ${TIME}
 */

二。 方法注释

到 file-settings-editor-live templates中:
1、点击 右侧 + 号 ,选择 template group
2、输入新建组的名称(随便输入名称),比如 CustomTemplates
3、点击新建的组
4、点击 右侧 + 号 ,选择 live template ,输入Abbreviation值(这是在代码中调用注释体的快捷键 我这里设置的是 methcmnt)
5、按照格式输入

/**
 * @description:    $desc$
 * @param:          $methodParameters$
 * @return:         $methodReturnType$
 * @author:         $user$
 * @time:           $date$ $time$
 */

6、点击 edit variables 按钮
7、输入属性值, 如将name为user的表达式设置为user(),即可自动显示作者名,date()自动显示最新日期:
8、保存即可

参考: https://blog.csdn.net/u014390957/article/details/83113435
https://blog.csdn.net/chenhy24/article/details/84567510

posted on 2020-03-05 10:32  ramlife  阅读(1492)  评论(0编辑  收藏  举报