Bug 44772 Java Search opens the wrong file
Build: 3.0M4 1. Navigate > Open type... 2. Enter 'Document' 3. In the list of available choice, click on the interface 'Document'. There are three potential qualifiers: i. javax.swing.text. ii. org.w3c.dom (from the xerces plug-in that I have in my workspace). iii. org.w3c.dom (from rt.jar of my Sun's 1.4.2 JRE) 4. Choose iii. Click OK. You will see that the interface that I chose did not open. Instead the one from ii did.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
assertTrue("Should find 37 elements, is " + result.size(), result.size() == 37);
		
		for (int i= 0; i < result.size(); i++) {
			TypeInfo ref= (TypeInfo) result.get(i);
			
			IType resolvedType= ref.resolveType(scope);
			if (resolvedType == null) {
				assertTrue("Could not be resolved: " + ref.toString(), false);
			}
		}
	}
	
	public void testNoSourceFolder() throws Exception {
		IPackageFragmentRoot root= JavaProjectHelper.addSourceContainer(fJProject1, "");
		IPackageFragment pack1= root.createPackageFragment("", true, null);
		ICompilationUnit cu1= pack1.getCompilationUnit("A.java");
		cu1.createType("public class A {\n}\n", null, true, null);		
		IPackageFragment pack2= root.createPackageFragment("org.eclipse", true, null);
		ICompilationUnit cu2= pack2.getCompilationUnit("B.java");
		cu2.createType("public class B {\n}\n", null, true, null);
		
		TypeInfo[] result= AllTypesCache.getAllTypes(new NullProgressMonitor());
		for (int i= 0; i < result.length; i++) {
			TypeInfo info= result[i];
			if (info.getElementType() == TypeInfo.IFILE_TYPE_INFO) {
				IFileTypeInfo fileInfo= (IFileTypeInfo)info;
				if (info.getTypeName().equals("A")) {
					assertEquals(info.getPackageName(), "");
					assertEquals(fileInfo.getProject(), "TestProject1");
					assertNull(fileInfo.getFolder());