Save Actions plugin
The plugin, Save Actions, offers this functionality.
When installed (and activated) you can find these options under Other Settings -> Save Actions:
- Add this to field access
- Add this to method access
- Remove unnecessary this to field and method
The plugin can be configured to execute these actions on save / idling / window deactivation.
Built into IntelliJ
InteliJ IDEA itself offers these checkstyle functionalities:
Ctrl + Alt + S -> Editor -> Inspections -> Code style issues:
- Unnecessary 'this' qualifier
- Instance field access not qualified with 'this'
- Instance method call not qualified with 'this'
To inspect the code and apply the fix:
Code -> Inspect
To auto apply fixes:
Code -> Cleanup