Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 AutoText templates for refactoring

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
kika Posted - Dec 20 2007 : 11:06:24 PM
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.
7   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 24 2007 : 10:56:54 AM
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.
kika Posted - Dec 23 2007 : 5:12:52 PM
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?
feline Posted - Dec 22 2007 : 2:40:37 PM
We are considering supporting two VA Snippet files:

case=1008
rhummer Posted - Dec 21 2007 : 3:34:19 PM
Since the addition of the Refactoring, they have always lived in the AutoText/Snippets. Since not everyone likes the default formatting they do :)
kika Posted - Dec 21 2007 : 3:30:17 PM
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.
kika Posted - Dec 21 2007 : 3:26:10 PM
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!
feline Posted - Dec 21 2007 : 2:39:33 PM
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

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