Any way to control code generated by "Encapsulate Fields" refactoring ?

Is there any way I can change the code generated by the "Encapsulate Fields" refactoring ?

I always change it from, say


This is my "favorite" IDEA annoyance ..


No, you can't. I thought there's a bug in the Tracker for this, but I couldn't find one, so I filed it: . There's a related request at , too.


Great, thank's. I hope someone will notice it one day. It really annoys me sometimes to generate ~10 accessors and then go fix all of them manually ..


Yeah, it is annoying, but with the HungryBackspace plugin, it's much easier. The plugin deletes all whitespace between the cursor and the previous non-whitespace character, when you press Backspace. It makes reformatting a getter or setter as easy as pressing Backspace, Space, Backspace, Space, with a click in between.


Hmm .. I'll give it a try - many thanks !


Please sign in to leave a comment.