Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Refactoring: Create Overload without Parameter
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Curtis
Junior Member

14 Posts

Posted - Dec 12 2007 :  2:51:51 PM  Show Profile  Reply with Quote
When creating classes often times we write a method with several parameters. We then want to write simplified overloads of those same methods.

Create a refactoring that, when the cursor is on a parameter, gives the option of creating a method without that parameter. In the new method call the existing method with the default value (from the type's constructor).

Chief Software Fanatic - www.carverlab.com

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Dec 13 2007 :  3:11:03 PM  Show Profile  Reply with Quote
This sort of exists, if you trigger "Add Similar Member" on the function.

Picking up the default constructor for the type is not that reliable, not all types have default constructors. What about "int", "float", "void *" and structures?

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000