DESCRIPTION

Bug 420035 - [CSS] Support SWT color constants in gradients

Similar to single colors, this change makes using SWT color constants in
gradient definitions possible, e.g.:

  background-color: COLOR-WIDGET-BACKGROUND #E2E2E2 100%;

Change-Id: I55121b7b47342d9b7f0683ecef157c95a0b5b198
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-10-21 22:51:25.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/139/

-------------------------------------
author: Danika Greer
date: 2013-10-21 22:52:28.000000000

Patch Set 1:

(1 comment)

Line:172, bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/helpers/CSSSWTColorHelper.java -> I'm not sure if the old signature should be preserved, the package is marked as internal, but there might still be callers.

-------------------------------------
author: Brenden Conley
date: 2013-10-21 23:01:34.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/139/ : SUCCESS

-------------------------------------
author: Zaid Mosley
date: 2013-10-22 08:19:19.000000000

Patch Set 1: Code-Review+1 IP-Clean+1

(1 comment)

Just a minor comment about the header. Change looks ok to me, but someone else should approve, I have not looked into the gradient implementation so far.

Line:13, bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/helpers/CSSSWTColorHelper.java -> I think we use the format Danika Greer <email_if_you_want> - Bug XXXXXX

-------------------------------------
author: Pierre Zimmerman
date: 2013-10-22 10:20:39.000000000

Patch Set 1: IP-Clean+1

Hi Robin, looks good so far but there is one little issue that I want to be sure of before I vote +2: In the convert method you cast the context object to Display. Would it make sense to check if the context is a Display at all?

-------------------------------------
author: Danika Greer
date: 2013-10-22 11:14:06.000000000

Patch Set 1:

(1 comment)

About casting to Display: I copied that from CSSValueSWTColorConverterImpl. The safer way would probably be to check it and pass null otherwise, and make the helper also be able to handle null. Should I do that?

Line:13, bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/helpers/CSSSWTColorHelper.java -> Can I also leave it away entirely? (IMO the Git history is a better place to look at the history)

-------------------------------------
author: Pierre Zimmerman
date: 2013-10-22 11:20:39.000000000

Patch Set 1:

Hm, I did not realize that there are other code pieces that contain similar casts. If you introduce the check only here but in other code pieces it is not done, I suggest: leave it as is and just add a TODO comment.

-------------------------------------
author: Danika Greer
date: 2013-10-22 19:58:42.000000000

Patch Set 1:

(1 comment)

I changed it to check before casting it to Display (to be on the safe side and not leave a TODO behind).

Line:13, bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/helpers/CSSSWTColorHelper.java -> Done

-------------------------------------
