Community
Participate
Working Groups
I was running my Eclipse4 application from https://github.com/paulweb515/eclipseExamples/tree/master/org.eclipse.example.e4.commands When I started up I get the following error: java.net.MalformedURLException at java.net.URL.<init>(URL.java:613) at java.net.URL.<init>(URL.java:476) at java.net.URL.<init>(URL.java:425) at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.parseStyleSheet(AbstractCSSEngine.java:199) at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.setTheme(ThemeEngine.java:365) at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.setTheme(ThemeEngine.java:336) at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.setTheme(ThemeEngine.java:318) at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.restore(ThemeEngine.java:477) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.initializeStyling(PartRenderingEngine.java:1126) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:913) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:910) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:85) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:147) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Because my SDK has customized the CSS, I have a $HOME/.e4css directory. When we call engine.parseStyleSheet(*) on file:/C:/Users/Paul/.e4css/e4_default_win7.css We calculate the import as file:/C:/Users/Paul/.e4css/e4_basestyle.css We can't find it. So we look for defaults, and we get to org.eclipse.e4.ui.css.core.util.impl.resources.OSGiResourceLocator.resolve(String) which has a hard-coded startLocation: platform:/plugin/org.eclipse.platform/css/ Except all my themes were provided in org.eclipse.example.e4.commands PW
org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.ThemeEngine(Display) contains code to register the OSGiResourceLocator, but it seems to involve extension point elements not defined in the themes EP schema. PW
We should look at writing the customized CSS to the configuration area of the running app as well. That way, an SDK install won't interfere with any of the RCP apps, or different SDK installs. org.eclipse.core.runtime.Platform.getConfigurationLocation() is a convenience method to get the configuration Location. Then maybe FileLocator.toFileURL(location.getDataArea(CSS.PLUGIN_ID)) PW
Moving to RC1 to give a bit more time to try out different options.
Defered to 4.3
Created attachment 225639 [details] Patch for EditorPrefPage
Created attachment 225640 [details] Patch for ThemeEngine
Could you include a copy-contents step from the current user.home/.e4css ? Otherwise people's edits from SR1 will be lost in the upgrade. Other than that, it looks good. PW
I hit a snag in 4.2.2, I pushed http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_2_maintenance&id=8f14292377e08c6f5df1adca0ecb798852e29e13 to fix some version numbers. PW
.