Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 goto definition for auto std::shared types

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
MrJones4u Posted - Aug 13 2018 : 07:11:20 AM
Hello,

I often find myself wondering why I cannot simply go the the class definition of an object that has been defined by an auto, when using shared_ptrs.

In this case clicking ALT-G on the auto leads to an dead end somewhere in the stl memory include...



thanks,
Michael



7   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 14 2018 : 12:44:22 PM
Sometimes the tooltip is coming from the IDE, sometimes it will be coming from the IDE. So immediately this gets a bit more tricky. Next there is the problem that as soon as the tooltip stays put when you move the mouse to click on it, this will upset people who don't want to have the tooltip "stuck" on the screen in the way.

The Alt-Shift-G menu -> Types of Symbol sub-menu is designed to group the types into the hierarchy that they are using, to make it easier to understand what is holding what. A slightly more complex code sample showing this in action happens with:

std::shared_ptr<std::map<FoodData, testForwardDeclareOffered> > severalTypePtr;
auto testingRelated = severalTypePtr;
MrJones4u Posted - Aug 14 2018 : 08:10:22 AM
Not really, ALT-Shift-G gives me a two level menu with inconsistent, aka must read no blind fly, menu entries which may or may not contain the desired entry - whereas the normal informational pop-up generally clearly displays the desired aspects of the item I am hovering above- It also clearly displays that the code knows how the item is constructed as it is not a code copy but a (re) assembly of the type. As I can actually click into the pop.-up without it twiching it is currently "wasted real estate" :-)

cu,
Michael
feline Posted - Aug 14 2018 : 08:02:37 AM
Isn't this what Alt-Shift-G is giving you? It should, so if it isn't then this is something that needs looking into. Basically this is exactly the sort of situation that Goto Related is designed to handle.
MrJones4u Posted - Aug 14 2018 : 06:59:22 AM
..yes, my thoughts exactly - what with templates with multiple classes - a spiral decent into madness :-)

But that was why I included the picture above - what if we could click on the displayed elements e.g. when I click on the class name I get options for that classname?
feline Posted - Aug 14 2018 : 06:46:19 AM
They are, but where do you draw the line? If we apply a different rule just for the STL containers, then anyone using Boost will still have this problem. What about template classes in general? Sometimes you want the template, and sometimes you want one of the types the template is handling.
MrJones4u Posted - Aug 14 2018 : 03:49:06 AM
Hallo,

thanks for the pointer, I was not actually aware of this option :-).
Yet, while valid, this is still a really long winding way to do such a frequent operation - auto, std::shared and such are sort of here to stay for a while...

cu,
Michael
feline Posted - Aug 13 2018 : 08:57:24 AM
If you try Alt-Shift-G, which should bring up:

VAssistX -> Goto Related

this should offer the type inside the pointer, as well as the pointer type its self. You are asking VA to go to the definition of the type, but the main type is the shared pointer container. As soon as more than one type is involved, you always have this question of "which type do you mean", so Goto Related just tries to list all of the types, so you can decide which one it is you want to go to.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000