|
|
Comments and Discussions
|
|
 |

|
Anybody interested in fixing the bugs?
Like to use it to fix Windows inability to copy files with long names.
But it will build them!!
Cannot make it stay on line, crashes every time.
Vaclav
|
|
|
|

|
case CDSSetting::SETTING_UNDEFINE:
{
for( int i = 0; i<p_roDefines.size(); ++i )
{
if( !p_roDefines[i].compare( a_pszText ) )
{
p_roDefines.erase( &p_roDefines[i] );
break;
}
}
break;
}
You are erasing from the vector you are iterating through - in the case of erase, i would be still be incremented, and you would miss one element behind the deleted one. Is this intended?
(Also, it doesn't compile on VC8, but this can be fixed )
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|

|
Ah yes, I guess I hadn't thought about the case where a setting appeared more than once in the list. Thanks for the information. And please ignore my [mis]use of STL in this program
peterchen wrote: (Also, it doesn't compile on VC8, but this can be fixed )
Unfortunately for me I only have VC6 and VC7. I'm unsure when I will be upgrading to VC8, but I am not surprised it doesn't compile .
Thanks,
Chris Richardson
|
|
|
|

|
With a few fixes it does
(1) two instances where the return value of _tcschr is assigned to TCHAR pointer (must be TCHAR const *)
(2) two for's that break due to the now standard-compliant scope rules
(3) above line (the vector iterators are no longer pointers) but this fixes both problems:
if( !p_roDefines[i].compare( a_pszText ) )
{
p_roDefines.erase( p_roDefines.begin() + i );
break;
}
[edit]just noticed: the loop counter is no problem, since you break immediately after deleting [/edit]
I'm currently poking around in the code base to see if I can improve/add a few things.
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|

|
I appreciate the help, thanks again. I hadn't noticed the break statement either.
If you are interested in the code base, I could talk to Chris M. about making you a co-author so you could upload your changes. Otherwise if you'd like to send them to me I will make sure to attribute the fixes to you, in the article and code.
Like I said before though, the code is pretty rough, and it has been a few years since I've had time to work on it.
Do you mind if I ask what you are thinking about adding? Only out of curiousity; you are of course welcome to do whatever you'd like with the code.
Thanks,
Chris Richardson
|
|
|
|

|
Chris Richardson wrote: If you are interested in the code base, I could talk to Chris M. about making you a co-author so you could upload your changes
I was going to suggest that if I get anything useful done I think that's better than a separate article.
I am thinking of the following:
Finding include paths (how come a.cpp depends from b.h?)
Reverting the tree, i.e. starting at a file and seeing into which files it goes)
Some better control over the include directories, like not scanning PDSK headers (and it looks like VC8 include directories need to be supported, too)
better command line support (so it can be added to Extras/Tools conveniently)
VC6 also has a problem accessing the headers during a build while you are scanning - it looks like you are doing everything right (_tfopen opens with "share deny none" at least wit hthe VC8 runtime, so this might be a VC6 problem)
Other things I am now thinking of: some metrics (how "hot" is a file, lines of code), using a checkbox to enable/disable (comment/uncomment) #include statements, so one can go looking for unused ones, stripping a base folder from paths (if they are local to it) ....
But these are just ideas, I am currently just checking if I can get along with the code base and I don't know how much time and energy I can put into it.
Anyway, it's a great tool!
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|

|
The company I work for has a Visual Studio Addin that shows include graphs inside Visual Studio itself. They update automatically as you type and are very configurable. See my sig for more details. It's commercial but cheap, and with a 14-day free trial
|
|
|
|

|
..and your message board currently isn't working
submitting an e-mail gives the following error message:
Failed sending email :: PHP ::
DEBUG MODE
Line : 234
File : emailer.php
-- modified at 19:45 Saturday 11th November, 2006
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|
|

|
I recently made a fix and added an enhancement to IncludeFinder that I wanted to share.
The fix has to do with the search order of include directories -- "standard" include directories should be searched last, not first, the latest version has this backwards. This only matters if you're including a file with the same name as one of the "standard" include files, in which case the wrong file gets picked up. (In my case, it was IMessage.h).
The enhancement supports the use of environment variables to specify include directories in project files. Visual Studio supports this, but IncludeFinder does not without the attached patch.
Diff output for two affected files is listed following:
FILE COMPARISON
Produced: 7/28/2006 9:52:10 AM
Left base folder: K:\IncludeFinder
Right base folder: K:\IncludeFinderOrig
File: VC6Objects.cpp
116c116
< if( p_pszOpt )
---
> if( *p_pszOpt )
118,133c117,118
< // check for and expand env vars in include settings
< if ( (p_eType == CDSSetting::SETTING_INCLUDE) && ((_tcsncmp(p_pszOpt, "($", 2) == 0) || (_tcsncmp(p_pszOpt, "$(", 2) == 0) ) ) {
< TCHAR p_pszOptEnv[MAX_PATH +1] = "";
< TCHAR p_pszOptEx[MAX_PATH +1] = "";
< _tcsncpy(p_pszOptEnv, p_pszOpt+2, strlen(p_pszOpt) -2);
< TCHAR* p_pszOptEnd = _tcschr(p_pszOptEnv, _T(')'));
< if (p_pszOptEnd) {
< *p_pszOptEnd = _T('\0');
< TCHAR* p_pszOptEnvEx = getenv(p_pszOptEnv);
< _tcscat(p_pszOptEx, p_pszOptEnvEx);
< _tcscat(p_pszOptEx, (p_pszOpt + (p_pszOptEnd - p_pszOptEnv) +3));
< p_roSettings.push_back( CDSSetting( p_eType, p_pszOptEx ) );
< }
< }
< else
< p_roSettings.push_back( CDSSetting( p_eType, p_pszOpt ) );
---
> p_roSettings.push_back( CDSSetting( p_eType, p_pszOpt ) );
320,321c305,306
< a_roIncludes.insert( a_roIncludes.begin(), a_oNewIncludes.begin(), a_oNewIncludes.end() );
< a_roIncludes.insert( a_roIncludes.end(), a_oStdIncludes.begin(), a_oStdIncludes.end() );
---
> a_roIncludes.insert( a_roIncludes.begin(), a_oStdIncludes.begin(), a_oStdIncludes.end() );
> a_roIncludes.insert( a_roIncludes.end(), a_oNewIncludes.begin(), a_oNewIncludes.end() );
FILE COMPARISON
Produced: 7/28/2006 9:53:30 AM
Left base folder: K:\IncludeFinder
Right base folder: K:\IncludeFinderOrig
File: VC7Objects.cpp
192,193c192,193
< a_roIncludes.insert( a_roIncludes.begin(), a_oNewIncludes.begin(), a_oNewIncludes.end() );
< a_roIncludes.insert( a_roIncludes.end(), a_oStdIncludes.begin(), a_oStdIncludes.end() );
---
> a_roIncludes.insert( a_roIncludes.begin(), a_oStdIncludes.begin(), a_oStdIncludes.end() );
> a_roIncludes.insert( a_roIncludes.end(), a_oNewIncludes.begin(), a_oNewIncludes.end() );
|
|
|
|

|
Hi, I'm using 'doxygen' with 'graphiz' to document my projects and it's doing a great job! Would be very nice to have an UML diagram of classes from a Visual C++ project. Could you please tell me if you could do that? Thanks in advance.
|
|
|
|

|
Hi, Thank you for writing this! There've been times in the past when this would have been very useful
One possible enhancement I could suggest would be to allow a workspace to be passed in on the command line. I saw that there is a standard treatment of CCommandLineInfo in the InitInstance but I think it currently treats the input file as a results document. If the workspace can be input in this way then I believe one can add a verb to the Windows file association application and hence be able to right click on a workspace from a File Explorer and launch the IF Hierarchy viewer that way! Just an idea, you probably have left this code behind now!
|
|
|
|

|
If a .cpp file has includes like this:
#include "stdafx.h"
#include "blah1.h"
#include "blah2.h"
then only the first , "stdafx." appears in the treeview ouput.
if i move "stdafx.h" to the end of the list like this:
#include "blah1.h"
#include "blah2.h"
#include "stdafx.h"
then it seems to work fine.
Is this by design, a bug or a bug that only happens to me?
thanks for the program, bye
|
|
|
|

|
Very useful! Thanks!
But people never start one of these without asking for something, do they? So ...
Sometimes you have a conflict with something in a header being included five levels deep. Often there's some preprocessor symbol you could define or undefine that would skip over the problem definition. (Like NOSYSMETRICS etc. in Windows.h, or even a multi-include guard like _WINDOWS_) Tracing the various #ifdef (and #ifndef, #if defined(), #else, etc.) directives can be tedious and error-prone.
Would it be possible to track and report the preprocessor state that was necessary for each file to get included when it was?
(I'd love to look at the sources and add this myself, but I know I won't have time in the forseable future, so I offer the idea here in case somebody else has time.)
-- Scott
|
|
|
|

|
If you were to select the "Directory" tab, and under "File mask" enter "*.*", the screen begins to fill up and about a second later, the entire screen disappears. To prevent this from happening, the user has to uncheck the "Recurse subdirectories" checkbox.
The suggestion is, "If this has to be done in order to prevent the screen from disappearing, why not disable that checkbox if the user were to enter "*.*" in the "File mask" window?"
Another suggestion: Since this is a handy programming tool, why not convert it to be a "plug in" and insert a toolbar icon where the user can simply click on the icon and have the information appear on the screen.
William
Fortes in fide et opere!
|
|
|
|

|
Hi,
Thanks for the feedback. What did you enter for the search directory? And by the screen disappearing, do you mean the tree control? It shouldn't have to limit the recursive search if *.* is used; I need to fix whatever bug you found.
WREY wrote:
Another suggestion: Since this is a handy programming tool, why not convert it to be a "plug in" and insert a toolbar icon where the user can simply click on the icon and have the information appear on the screen.
This is in my "To Do" section of the article. Unfortunately, I don't have the time right now. Hopefully some day soon
Thanks,
Chris Richardson
|
|
|
|

|
i would like to use some of the code in projectzip to provide optional error checking (to prevent missing headers).
however, you don't seem to be supporting the code anymore and there appear to are a number of significant outstanding issues.
i don't want to have to write my own code but i'd prefer to do that than debug someone elses.
any chance you could update the code with the necessary fixes?
rgds
.dan.g.
AbstractSpoon
|
|
|
|

|
Yeah I've gotten a quite bit far behind on this project, as I have been extremely busy with work and family the last year or so. I'd like to fix all the issues people have reported, but for the mean time, if you'll tell me which issues will prevent you from using it, I can let you know if I will have time to fix them.
Thanks,
Chris Richardson
|
|
|
|

|
It is very nice and useful. I wonder whether it is easy to be modified to do function call tree?
|
|
|
|

|
This worked first time, and is most handy. I thought of these things that may enhance it more... 1. To include the icon explanations in the about box, or as a pop-up tip in the list area. You would not need to add any more documentation, it is so easy to use! 2. To pre-fill the file mask with some standard/suggested entries. 3. To offer a feature to list the files by .H first (rather than by source file). Thus the top level tree lists all of the include files.
|
|
|
|

|
Hi,
this is could be more useful if we can specify additional directories to search while loading the workspace. As I have directories of 3rd party sdks specified globally in the compiler include settings and not via project configuration /I, it is unable to find those files and gives a '?'
|
|
|
|

|
Repro
1. Enter any directory in "Directory\Look in"
2. Press "Start"
3. crash
|
|
|
|

|
it seems you are not looking at the project's include paths.
|
|
|
|

|
Any chance this tool can work with Embedded Visual C workspaces? The workspace format is similiar and this tool would be a fantastic addition!
|
|
|
|

|
Hi,
I have downloaded your program and code and gived it a try. I have the impression (based on what I saw from the project on which I tried it...) that you're wrongly searching the path.
Explanation : my project is a clean MFC project, using pre-compiled headers, which are accessed from the (not so extravagant!) stdafx.h include file.
In all cases, the shown stdafx.h is the one from VS98\VC98\MFC\SRC directory and not the one from the project. So I'm thinking (I haven't dug into the source code) that you forget to search FIRST in the project's directory before the include's path.
Beside this, it would be interesting to have some kind of reports (HTML format would be great!):
- Missing searched files
- included filenames sorted by the include count (desc) for a given source-code file (which should be 1)
- included filenames sorted by the include count (desc) for a project (which should be less than the number of source-code file, and better: 1)
Regards,
Eric
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
A tool to view the include file hierarchy of your source code.
| Type | Article |
| Licence | |
| First Posted | 6 Jan 2003 |
| Views | 226,088 |
| Bookmarked | 149 times |
|
|