Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VA 2393: Find Symbols coloring bug

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
Uniwares Posted - Dec 22 2020 : 10:11:37 AM
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"?



5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 30 2020 : 09:43:59 AM
That makes sense, and seems to settle the question

case=144262
Uniwares Posted - Dec 29 2020 : 10:38:06 AM
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.
feline Posted - Dec 29 2020 : 10:32:51 AM
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.
Uniwares Posted - Dec 28 2020 : 10:50:18 AM
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.
feline Posted - Dec 28 2020 : 09:58:53 AM
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.

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