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
 go to symbol definition more immediately useful...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mordachai
Tomato Guru

USA
224 Posts

Posted - Feb 12 2014 :  09:13:34 AM  Show Profile  Reply with Quote
void myfun()
{
using MyNamespace::MyClass;

... code ...

MyClass f(arg1, ...);
}

When I use "go to definition of MyClass where f is defined, I am shown the first line in the function, the using declaration.

This not so useful.

I want to actually see what I can do with an "MyClass" in order to instantiate it or manipulate it, and for that, I need to to go to the definition of MyClass, not the using deceleration.

Can we have an option (if not always the implicit default) to go to the real definition?

NOTE: The same thing applies for
typedef
- such as typedef std::vector<int> intvect; <-- I really don't want to see this line - I want to see the definition of vector so I can see what I can do with it - which is 99.9999% of the time why I want to see the definition of a symbol.

Also note: when looking at a variable - it is not unreasonable to jump first to the declaration of that variable, then have to regress to that type's definition. I Just don't want to go from type to alias for type to actual type. That alias thing is not helpful, IMO.

Lastly: It would be great if there were a key-modifier option to jump straight from the instance variable to the real definition of its ultimate type without having to do that stop-at-declaration phase also, such as "Alt+go to definition" or some such.

Edited by - Mordachai on Feb 12 2014 09:53:21 AM

accord
Whole Tomato Software

United Kingdom
3164 Posts

Posted - Feb 20 2014 :  2:34:21 PM  Show Profile  Reply with Quote
I was able to reproduce the problem and I have put in a bugreport for alt+g (Goto icon) jumping to using directive:

case=80352

Regarding typedef: Personally, I'm happy that alt+g jumps to the typedef, since when you're using someone else's code, it is good to know what a symbol is "hiding" from you. intvect is a reasonably good name for this typedef, but I have seen worse, when you can't guess easily. Guessing isn't for programmers anyway :)

But! I like you next idea AND it also kind of solves your typedef problem: a "special" goto could jump to the symbol right away, even with typedefs. We are already considering to implement this idea at some point:

case=9113
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Feb 21 2014 :  08:47:00 AM  Show Profile  Reply with Quote
Great! I hope to see that! :)
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Feb 21 2014 :  10:30:53 AM  Show Profile  Reply with Quote
On a related subject:

vector_type_alias items;
for (auto * pItem : items)
  do_something_with(pItem);


If I try to "go to" pItem - I can see the definition in the "go" drop down at the top of the edit view - but I can't actually go anywhere at all. VA appears to know that pItem is a pointer to a specific type (in my case, a CDynamicMenuItem), but there isn't any way to jump to the code for a CDynamicMenuItem except of course to trick the system by typing that string in directly, and then "going to" that thing.

I should be able to "go to" pItem - and actually get to the underlying type in it's .h file.





Edited by - Mordachai on Feb 21 2014 10:34:49 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3164 Posts

Posted - Feb 21 2014 :  1:18:43 PM  Show Profile  Reply with Quote
Since you are already over the declaration of pItem, alt+g won't take you anywhere. If you move the caret over auto (which is just a "disguise" for a type) alt+g should take you to the correct place.

I created a little code sample to demonstrate this:


As you can see, the caret is over "auto", and it's recognised as TestClass, and alt+g take me there.

However, if I use a typedef for the vector, it won't work anymore. I have put in a bug report for that:

case=80380

quote:
but there isn't any way to jump to the code for a CDynamicMenuItem except of course to trick the system by typing that string in directly


Find symbol in dialog (alt+shift+s) might be easier a little bit until this gets fixed.
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Feb 26 2014 :  10:08:34 AM  Show Profile  Reply with Quote
Thanks for clarifying and finding the additional bug. :)
Go to Top of Page

sean
Whole Tomato Software

USA
2641 Posts

Posted - Apr 07 2014 :  3:31:14 PM  Show Profile  Reply with Quote
case=80380 is fixed in build 2031
Go to Top of Page

sean
Whole Tomato Software

USA
2641 Posts

Posted - May 23 2014 :  10:05:46 PM  Show Profile  Reply with Quote
case=82118 has been opened to enhance the goto "type of symbol" introduced as part of "Goto Related" in build 2036.
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - May 23 2014 :  11:21:09 PM  Show Profile  Reply with Quote
Awesome! can't wait to check it out!
Go to Top of Page

sean
Whole Tomato Software

USA
2641 Posts

Posted - Sep 19 2014 :  12:34:02 AM  Show Profile  Reply with Quote
case=82118 is implemented in build 2047
Go to Top of Page

sean
Whole Tomato Software

USA
2641 Posts

Posted - Nov 07 2014 :  09:51:35 AM  Show Profile  Reply with Quote
case=80352 is fixed in build 2052.
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Nov 07 2014 :  10:54:49 AM  Show Profile  Reply with Quote
Woo-hoo! ;D
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000