Can Eclipse make parameters for generated methods (overwriting, implementing interface, etc.) final, and if so, how?
If I'm not mistaken, IntelliJ had an option for it. I could not find something similar in Eclipse.
I have become accustomed to making parameters final manually, but I am hoping for an automatic solution.
AFAIK, that is not possible. I've not found any option to customize it under Window > Preferences > Java > Editor > Templates or under Window > Preferences > Java > Code Style > Code Templates
.
Anyway, Eclipse 3.3+ comes with "save actions", an alternative mechanism for doing that. Under Preferencens > Java > Editors > Save
actions it is possible to configure "additional save actions". On the code style tab there is an option to automatically add final modifiers to private fields, method parameters and local variables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With