DESCRIPTION

ColorAndFontsPreferencePage to compare font value with current theme

When deciding whether to apply a change or not on a font,
ColorsAndFontsPreferencePage looks at the preferenceStore, which doesn't
seem to contain correct value at that time. Instead, let's compare it
with the value in the currentTheme using FontRegistry, which contains
the right value.
This is related bug 476037 which manipulate fontRegistry via API.

Change-Id: I61443d2c417ee9441576a6df87578fb10bda1862
Signed-off-by: Isis Velasquez xxx@xxx.xxx


COMMENTS

author: Isis Velasquez
date: 2015-11-26 12:27:08.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-11-26 12:27:14.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2015-11-26 12:45:33.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Sebastian Porter
date: 2015-11-26 12:48:03.000000000

Patch Set 1:

It seems to me that this would have surfaced in normal use cases of the preference page before.

Can you provide steps that surface the bug by using the preference page?

-------------------------------------
author: Isis Velasquez
date: 2015-11-26 13:00:18.000000000

Patch Set 1:

No I didn't manage to reproduce it with ColorsAndFontsPreferencePage only.
I believe that so far, since the only way to change font was through this wizard, the preferenceStore it uses was reliably storing a copy of the font and color settings. However, as far as I understand, the theme now stores that (whatever backend it is), so the page should use the theme whenever possible rather than the preference.
Using the Theme API to change colors, it seems like the theme can be changed without the ColorsAndFont preference store being updated, leading to out-of-sync issues. The "conflict" here is between the Theme API and the ColorsAndPreferencesPage.
Maybe the preferenceStore should be deprecated, or made "stateless" so that it would be reloaded from theme whenever page opens?

-------------------------------------
author: Sebastian Porter
date: 2015-11-26 13:24:51.000000000

Patch Set 1: Verified-1

For me it does not solve the issue regarding 'Reset' in https://git.eclipse.org/r/#/c/50042/

-------------------------------------
author: Gerrit Code Review
date: 2015-12-01 17:04:11.000000000

Change has been successfully merged into the git repository by Sebastian Porter

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