Bug 116573 wrong guess of binding with overloaded methods
Create two classes like this package var.creation.test; public class b { public final void m(int x, String y) {} // private final void m(String x) {} // public final void m(boolean x, String y, String z) {} } package var.creation.test; public class a { public a() { new b().m(first, second); } } Now applying "Quick Fix">"Create Local Var first/Create field first" creates a String variable/field instead of "int first" and for the second parameter "String second". When the method signature is fully typed and available there is only one possibility from the 3 signatures. Cheers and goodwill ----------------------------------------------------------------------- Software configuration ---------------------------------------------------------------------- Windows XP Version 5.1 (Build 2600.xpsp_sp2_gdr.050301-1519: Service Pack 2) ----------------------------------------------------------------------- java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode) --------------------------------------------------------------------- eclipse-platform-3.2M3-win32 eclipse-PDE-3.2M3 eclipse-JDT-3.2M3 xsd-runtime-2.1.0 emf-sdo-runtime-2.1.0 GEF-runtime-3.1 VE-runtime-1.1.0.1 wtp-1.0M8 subclipse-0.9.36 -------------------------------------------------------------------
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java
mask&= SimilarElementsRequestor.REF_TYPES & ~SimilarElementsRequestor.VARIABLES;
			} else if (parent instanceof ParameterizedType) {
				if (node.getLocationInParent() == ParameterizedType.TYPE_ARGUMENTS_PROPERTY) {
					return mask & SimilarElementsRequestor.REF_TYPES;
				}
				mask&= SimilarElementsRequestor.CLASSES | SimilarElementsRequestor.INTERFACES;
			} else if (parent instanceof WildcardType) {
				if (node.getLocationInParent() == WildcardType.BOUND_PROPERTY) {
					return mask & SimilarElementsRequestor.REF_TYPES;
				}
			}
			node= parent;
			parent= parent.getParent();
		}
		switch (parent.getNodeType()) {
			case ASTNode.TYPE_DECLARATION:
				if (node.getLocationInParent() == TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY) {
					kind= SimilarElementsRequestor.INTERFACES;
				} else if (node.getLocationInParent() == TypeDeclaration.SUPERCLASS_TYPE_PROPERTY) {
					kind= SimilarElementsRequestor.CLASSES;
				}
				break;
			case ASTNode.ENUM_DECLARATION:
				kind= SimilarElementsRequestor.INTERFACES;
				break;
			case ASTNode.METHOD_DECLARATION:
				if (node.getLocationInParent() == MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY) {
					kind= SimilarElementsRequestor.CLASSES;
				} else if (node.getLocationInParent() == MethodDeclaration.RETURN_TYPE2_PROPERTY) {
					kind= SimilarElementsRequestor.ALL_TYPES | SimilarElementsRequestor.VOIDTYPE;