0%

Idea 初始化配置

编码

  • Setting-Editor-File Encodings- UTF-8

自动生成注释

生成类/接口注释

  • Setting-Editor-File and Code Templates-Class|Interface
    1
    2
    3
    4
    5
    6
    7
    8
    /**
    *
    * ${Todo}
    *
    * @author wb
    *
    * @create ${DATE}
    **/

    生成方法注释

  • Setting-Editor-Live Templates
    1
    2
    3
    4
    5
    6
    7
    8
    **
    * $TODO$
    $params$
    * @return $return$
    * @throws
    * @Date $date$ $time$
    * @Author wb
    */
    主要是生成参数的脚本:
    1
    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) ? '\\r\\n    ' : '')}; return result", methodParameters())