Eclipse: syntax highlighting disappeared for one of my files

Kirill Smirnov picture Kirill Smirnov · Nov 5, 2012 · Viewed 16.6k times · Source

I was trying to close unused files in Eclipse and accidentally made something wrong. Now I can't see syntax highlighting for one of my files. Here are two screenshots - on the first you can see file, where highlighting is broken, and on the second everything is fine: enter image description hereenter image description here

Highlighting doesn't work for this file only. Extension of this file is correct. I tried to look through all menu buttons carefully, but this attempt failed, I suppose Eclipse is hard enough for newbie. Of course, I tried to find information in the Web, but couldn't get anything relative.

Answer

Arun Manivannan picture Arun Manivannan · Nov 5, 2012

I guess you accidentally opened the file with the 'Text Editor'. Refer screenshot below.

Open with Text Editor