Is there an automatic Javadoc generation plugin for IntelliJ? Example http://jautodoc.sourceforge.net/
In the Package Explorer view, select a Java project and click Project > Generate Javadoc with Diagrams > Automatically. In the Generate Javadoc wizard, under Javadoc command, select the Javadoc command (an executable file).
To generate JavaDoc in Eclipse: –Select “Generate JavaDoc” option from Project menu and a wizard will appear. Specify the location for the JavaDoc file on your computer, by default it will be in the C drive. Select the project and then the packages for which you want to create the JavaDoc file.
Create JSDoc commentsPosition the caret before the declaration of the method/function or field to document, type the opening block comment /** , and press Enter . IntelliJ IDEA generates a JSDoc comment with a list of parameters ( @param ) and return values ( @returns ), where applicable.
Javadoc generation (writing the .html files) is done for you on-demand (Tools->Generate Javadoc) and is essentially automatic once you set it up. Generating javadoc stubs, which is what jautodoc for Eclipse does, is done method-by-method, class-by-class and only where you tell it to.
Typing /** <enter>
above a method signature will create Javadoc stubs for you. I suspect you want something that will do this for an entire file, package or project though (like jautodoc). There used to be such a plugin: http://plugins.intellij.net/plugin/?id=952 but it won't work with 10.
I do have to say that this jautodoc example, while a neat party trick, is the single most useless thing I've ever seen in an IDE: It creates a description based on the variable name - but only if the variable name is so descriptive that it doesn't need a comment in the first place.
/**
* The number of questions
*/
private int numberOfQuestions;
Makes you yearn for punched card.
Updated the answer for 2020.3
version of IntelliJ (also works in 2019.2
)
Ctrl
+ Shift
+ A
> Plugins
> Marketplace
tab > search for JavaDoc
(by vendor: "Sergey Timofiychuk") > Install)and follow below steps (from Step 2).
--PREVIOUS ANSWER--
Tested below in 2018.2
version of IntelliJ
Ctrl
+ Shift
+ A
> Plugins
> Browse Repositories...
> JavaDoc2
)File
> Invalid Caches/Restart...
> Just Restart
)Alt
+ Shift
+ G
. If this doesn't work due to different keymap association, try Alt
+ Insert
and selecting Create JavaDocs for the selected element
Ctrl
+ Alt
+ Shift
+ G
(or Alt
+ Insert
and selecting Create JavaDocs for all elements
)(One caveat is, it is generating javadoc only for public methods, not for fields and private methods)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With