psherm85
New Member
7 Posts |
Posted - Mar 21 2009 : 5:19:17 PM
|
I find the Go To Declaration/Definition functionality invaluable for navigating through source code. However, there is a way in which I'd like to see it improved.
Let's say we have a class hierarchy with class A and B, where B inherits A and overrides one of it's methods, f. Now let's say there's another method in A, g, that calls f and let's say in another class C, I have code such as "B b; b.g()". Now, I don't know what g() does and am trying to figure it out, so I press Alt+g with my cursor on it, which takes me to the definition of A::g. There I see f, which I've never seen before either, so I press Alt+g on it. However, in this case it takes me to A::f(), even though what I really want to see is B::f(), since that's what's ultimately called by the code in class C. I'd like to see a feature that conveniently handles this scenario. One way I can think of is to have a list of overridden versions of a function if I click on the function name. But maybe as "task" approach would work too, if it's easy to define my current task as figuring out what "g" does. Regardless, anything that improves my ability to figure out what g does in this case would be much appreciated. |
|