protected void collectExportedEntries(IJavaProject proj, List<IRuntimeClasspathEntry> runtimeEntries) throws CoreException {
IClasspathEntry[] entries = proj.getRawClasspath();
for (int i = 0; i < entries.length; i++) {
IClasspathEntry entry = entries[i];
if (entry.isExported()) {
IRuntimeClasspathEntry rte = null;
switch (entry.getEntryKind()) {
case IClasspathEntry.CPE_CONTAINER:
IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), proj);
int kind = 0;
switch (container.getKind()) {
case IClasspathContainer.K_APPLICATION:
kind = IRuntimeClasspathEntry.USER_CLASSES;
break;
case IClasspathContainer.K_SYSTEM:
kind = IRuntimeClasspathEntry.BOOTSTRAP_CLASSES;
break;
case IClasspathContainer.K_DEFAULT_SYSTEM:
kind = IRuntimeClasspathEntry.STANDARD_CLASSES;
break;
}
rte = JavaRuntime.newRuntimeContainerClasspathEntry(entry.getPath(), kind, proj);
break;
case IClasspathEntry.CPE_LIBRARY:
rte = JavaRuntime.newArchiveRuntimeClasspathEntry(entry.getPath());
rte.setSourceAttachmentPath(entry.getSourceAttachmentPath());
rte.setSourceAttachmentRootPath(entry.getSourceAttachmentRootPath());
break;
case IClasspathEntry.CPE_PROJECT:
String name = entry.getPath().segment(0);
IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (p.exists()) {