Bug 105324 - [refactoring] Constructor/Method Params to Setters Refactoring
Summary: [refactoring] Constructor/Method Params to Setters Refactoring
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P4 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-27 11:02 EDT by Chris Morris CLA
Modified: 2010-11-04 06:44 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Morris CLA 2005-07-27 11:02:22 EDT
This came out of a discussion on
https://bugs.eclipse.org/bugs/show_bug.cgi?id=102287 which is a request to add
an Introduce Parameter Object refactoring.

102287 talks about a way to help do the Introduce Param Object refactoring
currently by making an anonymous inner class, then using the Convert Anonymous
to Nested refactoring. 

I did this in some of my code and was left with the following:

new IMethodFormattingTester("myMethod", "S,i", (new String[] {"QString;","I"}),
"MyClass").doTest();

It would be nice to then refactor this long param constructor into setters,
something like this:

IMethodFormattingTester tester = new IMethodFormattingTester();
tester.setMethodName = "myMethod";
tester.setExpectedParams = "S,i";
tester.setParams = (new String[] {"QString;","I"});
tester.setClassName = "MyClass";
tester.doTest();