添加类注释:
File---Setting----Editor----Code Style-----File and Code Templates--------Class
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end #parse("File Header.java") /** *@program: ${PROJECT_NAME} *@description: ${description} *@author: liu yan *@create: ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE} */ public class ${NAME} { }
添加成功后,描述会在类创建成功的时候弹出文本框。
阿里代码规范建议日期格式为YYYY/MM/DD
添加方法注释:
Editor -> Live Templates -> 点击右边加号为自己添加一个Templates Group -> 然后选中自己的Group再次点击加号添加Live Templates
/** *@Description: $discription$ *@Param: $params$ *@return: $return$ *@Author: your name *@date: $date$ */
edit variables:
参考:
https://blog.csdn.net/qq_34581118/article/details/78409782