Author |
Topic |
|
khb
Tomato Guru
Germany
337 Posts |
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. |
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
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 |
zen is the art of being at one with the two'ness |
|
|
jpizzi
Tomato Guru
USA
642 Posts |
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 |
Joe Pizzi |
|
|
khb
Tomato Guru
Germany
337 Posts |
Posted - Jun 28 2006 : 02:13:43 AM
|
@feline: Thanks for putting in a feature request. @joe:
Regards, Marcus. |
|
|
support
Whole Tomato Software
5566 Posts |
|
|
Topic |
|