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
 VA 2393: Find Symbols coloring bug
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Dec 22 2020 :  10:11:37 AM  Show Profile  Reply with Quote
Any idea why bool and byte are colored wrong? Makes no sense, they are correct everywhere else. Also the difference in ReadOnlySpan italic/normal between editor and "Find Symbols"?



feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Dec 28 2020 :  09:58:53 AM  Show Profile  Reply with Quote
In the editor, if you place the caret into "byte" the context and definition field will show VA's colouring for byte, which is different to the IDE's colouring of byte, at least in VS2019.

In the Find Symbol dialog you are again seeing VA's colouring of byte.

I am not actually sure what the "correct" colouring of byte is. Using F12 on "byte" in VS2019, I am taken to a struct declaration, and on my white background, the struct name "Byte", yes, a different case to "byte", is pale blue, the colour set for types:

[ComVisible(true)]
public struct Byte : IComparable, IFormattable, IConvertible, IComparable<Byte>, IEquatable<Byte>

while in my .cs source code, "byte" is shown in darker blue, the colour of keywords. So with VA colouring of the text editor turned off, the IDE is telling me that "byte" is the same as "Byte" and that the two symbols should have different colours.

When the IDE and VA are both applying colouring, its not always clear who is colouring a given symbol.

As for italic, stable symbols in italic isn't applied outside of the text editor. On VA's Coloring and Attributes settings page both bold and italic are under the "Text editor font attributes" heading, so this is by design.

Would it make a useful difference if VA applied the italic setting to dialogs and views? I can see how this would help a little bit, but I am not sure if it would be that useful.

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Dec 28 2020 :  10:50:18 AM  Show Profile  Reply with Quote
If i am not mistaken, "byte" is a C# keyword, a type, that is mapped onto the .NET "struct Byte", so I guess it should be colored as a keyword. This seems to be what the IDE does too.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Dec 29 2020 :  10:32:51 AM  Show Profile  Reply with Quote
After a bit of looking, I am still not quite sure how VA should define "byte". This page:

https://docs.microsoft.com/en-us/dotnet/api/system.byte?view=net-5.0

by Microsoft describes the "Byte" structure, by using the type "byte", so considering it to be a type seems reasonable on VA's part, but the IDE does indeed seem to colour it as a keyword.

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Dec 29 2020 :  10:38:06 AM  Show Profile  Reply with Quote
True, MS does use the term interchangeably it seems, after all they use it always in reference to .NET. Though, by feeling "byte" should be colored just like "int" or "short", even though all of them map to corresponding .NET types.

See also: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/ which seems to indicate byte indeed IS a language keyword.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Dec 30 2020 :  09:43:59 AM  Show Profile  Reply with Quote
That makes sense, and seems to settle the question

case=144262

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