linlf03

Idea版本2019.2

 

 

1、给类添加注释

File -> Settings -> Editor -> File and Code Templates -> Class

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
/**
*@description: ${description}
*@author: larry
*@create: ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
*/
public class ${NAME} {
}

  

2、给方法添加注释

File -> Settings -> Editor -> Live Templates ->   增加Template Group(取名为MyGroup)

 

 在选中MyGroup,点击右边“+”号中,选择Live Template

 

 

 

 

 Abbrevication取名为*

使用方法: /** 然后按下Tab键。如果 Abbrevication取名为add, /*add + Tab键

模板内容如下:

*
 * @Description: $description$
 * <br/>
 *
$params$
 * @return: $return$
 * @Author: larry
 * @date: $date$ $time$
 */

 

效果图如下:

 参考: https://zhuanlan.zhihu.com/p/32891910

分类:

技术点:

相关文章:

  • 2021-10-08
  • 2021-10-19
  • 2021-12-06
  • 2022-01-18
  • 2021-11-20
  • 2022-02-07
  • 2021-11-03
  • 2021-11-04
猜你喜欢
  • 2022-02-07
  • 2021-11-02
  • 2021-12-03
  • 2021-11-30
  • 2021-06-16
  • 2021-09-27
  • 2021-11-05
相关资源
相似解决方案