如何手动设置Intellij Idea中的类,方法和字段的注释? [英] How to set comments manully for Class, Method and Field in Intellij Idea?

查看:363
本文介绍了如何手动设置Intellij Idea中的类,方法和字段的注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处有一个复选框Enable Live Template,但如何在实时模板中使用Class Header.

There is a checkbox Enable Live Template here, but how to use Class Header in Live Template.

谁知道最好的方法来手动设置Intellij Idea中的类,方法和字段的注释,例如Eclipse中的代码模板?

Who knows the best way to set comments manully for Class, Method and Field in Intellij Idea like the Code Template in Eclipse ??

推荐答案

File Header.javaClass Header.java对应于邻居includes选项卡上的模板:

File Header.java and Class Header.java corresponds to templates on the neighbour includes tab:

不确定您的意图

手动设置Intellij Idea中的类,方法和字段的注释,例如 Eclipse中的代码模板

set comments manully for Class, Method and Field in Intellij Idea like the Code Template in Eclipse

在Intellij IDEA中,您可以将光标置于类/字段/方法的声明上方,然后按/** Enter键.例如,这将为方法:@param@return@throws等生成javadoc. 例如,此处提供了有关创建新模板的重要说明:如何配置Intellij Idea javadoc模板?

In Intellij IDEA you can position cursor above declaraion of class/field/method and press /** Enter. This will generate javadoc, for example, for method: @param, @return, @throws, etc. Great instructions on creating new templates are, for example, here: How configure Intellij Idea javadoc templates?

这篇关于如何手动设置Intellij Idea中的类,方法和字段的注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