filter classpath depenencies based on whether they have been added as libs to bundle FELIX-2587


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@995291 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 b001f38..7ece159 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
@@ -440,27 +440,30 @@
             attributes, export));
         for (IClasspathEntry e : n.getJavaModel().getRawClasspath())
         {
-            switch (e.getEntryKind())
-            {
-                case IClasspathEntry.CPE_LIBRARY:
-                    entries.add(JavaCore.newLibraryEntry(e.getPath(),
-                        e.getSourceAttachmentPath(), e.getSourceAttachmentRootPath(),
-                        rules, attributes, export));
-                    break;
-                case IClasspathEntry.CPE_VARIABLE:
-                    IPath path = JavaCore.getResolvedVariablePath(e.getPath());
-                    if (path != null)
-                    {
-                        IPath spath = e.getSourceAttachmentPath();
-                        if (spath != null) {
-                            spath = JavaCore.getResolvedVariablePath(spath);
-                        }
-                        
-                        entries.add(JavaCore.newLibraryEntry(path,
-                            spath, e.getSourceAttachmentRootPath(),
+            String encoded = n.getJavaModel().encodeClasspathEntry(e);
+            if ( n.getBundle().getClasspathEntrys().contains(encoded) ) {
+                switch (e.getEntryKind())
+                {
+                    case IClasspathEntry.CPE_LIBRARY:
+                        entries.add(JavaCore.newLibraryEntry(e.getPath(),
+                            e.getSourceAttachmentPath(), e.getSourceAttachmentRootPath(),
                             rules, attributes, export));
-                    }
-                    break;
+                        break;
+                    case IClasspathEntry.CPE_VARIABLE:
+                        IPath path = JavaCore.getResolvedVariablePath(e.getPath());
+                        if (path != null)
+                        {
+                            IPath spath = e.getSourceAttachmentPath();
+                            if (spath != null) {
+                                spath = JavaCore.getResolvedVariablePath(spath);
+                            }
+                            
+                            entries.add(JavaCore.newLibraryEntry(path,
+                                spath, e.getSourceAttachmentRootPath(),
+                                rules, attributes, export));
+                        }
+                        break;
+                }
             }
         }