Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 fields highlighting (C#,C++)

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
mpovidlov Posted - Sep 19 2006 : 01:12:01 AM
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!
9   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 20 2018 : 07:15:25 AM
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.
walter Posted - Aug 19 2018 : 11:30:21 PM
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.
feline Posted - Nov 29 2007 : 4:58:05 PM
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.
accord Posted - Nov 26 2007 : 4:11:27 PM
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?
feline Posted - Nov 20 2007 : 08:20:45 AM
I have increased the priority for:

case=2364

which covers this problem. Hopefully this will help.
mpovidlov Posted - Nov 19 2007 : 5:10:17 PM
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.
feline Posted - Oct 13 2006 : 08:08:36 AM
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.
mpovidlov Posted - Oct 12 2006 : 5:19:32 PM
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.
feline Posted - Sep 23 2006 : 1:39:10 PM
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.

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