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
 Highlighting occurences of symbol under cursor
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Nov 29 2006 :  04:42:48 AM  Show Profile  Reply with Quote
This is a feature I considered very useful when working with Eclipse: whenever I placed the cursor on a particular symbol (usually variables or methods), any occurence of this symbol within the same editor window was highlighted. Find References of course would do the trick as well, but that's at least two clicks away, and most often I'm only interested in the local function code anyway.

Yes, I'm being lazy, but isn't that what VAX is about?

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Nov 29 2006 :  08:46:47 AM  Show Profile  Reply with Quote
You can bind a keyboard shortcut to Find References, so it takes less effort

There is a similar feature in VIM that I am a great fan of myself, but in VIM this is not a true Find References, it is simply "match all identical strings", so "int foo" in 2 different functions will be highlighted in both. This makes it fast to implement, but it is not quite the same feature

I am wary of this, partly due to the performance impact of trying to do this automatically. Find References is basically instant for local variables, so triggering this is nice and fast. But if this was automatic then what happens when you place the caret or cursor on a class, or function?

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

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Nov 29 2006 :  10:31:26 AM  Show Profile  Reply with Quote
Well, as I said, I'm only interested in the highlighting, just so I see where this object is being used. Since this affects only the area of the code that is currently visible in the editor window I doubt it would notably slow down the performance.

This feature (in Eclipse) was very helpful with respect to spotting uses of local variables and finding out their meaning (especially when looking at foreign code). Same goes for code reviewing. Thinking about it I believe highlighting anything else but local variables wouldn't be of that much use in comparison, so a feature just working on local variables would be fine.

Assigning a key shortcut is usually something I try to avoid since the IDE itself already defines lots, and each additional tool does as well. So finding a key combination that doesn't result in a conflict and at the same time is both easy to type and remember gets harder with each new shortcut. And anyway, for the purpose listed above it would still be one more key combination than what Eclipse needs

Edited by - sl@sh on Nov 29 2006 10:32:57 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Nov 30 2006 :  08:39:03 AM  Show Profile  Reply with Quote
I like the idea, I am just not convinced that it is something we should be trying to offer in VA. I can virtually guarantee you that as soon as it appears someone is going to complain they don't like it, and that they want an option to turn it off.

Since you are more mouse centred have you tried triggering Find References via the hovering refactoring icon?

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

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Nov 30 2006 :  09:48:16 AM  Show Profile  Reply with Quote
I use Find References most often via the refactoring icon, yes. However, since this icon almost always takes a little time just to show up it is usually much slower than any key-combination I could think of, so I'm currently considering just to go with your first suggestion.

You're probably right on the point of some people wanting to disable such a feature, unless the symbol highlighting uses an independant and visibly different method of highlighting from Find References. OTOH if you can think of a way to implement it without causing conflicts I doubt anyone will complain.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Nov 30 2006 :  11:27:59 AM  Show Profile  Reply with Quote
If I have a brain wave I may come back to this, but currently the highlighting done by Find References - changing the background colour, has some problems around the edge, so I am not rushing to suggest more highlighting. Changing the background colour is *hard*, so I am happy it works as well as it does

For speed have you considered binding a keyboard shortcut to "VAssistX.RefactorContextMenu" Personally I find this invaluable

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