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:
enter image description here And it doesn't work:
enter image description here

I tried using Eclipse Help -> Check for Updates but the problem persists.

I checked Content Assit under Preferences as suggested somewhere on StackOverflow:
enter image description here Of course I cleaned up the project, my entire workspace, and restarted my Eclipse several times.

What am I missing?

+3


source to share


1 answer


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).



0


source







All Articles