00 Votes

No Syntax Highlight for one File in Eclipse

Question by Guest | 2013-09-24 at 15:47

One beautiful thing I have to mention when talking about development environments such as Eclipse is the syntax highlighting. That is that certain words from the code are displayed in a specific color. This makes it much more easier to navigate and orientate through many lines of code.

But now comes my disaster: I do not know why but just this loved syntax highlight failed in one of my source files! However, all other files of my project are still displayed correctly. So, what can I do now? This makes the file totally illegible, I can hardly orientate in my code!

Even closing and reopening the file or Eclipse at all does not lead to success. Please help me!

ReplyPositiveNegative
0Best Answer0 Votes

Maybe, you have opened your file with the internal text editor which is showing files without syntax highlighting. When loading the file again, Eclipse has remembered this linkage so that the file will be still displayed without any highlighting.

Try the following:

  1. Go to the left side of Eclipse in the "Project Explorer" where all your files are displayed.
  2. Click with the right mouse button on the concerning file.
  3. Select "Open With".
  4. You should get a list with some possibilities such as "Text Editor" or "Java Editor" if it is Java code.
  5. Select the fitting editor for your file.

Now the file should be displayed properly again. If this does not work, it can also help to re-read your entire project in Eclipse. 
2013-09-26 at 23:15

ReplyPositive Negative
Reply

Related Topics

Rename File to its Folder Name

Tutorial | 0 Comments

Android Splash Screen Tutorial

Tutorial | 0 Comments

PHP: File Download Script

Tutorial | 0 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.