Author: dsavage
Date: Thu Sep 9 01:39:10 2010
New Revision: 995291
URL: http://svn.apache.org/viewvc?rev=995291&view=rev
Log:
filter classpath depenencies based on whether they have been added as libs to
bundle FELIX-2587
Modified:
felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/JavaHelper.java
Modified:
felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/JavaHelper.java
URL:
http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/JavaHelper.java?rev=995291&r1=995290&r2=995291&view=diff
==============================================================================
---
felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/JavaHelper.java
(original)
+++
felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/util/JavaHelper.java
Thu Sep 9 01:39:10 2010
@@ -440,27 +440,30 @@ public class JavaHelper
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;
+ }
}
}