Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 185226

Summary: System default colors are always black text on a white background
Product: [Eclipse Project] Platform Reporter: Tod Creasey <Tod_Creasey>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Bug Depends on:    
Bug Blocks: 185111    
Attachments:
Description Flags
text editor in high contrast
none
text editor in high contrast mode
none
Java editor in high contrast mode none

Description Tod Creasey CLA 2007-05-02 16:47:28 EDT
M6 (note the milestone)

When text background and foreground colors are both set to System default in the Text Editor preference page the system colors will not be picked up (they will always be black text on a white background).

STEPS
1) Open a fresh workspace in High Contrast
2) Open a java editor
3) Check the Text Editor preference page - default are selected
4) Open the StyledText SWT example - colors are correct
Comment 1 Dani Megert CLA 2007-05-03 06:42:13 EDT
Tod, this works for using Windows XP and I20070503-0010 (I really don't care about M6):

Steps I Used:
1. Control Panel > Accessibility Options > Display: check 'Use High Contrast'
2. start fresh workspace using I20070503-0010.
3. create Java project
4. add CU
5. open with text and Java editor
==> the background is black and foreground is white

The problem is the current line highlighting but that white color comes from the 'Reduced Palette' and that's bug 185111.
Comment 2 Dani Megert CLA 2007-05-03 06:51:54 EDT
Created attachment 65741 [details]
text editor in high contrast
Comment 3 Dani Megert CLA 2007-05-03 06:53:24 EDT
Created attachment 65742 [details]
text editor in high contrast mode
Comment 4 Dani Megert CLA 2007-05-03 06:53:45 EDT
Created attachment 65743 [details]
Java editor in high contrast mode
Comment 5 Dani Megert CLA 2007-05-03 06:57:14 EDT
Maybe the difference is Vista but then I do understand why the StyledText sample would work but not the text editor.

If you can still repdocude using I20070503-0010 then please try this: modify the StyledText snippet by adding these two lines:
   st.setBackground(null);
   st.setForeground(null);
Comment 6 Tod Creasey CLA 2007-05-04 11:02:20 EDT
What is the setting for the plain text? If you look at the screenshot what is the setting that determines the color of the class name?

BTW your screenshots are consistent with Vista.
Comment 7 Dani Megert CLA 2007-05-05 05:50:39 EDT
Now I am confused: In your inital bug report you write:
>When text background and foreground colors are both set to System default in
>the Text Editor preference page the system colors will not be picked up (they
>will always be black text on a white background).e background).
But in your last comment you say that you see the same as in the screen shots which is white on black.


>What is the setting for the plain text?
Java or Text editor?

>If you look at the screenshot what is
>the setting that determines the color of the class name?
PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR
Comment 8 Tod Creasey CLA 2007-05-07 07:59:28 EDT
The confusion is the relationship between the undecorated text in the java editor and the text editor preferences - I thought they were related and couldn't find the one I needed.

Where is PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR in the preference pages? I don't see anything like it in the Java -> Editor page.
Comment 9 Dani Megert CLA 2007-05-07 08:02:23 EDT
This is the 'Others' item.