Skip to content

Instantly share code, notes, and snippets.

@codethereforam
Last active February 19, 2021 17:39
Show Gist options
  • Save codethereforam/b17948ee4a4a858d4d78f452ef75d5d8 to your computer and use it in GitHub Desktop.
Save codethereforam/b17948ee4a4a858d4d78f452ef75d5d8 to your computer and use it in GitHub Desktop.
idea方法注释live template
  • abbreviation: *
  • Template text:
    *  
     * $END$
     *
     * @author yanganyu 
     * @date $date$ $time$
    $params$ 
     * @return {@code $returnValue$}
     */ 
    
  • variables
    • date: date()
    • time: time()
    • params:
      groovyScript("if(\"${_1}\".length() == 2) {return '';} else {def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {result+=' * @param ' + params[i] + ' ' + params[i] + ((i < params.size() - 1) ? '\\n' : '')}; return result}", methodParameters())
    • returnValue: methodReturnType()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment