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
 Feature Requests
 Highlight references to symbol in scrollbar
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

darg
New Member

Canada
9 Posts

Posted - Jan 19 2020 :  10:37:33 AM  Show Profile  Reply with Quote
Hi!

I think it would be of great help to all developers this simple feature: the ability to see in the scrollbar (when it is in "source overview" mode) the highlights of all matching read/write references to symbol under the cursor. Just as it works with regular highlighting of CTRL+F searches, but for VAssistX read/write references, using its respective colors.

Example of what I mean:


The FindNext/Previousbycontext feature/shortcut is really useful, but it's kind of annoying to use it when you cannot see on screen where is the next/previous reference, so the cursor jump easily makes you lose track of where you are. Just being able to see in the scrollbar where the next reference is would make our lives happier :)

Would it be possible to have this feature soon?

Daniel

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Jan 20 2020 :  07:08:05 AM  Show Profile  Reply with Quote
We are considering the idea, but don't currently have an estimate for when we will try adding this feature:

case=23536

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

darg
New Member

Canada
9 Posts

Posted - Jan 21 2020 :  10:52:32 AM  Show Profile  Reply with Quote
there are already existing solutions to this as VS extensions, such as "Word Hightlight with Margin", which I find particularly useful (and which you could have a look at)... but you know, It'd be much better to have it smoothly integrated with VAssistX' context read/write references ;)

Edited by - darg on Jan 21 2020 10:53:33 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Jan 21 2020 :  11:15:04 AM  Show Profile  Reply with Quote
To be fair, when this idea first came up, the scroll bar map of the file feature did not exist.

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

darg
New Member

Canada
9 Posts

Posted - Jan 21 2020 :  12:46:13 PM  Show Profile  Reply with Quote
Time to catch up with modern times then xD thanks for considering it ;)
Go to Top of Page

darg
New Member

Canada
9 Posts

Posted - Jan 21 2020 :  4:35:02 PM  Show Profile  Reply with Quote
by the way, talking about the read/write references, I'd like to report a couple issues regarding this feature... is it ok to mention them here? maybe this whole feature needs revision?

The observed issues are:

