Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Refactoring: Remove declaration

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 21 2006 : 07:15:44 AM
Sometimes I move functions from one .cpp file to another one. Before cutting the function from the first file it would be nice if the refactoring menu had a "Remove Declaration" feature. After that I could simply do a cut & paste and finally an "Add Declarion" in the new file to completely move the function. What do you think?

Regards,
Marcus.
6   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 22 2006 : 2:26:16 PM
it seems someone has already thought of remove declaration

case=1101


when i need to move functions i tend to use alt-g to get the two most recent files to be the implementation and declaration of the function, which makes it easy to move the code to a new file via CTRL-TAB.

throw in Find References and this may help you do this manually.

PatLuja Posted - Jun 22 2006 : 02:48:55 AM
Hello all,

When I hear this, also another Refactoring function comes to mind: "Move Declaration and Implementation...", which should move the Declaration and the Implementation to a file-pair (.h and .cpp) of your choice...

The only thing is, where do you want to have it? Maybe you want to move this to a place within a class declaration, which maybe is somewhat harder to do.

With kind regards,
Patrick Luja

P.S. Nevertheless, "Remove Declaration" is still a useful function, even when this function should be implemented.
khb Posted - Jun 22 2006 : 02:25:17 AM
Ok, but that's not the best solution, as the line with the semicolon is left over in the header file. I just wanted to show you with this example that some kind of "remove" already exists in VA. So, adding a "Remove Declaration" shouldn't be much more dangerous. And as long as the undo function works...

A confirmation dialog for remove functionality would also be ok for me...

Just some food for thoughts

Regards,
Marcus.
support Posted - Jun 21 2006 : 1:21:06 PM
Clever.
khb Posted - Jun 21 2006 : 11:15:01 AM
I see. However, if I choose "Change Signature" in the .cpp file and completely delete the line in the edit box its nearly the same, just a semicolon is left in the header file

Regards,
Marcus.
support Posted - Jun 21 2006 : 10:51:44 AM
Interesting idea which hadn't come to us.

VA X normally adds code, e.g. completing as you type. We get nervous when VA X changes code, e.g. Extract Method. We'd have to be really careful if we start removing code.

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