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
 Feature Requests
 AutoText templates for refactoring
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kika
Junior Member

21 Posts

Posted - Dec 20 2007 :  11:06:24 PM  Show Profile  Reply with Quote
Hello,

I would be nice to have a template in AutoText for 'Create implementation'. For example I prefer to create not an empty stub for the function, but something with
//TODO: implement this
or
log_error(__FUNCTION__ " : not implemented!");

Another story if the function have the return type, it might be helpful to have a 'default' value returned by the created stub. But I understand that this is much more work for much less actual value.

As a sidenote, a great improvement would be to have 'per project' AutoText templates (merged with global ones). I have some templates which are different for different projects (due to different coding conventions for example) and I's quite annoying to have them all in one file having slightly different abbreviations.

Best regards,\rCyril\r

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Dec 21 2007 :  2:39:33 PM  Show Profile  Reply with Quote
Are you aware of the VA Snippet "Refactor Create Implementation" ?

Per project snippets is unlikely to happen any time soon. One simple reason, the IDE allows you to add a single file to multiple projects at the same time, which quickly means that it is not clear which project you are working on. Plus this would require quite a lot of GUI overhead.

You should find this FAQ entry on moving between different snippets interesting:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=7024

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

kika
Junior Member

21 Posts

Posted - Dec 21 2007 :  3:26:10 PM  Show Profile  Reply with Quote
feline,

It seems that I'm not aware about autotext being used in the refactoring at all. Since which version it's available? I'm still on version 1561.
Thanks a lot!

Best regards,\rCyril\r
Go to Top of Page

kika
Junior Member

21 Posts

Posted - Dec 21 2007 :  3:30:17 PM  Show Profile  Reply with Quote
BTW, what would be a great addition (which should not be very difficult to implement compared to per project templates) is to have the autotext templates split between 'system' and 'user' ones. System templates are which VAX brings with it and installed into 'Program Files'. User templates are in 'Documents and Settings' and preserved during reinstalls and updates.

Best regards,\rCyril\r
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Dec 21 2007 :  3:34:19 PM  Show Profile  Reply with Quote
Since the addition of the Refactoring, they have always lived in the AutoText/Snippets. Since not everyone likes the default formatting they do :)

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

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Dec 22 2007 :  2:40:37 PM  Show Profile  Reply with Quote
We are considering supporting two VA Snippet files:

case=1008

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

kika
Junior Member

21 Posts

Posted - Dec 23 2007 :  5:12:52 PM  Show Profile  Reply with Quote
I've looked into the autotext/snippets file and saw there that there are no different snippets for 'Create implementation' and, say, 'Move implementation to Source file'. How can I create empty implementations with body of { log_debug("blah-blah"); } while preserving bodies of moved methods?

Best regards,\rCyril\r
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Dec 24 2007 :  10:56:54 AM  Show Profile  Reply with Quote
Currently there is no official method. You might want to add the logging as a comment, so it is there, ready to be uncommented when you need it.

You might find this FAQ entry on swapping between different snippets helpful:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=7024

Alternatively you could add a snippet for the logging, to make it easy to insert into new functions when you want it.

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