Is it possible to change IntelliJ's code generation template for equals() and hashCode()

前端 未结 4 1302
生来不讨喜
生来不讨喜 2020-12-17 08:54

Is it possible to change the code generation template for equals() and hashCode()?

I would like the generated code to use the Java 7

4条回答
  •  不知归路
    2020-12-17 09:34

    As of release 14.1 of the Ultimate Edition it is possible to customize the Code generation template of equals()/hashCode() without the use of any third party plugin.

    Press "Alt + Insert" (Generate...), choose "equals() and hashCode()" and you will be able to select one of the predefined templates or a customized template of your own.

    Edit

提交回复
热议问题