1 Replies Last post: Dec 30, 2005 2:47 AM by Sixth and Red River Software  
Taras Tielkes Apprentice 1,016 posts since
Oct 20, 2002
Currently Being Moderated

Dec 29, 2005 10:47 PM

Introduce parameter object: parameter name suggestion

Parameter name suggestion

When I invoke this action, and provide a class name "Settings", I would expect to have parameter name auto-completion available, with "settings" as a completion proposal.

 

Actually, I'd expect the complete naming suggestion functionality that is available when invoking "Introduce variable".

 

Better field/tab order on form

Perhaps it would be a good idea to swap the order of the "parameter name" and "class name" field on the dialog: when "class name" is given, most of the time the default name suggested (see 1) would be fine.

 

Default selection

Currently, the selection of parameters to include is empty. I think it would be a better default to include all parameters. That's usually the 'smell' that leads to this refactoring: long parameter lists.

 

Refactoring multiple methods with the same parameter object

Sometimes I'd to apply this refactoring to multiple methods. Any ideas/plans in that direction for a future version?

Sixth and Red River Software Novice 139 posts since
Nov 29, 2005
Currently Being Moderated
Dec 30, 2005 2:47 AM in response to: Taras Tielkes
Re: Introduce parameter object: parameter name suggestion

 

The first three are good UI suggestions, which we don't currently have in plan.  If you'd put in a JIRA request, I can pretty much gaurantee that these would find their way into Refactor-J 2.0 (although the third might be implemented as a "select all" button, rather than defaulting to all).

 

As for the fourth, we are already planning on Introduce Parameter Object being capable of "chaining", so that if all (most?) of the wrapped parameters are passed to another method, you would be given the option of wrapping that method as well.  Additionally, we are planning on allowing existing classes to be used as wrappers, if it is compatible.  Would those fit the use cases you are thinking of?

 

Sixth and Red River Software

"Code with Grace and Verve"

More Like This

  • Retrieving data ...