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.

6 comments
Comment actions Permalink

What do you mean, "all reachable definitions"? Shouldn't a local variable have one and only one point of definition?

0
Comment actions Permalink

Oops, I mean assignment of course. The "definition" term comes from DFA theory.

0
Comment actions Permalink

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...

0
Comment actions Permalink

Eugene Vigdorchik wrote:

Oops, I mean assignment of course. The "definition" term comes from DFA theory.


Sounds good to me. +1

Sascha

0
Comment actions Permalink

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

0
Comment actions Permalink

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.


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.

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...

As for me I spent yesterday enjoying life in Moscow, and am desperately trying to catch up. And it is sunday evening already here;)

0

Please sign in to leave a comment.