Bug 36481 Quickfix (create method) generates wrong parameter type if same name exists in other package [quick fix]
given two types with same name, package a; public class A { } package b; public class A { public void doSomething(a.A obj) { newMethod(obj); // this should be quickfixed } } the generated method has the signature private void newMethod(A obj), but should have private void newMethod(a.A obj). I admit this to be not the classic style, we experience this behaviour, because we are generating lots of code and all the generated code goes to one directory, making calls to handwritten code with the same type name (by convention) in other packages.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NewMethodCompletionProposal.java
/*******************************************************************************
 * Copyright (c) 2000, 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.text.correction;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.graphics.Image;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.NamingConventions;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.dom.*;
import org.eclipse.jdt.ui.CodeGeneration;
import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
import org.eclipse.jdt.internal.corext.dom.ASTNodes;
import org.eclipse.jdt.internal.corext.dom.ASTRewrite;
import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
public class NewMethodCompletionProposal extends ASTRewriteCorrectionProposal {
	private ASTNode fNode; 
	private List fArguments;
	private ITypeBinding fSenderBinding;