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
 new autotext
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

gmit
Whole Tomato Software

Croatia
90 Posts

Posted - Sep 15 2005 :  09:34:03 AM  Show Profile
I've got few suggestions for your new autotext feature...

1. Add a toolbar icon for going into AutoText-edit dialog, because that's a rather frequent action to do.
2. Add a possibility to specify a default value. For example, $Index=i$ or $Index="i"$.
3. Add a $$ option that would be substituted with the type of expression from selection/clipboard/last used or defined variable. I believe that VA has those informations and such feature would be real powerful.

feline
Whole Tomato Software

United Kingdom
17921 Posts

Posted - Sep 15 2005 :  4:42:33 PM  Show Profile
point 1 - press the VA toolbar button "insert code template", use the bottom item on the list.

point 2 - a good idea

case=756

point 3 - have you tried the existing options:
$selected$
$clipboard$

also you can right click when prompted for the values to select recent clipboard items in 1422.

last used or defined variable is an interesting thought, but it could be confusing when mixed with $selected$. also you have problems with things like global variables, the autotext being the first thing in a function, the autotext being outside of a function (autotext comments).

what sort of thing are you picturing?

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

gmit
Whole Tomato Software

Croatia
90 Posts

Posted - Sep 16 2005 :  02:45:50 AM  Show Profile
We misunderstood about points one and three...

1. I was talking about EDIT autotext dialog, not inserting autotext, which I know it exists in toolbar already. Editing autotext is frequent action and it would be nice it could be triggered directly, not going through options dialog.

3. I was talking about TYPES, not names themselves, although, that could be handy also.

For example
for
expands to
for($selection_typeof$::iterator $iterator=it$ = $selection$.begin(); $iterator$ != $selection$.end(); ++$iterator$) {}

then you could only select container's name and you'll get iteration through it. At the point of selection, I'm sure that VA knows types of expressions, so, this probably can be implemented...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17921 Posts

Posted - Sep 17 2005 :  1:55:47 PM  Show Profile
point 1, i am using VS 2003 and VA 1422, the bottom item on the menu produced by the toolbar button "insert code template" is the option to edit autotext. up comes the edit dialog, the languages down one side in a tree, etc. if you are missing this option then that is a bug.


point 3, i am very taken by this, i can definitely see its usefulness in this example. i have an autotext rule for doing just this myself, but it is done slightly differently.

i am just wondering how reliable this would be, i.e. if strange special cases using typedef's, pointers, references, etc, would cause problems.

on occasions i have ended up with something rather like:

stl::vector<Data *> *pVector;

in this case the type would turn into "stl::vector<Data *> *", which is not actually what you want. the real question is are the problem cases worth worrying about? in my own template using code i virtually never have pointers to containers, but it does happen. so this would work as expected 99% of the time.

also can you think of any non STL rules that would use this? off hand i cannot think of any non template autotext rules that would care about the type, but i am sure they exist.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2021 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000