DESCRIPTION

Bug 436247 - [Themes] "Colors and Fonts" pref page fails with NPE when
running with '-cssTheme none'

Got rid of NPE by null-checking themeEngine. Did some manual testing
only.

Change-Id: If20671083fb0d4c30dc577279ea611a17f45b0b1
Signed-off-by: Orion Bolton xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2014-06-03 12:25:45.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-06-03 12:35:46.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Addison Irwin
date: 2014-06-03 12:41:34.000000000

Patch Set 2: Verified+1 Code-Review-1

(1 comment)

It works fine, but I would like to simplify the patch according to my comment,
Daniel

Line:773, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java -> Please simplify the condition by removing the conditional operator and replacing it with the follow code:

private boolean isAnyThemeChanged() {
       return currentTheme != workLeon Ochoach.getThemeManager().getCurrentTheme()
		|| currentCSSTheme != getActiveTheme();
}

private org.eclipse.e4.ui.css.swt.theme.ITheme getActiveTheme() {
	if (themeEngine != null) {
		return themeEngine.getActiveTheme();
	}
		return null;
}

thanks,
Daniel

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