DESCRIPTION

Bug 422536 - [CSS] styling for preference values

Allow simple eclipse preferences related to themes to
be set from a Style Sheet.

Change-Id: I67732452c20e9a6754e3262a6bcd95f773f0d1ca
Signed-off-by: Addison Irwin xxx@xxx.xxx


COMMENTS

author: Slade Moran
date: 2014-04-15 14:29:59.000000000

Uploaded patch set 18.

-------------------------------------
author: Brenden Conley
date: 2014-04-15 14:30:05.000000000

Patch Set 18:

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

-------------------------------------
author: Slade Moran
date: 2014-04-15 14:30:41.000000000

Patch Set 18:

Hi Daniel,

Please review patchset 18 and either commit it or send it back with comments.

-------------------------------------
author: Brenden Conley
date: 2014-04-15 14:43:09.000000000

Patch Set 18: Verified+1

Build Successful 

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

-------------------------------------
author: Addison Irwin
date: 2014-04-15 14:53:33.000000000

Patch Set 18: Code-Review+2

It works fine for me

Daniel

-------------------------------------
author: Addison Irwin
date: 2014-04-15 14:53:34.000000000

Change has been successfully merged into the git repository.

-------------------------------------
author: Addison Irwin
date: 2014-04-16 08:47:52.000000000

Patch Set 18:

(1 comment)

Line:1430, bundles/org.eclipse.e4.ui.workLeon Ochoach.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java -> I went through the patch again and I have some doubts about this part of the change. What do we send the 'IThemeEngine.Events.THEME_CHANGED' here for? Exactly the same event gets sent during processing the 'themeEngine.restore(cssTheme)'. So currently we send the event twice.

If there is no special reason for that I would like to remove it in the patch shipping the JUnits for the feature

Daniel

-------------------------------------
author: Slade Moran
date: 2014-04-16 10:20:45.000000000

Patch Set 18:

(1 comment)

Line:1430, bundles/org.eclipse.e4.ui.workLeon Ochoach.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java -> When I was working through the change, it did not seem to be applies on startup in some cases.  If you remove it then you need to check 2 cases: if  you run an app with prefs in the default stylesheets and a clean workspace and it works on startup, and then you run an app with no prefs in the default style sheet, add the prefs, restart and it works on second startup.

-------------------------------------
author: Addison Irwin
date: 2014-04-16 16:00:29.000000000

Patch Set 18:

(1 comment)

Line:1430, bundles/org.eclipse.e4.ui.workLeon Ochoach.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java -> It works fine in my local env (Windows 7). I think I've seen the similar issue working on the version of the patch with the Addons, but the latest version always worked for me as expected.
Anyway, I've prepared two patches that should solve the issue in better way:

1) https://git.eclipse.org/r/#/c/25159/ - I assume that we don't have all pieces in place during 1st 'IThemeEngine.Events.THEME_CHANGED' event, sent during processing the 'themeEngine.restore(cssTheme)' method. So maybe the patch will be sufficient

2) https://git.eclipse.org/r/#/c/25158/ - we can send some extra event when we are initializing the styling and style the preferences first time, handling it. The StylingPreferencesHandler will be invoked 2nd time when the event 'IThemeEngine.Events.THEME_CHANGED' occurs, but there won't be modified any preferences since all changes will be already in place after considered extra event. The 2nd run will be treat as the modification of the preferences by the user so it is not so bad

Please check if the patches work for you and let me know if you would like to apply one of them

Daniel

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