Idea custom method annotation
I am using a set of custom method annotations. In order to prevent the annotations from being changed when ctrl+alt+L is used to format the code, remove the checkmark from the red box in the idea settings.
templateText
**
* @apiNote TODO
$param$
$return$
*/
param
groovyScript("if(\"${_1}\".length() == 2) {return '';} else {def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList();for(i = 0; i < params.size(); i++) {if(i==0){result+='* @param ' + params[i] + ' TODO'}else{result+='\\n' + ' * @param ' + params[i] + ' TODO'}}; return result;}", methodParameters());
return
groovyScript("def returnType = \"${_1}\"; def result = '* @return ' + returnType; return result;", methodReturnType());