Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Enhanced Syntax Coloring VS2015

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
kumbor Posted - Nov 06 2017 : 09:24:24 AM
If variable (or property) has name like type - color the same



5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Nov 07 2017 : 4:42:37 PM
Unfortunately this is a known problem. VA can get confused when colouring code and the same name is used for two different things, as here. I am not sure why this is not happening in VS2010, but I asked about the collapsed comments since sometimes collapsed code effects VA's colouring. But not in this case it seems.

We are working on improving the colouring, but this is hard, since we have to work around behind the IDE's back when applying colouring:

case=660
kumbor Posted - Nov 07 2017 : 11:30:11 AM
Comments (collapsed or expanded) do not change any color.
In your example - test_general property has green color, but must be silver (like ActualHeight property).
I do not have any installed extensions for change colors.
We did not have such problems in VS2010.
feline Posted - Nov 07 2017 : 09:47:22 AM
I am getting a different result. I am using VS2017, VA 2237 running under Windows 7. In a C# file I have placed the following code:
class test_general
{
}
class GetSetPropertyNameColour
{
    public double ActualHeight { get; }

    public readonly String ActualName;

    //
    // placing a comment that can be collapsed
    // here in front of the accessor pair
    // for the return type of a class
    // with the class name
    public test_general test_general { get; set; }
}

In the VA options, I have set the colour for "Variables" to Silver, so I am closer to what you are showing in your screen shot. With the comment collapsed, I am seeing this:



I have different colouring behaviour to you, but also, the collapsed comment is above the accessor pair, not before it and on the same line, as in your screen shots.

Do you know if you have any extensions installed that might be a factor here?
kumbor Posted - Nov 07 2017 : 02:17:09 AM
Collapsed region - it's comments and IDE collapse automatically.
Problem in the property name - the same as type.



feline Posted - Nov 06 2017 : 3:37:27 PM
If you expand the collapsed code before one of the marked lines, does this have any effect?

Also, how did you get collapsed code at the start of the line like that? Is this a block the IDE offers to collapse automatically, or a block you manually marked out and collapsed?

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