1.Settings -->Editor --> Live Templates -->新建一个group
2.添加方法注释
* * desc: * date: $date$ $time$ * @author gl $params$ * @return $return$ */
data : date()
time : time()
params : 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) ? '\r\n' : '')}; return result", methodParameters())
return : groovyScript("def result="${_1}"; if(result == "void"){return "";}else{return "{@link "+result+"}";}", methodReturnType())
3.添加修改记录
//gl $date$ $time$ 说明:
4.添加参数注释
/** * create by: gl * description: * create time: $date$ $time$ */