Bug 122906 [quick fix] add unimplemented method does not consider name conflicts
Version: 3.2.0 Build id: I20060105-0800 Having: package ibm.util; public class Properties {} package ibm.util; import java.util.Properties; public interface F { public void b(Properties p); public void g(ibm.util.Properties p); } package ibm.util; public class Test implements F { } Then applying quick fix 'add unimplemented methods' results in: package ibm.util; import java.util.Properties; public class Test implements F { public void b(Properties p) {} public void g(Properties p) {} } But should be: package ibm.util; import java.util.Properties; public class Test implements F { public void b(Properties p) {} public void g(ibm.util.Properties p) {} } or: package ibm.util; import ibm.util.Properties; public class Test implements F { public void b(java.util.Properties p) {} public void g(Properties p) {} }
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java
buf.append("    public static int foo() {\n");
		buf.append("        return 1;\n");	
		buf.append("    }\n");
		buf.append("}\n");
		other.createCompilationUnit("A.java", buf.toString(), false, null);		
		IPackageFragment pack0= fSourceFolder.createPackageFragment("pack", false, null);
		buf= new StringBuffer();
		buf.append("package pack;\n");
		buf.append("public class B extends other.A {\n");
		buf.append("}\n");
		pack0.createCompilationUnit("B.java", buf.toString(), false, null);		
		
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("public class E {\n");
		buf.append("    public int foo() {\n");
		buf.append("        return pack.B.foo();\n");
		buf.append("    }\n");
		buf.append("}\n");
		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
		CompilationUnit astRoot= getASTRoot(cu);
		ArrayList proposals= collectCorrections(cu, astRoot);
		assertNumberOfProposals(proposals, 1);
		assertCorrectLabels(proposals);
		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
		String preview= getPreviewContent(proposal);
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("\n");