T O P I C R E V I E W |
sl@sh |
Posted - Nov 29 2006 : 04:42:48 AM 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? |
5 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Nov 30 2006 : 11:27:59 AM 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 |
sl@sh |
Posted - Nov 30 2006 : 09:48:16 AM 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. |
feline |
Posted - Nov 30 2006 : 08:39:03 AM 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? |
sl@sh |
Posted - Nov 29 2006 : 10:31:26 AM 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 |
feline |
Posted - Nov 29 2006 : 08:46:47 AM 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? |
|
|