1.类模板设置:
/**
* @Description
* @Author lc
* @Date $DATE$ $TIME$
*/
2.方法模板设置:
**
* @Description
* @Author lc
* @Date $date$ $time$
$param$
$return$
**/
param默认值:
groovyScript("if(\"${_1}\".length() == 2) {return '';} else {def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList();for(i = 0; i < params.size(); i++) {if(i<(params.size()-1)){result+=' * @param ' + params[i] + ' ' + '\\n'}else{result+=' * @param ' + params[i] + ' '}}; return result;}", methodParameters());
return默认值:
groovyScript("def returnType = \"${_1}\"; def result = ' * @return ' + returnType; return result;", methodReturnType());
快捷键使用方法:/ + add +Enter