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
 Technical Support
 Add Members
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

swinefeaster
Tomato Guru

310 Posts

Posted - Jul 13 2006 :  2:05:13 PM  Show Profile  Reply with Quote
I think I remember reading this somewhere, but I'd like to add my 2 cents that if you guys could PLEASE add the feature to always add implementations to source file. Otherwise adding a new function using your tools is awkward, cause then you have to explicitly go Move to Implementation.

Also, it would be nice if your Add Member dialog also had an edit box above it for comments about the function. Then you could generate code like this in the header:

// Comments go here.
void Something(void);

and then in the cpp file, put

void
CSomeClass:Something(void)
{
}

and put the caret position in the cpp file. Some people might want to put the comments in the cpp instead.

Otherwise 1530 looks pretty cool! I am real excited about the features. Sometimes I have problems getting this little arrow to appear around symbols (there's no hotkey binding for this menu?).

swine

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 15 2006 :  12:28:08 PM  Show Profile  Reply with Quote
putting the implementation into the header file was a design decision taken for several reasons. we either have to just put the implementations "somewhere" or we have to (a) ask every time or (b) have an option for this.

we want to ask as few questions as possible, since we want to keep refactoring as quick, easy and simple as possible.

one additional reason has come along since then which is templates. these normally exist only in the header file, and have no associated cpp file.

my first reaction was that the comment hole was an interesting idea, but what happens when you have to use structured or formatted comments? i try to insert all comments using Doxygen format, which lists out both the parameters and the return value of the function. i have edited the autotext for Document Method to help me do this.

plus a small edit box in a dialog is not going to give you the tools or power of the IDE when you are entering your comment text. for instance, no spell checking from VA

you observation about where people want the comment placed is at the core of the design of VA's refactoring. as soon as you have an operation with any "complexity", even as simple as insert function + a comment, you have to ask the user question after question to get it right.

by keeping the operations very simple the user is free to chain them together however best suits them, without having to bother with a load of questions.

zen is the art of being at one with the two'ness
Go to Top of Page

swinefeaster
Tomato Guru

310 Posts

Posted - Jul 17 2006 :  2:32:21 PM  Show Profile  Reply with Quote
i see what you are saying, but puting code in the header is usually bad coding practice. i would really like to see an option to have it put it in the cpp file by default...
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Jul 17 2006 :  3:06:56 PM  Show Profile  Reply with Quote
bad coding practice by what standards? I put code in headers for simple inlined functions. I agree with the design decision of how VA X Ractoring is implemented, many small operations that are ment to be chained together to perform one operation.

Whould an option be good? Eh, I would mind, nor would I miss it if there wasn't one. I've grown acustomed to how the refactoring works and it doesn't bother me one bit.

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

swinefeaster
Tomato Guru

310 Posts

Posted - Jul 17 2006 :  3:23:45 PM  Show Profile  Reply with Quote
why inline functions when there is a optimization to inline all suitable functions anyway?

putting stuff in header is bad because any symbols you use you have to include their headers in the header (which just increases recursive dependencies and compile time). i have had to clean up a lot of this kind of practice after other coders. finally VAX let's me do it automatically!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 18 2006 :  7:09:06 PM  Show Profile  Reply with Quote
it is possible we will have to add an option for this eventually, but when ever possible VA only modifies the current file when you do a single refactoring operation. this helps to simplify the operations, and the user experience.

i agree with you about the number of header file dependencies, but not all "implemented in the header file" functions will require any extra includes.

my personal preference is to keep very simple class methods in the header file, inside the class definition. but anything that requires more than 2 lines of code, or extra include files, goes in the cpp file.

we are never going to satisfy everyone with a single default behaviour. but at the same time we don't want hundreds and hundreds of options either *sigh*

zen is the art of being at one with the two'ness
Go to Top of Page

swinefeaster
Tomato Guru

310 Posts

Posted - Jul 18 2006 :  7:56:42 PM  Show Profile  Reply with Quote
i see your point... and i sympathize (remember we are all programmers here). but right now the create implementation is not too useful for me

1. without it putting it in the cpp right away
2. without having a hotkey (i hate using the mouse).

regards
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 18 2006 :  8:10:29 PM  Show Profile  Reply with Quote
the hot key i can help you with. if you are in VS2003, etc, then you can use:

ALT-A -> r -> i

open the VAssistX menu, open the refactoring sub-menu, trigger create implimentation. this is how i do it, since i also hate having to use the mouse.

Or, in the IDE keyboard settings you can map a keyboard shortcut to this. search for "VAssistX.CreateImplementation"

zen is the art of being at one with the two'ness
Go to Top of Page

swinefeaster
Tomato Guru

310 Posts

Posted - Jul 18 2006 :  8:24:23 PM  Show Profile  Reply with Quote
excellent! rats now i might have to stop whining...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 20 2006 :  5:32:22 PM  Show Profile  Reply with Quote
if you really want to go wild, try mapping a keyboard shortcut to "VAssistX.InsertAutotext" and then trigger this when you have some text selected... it will take a bit of fiddling to get the correct set of autotext rules in place for what you want and need, but once you get the idea, this should be a very powerful feature.

plus, you an always bind keyboard shortcuts to all of the other VA refactoring functions as well

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