No syntax highlighting in eclipse for java

No syntax highlighting in eclipse for java

Closing the files tab and re-opening it fixed it for me.

(I actually closed all the tabs…)

I faced the same issue all of a sudden after a commit/update project operation.

The point is, default editor of Eclipse has changed somehow and we have to set it back to normal.

Try the below method,
1. Goto Windows -> Click Preferences
2. From the Preferences window goto General -> Editors -> Click File Associations
3. You can choose the default editor for *.java files here

Preferences

When I first opened Preferences, Text editor was set as the default editor for .java files and then I changed it back to Java Editor.

Now it works perfectly fine.

No syntax highlighting in eclipse for java

You probably have a corrupt installation or you have recently installed a corrupt plugin.

The following steps might help.

In your Install window,

  1. view your already installed plugins.
  2. select the Installation History tab.
  3. select a previous stable configuration
  4. Click the Revert button

Leave a Reply

Your email address will not be published. Required fields are marked *