IDEA 注释模板
File Header
1
2
3
4
5
6
7
#set($AUTHOR="procon.wong")
/**
* <p>${description}</p>
* @author ${AUTHOR}
* @since ${DATE}
*/
Live Template
1
2
3
4
5
*
* <p>功能描述</p>$param$
* @return $return$
*/
groovyScript("def result=''; def stop=false; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); if (params.size()==1 && (params[0]==null || params[0]=='null' || params[0]=='')) { stop=true; }; if(!stop) { for(i=0; i < params.size(); i++) {result +=((i==0) ? '\\r\\n' : '') + ((i < params.size() - 1) ? ' * @param ' + params[i] + '\\r\\n' : ' * @param ' + params[i] + '')}; }; return result;", methodParameters())