Intellij generate javadoc for methods and classes

2019-02-03 23:32发布

问题:

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 (2016+), 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.