开发者

Intellij generate javadoc for methods and classes

开发者 https://www.devze.com 2022-12-13 00:57 出处:网络
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.

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 the files have templates and also I can manually semi-automatically add javadoc to selected method/class. But I want the generation to be automa开发者_如何学Gotic 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.


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


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.


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


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


Now there is a new plugin available for that. It works great, you can generate javadoc with alt+insert.

It's called "javaDoc", it's available directly in the plugin section. The documentation is here : https://github.com/setial/intellij-javadocs/wiki


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.


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.


Actually it's now possible, you can simply go to "Settings/Editor/File and Code Templates". There, you can edit the template which is used to create classes, enums, interfaces etc. My Intellij version is 2019.2.3 and on linux.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消