aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-02-04 10:47:26 (EST)
committersefftinge2009-02-04 10:47:26 (EST)
commit560f83803c4f50b901bebcc8118223fd9e9cd90b (patch)
treea1e6b5cad5b31177319948f103de5cdea400ea3e
parent34215a834564c9a4346ada668e2c00945bdaff8e (diff)
downloadorg.eclipse.xtext-560f83803c4f50b901bebcc8118223fd9e9cd90b.zip
org.eclipse.xtext-560f83803c4f50b901bebcc8118223fd9e9cd90b.tar.gz
org.eclipse.xtext-560f83803c4f50b901bebcc8118223fd9e9cd90b.tar.bz2
Fix with ClasspathScheme: Finally it seems to work.
-rw-r--r--plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/util/JdtClasspathUriResolver.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/util/JdtClasspathUriResolver.java b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/util/JdtClasspathUriResolver.java
index 6ecf1e9..f8cbb27 100644
--- a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/util/JdtClasspathUriResolver.java
+++ b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/util/JdtClasspathUriResolver.java
@@ -102,8 +102,17 @@ public class JdtClasspathUriResolver implements IClasspathUriResolver {
if (zipFile != null) {
ZipEntry zipEntry = zipFile.getEntry(projectRelativePath.substring(1));
if (zipEntry != null) {
- return URI.createURI("jar:" + "platform:/resource" + jarPackageFragmentRoot.resource().getFullPath()
- + "!" + projectRelativePath, true);
+ IResource resource = jarPackageFragmentRoot.resource();
+ if (resource == null) {
+ resource = jarPackageFragmentRoot.getUnderlyingResource();
+ if (resource == null) {
+ String name = zipFile.getName();
+ String uri = "jar:file:" + name + "!" + projectRelativePath;
+ return URI.createURI(uri);
+ }
+ }
+ return URI.createURI(
+ "jar:" + "platform:/resource" + resource.getFullPath() + "!" + projectRelativePath, true);
}
}
return null;