Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Suggest unknown names

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
Mordachai Posted - Jun 23 2010 : 1:17:35 PM
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.
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Jun 24 2010 : 3:05:29 PM
I've put in a feature request for suggesting unknown (underlined) symbols:

case=46359
Mordachai Posted - Jun 23 2010 : 2:31:11 PM
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 :)
accord Posted - Jun 23 2010 : 1:58:31 PM
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.

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