Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Option to show actual type in declaration bar

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
Blake Posted - Oct 11 2017 : 7:49:13 PM
When you click on a variable, the bar at the top of the screen shows the declaration as a dropdown menu.

If that type is a typedef though, it shows the name of the typedef, and not the underlying type which is sometimes more useful.

A common pattern at my workplace is to have containers typedef'd so that they can be returned by things:
class Foo {
using BarList = FixedVector<Bar>;
const BarList& GetMyList() { return m_myList; }
BarList m_myList;
};

But when clicking on m_myList or something that has been returned from GetMyList, the bar at the top will just say BarList m_myList, when FixedVector<Bar> might be the more useful info.
Currently to find that information I have to go to the variable declaration, then if it was declared auto go to the definition of the thing it was assigned to, then click on the typename in order to see the underlying type.

I would like to be able to tell that declaration line to parse typedefs, perhaps using that dropdown menu to switch between them (So the dropdown menu would have the items "BarList m_myList" and "FixedVector<Bar> m_myList" in it.

Thanks,
Blake
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 16 2017 : 11:12:45 AM
If you are more comfortable using your Mouse for this, you can easily map Goto Related in the VA Options dialog, on the Mouse page.
Blake Posted - Oct 16 2017 : 01:56:44 AM
I was unaware of that feature of Goto Related, it still might be nice to have that list in the dropdown menu (since that menu only has 1 entry anyway and is used for going to it), but alt+shift+G might be good enough for my usual workflow (as long as I make work to remember it).

Thanks,
Blake
accord Posted - Oct 11 2017 : 8:29:15 PM
Are you familiar with Goto Related? (alt+shift+G)

That command is able to recursively parse typedefs and show the types for you. I've attached a screenshot of what I see over m_myList:



You can see the result of this parse in the Types of Symbols submenu, but in this case you can already also see the type in the main menu as Goto Member of <type>

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