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
 fields highlighting (C#,C++)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mpovidlov
New Member

3 Posts

Posted - Sep 19 2006 :  01:12:01 AM  Show Profile  Reply with Quote
It would be good if Visual Assist was able to distinguish member variables (fields), highlighting them in a different color. This would help to avoid complex naming conventions. Just looking at the color of the variable would tell if it is a local variable, function parameter or a field. Currently in C# it makes the local variables bold, which is nice, but enums, fields, const static variables are made bold too!

Thanks for this nice software!

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Sep 23 2006 :  1:39:10 PM  Show Profile  Reply with Quote
when you say enum's are made bold do you mean variables of type enum? enum values are coloured according to:

VA Options -> Environment -> Fonts and Colors -> Preprocessor maros

the bold is most likely coming from:

VA Options -> Environment -> Fonts and Colors -> Local symbols in Bold

which, as the name suggests, only applies to local variables.

in C++ it is common practice to start all class member variables "m_" for this very reason. i know the naming policy Microsoft suggests for C# says not to do this, but starting local variables with _ on its own seems valid, and i have seen some C# code do this.

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

mpovidlov
New Member

3 Posts

Posted - Oct 12 2006 :  5:19:32 PM  Show Profile  Reply with Quote
Yes, and this is the point: we at the company were deciding which naming convention to go and people are reluctant to type 'm_' or extra '_' for fields. If VA were able to show member variables in a color different from local variables we could use the same character style for both and distinguish them just by their syntax highlighting.

Edited by - mpovidlov on Oct 12 2006 5:21:24 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 13 2006 :  08:08:36 AM  Show Profile  Reply with Quote
we are unlikely to add more colour groups any time soon. see here for the basic explanation of the problem:

http://www.wholetomato.com/products/features/color.asp

Coloring by Usage section. there are quite a few "edge" cases already where coloring is not perfect. this is one advantage of longer naming conventions, it gives VA more clues as to what is going on.

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

mpovidlov
New Member

3 Posts

Posted - Nov 19 2007 :  5:10:17 PM  Show Profile  Reply with Quote
I still miss the ability to see local stack variables, function parameters inside the function and class fields in different color.
Unfortunately, the "Local symbols in bold" option makes bold almost all the variables.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Nov 20 2007 :  08:20:45 AM  Show Profile  Reply with Quote
I have increased the priority for:

case=2364

which covers this problem. Hopefully this will help.

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

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 26 2007 :  4:11:27 PM  Show Profile  Reply with Quote
Wow, I have thinked also about this.
VAX has "Local symbols in bold" option, but if I see correctly it makes bold variables defined in the same file rather that in local scope... It does not make any sense for me.
I think that function parameters and local variables inside the same function should be bold. To distinguish member variables from function variables makes a lot of sense.

Let see, what if I use cpp to store function implementations and headers to store class declarations:
In cpp files the current functionality is not too bad:
- Function variables are bold, which is good.
- Function parameters are bold, which is good.
- Member variables are NOT bold, which is good.
- C style Global variables in the same file are bold which is bad for me.
But in header files, most of the variables are bold:
- Function variables are bold, which is good.
- Function parameters are bold, which is good.
- Member variables in inline functions are bold, which is bad for me.
- C style extern variables in the same file are bold which is bad for me.

So, If I put my member function into the cpp, member variables are NOT bold. But if I put the same member function into the class in the header file (to be inline), the member variables becomes bold. I really love Visual Assist X, but I think that the working of "Local symbols in bold" is a little extreme

What do you think? Is the current functionality helps to read and understand code faster?

Edited by - accord on Nov 26 2007 4:25:05 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Nov 29 2007 :  4:58:05 PM  Show Profile  Reply with Quote
accord your summary is quite extensive

There is definitely a limitation / problem here. In "basic" situations, where you just have the class declaration in the header file and the implementations in the cpp file the current approach works fairly well. But as you say it is far from perfect.

case=2364 basically wants VA to understand the scope / context of variables, and use this information to actually make things bold or not bold.

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

walter
Starting Member

1 Posts

Posted - Aug 19 2018 :  11:30:21 PM  Show Profile  Reply with Quote
I'm desperate to distinguish member variables in a different color too��

I'm working with UE4, and I can't distinguish member variables from local variables literally, according to the UE4 coding standard. Member variables don't start with "m_" or "_" in UE4, they just look like the same with local variables.

In fact, the MSVS provides me the feature I want. Unfortunately, the VS2015 Intellisense just works too slow.

The "Local symbols in bold" option, mentioned above, is capable of this job in most case. But it looks really stupid.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Aug 20 2018 :  07:15:25 AM  Show Profile  Reply with Quote
Have you tried a different font for the editor? I am quite used to working with local variables in bold, but I do realise that the font you are using has a lot of effect on how sensible / stupid this looks in the editor.

zen is the art of being at one with the two'ness
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