T O P I C R E V I E W |
tony.riviere |
Posted - Oct 21 2016 : 06:24:44 AM 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. |
5 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Oct 28 2016 : 12:20:12 PM 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. |
Karpen |
Posted - Oct 25 2016 : 7:12:56 PM 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 :) |
feline |
Posted - Oct 25 2016 : 2:37:43 PM 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. |
Karpen |
Posted - Oct 24 2016 : 06:00:16 AM 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. |
sean |
Posted - Oct 21 2016 : 11:22:35 AM 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 |
|
|