Intellij generate javadoc for methods and classes

隐身守侯 提交于 2019-11-30 13:07:09

问题


Is it possible to set up Intellij to generate javadoc for methods and classes, automatically, with @author and @since date ?
I had this feature in Eclipse.
I know, that files have templates and also i can manually semi-automatically add javadoc to selected method/class. But i want the generation to be automatic for every generated method/class/enum/interface/field etc.
This is useful for e.g. "extract method", "override/implement", "create getter/setter" etc.
This would save hundreds of manual actions.
I'm using IntelliJ Idea 9.0 BETA Community Edition, #IC-90.96.
TIA.


回答1:


It's not possible at the moment. You may want to Vote for IDEABKL-1787.




回答2:


For IntelliJ 12:

Position caret above a method name, type /** and press Enter to let IntelliJ IDEA automatically generate JavaDoc stubs for this method. See here




回答3:


For newer versions of IntelliJ (2018+), you can use this solution:

Typing /** + then pressing Enter above a method signature will create Javadoc stubs for you.




回答4:


for generate javadoc in intellij Idea go to Tools->Generate JavaDoc (4th option) click it and give path to save your Document




回答5:


There is JavaDoc Sync Plugin 8. http://plugins.intellij.net/plugin/?idea&id=3403 Generates javadoc for all methods in class. Works in Idea 10.




回答6:


I have given up on hoping that IntelliJ will be able to do this. I now open my project in Eclipse, go to the desired files and invoke JAutoDoc.




回答7:


An easy option is to access Find Action menu (Macs: Cmd+Shift+A | Win: Ctrl+Shift+A) and type any part of the Generate JavaDoc action. Once you found and clicked on that , an option menu for generation of JavaDocs is opened , containing a wide range of options and scopes.

Reference -> https://www.jetbrains.com/help/idea/mastering-keyboard-shortcuts.html



来源:https://stackoverflow.com/questions/1843072/intellij-generate-javadoc-for-methods-and-classes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!