Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Extract method for C++

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
NOPcode Posted - Apr 03 2008 : 08:00:59 AM
One thing that is getting more and more annoying is when I use the Extract Method function in a traditional .h/.cpp project, it always puts the method body in in the .h file, so then I have to fuss with Move Imp. to Source File (which is another annoyance - it is fussy about being active, so I have to often try right-clicking multiple times to get it to be used).
How about some way to control this for non-.NET development?
8   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 14 2008 : 1:40:30 PM
I have asked internally about this. We like to keep the number of options to a minimum, but there is clearly a desire / need for more control over refactoring.
NOPcode Posted - Apr 11 2008 : 2:02:30 PM
quote:
Originally posted by feline

The problem with "the proper job" is that if you ask 6 people you are likely to get 6 definitions of what should happen.



Yes, which is why I'm asking for a checkbox option in the settings for this. You have .h/.cpp file-flipping, and yet the extract only uses the .h file...
feline Posted - Apr 10 2008 : 3:52:24 PM
The problem with "the proper job" is that if you ask 6 people you are likely to get 6 definitions of what should happen.
NOPcode Posted - Apr 09 2008 : 11:09:45 AM
Basically, what I'm asking for is a simple checkbox in the config options to automatically do the job, by putting the code at the end of the target .cpp file. Otherwise, you're just annoying C++ developers by jamming everything into the header.

I'll try the macro concept out, but not a monster fan of macros - always seem to foobar the IDE. Seems like a hack workaround to make the thing do the proper job in the first place.
accord Posted - Apr 04 2008 : 8:01:17 PM
quote:
Looking beyond Extract Method, how long before people reasonably ask for the same modifier for Add Member, Add Similar Member and Create Implementation?


This is why "Move Implementation to Source File" is great.
The only minor problem is that it always put the method at the end of the file, but placing below the implementation of preceding function
is under consideration.

quote:
I have to often try right-clicking multiple times to get it to be used

The re-parse time currently about 1 second for little files like an average header. I am waiting for about 1 second before pressing my shortcut to Move Implementation.

Alternatively, you can write a macro which call reparse and then do a Move Implementation Not the same what you want, but can be a solution if you don't want to wait at all.
feline Posted - Apr 04 2008 : 09:42:58 AM
Assuming for the moment we do this, the next problem is going to be where is the function placed in the cpp file?

We already have this problem with Move Implementation to Source File, and this will add the same problem to Extract Method. If we are not careful we will start to "blur" the lines between these two operations. From a support, and also making them do what people want point of view, I am wary of this.

This is why the idea of somehow chaining together the refactoring operations sounds appealing, at least on paper.

Looking beyond Extract Method, how long before people reasonably ask for the same modifier for Add Member, Add Similar Member and Create Implementation?
chrisd Posted - Apr 03 2008 : 6:03:26 PM
feline,
I have always had the same response to this as NOPcode, how about just changing the behavior if the ctrl key is pressed when the option is selected from the menu?

Chris
feline Posted - Apr 03 2008 : 08:57:18 AM
We have tried to keep the refactoring operations as simple, quick and easy to use as possible. They are also designed to be chained together.

One reason for this is that no matter what we do, it is going to be "wrong" for some people. So it is keep the actions simple, or ask a lot of questions all of the time.

We have discussed internally some method for chaining refactoring operations together automatically, but this is just a vague idea at the moment. You might find this FAQ entry on using IDE macro's to control refactoring helpful:

http://docs.wholetomato.com?W382

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