Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » AbstractCSSEngine MalFormedURLException in a deployed RCP product
AbstractCSSEngine MalFormedURLException in a deployed RCP product [message #1016153] Tue, 05 March 2013 04:33
Eclipse UserFriend
Hi guys,
we had an RCP Product based on 4.1 using the compatibility layer. After switching the target platform to 4.2.2 the theming via css didn't work anymore on a deployed product, it only works in the IDE. Ater looking at the code in AbstractCSSEngine we found a change since 4.1


4.1:
URL url = FileLocator.resolve(new URL(trim.addTrailingSeparator().toString() + ((CSSImportRule) rule).getHref()));
InputStream stream = url.openStream();


4.2.2
URL url = FileLocator.resolve(new URL(trim.addTrailingSeparator().toString() + ((CSSImportRule) rule).getHref()));
File testFile = new File(url.getFile());
if (!testFile.exists()) {
  //look in platform default
  String path = getResourcesLocatorManager().resolve(((CSSImportRule) rule).getHref());
  testFile = new File(new URL(path).getFile());
  if (testFile.exists()) {
    url = new URL(path);
  }
}
InputStream stream = url.openStream();


This won't work if the file is in a deployed bundle.
We are using the "org.eclipse.e4.ui.css.swt.theme" extension point in our product

<extension
        point="org.eclipse.e4.ui.css.swt.theme">
     <theme
           basestylesheeturi="css/e4_day.css"
           id="default"
           label="%Theme_Default">
     </theme>
     <theme
           basestylesheeturi="css/e4_dark.css"
           id="dark"
           label="%Theme_dark">
     </theme>
  </extension>


Is this a known bug?

[Updated on: Tue, 05 March 2013 04:35] by Moderator

Previous Topic:Switching Themes in E3 mode
Next Topic:Running Juno to generate RCP e3
Goto Forum:
  


Current Time: Fri Nov 07 16:53:38 EST 2025

Powered by FUDForum. Page generated in 0.02498 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top