1. sometimes when scrolling with mouse wheel (not clicking at all) while having an active symbol and its references highlighted, the highlight is lost for the current symbol and then any other symbol which is currently under the mouse cursor is then highlighted, hence highlighting all read/write references to that new symbol (which I'm not interested in... so pretty annoying indeed)

2. not proper read/write distinction (see screenshot below)






(my color for write references is set to dark red, and it works in most cases, but from time to time as you can see, all references are highlighted in blue, which is my color for read references)

I'm on Visual Studio Community 2017, C++, Windows 10 x64.

Thanks a lot for your attention!

Edited by - darg on Jan 21 2020 4:36:18 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Jan 22 2020 :  04:46:09 AM  Show Profile  Reply with Quote
Can you please look and see if you have any of these settings turned On:

VA Options -> Highlighting -> Highlight write and read references to symbol under cursor
VA Options -> Highlighting -> Highlight matching words when caret is in comments and strings
VA Options -> Highlighting -> Highlight results of Quick Find and Find in Files

I just want to make sure that the highlighting is due to VA's Find References last scan, and not something else. If the highlighting is being triggered by something else this could explain what you are seeing, since clearly not all of these results should be highlighted in the same colour.

As for modern times, VC6 was good enough years ago, why isn't it good enough now?

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

darg
New Member

Canada
9 Posts

Posted - Jan 23 2020 :  10:05:33 AM  Show Profile  Reply with Quote
yes I have this two turned on:
VA Options -> Highlighting -> Highlight write and read references to symbol under cursor
VA Options -> Highlighting -> Highlight matching words when caret is in comments and strings

the third one is off.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Jan 24 2020 :  05:46:14 AM  Show Profile  Reply with Quote
Does turning Off:

VA Options -> Highlighting -> Highlight matching words when caret is in comments and strings

have any effect on this?

When you are scrolling with the mouse wheel, is the keyboard caret moving in the text editor? It doesn't move for me when scrolling with the mouse wheel, but I wonder if your system is behaving differently for some reason.

If you place the keyboard caret into one of these instances of "interest" and manually run Find References, do you get the correct highlighting in the editor window?

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

darg
New Member

Canada
9 Posts

Posted - Jan 24 2020 :  10:03:48 AM  Show Profile  Reply with Quote
Hi! nope, turning that off has no other effect that ignoring comments and strings for highlighting...
The keyboard caret doesn't change position at all, it's just the highlighting.
When I manually place the keyboard caret into any instance, it works well in almost any situation, and Find References highlighting also works fine.

The only issue is when mouse scrolling... and the bug happens to me 100% of the time in any C++ file I try it on...

Look, some screenshots here:

1. VAX highlighting setup:


2. Current highlighting with caret on variable "nom"


3. Current highlighting after making a single wheel scroll while having mouse cursor over identifier "std" (note how keyboard caret is in the same place but the highlighted identifier has changed)






Edited by - darg on Jan 24 2020 10:05:21 AM
Go to Top of Page

darg
New Member

Canada
9 Posts

Posted - Jan 24 2020 :  10:24:24 AM  Show Profile  Reply with Quote
Ah but about that "interest" instance that I reported before! while making some research about possible causes for that, it turned out that the symbol is not being recognized by VAssistX... so now (I don't know exactly why) the symbol has no highlights at all, and the reference cannot be found by VAssistX...



Btw! possible reason for this might be that there's another instance of a bool variable called "interest" before this one in the picture in the same file... but in a completely different local scope, so there is no code conflict at all between them...

In that same file, in general, some symbols are being recognized (such as keywords or the variable "netId" declared below in this same snippet) but others are not, for no apparent reason... (such as "interest" or "inventory").....



Edited by - darg on Jan 24 2020 10:31:22 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Jan 24 2020 :  2:52:33 PM  Show Profile  Reply with Quote
First the mouse wheel scrolling problem, the fact that you are seeing this in every file is strange. A first step is to have both of us look at the same code file, to see if the problem is somehow specific to the files in your solution or not. So can you please download and open a copy of this file:

https://github.com/microsoft/terminal/blob/master/dep/jsoncpp/jsoncpp.cpp

randomly selected, simply because it is C++ and large enough to make a good test case. Looking for a test spot, line "1315" is where the function:

bool OurReader::readValue() {

starts, which is a nice long function. Are you able to easily reproduce this problem here when scrolling with the mouse?


Now the symbol not being recognised, at a guess it sounds like VA's parser is somehow confused by or in this file. Can you please look at VA Outline for this file, and see if the outline seems complete and correct?

If you go to the start of the function, are any local variables declared right at the start? If so, does Find References work when run on any of these? I am trying to work out if the problem starts inside this function, or somewhere above this function.


A last question, is the colouring on the VA error message about Find References correct? It looks like you have changed the colour scheme in Windows, not just the IDE, but I would not expect the bottom bar of the message box to be black while the background to the text is white. But without knowing the details of how you have set your Windows colour scheme I don't know if this is right or not.

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

darg
New Member

Canada
9 Posts

Posted - Jan 24 2020 :  5:06:48 PM  Show Profile  Reply with Quote
Thanks a lot for your support feline! Ok then, replying to your questions:

1. I opened the file in VS2017 and the exact same weird behaviour is happening with the mouse wheel:
1a) see highlighted symbol "currentValue"


1b) I made a single scroll down while having my cursor over the "case" keyword (note how the highlight went to that symbol even though the keyboard caret is still on its original position in "currentValue"


2. The VA Outline looks fine, both for my files and for you jsoncpp.cpp


3. Local variables at the start of my functions work fine for finding references... they seem to start not being recognized well inside the function... look, this is a point inside this big function where I detected symbols to start failing:
for (size_t viewIndex(0); viewIndex < count; ++viewIndex)
//viewIndex is not being recognized from its declaration here, and from this point, several other variables inside this "for" are also failing (aforementioned bool "interest" among them)

Also in your function OurReader::readValue most variables are not being recognized by VAssistX... look how in this screenshot "token" is not being recognized:




3. I have windows in Dark mode (Settings > colors > default app mode: Dark), but as I can see VAssistX has all its windows in that old-default-light-gray background color :P anyway I'm more inclined to think that the dark bar at the bottom of the message box comes from the VS color scheme...

Edited by - darg on Jan 24 2020 5:11:26 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Jan 25 2020 :  11:18:09 AM  Show Profile  Reply with Quote
Point 1, it looks like all references to the symbol under the caret are being highlighted. But more than this, the existing highlighting is being removed as well.

VA does not highlight the symbol under the mouse cursor like this, but if the highlighting isn't coming from VA, why is the VA highlighting being replaced by this new highlighting?

If you move the mouse to hover over a different symbol, does the highlighting follow the moving mouse cursor? Or does the highlighting only follow the mouse cursor when using the mouse wheel to scroll the code?

My first thought is that an interaction with another extension / tool is happening. Have you installed any other extensions besides Visual Assist? I am not seeing anything obvious in the VS2019 settings that would explain this behaviour.

In the VA Options dialog, on the Mouse page, do you have any of these settings turned On? Specifically the two options for override Ctrl+Wheel in text editor and Ctrl+Shift+Wheel in text editor? This is the closest I can see to an option that could be a factor here.


For point 3, can you please try making a new, default C++ solution, and then copy and add just this single cpp file into this test solution. Obviously the code won't compile, but I am wondering if this will have any effect on how Find References works inside this function. It is possible the problem is something else inside the same file, and it is possible it is outside the file. This test should tell us which.

For the error message, VA does not yet follow the IDE's theme with dialogs, so appart from the title bar I would expect the error message window to have a single background colour. If you open the IDE options dialog does it show the same colouring pattern?

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

darg
New Member

Canada
9 Posts

Posted - Jan 25 2020 :  2:00:22 PM  Show Profile  Reply with Quote
- I have no other extension in VS which has any kind of interaction with text highlighting or mouse cursor.

- when I disable "Highlight write and read references to symbol under cursor" (and also also keep default VS behaviour off when prompted) all highlighting disappears, and by enabling it again, it comes back so I have no doubt that all the highlighting that I'm seeing is from VA.

- the highlighting only changes when using the mouse wheel to scroll the code (not when just moving the mouse). It happens one out of two or three mouse wheel scroll units (ie if I make one single unit wheel scroll, the highlighting sometimes doesn't change, but by the second or third scroll (up or down, doesn't matter) then the highlighting changes, selecting the symbol that was under the mouse cursor when the wheel spin was performed. And it's VA's highlighting for sure, as I have no other extension or color set to those dark red and blue that I showed in the images above, and as I said, if I disable VA "Highlight write and read references to symbol under cursor" all highlighting is turned off.

I just created a new C++ solution with that single file, and this weird highlighting changes occur exactly the same, it changes when I spin the scroll wheel. More symbols are recognized now though (for example variable "token" below is now recognized and highlighted)...





Edited by - darg on Jan 25 2020 2:00:57 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Jan 27 2020 :  05:34:52 AM  Show Profile  Reply with Quote
What you are seeing does seem to confirm that VA is causing this effect, I am just not sure why. Can you please export your VA and IDE settings and send them to me:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

I can then import them here and see if I can reproduce the problem. Please send me the files via email:

support@wholetomato.com

including this thread ID or URL in the description, so we can match it up.

For your test solution and the single file, are you still finding symbols in this file that are not recognised by VA, that you think should be recognised? Basically any parameters or local variables should be understood by VA. It is starting to sound like the symbol problem is something related to your solution, but I wanted to make sure if that is really what it looks like.

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