Author |
Topic |
whizmike
Starting Member
1 Posts |
Posted - Jun 16 2007 : 06:57:07 AM
|
In the Eclipse IDE, when you click the cursor on symbol such as a variable, function name etc, it highlights all the other uses of that symbol within the current context. Would it be possible to add this to VA? |
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Jun 16 2007 : 2:09:34 PM
|
We are considering adding this feature:
case=5141 |
zen is the art of being at one with the two'ness |
|
|
Myron
New Member
6 Posts |
Posted - Jul 27 2007 : 03:32:27 AM
|
This feature is very important to us.
Software like SourceInsight has the ability to use it, and it did help a lot!
Very glad to see that VA is going to support it. Bravo! |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
|
Myron
New Member
6 Posts |
Posted - Dec 17 2007 : 9:57:16 PM
|
Just curios, is this function ready in the newest release: "10th Anniversary Edition -?V Version 10.4" ? |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 18 2007 : 1:16:50 PM
|
No. It is still on our list of things to look at. |
zen is the art of being at one with the two'ness |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Dec 24 2007 : 12:10:24 AM
|
Not the same, but maybe useful:
I am using this IDE macro to achieve this:
Sub HighlightByContext()
DTE.ExecuteCommand("VAssistX.FindReferencesinFile")
DTE.ExecuteCommand("Window.ActivateDocumentWindow")
DTE.ExecuteCommand("VisualAssistX.RefResultsToggleHighlight")
End Sub
I have assigned it to a keyboard shortcut, so I can access very easily on demand. If you run first time after visual studio start it will take seconds, but after that it will work quickly. The last line is only need if you haven't checked "Highlight References" in Refactoring section of Visual Assist X Options Dialog.
|
Edited by - accord on Dec 24 2007 09:54:25 AM |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 24 2007 : 11:00:30 AM
|
Interesting. Thank you for posting this
Personally I just use Alt-X, D, and that has become a habit that tends to happen without much thought these days, but it does leave me needing to press Escape. |
zen is the art of being at one with the two'ness |
|
|
macpl
New Member
6 Posts |
Posted - Dec 30 2007 : 4:28:17 PM
|
I was looking at Visual Assist and I really miss this feature as well (it's called "mark occurrences" in Eclipse by the way).
It would be really nice if you could mark the occurrences on the side of the scrollbar as well (in addition to the code editor itself), for a clear view of the whole file (again, just like in Eclipse).
After 2 years of working exclusively in Eclipse I really miss it in VS, I'd purchase Visual Assist for this feature alone. |
Edited by - macpl on Dec 30 2007 4:30:02 PM |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Jan 03 2008 : 08:36:03 AM
|
We are considering doing something like this:
case=6592
For now have you tried turning on Highlight References when you run Find References? |
zen is the art of being at one with the two'ness |
|
|
macpl
New Member
6 Posts |
Posted - Feb 19 2008 : 6:46:40 PM
|
Any word on this? Really looking forward to this feature... |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Feb 20 2008 : 08:07:56 AM
|
No progress on this yet. It is still in our list of things to consider doing. |
zen is the art of being at one with the two'ness |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Dec 01 2008 : 07:22:55 AM
|
case=5141 is implemented in build 1707 |
|
|
Myron
New Member
6 Posts |
Posted - Dec 01 2008 : 07:34:12 AM
|
Does build 1707 support VC6++? |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 01 2008 : 09:09:57 AM
|
Yes, I have VA 1709 running in VC6 right now on a test machine. |
zen is the art of being at one with the two'ness |
|
|
holedigger
Whole Tomato Software
145 Posts |
Posted - Dec 01 2008 : 11:18:20 AM
|
The highlighting feature is not supported in VC6. |
Whole Tomato Software |
|
|
Myron
New Member
6 Posts |
Posted - Dec 01 2008 : 8:04:44 PM
|
That's too bad. I was thinking of buying the new suite for this feature... There are still many people working on VC6 in the industry. I think they are all eager for this feature on Whole Tomato. |
|
|
macpl
New Member
6 Posts |
Posted - Dec 29 2008 : 4:26:23 PM
|
Still no mark occurences functionality similar to that of Eclipse as far as I can tell (build 1711).
There is this in build history for build 1707: Highlight find results (case=5141).
But this is not the same thing as requested in this topic - we would like automatic find references of a symbol in file when the cursor moves over that symbol.
Please add it, it has to be trivial to implement at this point. Thanks.
It's the same thing as in this topic: http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=6254&whichpage=1
Go ahead and install Eclipse if you have to to get a good idea of what we are talking about. It would be of great help to have the same functionality available in VS.
It should probably work without the Find References window (and other windows) refresh, as the blinking windows would be quite annoying. |
Edited by - macpl on Dec 29 2008 4:34:09 PM |
|
|
Myron
New Member
6 Posts |
Posted - Dec 29 2008 : 8:09:21 PM
|
Or reference SourceInsight, and press F8 key when you wanna select any (key-)word. |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Jan 02 2009 : 09:59:33 AM
|
I had a look at installing Eclipse a while ago, and got as far as needing to install Java, and gave up. It was to much work for not enough return at that point in time.
What I do not understand is how you use this highlighting. Surely it disappears / changes as soon as you move the caret to actually edit some code?
Myron if you want a keyboard shortcut then you can do this with VA, simply bind a keyboard shortcut to VAssistX.FindSelected, Alt+K works well for me. This causes VA to highlight the symbol the caret is in without moving the caret.
|
zen is the art of being at one with the two'ness |
|
|
macpl
New Member
6 Posts |
Posted - Jan 02 2009 : 11:25:42 AM
|
quote: Originally posted by feline
I had a look at installing Eclipse a while ago, and got as far as needing to install Java, and gave up. It was to much work for not enough return at that point in time.
If the chance to acquire new customers isn't worth the effort of installing the Java runtime (which takes like 2 minutes to do), then I should probably just give up asking for this feature... But let's give it another try.
quote: Originally posted by feline What I do not understand is how you use this highlighting. Surely it disappears / changes as soon as you move the caret to actually edit some code?
It's extremely useful when browsing existing code, for example when trying to understand how it works. There is no reason that keyboard and extra key presses should be necessary to do that efficiently.
I should probably also mention that the symbol locations are displayed next to the scroll bar as well, in addition to the editor window. But that could be part 2 of the feature's implementation (once it works in the editor window).
Anyway, just see how it all works in Eclipse... It's such a great IDE, I'd still be using it if I didn't have to work in .net...
Some images to help you visualize it...
Mark occurrences (notice symbol locations displayed on the sidebar as well): http://wiki.javajigi.net/download/attachments/2247/14_markOccurrences.jpg
The sidebar can also be used to display compilation errors etc. (optional): http://math.hws.edu/eck/cs225/f07/lab1/eclipse_window.png |
Edited by - macpl on Jan 02 2009 11:33:29 AM |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Jan 05 2009 : 09:17:15 AM
|
quote: Originally posted by macpl
If the chance to acquire new customers isn't worth the effort of installing the Java runtime (which takes like 2 minutes to do), then I should probably just give up asking for this feature... But let's give it another try.
This is a fair comment, but I assume you do not try to install "random" tools to help with technical support on a regular basis. I do, and this is never a 2 minute job.
So I did a web search for Eclipse, which was a 5 minute download, plus 1 minute to unpack the zip file.
Run what looks like the right exe file, I am told I need Java. I cannot find any direct download links from the Eclipse website, but I do get a nice page full of long names of potential packages.
So a bit more web searching gets me to a Sun page with 13 different download buttons for Java development kits. I don't want to read all this to understand what to download.
After a couple minutes hunting around it turns out the main download Java button requires JavaScript to work. Why do they do that???
Oh and its a web installer, so I need to enable a network connection for my test machine before I can install it.
At least it installed fairly quickly, a nice surprise.
Eclipse now loads. File menu -> open file, select a reasonable sized cpp file... and VS2005 is loaded!!! No file is loaded in the IDE though, and Eclipse has done nothing useful.
This is after downloading the C++ version of Eclipse, which I would reasonably expect to be able to open C++ code files.
At this point, having been at this for a while now, I am loosing interest.
This goes to the heart of "please install tool X", if I know nothing about tool X it can be a fair bit of work to actually do anything useful with it.
The first screen shot, the marks next to the scroll bar, this goes to the very heart of my confusion. How can you scroll through the file to see these highlighted references? As soon as you start scrolling the caret is likely to move, and all this highlighting will disappear.
Perhaps I just do not understand how this works?
The second screen shot, a list of compilation errors, the Microsoft IDE's already do this in the error / task list window. |
zen is the art of being at one with the two'ness |
|
|
macpl
New Member
6 Posts |
Posted - Jan 05 2009 : 2:37:21 PM
|
Scrolling doesn't change the caret position, does it? And the highlighted symbol doesn't change as long as you don't select a new symbol (put the caret over a new symbol). So you can move the caret around as long as it doesn't select another symbol - this of course changes the highlighting.
As for the compilation errors list, as I said, it could be optional and implemented at a later time. It just fits with the idea of integrating as much useful information into the editor window as it's sensibly possible. Eclipse has a separate errors window as well obviously, but that doesn't mean the above feature isn't useful.
So please consider implementing this, it can't be too time consuming since the highlighting logic is already in place, it's just a matter of creating another way to use it (at least the editor window highlighting itself, sans sidebar symbol position display etc., but that is very useful as well of course and it would be great to have). |
Edited by - macpl on Jan 05 2009 2:44:36 PM |
|
|
holedigger
Whole Tomato Software
145 Posts |
Posted - Jan 05 2009 : 4:01:12 PM
|
We have been looking into this, and making progress, however there are plenty of pesky implementation details that do not make this "trivial". case=21926
Using the scrollbar does not change caret position, but PageUp/Down and Ctrl+Up/Down do (which I use mostly). So, imho, I find this feature distracting, but I understand the appeal. One thing from Eclipse that bothers me is the lag between when you click on a symbol and when the highlighting actually happens, it just adds to my distraction. Does the lag bother you, or do you prefer it so that you don't get spurious highlighting as you scroll around?
|
Whole Tomato Software |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Jan 27 2009 : 11:01:37 PM
|
case=21926 is implemented in build 1715
Enable in VA Options|Advanced|Refactoring|Automatically highlight references to symbol under cursor. |
Whole Tomato Software, Inc. |
|
|
briancollins
Senior Member
United Kingdom
39 Posts |
Posted - Jan 28 2009 : 08:21:01 AM
|
quote: Originally posted by supportEnable in VA Options|Advanced|Refactoring|Automatically highlight references to symbol under cursor.
With the caveat that I haven't actually downloaded and installed 1715 , are you sure the option text should be "Automatically highlight references to symbol under cursor". The discussion has implied that it highlights references to the symbol containing the caret. While people often use the two words "cursor" and "caret" interchangeably, the use of tooltips and HCB mean that both are used for different purposes in VA.
Is it worth clarifying? Or am I being to sensitive?
Brian |
|
|
RoSe
Junior Member
15 Posts |
Posted - Jan 28 2009 : 11:37:54 AM
|
I just installed 1715 ... well, great work guys. The behavior is as expected and the performance is good, even if I can see the coloring of the occurences on the displayed section of the page while scrolling through the files, but my laptop is pretty old ...
I noticed one small bug (visual basic): I have an inherited class with members that are defined in the superclass. When I select an occurence of that member in the inherited class it isn't marked (neither are the other occurences in the actual file).
Another question, that I'd like to discuss, is if marking keywords like public, function, if, while ... is usefull or not. E.g. in VB it is nice to mark the Sub and can see the mathing end of a function ... but maybe this is another feature and should be handled in another way. |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Jan 28 2009 : 1:52:20 PM
|
quote: Originally posted by briancollins With the caveat that I haven't actually downloaded and installed 1715 , are you sure the option text should be "Automatically highlight references to symbol under cursor". The discussion has implied that it highlights references to the symbol containing the caret. While people often use the two words "cursor" and "caret" interchangeably, the use of tooltips and HCB mean that both are used for different purposes in VA.
Is it worth clarifying? Or am I being to sensitive?
Brian
Not too sensitive - this was a point of contention for us in trying to figure out the label for the option. C# in vs2010 has this feature and we decided to use the same label they used so as not to cause confusion even though their label causes us confusion. Perhaps we should append "[sic]" to our label?
Why did the C# team use cursor instead of caret? Maybe C# developers don't make the distinction between mouse cursor and text caret that native developers are all too familiar with?
|
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Jan 28 2009 : 1:59:02 PM
|
quote: Originally posted by RoSe I noticed one small bug (visual basic): I have an inherited class with members that are defined in the superclass. When I select an occurence of that member in the inherited class it isn't marked (neither are the other occurences in the actual file).
If you could post a simple test case, that would be much appreciated.
|
|
|
macpl
New Member
6 Posts |
Posted - Jan 28 2009 : 3:11:09 PM
|
Excellent, thanks for adding the feature.
Now it's time to have my boss buy me VA.
Please also consider displaying the occurences' locations on the side bar as shown below (the location labels could also display information about the corresponding symbol like its name etc. on mouse-over, and they could be clickable to move to the symbol's location in the file): http://wiki.javajigi.net/download/attachments/2247/14_markOccurrences.jpg
The labels/locations help to get a quick glimpse of the whole file and they are a great addition to the auto mark occurences feature.
And of course try to fix the bug found by RoSe.
Thanks again for adding the feature, good work. |
Edited by - macpl on Jan 28 2009 3:16:47 PM |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Feb 02 2009 : 6:03:09 PM
|
I have put in a feature request for some indicator bar like this to show the highlighted marks:
case=23536 |
zen is the art of being at one with the two'ness |
|
|
Topic |
|