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
 collection of coloring errors seen lately
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Apr 14 2020 :  11:50:39 AM  Show Profile  Reply with Quote
Please tell me if anything seen here is expected, C# .NET core projects and C# MSTest core projects in one solution. VS2019 16.5.2 / VA 10.9.2366.0

Attribute [TestClass]


Different colors between the three privates (not mentioning Needle which is a class)


Correct coloring in the comment but not the parameter


once more the privates


Attributes [Column] and [NotMapped]


Attribute [Table]


Now, why is Needle colored correctly as class/function in one snippet but not in the other, same file.



Now you tell me...


accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 14 2020 :  3:55:56 PM  Show Profile  Reply with Quote
What is the declaration of TestClass? Is it a class? I tried to reproduce that problem in a C# Forms Application but wasn't able to, the class is colored as a class, not as a function.

Not sure if it makes any difference regarding coloring, but what type of C# project are you using?

Do you have a test project to share with us where we can see these kind of problems occuring? Coloring may be depend on surrounding code, and might be hard or impossible to reproduce unexpected behaviour without them.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Apr 14 2020 :  4:00:48 PM  Show Profile  Reply with Quote
You�ll have to "using Microsoft.VisualStudio.TestTools.UnitTesting;" which will be added automatically when you create a MSTest Core Project. TestClass is an attribute from this assembly.

I�ll see if I can get some test project over to you.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 14 2020 :  6:50:19 PM  Show Profile  Reply with Quote
Thank you for the additional information. I've created a new MSTest Core Project, and used a [TestClass()] attribute there, but I still see class color, not method color with VA syntax coloring enabled. I'm wondering what might be a factor here.

I also tried namespace with dots and #region from your screenshot, hoping it's the missing piece, but I still see the correct color for the attribute.

Edited by - accord on Apr 14 2020 6:53:16 PM
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Apr 15 2020 :  04:25:37 AM  Show Profile  Reply with Quote
Sent you a project and current settings by mail.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 15 2020 :  9:39:52 PM  Show Profile  Reply with Quote
Thank you, I got the files and I'm looking into the problems.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 17 2020 :  9:26:04 PM  Show Profile  Reply with Quote
The 1st and 5th screenshot is caused by referring to attributes. I have put in a bug report for them:

case=142134

The 2nd and 3rd screenshot is caused by overlapping symbol names. I have added a comment about this to

case=660

4th screenshot is an IDE feature and stays even when I fully disable Visual Assist. Hover over the faded out words to see more in the tooltip and to disable it.

6th screenshot - cannot repro with your test project but should be covered by case 142134.

7th screenshot is not a bug - why is it working? It seem to be in a different file (NeedleSlotTest.cs) vs the second screetshot (NeedleSlot.cs)

8th screenshot: I cannot repro "System" coloring. Is it still brown if you temporarily disable Visual Assist by VAssistX -> Enable/Disable Visual Assist?
The fade-out is a VS feature. (Trying to signal that the using directive is unnecessary)
The coloring of "AccessPermissions" seems to be correct as a class.

Edited by - accord on Apr 17 2020 9:31:47 PM
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Apr 18 2020 :  05:25:25 AM  Show Profile  Reply with Quote

With VA disabled:


The fade out and the accesspermissions are correct.

So the different shades of privates seem to have todo with the auto-property suggestions of IntelliSense.

As for the 7th, they are both in the same file, NeedleSlotTest.cs
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 20 2020 :  12:59:44 PM  Show Profile  Reply with Quote
Strangely, when I opened your solution today, "System" was colored brown. What I've found is an AlertClass enum in AlertClass.cs, which has an enum item System. I've added a comment about this with repro steps to case=660.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 20 2020 :  1:17:55 PM  Show Profile  Reply with Quote
Regarding the 7th: Needle coloring seems to be inconsistent. In NeedleSlot.cs, there is a property definition:

