diff options
author | justinchen | 2006-06-01 22:53:48 +0000 |
---|---|---|
committer | justinchen | 2006-06-01 22:53:48 +0000 |
commit | a0c14540d486061f20b36eb03092a2dc0fbdf672 (patch) | |
tree | 643d3360c9160abc2f5ded69550d7b470e1ed6e5 /jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry | |
parent | e58a27803cd3b05b952fb6f06502be64fe1f0099 (diff) | |
download | webtools.jsf-a0c14540d486061f20b36eb03092a2dc0fbdf672.tar.gz webtools.jsf-a0c14540d486061f20b36eb03092a2dc0fbdf672.tar.xz webtools.jsf-a0c14540d486061f20b36eb03092a2dc0fbdf672.zip |
Fixes for bug 144954, to support jsflibraries contribution.
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry')
-rw-r--r-- | jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/ArchiveFileImpl.java | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/ArchiveFileImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/ArchiveFileImpl.java index 279e86faa..3a4348ff2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/ArchiveFileImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/ArchiveFileImpl.java @@ -426,13 +426,24 @@ public class ArchiveFileImpl extends EObjectImpl implements ArchiveFile { */ public String getResolvedSourceLocation() { String resolvedSourceLocation = null; + /** + * The implementation to support PluginProvidedJSFLibrary assume the following. + * 1. Plugin provided JSF library needs to be distributed as an expanded folder. + * 2. JARs for plugin provided JSF library need to reside inside the folder mentioned in item 1 above. + * 3. Each JAR needs to specify a relative path for the folder mentioned in item 1 above. + * + * Fix for bug 144954. + */ if (getJSFLibrary() instanceof PluginProvidedJSFLibrary) { Bundle bundle = getBundle(); if (bundle != null) { - String bundleLocation= bundle.getLocation(); - if (bundleLocation != null) { - resolvedSourceLocation = appendSeparator(bundleLocation) + sourceLocation; - } else { + //resolvedSourceLocation = appendSeparator(bundleLocation) + sourceLocation; + try { + Path srcPath = new Path(sourceLocation); + URL fileURL = Platform.find(bundle, srcPath); + URL url = Platform.resolve(fileURL); + resolvedSourceLocation = url.getPath(); + } catch (IOException e) { resolvedSourceLocation = sourceLocation; } } else { |