Author |
Topic |
|
MrDoomMaster
Tomato Guru
251 Posts |
Posted - Sep 07 2007 : 5:56:13 PM
|
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
|
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. |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
|
fspafford
Senior Member
USA
45 Posts |
Posted - Oct 19 2007 : 10:29:29 AM
|
7156 has my vote! |
|
|
AGPX
Senior Member
28 Posts |
Posted - Oct 22 2007 : 02:16:23 AM
|
And my vote |
|
|
markgladding
New Member
Australia
3 Posts |
Posted - Nov 01 2007 : 8:50:32 PM
|
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. |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Nov 18 2013 : 3:33:37 PM
|
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)
|
|
|
|
Topic |
|