Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341067 - Text coloring has disappeared
Summary: Text coloring has disappeared
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 03:26 EDT by molokanov CLA
Modified: 2011-03-31 04:30 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot of the editor (47.75 KB, image/png)
2011-03-28 03:48 EDT, molokanov CLA
no flags Details
File associations page (45.98 KB, image/png)
2011-03-28 04:16 EDT, molokanov CLA
no flags Details
Java source file page (41.36 KB, image/png)
2011-03-28 04:17 EDT, molokanov CLA
no flags Details
Log file (46.42 KB, image/png)
2011-03-28 04:17 EDT, molokanov CLA
no flags Details
Properties of java file (30.35 KB, image/png)
2011-03-30 02:11 EDT, molokanov CLA
no flags Details
Outline view (19.23 KB, image/png)
2011-03-30 02:24 EDT, molokanov CLA
no flags Details
Picture of wrong content type definition (15.76 KB, image/png)
2011-03-31 04:22 EDT, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description molokanov CLA 2011-03-28 03:26:34 EDT
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
Comment 1 Dani Megert CLA 2011-03-28 03:31:01 EDT
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?
Comment 2 molokanov CLA 2011-03-28 03:48:21 EDT
Created attachment 191977 [details]
Screenshot of the editor
Comment 3 Dani Megert CLA 2011-03-28 03:53:11 EDT
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.
Comment 4 Dani Megert CLA 2011-03-28 03:53:57 EDT
BTW: I've removed the 'helpwanted' keyword as this is used by the committers to ask for help.
Comment 5 molokanov CLA 2011-03-28 04:00:15 EDT
Yes, that's true, but code isn't colored.
Comment 6 Dani Megert CLA 2011-03-28 04:06:01 EDT
(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.
Comment 7 molokanov CLA 2011-03-28 04:16:33 EDT
Created attachment 191978 [details]
File associations page
Comment 8 molokanov CLA 2011-03-28 04:17:26 EDT
Created attachment 191979 [details]
Java source file page
Comment 9 molokanov CLA 2011-03-28 04:17:58 EDT
Created attachment 191980 [details]
Log file
Comment 10 molokanov CLA 2011-03-28 04:19:21 EDT
I have made corresponding screenshots. So in my opinion nothing connected to text coloring.
Comment 11 Dani Megert CLA 2011-03-28 04:26:06 EDT
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?
Comment 12 molokanov CLA 2011-03-28 04:31:13 EDT
1) Type: File (Text)

2) I tried it 100 times! All last week and today! The problem repeats.
Comment 13 Dani Megert CLA 2011-03-28 04:40:10 EDT
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.
Comment 14 Dani Megert CLA 2011-03-28 11:33:32 EDT
> 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?
Comment 15 molokanov CLA 2011-03-29 02:51:54 EDT
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?
Comment 16 Dani Megert CLA 2011-03-29 03:05:48 EDT
(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?
Comment 17 molokanov CLA 2011-03-30 02:11:21 EDT
Created attachment 192161 [details]
Properties of java file
Comment 18 molokanov CLA 2011-03-30 02:13:27 EDT
Good morning! True, the content type is File (Text).
Java outline? What do you mean by this?
Comment 19 Dani Megert CLA 2011-03-30 02:15:33 EDT
(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.
Comment 20 molokanov CLA 2011-03-30 02:24:01 EDT
Created attachment 192163 [details]
Outline view

Yes, of course, it works.
Comment 21 Dani Megert CLA 2011-03-30 06:30:45 EDT
Sorry, but I see only two ways here:
- you provide me your workspace so that I can debug it
- you install Eclipse again
Comment 22 molokanov CLA 2011-03-31 03:25:24 EDT
I would better give you my workspace.
Comment 23 Dani Megert CLA 2011-03-31 03:27:32 EDT
(In reply to comment #22)
> I would better give you my workspace.
OK.
Comment 24 Dani Megert CLA 2011-03-31 04:21:48 EDT
It looks that a plug-in or you added the '*.java' extension to the Text content type (see attached picture). Simply remove this.
Comment 25 Dani Megert CLA 2011-03-31 04:22:21 EDT
Created attachment 192254 [details]
Picture of wrong content type definition
Comment 26 molokanov CLA 2011-03-31 04:28:52 EDT
I have removed the extension "java" from content type "Text". At last all works correctly. Much thanks!
Comment 27 Dani Megert CLA 2011-03-31 04:30:49 EDT
> Much thanks!
np.