Community
Participate
Working Groups
Build Identifier: 20100917-0705 Good morning! For some reason in my Eclipse IDE code coloring has disappeared, despite that other hints of Java editor are present. It concerns only to java files, and in JSP files opened with Java editor code coloring is also present. Nevertheless in is very inconvenient to work with java code. Could you please help me? Best regards. Reproducible: Always Steps to Reproduce: Open any .java file with Java Editor
Sounds strange. Can you attach a screenshot of the editor? Please select a *.java file in the 'Package Explorer' and then select the 'Open With' context menu. Which editor menu item has the black dot on the left?
Created attachment 191977 [details] Screenshot of the editor
Looks like the Java editor is either not installed or it is no longer associated with *.java files. Open the 'File Associations' preference page and make sure the 'Java Editor' is there and set as default.
BTW: I've removed the 'helpwanted' keyword as this is used by the committers to ask for help.
Yes, that's true, but code isn't colored.
(In reply to comment #5) > Yes, that's true, but code isn't colored. Can you attach a picture of the 'File Associations' (select *.java element) and the 'Content Types' (select 'Java Source File') preference pages? Also, check the .log (or open Error Log view) for errors.
Created attachment 191978 [details] File associations page
Created attachment 191979 [details] Java source file page
Created attachment 191980 [details] Log file
I have made corresponding screenshots. So in my opinion nothing connected to text coloring.
Can you attach all the .log? Maybe another plug-in you installed messed up the editor registry. Let's check whether the Java editor works at all: 1. select the *.java file 2. <context menu> > Properties ==> what 'Type' does the file have? 1. select the *.java file 2. <context menu> > Open With > Other... 3. select the 'Java Editor' from the internal editors list ==> does it work?
1) Type: File (Text) 2) I tried it 100 times! All last week and today! The problem repeats.
OK, it looks like you installed some plug-in(s) that causes Java files to be detected as Text files. Therefore it will always use the text editor. There's nothing we can do on our side. Sorry. Either you know that you installed something recently (check the install history in the about dialog) and remove it again or install a clean drop.
> Either you know that you installed something recently (check the install > history in the about dialog) and remove it again or install a clean drop. Did that help?
I didn't install plug-ins. I only installed libraries. In my installation history I see only "current installation". Yesterday I thought the problem is in my Windows 7. It displays a text-file icon for files ".java". For other source files, for example ".jsp", it displays no icon. I made an attempt to set eclipse as default program for java files but the problem remains. Maybe you know how to delete this type of files from the list of registered types?
(In reply to comment #15) > I didn't install plug-ins. I only installed libraries. In my installation > history I see only "current installation". > Yesterday I thought the problem is in my Windows 7. It displays a text-file > icon for files ".java". For other source files, for example ".jsp", it displays > no icon. I made an attempt to set eclipse as default program for java files but > the problem remains. Maybe you know how to delete this type of files from the > list of registered types? The OS registration has nothing to do with what Eclipse uses for Java files. Also, in your first picture, it looks like it picked up the right one but then isn't able to correctly detect the content type. Can you double-check whether the content type is indeed 'Text': 1. select the *.java file 2. <context menu> > Properties ==> what 'Type' does the file have? (I know you already tried it - but just to be sure). Also, when you open the editor: can you check whether the Java Outline is there and works?
Created attachment 192161 [details] Properties of java file
Good morning! True, the content type is File (Text). Java outline? What do you mean by this?
(In reply to comment #18) > Good morning! True, the content type is File (Text). > Java outline? What do you mean by this? You should see this view in the default 'Java' perspective: it's called the 'Outline' view and should show the structure of the file.
Created attachment 192163 [details] Outline view Yes, of course, it works.
Sorry, but I see only two ways here: - you provide me your workspace so that I can debug it - you install Eclipse again
I would better give you my workspace.
(In reply to comment #22) > I would better give you my workspace. OK.
It looks that a plug-in or you added the '*.java' extension to the Text content type (see attached picture). Simply remove this.
Created attachment 192254 [details] Picture of wrong content type definition
I have removed the extension "java" from content type "Text". At last all works correctly. Much thanks!
> Much thanks! np.