To prevent accidental shadowing, I use this.
before class fields as standard practice. I would like my IntelliJ to follow this same convention when autocompleting, generating, or inserting code. This feels like something the editor should be able to do. Where is this setting, and how do I configure it?
If this is not already a built-in feature, is there an existing plug-in that will accomplish the same goal?
I'm afraid IDEA cannot to exactly what you want (out of the box). The best you can do is to go to Settings -> Editor -> Inspections -> Java -> Code style issues
and enable Instance field access not qualified with this
inspection. After you enable the inspection, IDEA will start highlighting all unqualified accesses to fields in your Java files. Then fixing all such accesses will be very easy: you just press Alt+Enter
on any unqualified access, select Cleanup Code
and IDEA will add this.
where necessary. Also, you can click Analyze -> Silent Code Cleanup
at any time, it will add this.
too.