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
 Suggest unknown names
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mordachai
Tomato Guru

USA
224 Posts

Posted - Jun 23 2010 :  1:17:35 PM  Show Profile  Reply with Quote
I often will write some code that is going to need some variable or symbol declarations:

if (key.QueryValue(kszContentType, strContentType))

key is defined, QueryValue() is defined, but kszContentType and/or strContentType are not.

I go up a line or two, and start typing:

CString strCo


At this point, it would be nice if "strContentType" were given as an autocompletion option.

Its not uncommon, at least for me, to write this way. "What do I want to do"... followed by "what do I need to do it".

VA is aware of the symbol "strContentType" because its underlined it as unknown. So I'd just like to have declarations use unknown context to fill in the blank.

I hope that all makes sense. Happy to expand on it or answer questions to make it more clear.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 23 2010 :  1:58:31 PM  Show Profile  Reply with Quote
Are you aware of Create from usage refactoring? Just right click on an undefined symbol, and select

Refactor (VA X) -> Create from usage refactoring

It will create the definition for you without leaving your position in the source.
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Jun 23 2010 :  2:31:11 PM  Show Profile  Reply with Quote
Thanks.

I am aware of that refactoring tool, but I don't find it to be very useful in this type of situation.

When I am in the midst of creating a new method or function, I find 'create from context' to be reasonable. But when I'm just creating a local temporary variable or constant, it's much faster to type out the declaration myself. Plus, the options for where it creates the variable for a local variable are rather coarse... I don't want this variable defined at the outtermost scope for this function or method body, but rather the innermost scope necessary for it to be useful, and no more. You can't really tell VA that, as is. And even if you could, you'd still have to type out the declaration type in the dialog box, which is slower, and not itself context-sensitive as you type it, whereas manually typing out the declaration gives you that suggestion feedback as you go (except for the variable name, which is what this suggestion would add).

To clarify: as I type "CStr" I can jump to the suggested "CString", which doesn't happen in the dialog, and the insertion point in the dialog is wrong (I have to change highlights to get back to the type, which again makes it slower & more cumbersome).

Thanks :)

Edited by - Mordachai on Jun 23 2010 2:33:24 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 24 2010 :  3:05:29 PM  Show Profile  Reply with Quote
I've put in a feature request for suggesting unknown (underlined) symbols:

case=46359
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