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
assertEquals(fileInfo.getFileName(), "A");
					assertEquals(fileInfo.getExtension(), "java");
				} else if (info.getTypeName().equals("B")) {
					assertEquals(info.getPackageName(), "org.eclipse");
					assertEquals(fileInfo.getProject(), "TestProject1");
					assertEquals(fileInfo.getFolder(), "src");
					assertEquals(fileInfo.getFileName(), "B");
					assertEquals(fileInfo.getExtension(), "java");
				}
			}
		}
	}
	
	public void testJar() throws Exception {
		TypeInfo[] result= AllTypesCache.getAllTypes(new NullProgressMonitor());
		for (int i= 0; i < result.length; i++) {
			TypeInfo info= result[i];
			if (info.getElementType() == TypeInfo.JAR_FILE_ENTRY_TYPE_INFO) {
				JarFileEntryTypeInfo jarInfo= (JarFileEntryTypeInfo)info;
				if (info.getTypeName().equals("Object")) {
					assertEquals(info.getPackageName(), "java.lang");
					assertTrue(jarInfo.getJar().endsWith("rtstubs.jar"));
					assertEquals(jarInfo.getFileName(), "Object");
					assertEquals(jarInfo.getExtension(), "class");
				}
			}
		}		
	}
}