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/core/AddImportTest.java
assertAddedAndRemoved(imports,
				new String[] { "java.lang.Math" }, new String[] {},
				new String[] { "java.lang.Math.min", "java.lang.Math.max" }, new String[] {}
		);
		
		imports.removeImport("java.lang.Math");
		imports.removeImport("java.util.Vector");
		imports.removeStaticImport("java.lang.Math.dup");
		assertAddedAndRemoved(imports,
				new String[] { }, new String[] { "java.util.Vector"},
				new String[] { "java.lang.Math.min", "java.lang.Math.max" }, new String[] {}
		);
		
		imports.addImport("java.util.Vector");
		imports.addStaticImport("pack1.C", "CONST", true);
		
		assertAddedAndRemoved(imports,
				new String[] { }, new String[] { },
				new String[] { "java.lang.Math.min", "java.lang.Math.max", "pack1.C.CONST" }, new String[] {}
		);
		
		apply(imports);
		buf= new StringBuffer();
		buf.append("package pack1;\n");
		buf.append("\n");
		buf.append("import static java.lang.Math.max;\n");
		buf.append("import static java.lang.Math.min;\n");
		buf.append("import static pack1.C.CONST;\n");
		buf.append("\n");
		buf.append("import java.util.Vector;\n");