如何在JetBrains IntelliJ IDEA中编辑评论模板并添加类型或功能注释?

时间:2012-05-10 01:04:42

标签: java templates comments intellij-idea

在JetBrains IntelliJ IDEA中,我想编辑类似

的评论
/**
 * Created by IntelliJ IDEA.<br/>
 * User: ${USER}<br/>
 * Date: ${DATE}<br/>
 * Time: ${TIME}<br/>
 * To change this template use File | Settings | File Templates.
 */

并为类型为

的类型生成评论
public class MyUsernamePasswordAuthenticationFilter extends UsernamePasswordAuthenticationFilter

或类似

的功能
protected  void checkUsbKeyID(UserObj user,String usbKeyID)

1 个答案:

答案 0 :(得分:49)

输入您可以在菜单File -> Settings -> File Templates中修改的评论。 然后,您会看到标签Includes并修改条目File Header

enter image description here

我认为方法评论无法编辑。