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
 Minor bug with "Show local symbols in bold"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

evolution
Ketchup Master

USA
89 Posts

Posted - Dec 16 2020 :  8:39:44 PM  Show Profile  Reply with Quote
I've noticed that sometimes symbols are shown in bold even if they are member properties. Think I've identified two repro cases (verified in a new win32 console app project):

Repro 1:
- When you have a local symbol in a .cpp file, any other symbols with the same name in that .cpp will be colored bold, even if they refer to member properties:



With the local commented out:






Repro 2:
If you declare a class in the .cpp file, then all of its members will be colored bold, even in the class declaration.




And these two issues can combine: if you have a class declaration in .cpp file, its members are colored bold. If you then have any other symbol references in that same .cpp file that have the same name as any of the members of that class, then those references will be colored bold as well, regardless of whether they're members or local.



what could possibly go wrong? :D

feline
Whole Tomato Software

United Kingdom
17095 Posts

Posted - Dec 17 2020 :  08:59:11 AM  Show Profile  Reply with Quote
Unfortunately both of these are known limitations of how VA does local symbols in bold. This is applied very quickly, to keep up with the speed of scrolling, but because it is a fast method, it is also not very accurate. From the bottom of the documentation on this feature:

https://support.wholetomato.com/default.asp?W180

>> Bold is applied without knowledge of context. If foo is defined somewhere in the current file, all occurrences of foo are bold even if they refer to symbols defined elsewhere.

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

evolution
Ketchup Master

USA
89 Posts

Posted - Dec 17 2020 :  12:18:04 PM  Show Profile  Reply with Quote
Hmm, I understand. But if it "randomly" (from user's perspective) applies the wrong coloring, that diminishes its utility as we can't really trust it. Does that mean a similar limitation applies to the "Highlight references" feature?

what could possibly go wrong? :D
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17095 Posts

Posted - Dec 18 2020 :  05:26:52 AM  Show Profile  Reply with Quote
Local variables in bold should be fairly consistent, which helps a bit. It's generally fairly helpful in C++, when you have your definitions and implementations in separate files, but obviously this isn't always the case.

For highlight references, it depends on which version you mean

In VA's Highlighting options, the first setting controls the colours used for highlighting Find References Results, which is a syntax aware find. So this will respect scope and type, and should be highly accurate.

Next you have "Highlight write and read references to symbol under cursor" which again uses VA's Find References understanding of your code, so will be accurate.

Both "Highlight matching words when caret is in comments and strings" and "Highlight results of Quick Find and Find in Files" are different, these are simply doing a "highlight all matching strings" highlight. So there is no context or awareness here. This has to work this way though, since the find is triggered without any context to tell you the scope that should be checked.

Not the simplest answer, but I hope this makes sense and you can see why this is working this way.

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