diff options
author | Xavier Ducrohet <xav@android.com> | 2012-03-06 15:24:47 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-03-06 15:24:47 -0800 |
commit | a794cb4669b5b77ad1956598213f0ce5b1fb6d8b (patch) | |
tree | abdd0365ccfc87c5699a7017df894d86bd537d85 /eclipse | |
parent | 53432f77b6c09715fc742809c44208b5b54cbe76 (diff) | |
download | sdk-a794cb4669b5b77ad1956598213f0ce5b1fb6d8b.zip sdk-a794cb4669b5b77ad1956598213f0ce5b1fb6d8b.tar.gz sdk-a794cb4669b5b77ad1956598213f0ce5b1fb6d8b.tar.bz2 |
Only add Java project's jar file if they are exported.
Change-Id: Ia44fab93718ac83aee1783e08c606d234c7afcfe
Diffstat (limited to 'eclipse')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java index 197d18c..65fd9c7 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java @@ -350,6 +350,10 @@ public class LibraryClasspathContainerInitializer extends BaseClasspathContainer IClasspathEntry[] classpaths = javaProject.readRawClasspath(); if (classpaths != null) { for (IClasspathEntry e : classpaths) { + // only consider the classpath entries that are exported. + if (e.isExported() == false) { + continue; + } // if this is a classpath variable reference, we resolve it. if (e.getEntryKind() == IClasspathEntry.CPE_VARIABLE) { e = JavaCore.getResolvedClasspathEntry(e); @@ -368,7 +372,9 @@ public class LibraryClasspathContainerInitializer extends BaseClasspathContainer container.getKind() == IClasspathContainer.K_APPLICATION) { IClasspathEntry[] entries = container.getClasspathEntries(); for (IClasspathEntry entry : entries) { - handleClasspathEntry(entry, wsRoot, jarFiles); + if (entry.isExported()) { + handleClasspathEntry(entry, wsRoot, jarFiles); + } } } } catch (JavaModelException jme) { |