一、文件级别的注释
Predefined variables will take the following values:
${PACKAGE_NAME}name of the package in which the new file is created
${USER}current user system login name
${DATE}current system date
${TIME}current system time
${YEAR}current year
${MONTH}current month
${MONTH_NAME_SHORT}first 3 letters of the current month name. Example: Jan, Feb, etc.
${MONTH_NAME_FULL}full name of the current month. Example: January, February, etc.
${DAY}current day of the month
${DAY_NAME_SHORT}first 3 letters of the current day name. Example: Mon, Tue, etc.
${DAY_NAME_FULL}full name of the current day. Example: Monday, Tuesday, etc.
${HOUR}current hour
${MINUTE}current minute
${PROJECT_NAME}the name of the current project
个人一般设置成
/** * @className ${NAME} * @description TODO * @author ${USER} * @since ${DATE} ${TIME} * @version 1.0 */
二、方法级别的注释
其中Abbreviation 必须是* ,使用过程中可以输入 /** 回车即可
模板
* * @description TODO * @author $user$ * @since $date$ $time$ $param$ * @return $return$ */
groovyScript("def result=\'\'; def params=\"${_1}\".replaceAll(\'[\\\\[|\\\\]|\\\\s]\', \'\').split(\',\').toList(); for(i = 0; i < params.size(); i++) {result+=\' * @param \' + params[i] + ((i < params.size() - 1) ? \'\\n\' : \'\')}; return result", methodParameters())