Java syntax highlighting and code suggestion stopped working for specific file
It suddenly stopped working for both Eclipse Kepler and Luna.
Take a look at the following comparison:
This is the file with correct syntax highlighting and code suggestion:
And it doesn't work:
I tried using Eclipse Help -> Check for Updates but the problem persists.
I checked Content Assit under Preferences as suggested somewhere on StackOverflow:
Of course I cleaned up the project, my entire workspace, and restarted my Eclipse several times.
What am I missing?
source to share
I've had the same or similar problem lately. To me it seems like your Java highlighting is gone because your choice of JDK went away or because of a build error. First: Try Settings-> Installed JREs (select JDK) and / or: Settings-> Installed JREs-> Run Conditions (select JDK in the right window). For the second: look at the build file, eg. pom.xml for Maven, and see what has recently changed in that file (like the maven compiler plugin).
source to share