Having the wrong class path can lead to lots of spurious errors. We should add a class path validator that checks that the class path contains one (and only one) scala-library.jar, and that its version corresponds to the one the IDE expects. If it doesn't an error marker should be added to the project, and no errors should be reported.
The validator could work by checking all class path entries for
- name: if it is scala-library.jar, it's a scala library. To detect the version, you can look into scala-library.jr/library.properties which has it. This covers 99% of the use cases
- if no scala-library.jar is found, look for any class path fragment that has either library.properties, or object scala.Predef (and be creative with finding the version number) -- this is for people who develop the compiler/library and want to built it themselves
- lastly, check if the source folders contain the scala library (scala/Prefef.scala)