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
setDisplayName(CorrectionMessages.UnimplementedMethodsCompletionProposal_description);
		setImage(JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE));
		fTypeNode= typeNode;
		fMethodsToOverride= null;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.ui.text.correction.ASTRewriteCorrectionProposal#getRewrite()
	 */
	protected ASTRewrite getRewrite() throws CoreException {
		ITypeBinding binding;
		AST ast= fTypeNode.getAST();
		ASTRewrite rewrite= ASTRewrite.create(ast);
		ListRewrite listRewrite;
		if (fTypeNode instanceof AnonymousClassDeclaration) {
			AnonymousClassDeclaration decl= (AnonymousClassDeclaration) fTypeNode;
			binding= decl.resolveBinding();
			listRewrite= rewrite.getListRewrite(decl, AnonymousClassDeclaration.BODY_DECLARATIONS_PROPERTY);
		} else {
			AbstractTypeDeclaration decl= (AbstractTypeDeclaration) fTypeNode;
			binding= decl.resolveBinding();
			listRewrite= rewrite.getListRewrite(decl, decl.getBodyDeclarationsProperty());
		}
		IMethodBinding[] methods= StubUtility2.getUnimplementedMethods(binding);
		fMethodsToOverride= methods;
		CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(getCompilationUnit().getJavaProject());
		if (binding.isAnonymous()) {
			settings.createComments= false;
		}
		ImportRewrite imports= new ImportRewrite(createImportRewrite((CompilationUnit) fTypeNode.getRoot()));
		ImportRewriteContext context= new ContextSensitiveImportRewriteContext((CompilationUnit) fTypeNode.getRoot(), fTypeNode.getStartPosition());