创建类时自动生成注释声明:操作步骤:

File --> settings --> Editor --> File and Code Templates

点击 Includes 选择 File Header 在右边内容框中输入如下内容:

/**
* @author Dkx
* @${DATE}${TIME}
* @version 1.0
* @function
* @comment
*/

image_2023-01-14-21-04-28

创建方法时自动生成注释声明:操作步骤:

File --> settings --> Editor --> Live Templates

  1. 点击 + 号,再点击 Template Group...

创建名称随意,建议使用名称: Method 翻译为方法更为规范

image-20240105144937718

选中刚才创建好的 Method 再次点击 + 号,选择 Live Template

取名为: /** 注意:不能随便起名建议使用这个名称

在展开 Method 选项点击 /** 标签

image_2023-01-14-21-09-33

在下面的内容框中输入如下内容:

/**
*@param:$params$
*@return:$returns$
*@Date:$date$
*/

image_2023-01-14-21-10-29

然后点击 EDIT VARIABLES

设置如下设置:

image_2023-01-14-21-11-14

更改调用方式为按 Enter 后触发

image_2023-01-14-21-11-47

点击 APPLY,OK 即可