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
 Strange syntax coloring in C#
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
1986 Posts

Posted - Nov 21 2019 :  05:29:16 AM  Show Profile  Reply with Quote
This does just not seem right. Adding a "this." will correctly color the member, removing "this." does not.

Using VA 10.9.2341.2 (trial)

Am I missing something?



Uniwares
Tomato Guru

Portugal
1986 Posts

Posted - Nov 21 2019 :  05:33:47 AM  Show Profile  Reply with Quote
Ah, reparsing doesnt help
Go to Top of Page

Uniwares
Tomato Guru

Portugal
1986 Posts

Posted - Nov 21 2019 :  05:45:16 AM  Show Profile  Reply with Quote
Ok, now it gets funny:

VA does color these items correctly, until... i scroll the window, either with the mouse or by clicking on the scroll bar. Then it get "uncolored". When I switch window and back (Alt-Tab), it gets colored correctly again.
Seems there is some interference here. Not sure what and why, no other syntax coloring extension installed, so its a fight between VS and VA.



and



Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Nov 21 2019 :  12:46:41 PM  Show Profile  Reply with Quote
The clue is that "Text" is sometimes showing up in italics. This is a common enough symbol name that VA's coloring is getting confused about the meaning of this. Since the colouring code has to run quickly we have to make some educated guesses sometimes about how to colour things, so seeing the same name used for two different symbols of different types can confuse our colouring code.

This is something we are aware of, and do try to minimise, but it's not something that we currently have a full fix for.

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

Uniwares
Tomato Guru

Portugal
1986 Posts

Posted - Nov 21 2019 :  12:50:56 PM  Show Profile  Reply with Quote
I see, so thats only with "common enough" symbols? I keep an eye on it, though it doesnt explain the color/uncolor/recolor effect.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
1986 Posts

Posted - Nov 21 2019 :  1:10:59 PM  Show Profile  Reply with Quote
Well, I just changed the name to Text1, with the effect that it doesnt get any color anymore. Just plain white. Cleared cache, rebuilt database, etc.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Nov 21 2019 :  2:56:33 PM  Show Profile  Reply with Quote
Apologies, I really did not explain that very well. From the "Color by Usage" section here:

https://docs.wholetomato.com/default.asp?W179

>> Coloring is efficient, particularly during scrolling, but unusual sequences of symbols and characters, and commonly used symbol names of differing types, might cause a symbol to be drawn in the wrong color. For example, if MyVar is a method in one place and int in another, MyVar is colored like a method regardless of the instance to which it refers.

This seems to be a factor some of the time, but I don't think it explains all of the colour problems you are reporting.

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:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000