Files>Settings>Editor>Live Templates
参数脚本:groovyScript("if(\"${_1}\".length() == 2) return '';else {def result = '';def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList();for(i = 0; i < params.size(); i++) { result += '\\n * @param ' + params[i]}; return result;}", methodParameters());
返回值脚本:groovyScript("if(\"${_1}\".length() == 4) return '';else {def returnType = \"${_1}\"; def result = '\\n * @return ' + returnType; return result;}", methodReturnType());