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

Bug 330680

Summary: Refactoring Signature Preview bg color is changed to default, hard to read with light syntax coloring
Product: [Eclipse Project] JDT Reporter: Chris Williams <chris.a.williams>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: 3.7 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch to avoid changing bg color to parent widget's
none
Fix none

Description Chris Williams CLA 2010-11-19 11:32:02 EST
Build Identifier: M20100909-0800

ExtractMethodInputPage, line 314. This explicitly sets the background color of the signature preview text widget to be the same as the parent composite, which is going to the be standard gray.  If the user has set up preference in such a way that they use light fg colors on top of a dark bg color for their Java syntax coloring, this makes the preview very hard to read.

This particular "bug" is also in any other Refactoring action that provides a signature preview on the first page of the dialog.

Reproducible: Always

Steps to Reproduce:
1. Set a black bg and white fg in Preferences > General > Editors > Text Editors
2. Create a simple hello world Java file.
3. Try to Refactor > Extract Method a line of code.
Comment 1 Chris Williams CLA 2010-11-19 11:54:23 EST
Created attachment 183486 [details]
Patch to avoid changing bg color to parent widget's

This is a possible fix. This just removes the lines that override the bg color of the signature preview text widget with the parent's bg color. A more sophisticated patch might want to try and compare the bg color to see if it's "close" to the parent's bg color and if so then override (i.e. if the text bg is white, and the parent is light gray, then using light gray for the text bg probably won't hurt and would make the UI a little nicer; However, using light gray when the text bg was close to black would make it hard to read).
Comment 2 Markus Keller CLA 2010-11-25 10:29:33 EST
Created attachment 183861 [details]
Fix

This problem is similar to bug 313943. I agree it's a problem in your setup, but in general, it looks better with a default widget background color.

This fix only sets the default bg color if it's visually distinct from the configured editor bg color.
Comment 3 Markus Keller CLA 2010-11-25 10:29:58 EST
Fixed in HEAD.