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/ui/org/eclipse/jdt/internal/ui/text/correction/UnimplementedMethodsCompletionProposal.java
for (int i= 0; i < methods.length; i++) {
			MethodDeclaration newMethodDecl= StubUtility2.createImplementationStub(getCompilationUnit(), rewrite, imports, ast, methods[i], binding.getName(), settings, binding.isInterface(), context);
			listRewrite.insertLast(newMethodDecl, null);
		}
		return rewrite;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.ui.text.correction.CUCorrectionProposal#getAdditionalProposalInfo()
	 */
	public String getAdditionalProposalInfo() {
		try {
			getChange(); 
			StringBuffer buf= new StringBuffer();
			buf.append("<b>"); 
			buf.append(Messages.format(CorrectionMessages.UnimplementedMethodsCompletionProposal_info, String.valueOf(fMethodsToOverride.length)));
			buf.append("</b><ul>"); 
			for (int i= 0; i < fMethodsToOverride.length; i++) {
				buf.append("<li>"); 
				buf.append(BindingLabels.getFullyQualified(fMethodsToOverride[i]));
				buf.append("</li>"); 
			}
			buf.append("</ul>"); 
			return buf.toString();
		} catch (CoreException e) {
			JavaPlugin.log(e);
		}
		return null;
	}
}