setting -> editor -> file and code templates -> includes -> file header
/**
* <h2> </h2>
* @description:
* @menu
* @author: gitsilence
* @description:
* @date: ${DATE} ${TIME}
**/
setting -> editor -> live templates
新建 live Templates
**
* @Author gitsilence
* @Description
* @Date $date$ $time$
* @status done
$param$
* @return $return$
*/
edit variables
date - date()
time - time()
return - methodReturnType()
param 对应的值为:
groovyScript("def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {result+=' * @param ' + params[i] + '\\t' + ((i < params.size() - 1) ? '\\n' : '')}; return result", methodParameters())
方法注释快捷键使用:
/*+tab键
public void hello() {
....
}
在方法上方输入 /*
再按下 tab 键