public class NeedleSlot : IEquatable<NeedleSlot>
{
[...]
	public Needle Needle
	{
		get
		{
			return this._needle;
		}
		set
		{
			this._needle = value;
		}
	}
[...]


a.Needle refers to this member:

NeedleSlot a = new NeedleSlot("Slot1", 1);
[...]
Assert.AreEqual(a.Needle, n);


So in this context, Needle is a property, colored as a variable, not a class, while the other occurrences are referring to the class, not the variable. When I disable VA, I see that Intellisense is doing the same: coloring the two differently.

Hope this makes sense.

Edited by - accord on Apr 20 2020 1:18:42 PM
Go to Top of Page

mark.ai
New Member

United Kingdom
6 Posts

Posted - Apr 21 2020 :  08:40:29 AM  Show Profile  Reply with Quote
Some other problems with custom colors in tooltips that I'm seeing with a UE4 C++ project:

Comments are always a standard green instead of custom color
Parent class functions use the default VA colors instead of custom


When debugging, then all colors in tooltips use the default VA colors instead of the custom colors I've set


Go to Top of Page

mark.ai
New Member

United Kingdom
6 Posts

Posted - Apr 21 2020 :  09:29:17 AM  Show Profile  Reply with Quote
Hovering over a return statement, then tooltip colors are wrong:


Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Apr 21 2020 :  11:54:12 AM  Show Profile  Reply with Quote
Thank you for reporting the tooltip colour problems. Unfortunately this is a known problem:

case=65009

It is due to the way the IDE works, it is making it difficult for us to apply the correct, currently set, colours to the tooltips, so instead you end up with the default colours.

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

mark.ai
New Member

United Kingdom
6 Posts

Posted - Apr 21 2020 :  1:22:32 PM  Show Profile  Reply with Quote
Thanks feline - after searching for that case number I can see there were previous reports! At least it is good to know you would fix it if it was possible. And I can switch to the IDE colors just for tooltips if I need to - although I notice those display a lot of the text in pure white in the problem cases, so guessing that's related to the problem too.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Apr 22 2020 :  05:34:48 AM  Show Profile  Reply with Quote
When you are getting a lot of pure white, is tooltip colouring enabled? Is the pure white code, comment, or both?

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

mark.ai
New Member

United Kingdom
6 Posts

Posted - Apr 22 2020 :  07:54:04 AM  Show Profile  Reply with Quote
If I turn off VA coloring just for tooltips, or turn off VA enhanced syntax coloring completely then I see these tooltip colors (same 3 examples as above) (note I roughly have the IDE colors set to match my VA colors from when I was testing differences)







Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Apr 22 2020 :  11:09:04 AM  Show Profile  Reply with Quote
These three screen shots make some sense, assuming VA syntax colouring of tooltips is turned off.

The first screen shot, this looks like the standard IDE colouring of the tooltip, with VA having added a comment it has found to the bottom of the tooltip. Since VA is not being asked to colour the tooltip, we are not adding any colouring.

The third tooltip comes entirely from VA, and again, you have asked VA for no colouring. Otherwise this tooltip should be coloured.

But the middle tooltip is a bit confusing. If you disable VA via the menu entry:

VAssistX -> Enable/Disable Visual Assist X

do you still get a tooltip when hovering the mouse here, and does it get any colour? I am wondering if for some reason the IDE is not showing a tooltip here, leaving it entirely to VA, which is then obeying the no colour setting.

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

mark.ai
New Member

United Kingdom
6 Posts

Posted - Apr 22 2020 :  12:27:59 PM  Show Profile  Reply with Quote
Yes, you are correct on all counts :) If I disable VA, then the middle tooltip disappears completely!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Apr 23 2020 :  08:35:37 AM  Show Profile  Reply with Quote
This is good. Does the tooltip colouring you are seeing now make sense, and seem reasonable? I think I have covered all of the points you have raised so far.

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

mark.ai
New Member

United Kingdom
6 Posts

Posted - Apr 23 2020 :  09:24:35 AM  Show Profile  Reply with Quote
Yes, it all makes sense - thanks for your time spent going through it :) I will just hope that one day in the future Visual Studio will be improved to allow the same application of colours in tooltips (by extensions) as it allows within the text editor itself!
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