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
 Feature Request: Include Dependencies
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MrDoomMaster
Tomato Guru

251 Posts

Posted - Sep 07 2007 :  5:56:13 PM  Show Profile  Reply with Quote
Hi,

I was thinking of a new feature for VAX that would be very useful. The ability to obtain a list of files that include a specific header would be helpful in large projects to help hunt down unnecessary header dependencies. For example:

Say we have a file called "foo.h". Two files, "A.cpp" and "B.h" include this file. Visual Assist would have a sort of "tree view" that shows files "A.cpp" and "B.h" include "foo.h" (Since we've explicitly told VAX that we're interested in seeing which files include "foo.h").

Say that "A.cpp" undergoes various changes that makes the file no longer need to include "foo.h". We carelessly forget to remove the include (I even sometimes forget to remove includes). Now, imagine this happening to 100 other files. Your compile time is significantly slow due to this. Visual Assist, with this new feature, would allow me to "refactor" my include dependencies by quickly finding files that include a certain other header file. This would allow me to more quickly spot files that don't need the header in question. Once you spend some time doing this, your compile time would improve significantly.

I consider this another form of refactoring that improves compilation time. I'm not sure how many other programmers would find this feature useful. All I know is that popularity of such a feature determines its probability of being implemented in a future release. Opinions are greatly appreciated!

Thanks.

cyril
Junior Member

19 Posts

Posted - Sep 08 2007 :  12:27:51 PM  Show Profile  Reply with Quote
I would find this feature extremely useful!
In addition, this could help a lot to figure out circular dependencies (that need to be removed in C++) which cause obscure compile errors.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 10 2007 :  10:10:18 AM  Show Profile  Reply with Quote
We are thinking about something like this:

case=7156

See the discussion here: http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=6384

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

fspafford
Senior Member

USA
45 Posts

Posted - Oct 19 2007 :  10:29:29 AM  Show Profile  Reply with Quote
7156 has my vote!
Go to Top of Page

AGPX
Senior Member

28 Posts

Posted - Oct 22 2007 :  02:16:23 AM  Show Profile  Reply with Quote
And my vote
Go to Top of Page

markgladding
New Member

Australia
3 Posts

Posted - Nov 01 2007 :  8:50:32 PM  Show Profile  Reply with Quote
And my vote.

Note that PCLint already supports this. It will generate a warning when it discovers an unused header file being included in a cpp file.

This was one of the features I liked about PCLint. However I can't remember the last time we ran PCLint over our codebase. It's quite slow and generates a lot of spurious results that need to be manually sifted through.

I would much rather see this featured added to VAX.


Author of Text2Go, text to speech to your iPod.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 18 2013 :  3:33:37 PM  Show Profile  Reply with Quote
case=7156 is implemented in build 2007.
Include file hierarchy viewer is a mode of the HCB in the VA View.

It can be invoked 3 ways:
- VAssistX | Tools | List include files: opens VA View and places focus in HCB
- when HCB update on position change is enabled, placing caret on a #include line updates HCB w/ includes
- when caret is within top 15 lines of editor that otherwise would leave HCB empty, then includes are listed in HCB (can be disabled via HCB context menu)
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