Applying Suggested to the whole File

Hi,

I have a particular intention enabled (field could be made final). I have IntelliJ 12 now telling me when I visit a file that such and such a method/variable could be made final and gives me the opporunity to apply it (alt + enter). Is there a way for me to say to IntelliJ to apply this particular suggestion to the *whole* file, making all fields/methods final were appropriate? I'm refactoring a lot of legacy code with hundreds of lines + methods, and having to press alt+enter numerous numerous times in one file is very tiresome!

Thank you!

2 comments

After alt-enter, press "right", then select "Fix all xyz problems". That applies the quickfix to all warning in this file.

You can also run the inspection on a larger scope and fix the problems in multiple files at once.
To do that select "Run inspection on..." in the submenu that appears on "right" key after alt-enter.

0

Beautiful! Works fantastically!

:-)

-=david=-

0

Please sign in to leave a comment.