Automatically update all files in a project?

If I add new parameters to a method changing somethings like parseString(String s) to parseString(String s, Boolean b) but I have already called parseString(String s) it will make errors because it now needs a boolean to work.
It only updates and tells me about errors in that file or in files after I open them.  In Eclipe if I change something like that, instantly a couple of files will start to show errors without me have to open them or anything, is there any way to make IntelliJ do this as well?

1 comment

A couple of notes...

  1. If you use the "Change Signature" refactoring (Ctrl+F6 or F6 or Refactor > Change Signature), you can avoid the errors in the first place. The dialog has an option to assign a default value. You can make it null or have IDEA attempt to find a variable of the proper type. Activate the refactor with your cursor on the method signature.
  2. Rather than using the errors to find the places you need to update, you can use the "Find Usages" (Alt + F7 or F7 or Edit > Find > Find Usages) which shows all the usages in the Find tool window or "Show Usages" (Ctrl+Alt+F7 or F7 or Edit > Find > Show Usages) which shows them in a popup.

In Eclipse if I change something like that, instantly a couple of files will start to show errors without me have to open them or anything, is there any way to make IntelliJ do this as well?

Eclipse does this by using an alternate to the JDK's Javac compiler. Whereas the javac compiler stops upon hitting an error, the Eclipse compiler continues to compile what it can. To turn this on in IDEA:

  1. Go to File > Settings > [Project Settings] > Compiler > Java Compiler
  2. Change the "Use Compiler" value to "Eclipse"
  3. In the "Eclipse Options" section select the "Proceed on errors" option.
0

Please sign in to leave a comment.