Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333923

Summary: [quick fix] Using create parameter quick fix should do a change method refactoring
Product: [Eclipse Project] JDT Reporter: Chris Leon <chris.leon>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, markus.kell.r
Version: 3.5.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Chris Leon CLA 2011-01-10 17:49:16 EST
Build Identifier: M20090917-0800

If I'm working with an unknown variable in a method, and do quick assist...  on it, I'm presented with options including Create parameter.  This is good, but using that assist simply changes the method signature without doing the full 'change method signature' type process, which includes changing all the callers of this method.  

I'd be ok with it simply adding ', newVariableName' to every caller, but it'd be even better if it could present me with a way of specifying a default value for the new parameter.

Reproducible: Always

Steps to Reproduce:
1. Create a method A with no arguments
2. Create a method B that calls method A
3. In the body of A, insert the line 'int x = y;'
4. Use quick assist to 'create parameter 'y''
5. See that method B doesn't compile because the no arg method signature no longer exists.
Comment 1 Markus Keller CLA 2011-01-11 08:24:22 EST

*** This bug has been marked as a duplicate of bug 160212 ***