'Customize default getter/setter template in IntelliJ
I have created a custom template for setters in IntelliJ. I can chose that template when I use Alt + Insert and it works great.
However when I try to press Alt + Enter to generate a missing setter it uses the IntelliJ default.
How to make the Alt+Enter completion use my custom template instead of the default?
Solution 1:[1]
Using Alt + Insert to Generate getters and setters, a dialog opens, where you can customize the default template used by IntelliJ by clicking on the 3 dots button ...
.
or
Next the respective dialog will open, for example Generate Setter Dialogue. You can duplicate the default template (named 'IntelliJ Default') and adapt the copy to your needs. For a detailed description of template-variables see Getter/Setter Templates.
The customized template will also be used when pressing Alt + Enter to open intention actions in the context-menu.
See also
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |