Ctrl-Alt-B on local variable references
Hello, All,
Now going Ctrl-Alt-B on local variable reference goes to its definition, so the action behaves exactly as goto definition. What if instead all reachable definitions of the variable were suggested?
Eugene.
Please sign in to leave a comment.
What do you mean, "all reachable definitions"? Shouldn't a local variable have one and only one point of definition?
Oops, I mean assignment of course. The "definition" term comes from DFA theory.
I'm not sure. CommandShiftF7 works great for finding usages of a variable, and it's even already able to distinguish read and write usages.
Having CtrlAltB jump to the variable definition is really nice, and I don't think you need to add any extra behaviour to that.
P.S.: what's with everyone today? It's sunday morning and people are posting/answering like crazy... and I thought I was the only one who did that...
Eugene Vigdorchik wrote:
Sounds good to me. +1
Sascha
It seems like this would be a lot of DFA work for a bit of functionality which would probably confuse people. "All assignments" seems handier than "All reachable assignments".
--Dave Griffith
The point is that in case of complex control flow having a variable highlighted in red is not enough to understand this is a reaching assignment.
As for me I spent yesterday enjoying life in Moscow, and am desperately trying to catch up. And it is sunday evening already here;)