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
File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(JavaProjectHelper.JUNIT_SRC);
		assertTrue("Junit source", junitSrcArchive != null && junitSrcArchive.exists());
		JavaProjectHelper.addSourceContainerWithImport(fJProject2, "src", junitSrcArchive);
		
	}
	protected void tearDown() throws Exception {
		JavaProjectHelper.delete(fJProject1);
		JavaProjectHelper.delete(fJProject2);		
		
	}
	public void test1() throws Exception {
	
		
		IPackageFragmentRoot root1= JavaProjectHelper.addSourceContainer(fJProject1, "src");
		IPackageFragment pack1= root1.createPackageFragment("com.oti", true, null);
		ICompilationUnit cu1= pack1.getCompilationUnit("V.java");
		cu1.createType("public class V {\n static class VInner {\n}\n}\n", null, true, null);
		
		JavaProjectHelper.addRequiredProject(fJProject1, fJProject2);
		
		
		ArrayList result= new ArrayList();
		IJavaElement[] elements= new IJavaElement[] { fJProject1 };
		IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements);
		ITypeNameRequestor requestor= new TypeInfoRequestor(result);
		SearchEngine engine= new SearchEngine();
		engine.searchAllTypeNames(
			fJProject1.getJavaModel().getWorkspace(),