Skip to content

Plugin for IntelliJ IDEA , can generate document comments for Java/Kotlin file

Notifications You must be signed in to change notification settings

larboy1991/JKDoc

Repository files navigation

JKDoc

Plugin for IntelliJ IDEA / Android Studio , can generate document comments for Java/Kotlin file.
一款 IntelliJ IDEA / Android Studio 插件,用于生成java、kotlin文件类/方法的注释,模版支持自定义。

Usage

Just press Enter key after /**, just like in Java File !!!
在方法和类上方输入/** 后回车即可, 像以往使用java注释一样 !!!

settings

Settings/Preferences | Tools | JKDoc

gif

Screenshots

gif

gif

template

可自行定义模版,目前占位的支持以下几个参数:

  • {DATE} : 日期格式化,格式为 yyyy-MM-dd
  • {TIME} : 时间格式化,格式为 HH:mm
  • {PARAMS} : 参数名称
  • {PARAMS_TYPE} : 参数类型
  • {RETURN} : 返回值类型,目前如果是(kotlin)Unit或(java)Void是不显示的,如果有需要请自行修改

下面这几个模版是我个人用的模版

  • Java Class Template
<p>
Date: {DATE}
Company: YourCompany
Updater:
Update Time:
Update Comments:
Author YourName

  • Java Method template
<p>
@param {PARAMS}
@return {RETURN}
@Date: {DATE} {TIME}
@author YourName

  • Kotlin Class Template
<p>
Date: {DATE}
Company: YourCompany
Updater:
Update Time:
Update Comments:
@param {PARAMS} {PARAMS_TYPE}

Author: YourName

  • Kotlin Method Template
<p>
Date: {DATE} {TIME}
Author: YourName
@param {PARAMS} {PARAMS_TYPE}
@return {RETURN}

Thanks

About

Plugin for IntelliJ IDEA , can generate document comments for Java/Kotlin file

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages