1

I want to comment my code like source code comment (JavaDoc).

I have found it before How to generate javadoc comments in Android Studio, but It is for java only, Kotlin is not supported.

That is what I want. enter image description here

but I can only do with command + / enter image description here

or command + shift + / enter image description here

Ryan M
  • 18,333
  • 31
  • 67
  • 74
GHH
  • 1,713
  • 1
  • 8
  • 21
  • 3
    Use `/** **/` instead of `/* */` – Michiel Dec 03 '19 at 14:13
  • @Michiel what is the keymap shortcut – GHH Dec 03 '19 at 14:17
  • I had a quick look, but I think there is none. It is intended as JavaDoc, so once written, it will always be a comment block. That is probably the reason it can be turned off and on. What you can do: write `/**`and hit enter, it will add a line on every enter. – Michiel Dec 03 '19 at 14:19
  • @RicardoA. Thanks for suggest.But I have found it before.It is for java only, Kotlin is not support:( – GHH Dec 03 '19 at 14:30
  • [Kotlin Generate Comment Doc](https://stackoverflow.com/questions/38079234/kotlin-generate-comment-doc), [Generating Kotlin method/class comments](https://stackoverflow.com/questions/38015307/generating-kotlin-method-class-comments), [Generate KDoc for methods in Android Studio](https://stackoverflow.com/questions/40574195/generate-kdoc-for-methods-in-android-studio) – Ricardo A. Dec 03 '19 at 14:52
  • https://stackoverflow.com/a/54519269/908821 mentioned using a plugin for Kotlin document generation. https://plugins.jetbrains.com/plugin/10389-kdoc-generator – Angel Koh Dec 03 '19 at 16:01
  • Thanks for comment.But it seems that there is no simply shortcut can do what I want just like cmd + /... – GHH Dec 03 '19 at 16:17

0 Answers0