Author |
Topic |
|
darg
Junior Member
Canada
17 Posts |
Posted - Jan 19 2020 : 10:37:33 AM
|
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
19039 Posts |
Posted - Jan 20 2020 : 07:08:05 AM
|
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 |
|
|
darg
Junior Member
Canada
17 Posts |
Posted - Jan 21 2020 : 10:52:32 AM
|
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 |
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - Jan 21 2020 : 11:15:04 AM
|
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 |
|
|
darg
Junior Member
Canada
17 Posts |
Posted - Jan 21 2020 : 12:46:13 PM
|
Time to catch up with modern times then xD thanks for considering it ;) |
|
|
darg
Junior Member
Canada
17 Posts |
Posted - Jan 21 2020 : 4:35:02 PM
|
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 |
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - Jan 22 2020 : 04:46:09 AM
|
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 |
|
|
darg
Junior Member
Canada
17 Posts |
Posted - Jan 23 2020 : 10:05:33 AM
|
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. |
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - Jan 24 2020 : 05:46:14 AM
|
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 |
|
|
darg
Junior Member
Canada
17 Posts |
Posted - Jan 24 2020 : 10:03:48 AM
|
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 |
|
|
darg
Junior Member
Canada
17 Posts |
Posted - Jan 24 2020 : 10:24:24 AM
|
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 |
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - Jan 24 2020 : 2:52:33 PM
|
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 |
|
|
darg
Junior Member
Canada
17 Posts |
Posted - Jan 24 2020 : 5:06:48 PM
|
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 |
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - Jan 25 2020 : 11:18:09 AM
|
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 |
|
|
darg
Junior Member
Canada
17 Posts |
Posted - Jan 25 2020 : 2:00:22 PM
|
- 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 |
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - Jan 27 2020 : 05:34:52 AM
|
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:
[email protected]
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 |
|
|
TetraSomia
New Member
2 Posts |
Posted - Dec 16 2022 : 05:42:01 AM
|
Hello,
Does a solution to the "scroll changes highlight" has been found ? I'm encountering the exact same problem.
Concerning the "It happens one out of two or three mouse wheel scroll units", I'm able to reproduce it at each scroll. All I need to do is hover over another symbol before scrolling, and the last symbol my mouse flew over will be highlighted when I scroll (even if the cursor ends up above background at the time of scrolling).
It's like the selected symbol was based on mouse hovering instead of last click/caret position, and the scrolling just updates the view.
Thanks!
|
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - Dec 16 2022 : 07:27:26 AM
|
I don't recall ever getting to the bottom of this. Which IDE and version of VA are you using? Your description is quite clear, but I cannot reproduce the problem here, using VS2022 and VA 2471.0.
Are you able to reproduce this in all files, or is it a file or solution specific problem? I am wondering if it could be file specific somehow, perhaps related to some odd Unicode characters? This is a total guess, but it would explain why you can see this so easily and it doesn't seem to be a common problem. |
zen is the art of being at one with the two'ness |
|
|
TetraSomia
New Member
2 Posts |
Posted - Dec 16 2022 : 07:52:26 AM
|
Hi,
Thanks for your reactivity 3 years later !
I'm using VS2019 and VA 2022.3 (VA_X.dll file version 10.9.2458.0 built 2022.07.29). Note that I disabled IntelliSense by following these instructions: https://docs.wholetomato.com/default.asp?W133
I can reproduce this in every file, even in an hello-world test solution. An hexdump of the main.cpp doesn't show any BOM or non-ASCII characters.
Edit: while trying things, I noted that clicking back on the caret-symbol after the highlight moved due to scrolling would not update the highlight until next scroll, whereas clicking on another occurrence of the caret-symbol would immediately update the view (no scrolling needed). It's like the VA engine still kept track of the caret after the highlight moved to be able to compare to the new caret position to check if an update of the view is needed. Don't know if this info would help for debug but here it is :) |
Edited by - TetraSomia on Dec 16 2022 08:10:23 AM |
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - Dec 16 2022 : 10:41:53 AM
|
Since you can reproduce this so easily, it suggests there is something in your environment that is a factor. 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:
[email protected]
including this thread ID or URL in the description, so we can match it up. |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - Jan 09 2023 : 12:49:50 PM
|
I have the settings, many thanks for these. Now I know what I am looking for, and doing, I have been able to reproduce this easily and on demand. I mainly needed a better test case set of code, specifically designed for this. I am getting the problem maybe 80% of the time, so easily but not quite all of the time:
case=149002 |
zen is the art of being at one with the two'ness |
|
|
Ura
New Member
Belgium
2 Posts |
Posted - May 22 2024 : 10:02:22 AM
|
I just moved from clion to visual (studio) + visual assist. Clicking on a local variable does highlight the write and read uses correctly. But as soon as you scroll with the mouse then the variable that was underneath the cursor will be highlighted, while the cursor keeps its original position.
Because of this highlighting is somewhat useless!
Still no fix after all those years? |
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - May 22 2024 : 10:46:04 AM
|
Unfortunately still no fix. Mouse scrolling causing the highlighting to change isn't something that always happens, but it is fairly common, based on my tests.
If you want to try a sort of work around, you could disable:
VA Options -> Highlighting -> Highlight write and read references to symbol under cursor
and enable:
VA Options -> Highlighting -> Highlight results of Quick Find and Find in Files
and use the command:
VAssistX.FindSelected
which I have mapped to Alt-K, which triggers the highlighting of an IDE Find on the symbol under the keyboard caret, without showing the find dialog first. This lets you selectively highlight symbols in a more controlled manor. I know its not the same, but it can be helpful. |
zen is the art of being at one with the two'ness |
|
|
darg
Junior Member
Canada
17 Posts |
Posted - May 22 2024 : 10:56:19 AM
|
whoa in this case I just want to express my disappointment to the whole tomato company... It's really discouraging to see that after having taken all the time to report an issue along with a lot of examples and detailed descriptions and follow ups... apparently nothing has been done to address neither this issue nor the original request that started this thread... after more than 4 years (!!!)... quite incredible... and sad :( |
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - May 22 2024 : 1:15:44 PM
|
This is one of many bug reports and feature requests we have received, and continue to receive. Somehow we have to prioritize which order to tackle them in, and some things are clearly more urgent than others. It isn't easy working out the right priorities, but we do our best. |
zen is the art of being at one with the two'ness |
|
|
Ura
New Member
Belgium
2 Posts |
Posted - May 23 2024 : 03:57:51 AM
|
I understand that this is not the only issue. Maybe I can raise the priority by showing how it is 100% reproducible with some very clear steps in a simple basic project:
|
|
|
feline
Whole Tomato Software
United Kingdom
19039 Posts |
Posted - May 23 2024 : 08:31:16 AM
|
In my test case, specifically designed to test this, I was able to reproduce about 80% of the time. So easy and reliable to reproduce, but not quite guaranteed. No question that its a bug though. But we still have the question of how to prioritize everything. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|