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

Bug 420036

Summary: [CSS] SWT color constants are only accepted like "COLOR-WIDGET-BACKGROUND", not "COLOR_WIDGET_BACKGROUND"
Product: [Eclipse Project] Platform Reporter: Robin Stocker <robin>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WORKSFORME QA Contact: Daniel Rolka <daniel.rolka>
Severity: normal    
Priority: P3 CC: daniel.rolka, gheorghe, Lars.Vogel, tom.schindl
Version: 4.4   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=402530
Whiteboard:

Description Robin Stocker CLA 2013-10-21 18:57:47 EDT
With bug 402530, parsing of SWT color constants was introduced for the styling engine. But it only accepts values with hyphens (like "COLOR-WIDGET-BACKGROUND"), not with underscores ("COLOR_WIDGET_BACKGROUND").

It would probably be more discoverable for people how to use these if they could copy-paste the SWT constants like they are and not have to replace the "-" with "_" manually. Or is there a reason for preferring "-" over "_"?
Comment 1 Lars Vogel CLA 2014-03-31 17:37:44 EDT
Daniel, what do you think? I think we can close this one as WORKSFORME, the CSS constants are (supposed to be;-)) documented on the wiki and visible in the CSS spy.

Robin, I agree it would be nice to have it consistent but it is too late to change and and I think supporting both makes also no sense.
Comment 2 Daniel Rolka CLA 2014-04-01 02:10:50 EDT
(In reply to Lars Vogel from comment #1)
> Daniel, what do you think? I think we can close this one as WORKSFORME, the
> CSS constants are (supposed to be;-)) documented on the wiki and visible in
> the CSS spy.
> 
> Robin, I agree it would be nice to have it consistent but it is too late to
> change and and I think supporting both makes also no sense.

Yes, I agree with the 'WORKSFORME' state

Daniel
Comment 3 Daniel Rolka CLA 2014-04-01 02:16:24 EDT
The dash characters in the SWT color constants used in the CSS files are consistent with i.e. Color/FontDefinitions. I think the cohesion here is good from the user point of view

Daniel
Comment 4 Robin Stocker CLA 2014-04-01 07:09:39 EDT
Fair enough.