aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2012-03-02 19:07:07 -0800
committerXavier Ducrohet <xav@android.com>2012-03-02 19:11:30 -0800
commit420f7b22e62d45ff579e700c6456834c0739e37f (patch)
treef23be4c4f60cda092ad492de3ac87862be5e78be /eclipse
parent20524a799829e63450df821046b4d998102c255c (diff)
downloadsdk-420f7b22e62d45ff579e700c6456834c0739e37f.zip
sdk-420f7b22e62d45ff579e700c6456834c0739e37f.tar.gz
sdk-420f7b22e62d45ff579e700c6456834c0739e37f.tar.bz2
Make the library container be exported.
This allows test projects that reference the app project to have access to the library(ies) and associated jar files. Change-Id: I7bebe3e1d2e2265a95b23f65e6f1f0c5e51271bb
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java13
1 files changed, 8 insertions, 5 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 7a19344..197d18c 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
@@ -144,7 +144,8 @@ public class LibraryClasspathContainerInitializer extends BaseClasspathContainer
if (foundLibrariesContainer == false) {
// add the android container to the array
rawClasspath = ProjectHelper.addEntryToClasspath(rawClasspath,
- JavaCore.newContainerEntry(new Path(AdtConstants.CONTAINER_LIBRARIES)));
+ JavaCore.newContainerEntry(new Path(AdtConstants.CONTAINER_LIBRARIES),
+ true /*isExported*/));
}
// set the new list of entries to the project
@@ -208,7 +209,8 @@ public class LibraryClasspathContainerInitializer extends BaseClasspathContainer
IClasspathEntry entry = JavaCore.newLibraryEntry(
jarIFile.getLocation(),
sourceFolder, // source attachment path
- null); // default source attachment root path.
+ null, // default source attachment root path.
+ true /*isExported*/);
entries.add(entry);
@@ -237,7 +239,7 @@ public class LibraryClasspathContainerInitializer extends BaseClasspathContainer
// now add a classpath entry for each Java project (this is a set so dups are already
// removed)
for (IProject p : refProjects) {
- entries.add(JavaCore.newProjectEntry(p.getFullPath()));
+ entries.add(JavaCore.newProjectEntry(p.getFullPath(), true /*isExported*/));
}
// and process the jar files list, but first sanitize it to remove dups.
@@ -262,10 +264,11 @@ public class LibraryClasspathContainerInitializer extends BaseClasspathContainer
e.getSourceAttachmentRootPath(),
e.getAccessRules(),
e.getExtraAttributes(),
- e.isExported()));
+ true /*isExported*/));
} else {
entries.add(JavaCore.newLibraryEntry(new Path(jarFile.getAbsolutePath()),
- null /*sourceAttachmentPath*/, null /*sourceAttachmentRootPath*/));
+ null /*sourceAttachmentPath*/, null /*sourceAttachmentRootPath*/,
+ true /*isExported*/));
}
}
} catch (DifferentLibException e) {