fix for FELIX-1366
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@794802 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/JavaHelper.java b/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/JavaHelper.java
index a28771f..25ad1c2 100644
--- a/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/JavaHelper.java
+++ b/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/JavaHelper.java
@@ -464,16 +464,18 @@
for (String cp : classpath) {
IPath p = ".".equals(cp) ? path : cache.append(cp);
- IPath source = bundle.getSourcePathLocation();
-
- if (source != null && !source.toFile().exists()) {
- source = null;
+ if ( p.toFile().exists() ) {
+ IPath source = bundle.getSourcePathLocation();
+
+ if (source != null && !source.toFile().exists()) {
+ source = null;
+ }
+
+ IClasspathEntry e = JavaCore.newLibraryEntry(p, source,
+ bundle.getSourceRootPath(), rules, attributes,
+ exported);
+ entries.add(e);
}
-
- IClasspathEntry e = JavaCore.newLibraryEntry(p, source,
- bundle.getSourceRootPath(), rules, attributes,
- exported);
- entries.add(e);
}
return entries;