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
 Technical Support
 Enhanced Syntax Coloring VS2015
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kumbor
New Member

3 Posts

Posted - Nov 06 2017 :  09:24:24 AM  Show Profile  Reply with Quote
If variable (or property) has name like type - color the same



feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Nov 06 2017 :  3:37:27 PM  Show Profile  Reply with Quote
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?

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

kumbor
New Member

3 Posts

Posted - Nov 07 2017 :  02:17:09 AM  Show Profile  Reply with Quote
Collapsed region - it's comments and IDE collapse automatically.
Problem in the property name - the same as type.



Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Nov 07 2017 :  09:47:22 AM  Show Profile  Reply with Quote
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?

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

kumbor
New Member

3 Posts

Posted - Nov 07 2017 :  11:30:11 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Nov 07 2017 :  4:42:37 PM  Show Profile  Reply with Quote
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

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