Project: JDT
Bug 113592 [change method signature] dialog should provide unique parameter names
Reported: 2005-10-24 16:31:51 | Status: resolved fixed

Repeatedly clicking on the Add button in the Refactor ... Change Method Signature dialog adds new parameters all named "newParam". Perhaps the default parameter names could be newParam1, newParam2 etc. Steps to reproduce ... Create a Java Project Create a Java Class Ca Create method newMethod(..) in Ca with no parameters. Select newMethod in Package Exporer and execute the Change Method Signature refactoring through the context menu. In the resulting dialog click on the "Add" button twice. RESULT: 2 identical parameters with the same name "newParam" are added and an error is displayed at the bottom "Duplicate parameter name: 'newParam'".

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ChangeSignatureTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/ParameterInfo.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeParametersControl.java org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/RefactoringMessages.java