Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Refactoring: Reverse of Extract Method

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
khb Posted - Jun 27 2006 : 07:22:02 AM
I like the new refactoring function "Extract Method", but it sometimes happens to me that I need the reverse function. For example: I had a function that shrinked down to 4 lines of code after some refactoring. I called this function just from 2 locations in the code. So my idea was to remove the function and copy its code directly to the 2 locations. It would be cool if this function would be available from the refactoring menu. Of course, this should only be possible if the function to remove doesn't call itself

Regards,
Marcus.
4   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jun 28 2006 : 11:54:58 AM
FWIW: Refactoring is sometimes called "Inline Method."

http://www.refactoring.com/catalog/inlineMethod.html
khb Posted - Jun 28 2006 : 02:13:43 AM
@feline: Thanks for putting in a feature request.
@joe:

Regards,
Marcus.
jpizzi Posted - Jun 27 2006 : 11:18:19 PM
Here is how you can do this without VA's support.

At the beginning of the line, type the string, "inline "

Of course, if you need want VA's help, you could always create an autotext entry
feline Posted - Jun 27 2006 : 4:44:08 PM
i can think of times when working out if the function calls its self would be rather hard to determine. heavy use of overloaded functions plus default parameters is a good example

my gut instinct is to say "leave the function alone", since i have come to view small functions as good, but i understand why you are saying this. it would require the ability to remove the function, and its declaration.

i have just been sitting here, trying to work out it this presents any obvious problems or challenges that would make this very hard to do. so far though i have not come up with anything that sounds worse than extract method must have been, so i have put in a feature request

case=1493

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000