What is the IntelliJ shortcut key to create a javadoc comment?

夙愿已清 提交于 2019-11-28 15:34:50

问题


In Eclipse, I can press Alt+Shift+J and get a javadoc comment automatically generated with fields, returns, or whatever would be applicable for that specific javadoc comment. I'm assuming that IntelliJ IDEA has this feature. Can anyone tell me if there is a keyboard shortcut for this?


回答1:


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




回答2:


You can use the action 'Fix doc comment'. It doesn't have a default shortcut, but you can assign the Alt+Shift+J shortcut to it in the Keymap, because this shortcut isn't used for anything else. By default, you can also press Ctrl+Shift+A two times and begin typing Fix doc comment in order to find the action.




回答3:


Shortcut Alt+Enter shows intention actions where you can choose "Add Javadoc".



来源:https://stackoverflow.com/questions/16671418/what-is-the-intellij-shortcut-key-to-create-a-javadoc-comment

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