idea设置类注释和方法注释

类注释

1、file-->setting-->editor-->file and code templates-->includes--> file header
2、在右侧文件框编辑注释
/**
*description:
*author:${USER}
*time:${DATE}
*/

3、点击ok进行保存

方法注释

1、file-->setting-->editor-->livetemplates
2、点击右边绿色加号,选择template group,弹出窗口,随便起名。
3、file-->setting-->editor-->livetemplates
4、选择你刚才建立的group
5、点击右侧绿色+号,选择livetemplates,填写Abbreviation,注释的缩写名。打这个名,就可以添加注释。
6、在Templete text中编写注释,复制上方的即可
7、点击注释下方的define。选择注释作用域,勾选everywhere。
8、点击注释右侧的edit variables。设置参数的值,可选择默认表达式。
9、点ok配置完成。

posted @ 2019-08-12 08:33  经典鸡翅  阅读(281)  评论(0编辑  收藏  举报