方法:

1.打开 File->Setting

Studio设置自己的快捷键

2.打开 Editor->Live Templates

Studio设置自己的快捷键

3.创建Template Group

Studio设置自己的快捷键

4.填写group名称。

Studio设置自己的快捷键

5.在author组下,创业Live template

Studio设置自己的快捷键

 

填写abbreviation(得取个方便输入,自己能一看就懂的了)。填写template text,设置change,编辑edit variables。最后apply。

说明:$date$ $time$(是自定义的,按格式抒写) 需要编辑edit variables才可使用编辑template text(编写好后,打开edit variables,自动出现自定义的name)。

Studio设置自己的快捷键

6.设置在java代码中输入iauthor,显示注释内容。

Studio设置自己的快捷键

 

完成!

在代码中,输入iauthor,自动生成注释:

Studio设置自己的快捷键

 

补充:

使用as建类的时候,是不是都会自动出现这段注释?

Studio设置自己的快捷键

如果需要修改,去file and code temlates修改file header!

Studio设置自己的快捷键

 

自定义注释讲解完成。实用起来吧!

 

只有更了解,才能更懂得,才能更高效!

 

打开设置快捷方式!导航上的小图标!点起来吧!哈哈~~

Studio设置自己的快捷键

相关文章:

  • 2021-06-12
  • 2021-10-19
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2022-01-03
  • 2021-05-06
  • 2021-08-18
猜你喜欢
  • 2021-05-22
  • 2021-10-24
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案