在intelliJ中自动生成Javadoc注释?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35381225/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Auto-generate Javadoc comments in intelliJ?
提问by Madan
Is it possible to auto-generate Javadoc comments for each method in one class in IntelliJ IDEA?
是否可以为 IntelliJ IDEA 中一个类中的每个方法自动生成 Javadoc 注释?
采纳答案by Idos
Yes.
是的。
Under Tools
you have Generate JavaDoc
. Read about it in the official site.
在Tools
你之下Generate JavaDoc
。在官方网站上阅读它。
In addition you may (Intellij 15):
此外,您可以(Intellij 15):
Position caret above a method name, type /** and press Enter to let IntelliJ IDEA automatically generate JavaDoc stubs for this method
将插入符号放在方法名称上方,键入 /** 并按 Enter 让 IntelliJ IDEA 自动为此方法生成 JavaDoc 存根
Edit:You can use the action Fix doc comment
. It doesn't have a default shortcut, but you can assign the Alt+Shift+Jshortcut to it in the Keymap, because this shortcut isn't used for anything else.
编辑:您可以使用 action Fix doc comment
。它没有默认快捷方式,但您可以在 Keymap 中为其指定Alt+ Shift+J快捷方式,因为此快捷方式不用于其他任何用途。
回答by AlexanderRS
You can use JavaDoc pluginfor generation JavaDoc comments in batch mode. It is the simpliest way for do it.
您可以使用JavaDoc 插件以批处理模式生成 JavaDoc 注释。这是最简单的方法。
回答by resatz
A QuickShortCut is
QuickShortCut 是
CTRL+SHIFT+A
From the dropdown List "Fix doc comment"
CTRL+ SHIFT+A
从下拉列表“修复文档注释”