Community
Participate
Working Groups
My RCP application has plug-ins containing CSS stylesheets, where a master stylesheet includes others with @import. When the application runs from an UNC path, the stylesheets are not applied correctly. This code in AbstractCSSEngine.parseStyleSheet is wrong: Path p = new Path(source.getURI()); IPath trim = p.removeLastSegments(1); boolean isArchive = source.getURI().contains(ARCHIVE_IDENTIFIER); url = FileLocator .resolve(new URL(trim.addTrailingSeparator().toString() + ((CSSImportRule) rule).getHref())); File testFile = new File(url.getFile()); if (!isArchive&&!testFile.exists()) { // look in platform default String path = getResourcesLocatorManager().resolve((importRule).getHref()); testFile = new File(new URL(path).getFile()); if (testFile.exists()) { url = new URL(path); } } After the first assignment to testFile I get p = file://fileserver/volume/application/bin/plugins/theme.earth_25.4.89/css/earth.css trim = file://fileserver/volume/application/bin/plugins/theme.earth_25.4.89/css isArchive = false url = file://fileserver/volume/application/bin/plugins/theme.earth_25.4.89/css/earth_main_window_navigation.css testFile = \volume\application\bin\plugins\theme.earth_25.4.89\css\earth_main_window_navigation.css (WRONG!) new File(url.getFile()) obviously does not work when the URL contains a host part which should become part of the file name, as is the case with UNC paths. The correct way to convert an URL into a File would be new File(url.toURI()) but this has to be tested. The behaviour of the following code inside the !isArchive&&!testFile.exists() condition also has to be checked if it works when the whole application resides on an UNC path.