Open Setting and go to Editor — >Live Templates
Select + — >2, Temple Group…
Enter a name
Create 1 Live Temple
Fill in the necessary information
*
* @description:
* @author: burnsZhang
* @date: $date$
$params$
* @return: $return$
*/
Copy the code
Select Java information
Specify parameter details
Params default value
groovyScript("def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {if(i==0){result+='* @param ' + params[i] + ((i < params.size() - 1) ? '\\n' : '')}else{result+=' * @param ' + params[i] + ((i < params.size() - 1) ? '\\n' : '')}}; return result", methodParameters())
Copy the code