ThisInserter

Compatible with  IntelliJ IDEA
08.10.2012
2 429
Add explicit this. to the front of member variables and method calls

Download plugin

Version

Update date

Recent change notes

Plugin has been updated to work with IntelliJ 11.x

General usage instructions

The plugin is available from the Generate menu (Windows: Alt+Insert, Mac: Ctrl-n). Select it from the menu and it will do its thing. There are currently no configuration options.
20.05.2009
As mentioned in the comment above IntelliJ does have a built-in inspection to add \"this.\" in front of member variables that I didn\'t know about when I wrote this plugin. The inspection is turned off by default. To turn it on go to File->Settings->Errors, then under IDEA Profiles click on Default. Then in the search box search for \"not qualified with\" and you should see it.

However, the inspection only works on member variables. The plugin does member variables and methods. So if you also want to append \"this.\" on the front of methods this plugin is still useful.
20.05.2009
As mentioned in the comment above IntelliJ does have a built-in inspection to add "this." in front of member variables that I didn't know about when I wrote this plugin. The inspection is turned off by default. To turn it on go to File->Settings->Errors, then under IDEA Profiles click on Default. Then in the search box search for "not qualified with" and you should see it.
05.03.2009
You might also want to look at the "Instance field access not qualified with 'this'" inspection from InspectionGadgets which is included with an IntelliJ IDEA install.
Please  sign in  to leave a comment.