1. 文件头注释
- file->setting->Editor->Filr and Code Templates->Includes->File Header
2. 方法注释
- file->setting->Editor->LiveTemplates,自定义一个模板
*
* $end$
*
* @author: Fisher
* @date: $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())
groovyScript(“def result=’’; def params=”${_1}".replaceAll(’[\\[|\\]|\\s]’, ‘’).split(’<’).toList(); for(i = 0; i < params.size(); i++) {if(i!=0){result+=’<’;}; def p1=params[i].split(’,’).toList(); for(i2 = 0; i2 < p1.size(); i2++) { def p2=p1[i2].split(’\\.’).toList(); result+=p2[p2.size()-1]; if(i2!=p1.size()-1){result+=’,’} } ; }; return result", methodReturnType())
|