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
 unknown symbols in suggestion
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

foxmuldr
Tomato Guru

USA
314 Posts

Posted - Nov 07 2013 :  07:15:44 AM  Show Profile  Reply with Quote
Suppose I type:

void main(void)
{
    foo = 3;
}


At this point "foo" isn't known. If I then navigate up above and start typing "int f," would it be possible for VAX to suggest "foo" (since it is an unknown symbol in the current context, and therefore may be a likely candidate for nearby use)?

Best regards,
Rick C. Hodgin

Edited by - foxmuldr on Nov 07 2013 07:16:47 AM

jay.carlton
Ketchup Master

USA
65 Posts

Posted - Nov 07 2013 :  11:14:43 AM  Show Profile  Reply with Quote
What if you could just right-click on an undefined or unrecognized symbol and add a forward declaration, #include, or local, global, or class scope definition?
Go to Top of Page

foxmuldr
Tomato Guru

USA
314 Posts

Posted - Nov 07 2013 :  11:59:15 AM  Show Profile  Reply with Quote
That feature exists using right-click on the unrecognized symbol, Refactor (VA X) -> Create From Usage... -> and then the dialog box. But, it doesn't add it where I want, but always at the top, and it also doesn't use my column spacing as I like to align my symbol names vertically (dyslexia, makes it easier to "read" for me).

I want to be somewhere in the code and as I begin typing, VAX suggests the unknown names in scope, so I can even continue using them with the VAX speedups in tow before I define the variable.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Nov 26 2013 :  6:05:02 PM  Show Profile  Reply with Quote
foxmuldr: We are considering something like this at some point.

case=46359

Regarding Create from Usage: What you mean by "column spacing"? You want a tab between the type and the variable name?
quote:
it doesn't add it where I want, but always at the top

What if you could add on the previous line? Would it make any difference regarding the usability of this feature?

jay.carlton: We already have Add Include refactoring: just right click on a symbol and select it from the Refactor (VA) submenu.

http://www.wholetomato.com/products/features/autoUsing.asp#include

We are considering to add refactoring command for Add Forward Declaration, at some point:

case=27045
Go to Top of Page

foxmuldr
Tomato Guru

USA
314 Posts

Posted - Nov 27 2013 :  09:26:40 AM  Show Profile  Reply with Quote
quote:
Originally posted by accordRegarding Create from Usage: What you mean by "column spacing"? You want a tab between the type and the variable name?


I have dyslexia. As a result, I use a lot of vertical column spacing for my software because my brain doesn't read well, but when data is organized into columns and groups, it makes it much easier for me to understand than if I try to read through line-by-line.

In my case, I use this general format (use the widest definition in the block, and align everything a tab or two over from that):
int                  i, count, total;
char*                foo;
struct SWhatever     lsw;


...rather than:

int i, count, total;
char* foo;
struct SWhatever lsw;


The second form is literally almost unreadable to me. I have to really, really concentrate to sift through it. As a result, if I were to receive source code like that I would actually go through first and insert tabs and vertically align the variable names before I would even attempt to understand it. :-)

It's one of the reasons for certain things I use NetBeans. It has automatic syntax formatting. It's very nice to open certain files in because I can generally deal with the standard ANSI C (slightly modified of course). :-)

You can see an example of this here beginning around line 70: https://github.com/RickCHodgin/libsf/blob/master/vvm/core/vvmoss/vo_sup.cpp

It's no biggie. I don't expect VAX to do that for me. But, the ability to include as auto-suggests the recent unknown variable names would be nice -- mainly because in the midst of coding I often code ahead of my variable definitions because as I'm coding I'm thinking about how to "sort it out" (so to speak).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17013 Posts

Posted - Nov 27 2013 :  09:57:06 AM  Show Profile  Reply with Quote
For lining up the declarations, if your IDE has macros (VS2010 and earlier), look in:

IDE Tools menu -> Macros -> Macro Explorer

look for:

Samples -> VSEditor -> LineEmUp

which has the description:

'' LineEmUp aligns all text in the selected lines based on word breaks.
'' Useful for creating vertically aligned variable or method declarations.

I have not used this macro myself, but it sounds like it should help.

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

foxmuldr
Tomato Guru

USA
314 Posts

Posted - Nov 27 2013 :  10:23:16 AM  Show Profile  Reply with Quote
Thank you, feline.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jul 13 2018 :  3:17:33 PM  Show Profile  Reply with Quote
case=27045 is implemented in build 2283.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000