Idea 添加注释:类注释、方法注释(可获取参数)

原文链接:https://blog.csdn.net/liqing0013/article/details/84104419

Idea 添加注释:类注释、方法注释

类注释

File–Setting–Editor–File and Code Templates–Class:

  • 注释模板:
    /**
     *
     *
     *@description: 
     *@author: Andy
     *@time: ${DATE} ${TIME}
     * 
     */

    操作截图:

  •  效果:

方法注释

  • 为了获取参数信息,我们需要使用 “ Live Templates” 。

  • 创建 Live Templates 分组

    • File–Setting–Live Templates。

 

 

创建 Template

  • 我们上一步创建了 Andy 分组,现在我们将在 Andy 分组中创建 Template。

设置模板内容
模板缩写(Abbreviation):例如,我们可以把它设置为 “a”。
模板描述(Description):例如,我们可以设置为 “方法注释”。
模板内容:

/**
*
*
* @description: 
$params$
* @return: $return$
* @author: Andy
* @time: $date$ $time$
*/ 



原文地址:https://www.cnblogs.com/lvchengda/p/12668166.html