Reputation: 6412
There is no syntax highlighting in java files in my eclipse..This happened all of a sudden..Not sure why..
This is how it is looking now..
As mentioned in other posts..i tried to change the color from preferences window and there is nothing when i type java..something really messed up...
AAny suggestions..
Update:
It seems Java plugin is not installed..as per the below screeenshot
And when i try to install java plugin it says new version is already installed as per the below screenshot
Upvotes: 6
Views: 8809
Reputation: 1
I have one java class file like a text editor.
I tried following,
Now its works.
Upvotes: 0
Reputation: 3144
TLDR; open another workspace, then come back to the original workspace.
Ok this is odd, but for me, all the highlighting suddenly went away for Java files. I explored all of these ideas here, with no effect. I created a new workspace, planning to move everything to it. I realized that can be a pain to move many projects over, so I went back into the original workspace to look at some settings, and poof - the highlighting was working again.
Upvotes: 0
Reputation: 53
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
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.
Upvotes: 1
Reputation: 1301
Closing the file's tab and re-opening it fixed it for me.
(I actually closed all the tabs...)
Upvotes: 2
Reputation: 482
You probably have a corrupt installation or you have recently installed a corrupt plugin.
The following steps might help.
In your Install window,
Upvotes: 0