I just installed and re-installed IntelliJ. Every Java file is coming up RED. I checked the JDK; it is at 1.6.##. The maven clean install build worked just fine.
I’m getting the usual highlighted errors. On every declaration:
Cannot resolve symbol SomeEntityBean/Bean
and on every method:
Cannot resolve method SomeFunction()
How do I fix these false errors?
IntelliJ sometimes gets confused all by itself, even without the external changes Korgen described (though that is a good way to consistently reproduce it).
But IDEA now contains a "Repair IDE" menu item in the File menu that will walk you through steps to fix the issues (starting with quick and easy steps and getting progressively more disruptive as it goes on), asking if the problem is fixed after each one. The steps below should no longer be necessary to do directly, since the Repair IDE command will automatically do them only if necessary. They are preserved below for those on older versions:
Click File -> Synchronize, and IntelliJ should see that everything is okay again.
If that doesn’t work, IntelliJ’s caches might be corrupt (this used to happen a lot more often than it does now); in that case, regenerate them by
Clicking File -> Invalidate Caches and restarting the IDE
(though loading the project will take a while while the caches are recreated).