Bug 281236 Cannot switch themes in contacts demo
When I try to switch to the dark or light theme in contacts, I get exception traces that end with: Caused by: java.lang.NullPointerException at org.eclipse.e4.demo.contacts.handlers.ThemeUtil$1.run(ThemeUtil.java:46) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4113) at org.eclipse.e4.demo.contacts.handlers.ThemeUtil.switchTheme(ThemeUtil.java:37) at org.eclipse.e4.demo.contacts.handlers.BrightThemeHandler.execute(BrightThemeHandler.java:20) ... 30 more PW
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/internal/CSSStylingSupport.java
public static void initializeStyling(Display display, String cssURI,
			String resourceURI, IEclipseContext appContext) {
		
		final CSSEngine engine = new CSSNebulaEngineImpl(display, true);
		engine.setErrorHandler(new CSSErrorHandler() {
			public void error(Exception e) {
				e.printStackTrace();
			}
		});
		
		if (resourceURI != null) {
			engine.getResourcesLocatorManager().registerResourceLocator(
					new OSGiResourceLocator(resourceURI.toString()));
		}