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
 Find reference for headers
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tony.riviere
Ketchup Master

France
57 Posts

Posted - Oct 21 2016 :  06:24:44 AM  Show Profile  Reply with Quote
Hello,

It would be nice to right click on a #include directive and find anywhere the header is included.

Currently it's more or less possible if the name of the header is the same as a type or namespace, when I find references on the type, the #include of the file with same name appears too in the result.

Thanks.

sean
Whole Tomato Software

USA
2817 Posts

Posted - Oct 21 2016 :  11:22:35 AM  Show Profile  Reply with Quote
We don't have Find References for files, but we do have a tool to display include hierarchies:

Press alt+g on the #include directive and then in the main menu, select VAssistX | Tools | List include files

In the bottom tree part of the VA View, look at the "included by" root node.

It doesn't appear in any feature list, but is described on the VA View documentation page: https://docs.wholetomato.com/default.asp?W222

Edited by - sean on Oct 21 2016 11:26:03 AM
Go to Top of Page

Karpen
New Member

4 Posts

Posted - Oct 24 2016 :  06:00:16 AM  Show Profile  Reply with Quote
The VA view is nice, but it would be really nice to be able to stand on a function/class/etc and press a key, and get (in the output window or a popup or tooltip) just the full path of includes that leads this source file to that definition.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 25 2016 :  2:37:43 PM  Show Profile  Reply with Quote
tony.riviere, have you considered doing a regular expression find across all files, using a regular expression like:

#include ["<]foobar.h[">]

if you get a lot of false positives, you can make the regular expression more restrictive, by checking before and after the #include line.

Karpen, assuming the symbol is included, are you aware that after using List include files to get the list of include files, you can right click in this list, and use "Expand Descendants and Copy", and then paste this include tree into a document and simply search it for the desired header file with the definition in it?

This is less direct, but there may be more than one possible route through the include files, depending on how complex your include hierarchy has become.

zen is the art of being at one with the two'ness
Go to Top of Page

Karpen
New Member

4 Posts

Posted - Oct 25 2016 :  7:12:56 PM  Show Profile  Reply with Quote
Multiple ways there doesn't really present a big problem... present the first, and a "list other ways the header is reached" or whatever, if there is more than one. For example. But I didn't know about your solution and while cumbersome it's not relatively quick and good to know if you're in a pinch. Thanks :)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 28 2016 :  12:20:12 PM  Show Profile  Reply with Quote
This idea is a work around, not a direct solution, but hopefully helpful enough to be worth trying now and then.

Is this a problem you often encounter, needing to know the set of include files that lead to the symbol being included? I can see how this would help occasionally, but normally it isn't something I have ever felt a need to work out, I am generally simply happy that the symbol is defined and working.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000