Project: JDT
Bug 36481 Quickfix (create method) generates wrong parameter type if same name exists in other package [quick fix]
Reported: 2003-04-15 05:16:57 | Status: resolved fixed

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.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AssignToVariableAssistProposal.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ConstructorFromSuperclassProposal.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NewMethodCompletionProposal.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NewVariableCompletionProposal.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ReturnTypeSubProcessor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnimplementedMethodsCompletionProposal.java