Lines 6747-6751
Link Here
|
6747 |
ContainerInitializer.setInitializer(null); |
6747 |
ContainerInitializer.setInitializer(null); |
6748 |
} |
6748 |
} |
6749 |
} |
6749 |
} |
|
|
6750 |
/** |
6751 |
* @bug 324367: IJavaProject.findPackageFragmentRoots(IClasspathEntry cpe) returns empty list |
6752 |
* |
6753 |
* Test that exported classpath entries from the referenced project are included when invoked |
6754 |
* the API org.eclipse.jdt.core.IJavaProject.findPackageFragmentRoots(IClasspathEntry) |
6755 |
* |
6756 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=324367" |
6757 |
* @throws Exception |
6758 |
*/ |
6759 |
public void testBug324367() throws Exception { |
6760 |
try { |
6761 |
IJavaProject referencingProject = this.createJavaProject("ReferencingProject", new String[] {}, "bin"); |
6762 |
IJavaProject referencedProject = this.createJavaProject("ReferencedProject", new String[] {}, "bin"); |
6763 |
|
6764 |
addLibrary(referencedProject, "lib.jar", null, new String[0], |
6765 |
new String[] { |
6766 |
"META-INF/MANIFEST.MF", |
6767 |
"Manifest-Version: 1.0\n", |
6768 |
}, |
6769 |
JavaCore.VERSION_1_4); |
6770 |
IClasspathEntry[] classpath = new IClasspathEntry[1]; |
6771 |
classpath[0] = JavaCore.newLibraryEntry(new Path("/ReferencedProject/lib.jar"), null, null,true); |
6772 |
setClasspath(referencedProject, classpath); |
6773 |
|
6774 |
classpath = new IClasspathEntry[1]; |
6775 |
classpath[0] = JavaCore.newProjectEntry(new Path("/ReferencedProject"), false); |
6776 |
setClasspath(referencingProject, classpath); |
6777 |
|
6778 |
IClasspathEntry referencedProjectCPE = null; |
6779 |
IClasspathEntry[] rawClasspath = referencingProject.getRawClasspath(); |
6780 |
for(int index = 0; index < rawClasspath.length; index++) { |
6781 |
IClasspathEntry cpe = rawClasspath[index]; |
6782 |
if (cpe.getPath().equals(referencedProject.getPath())) { |
6783 |
referencedProjectCPE = cpe; |
6784 |
break; |
6785 |
} |
6786 |
} |
6787 |
assertEquals("No package fragment roots found referenced project", 1, referencingProject.findPackageFragmentRoots(referencedProjectCPE).length); |
6788 |
|
6789 |
} finally { |
6790 |
deleteProject("ReferencingProject"); |
6791 |
deleteProject("ReferencedProject"); |
6792 |
} |
6793 |
} |
6750 |
|
6794 |
|
6751 |
} |
6795 |
} |