Bug 220641 - Manifest editor page does not work in high contrast
Summary: Manifest editor page does not work in high contrast
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Jacek Pospychala CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, contributed
: 220648 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-27 14:16 EST by Kim Horne CLA
Modified: 2019-05-01 17:46 EDT (History)
3 users (show)

See Also:


Attachments
Screencap of the editor in this mode (12.51 KB, image/png)
2008-02-27 14:16 EST, Kim Horne CLA
no flags Details
patch (1.53 KB, patch)
2008-02-27 15:32 EST, Jacek Pospychala CLA
no flags Details | Diff
manifest look after patch (21.32 KB, image/png)
2008-02-27 15:33 EST, Jacek Pospychala CLA
no flags Details
exsd editor after patch (21.90 KB, image/png)
2008-02-27 15:33 EST, Jacek Pospychala CLA
no flags Details
mylyn/context/zip (795 bytes, application/octet-stream)
2008-02-27 17:13 EST, Chris Aniszczyk CLA
no flags Details
patch (3.78 KB, patch)
2008-02-29 01:36 EST, Jacek Pospychala CLA
no flags Details | Diff
patch (4.52 KB, patch)
2008-03-01 17:56 EST, Jacek Pospychala CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Horne CLA 2008-02-27 14:16:35 EST
Created attachment 90912 [details]
Screencap of the editor in this mode

1) go to the control panel-accessibility->display and enable high contrast
2) open eclipse and open/create an manifest.mf file
expected result: readable text
result: the manifest editor page shows black text on a black background in the manifest editor for property values.  This makes it pretty much unusable.
Comment 1 Chris Aniszczyk CLA 2008-02-27 14:21:26 EST
*sigh* :(
Comment 2 Jacek Pospychala CLA 2008-02-27 15:32:28 EST
Created attachment 90924 [details]
patch

oh no, don't let Kim run bugzilla out of numbers! :)

it fixes bug 220648 as well
Comment 3 Jacek Pospychala CLA 2008-02-27 15:33:08 EST
Created attachment 90925 [details]
manifest look after patch

is that better?
Comment 4 Jacek Pospychala CLA 2008-02-27 15:33:58 EST
Created attachment 90927 [details]
exsd editor after patch
Comment 5 Chris Aniszczyk CLA 2008-02-27 17:09:09 EST
Thanks Jacek!
Comment 6 Chris Aniszczyk CLA 2008-02-27 17:10:33 EST
*** Bug 220648 has been marked as a duplicate of this bug. ***
Comment 7 Chris Aniszczyk CLA 2008-02-27 17:13:01 EST
>20080227
Comment 8 Chris Aniszczyk CLA 2008-02-27 17:13:12 EST
Created attachment 90938 [details]
mylyn/context/zip
Comment 9 Brian Bauman CLA 2008-02-28 11:29:15 EST
Reopening after reverting fix.  It seems we had a minor side effect in the form of bug 220745 :)
Comment 10 Remy Suen CLA 2008-02-28 11:35:01 EST
Display.getDefault() is probably returning null I suppose.
Comment 11 Jacek Pospychala CLA 2008-02-29 01:36:53 EST
Created attachment 91117 [details]
patch

safer approach. even headless can use color.
I initially posted this patch under bug 220745 but this seems right place for it.
Comment 12 Chris Aniszczyk CLA 2008-02-29 12:46:40 EST
quick question, how does JDT UI handle this Markus?
Comment 13 Jacek Pospychala CLA 2008-03-01 09:08:00 EST
(In reply to comment #12)
> quick question, how does JDT UI handle this Markus?

I guess JDT is defining colors in extension point (they're configurable via preferences) and inherits some default colors from default text editor.
Actually only the default background and foreground colors change in HighContrast and other (keywords, numbers, strings, etc) remain the same.

Maybe we could get rid of P_DEFAULT, P_HEADER_VALUE, P_HEADER_ATTRIBUTES (they're RGB(0,0,0)) and use default editor foreground color instead.
Comment 14 Jacek Pospychala CLA 2008-03-01 17:56:12 EST
Created attachment 91282 [details]
patch

patch to use text editor's default preferences for foreground color.
Works in highcontrast mode.

Seems JDT sets its foreground/background colors when initializing editor in org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.initializeViewerColors().

The other colors preferences (e.g. for syntax highlighting) are initialized in org.eclipse.jdt.ui.PreferenceConstants.initializeDefaultValues(IPreferenceStore)
(quite like in PDE ColorManager)
Comment 15 Chris Aniszczyk CLA 2008-03-03 11:16:39 EST
I will probably commit the second to last patch. After that, we should open an enhancement so PDE can integrate better with the 'Colors and Fonts' stuff contained within the Platform.
Comment 16 Chris Aniszczyk CLA 2008-03-05 10:31:34 EST
Fixed in HEAD (2nd to last solution)

> 20080305
Comment 17 Jacek Pospychala CLA 2008-03-28 14:28:46 EDT
Verified in I20080325-0100