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
to
This is my "favorite" IDEA annoyance ..
Please sign in to leave a comment.
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: http://www.intellij.net/tracker/idea/viewSCR?publicId=30198 . There's a related request at http://intellij.net/tracker/idea/viewSCR?publicId=13073 , 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 !