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
 Technical Support
 Problem with "Add Include" function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kieling
New Member

2 Posts

Posted - Nov 29 2012 :  08:02:39 AM  Show Profile  Reply with Quote
Hi,

I've been using the "Add Include" function for a while now and it used to work fine. I've set the registry switch
AddIncludePreferShortestRelativePath=0
to get include statements like
#include "package\\class.h"
instead of
#include "..\\class.h".
I'm using both VS2005 and VS2008 and set the switch for both versions.

This function seems to be partially broken since one of the last updates. Apparently randomly I get one of both notations or the path is even completely missing so it will not compile. This is quite annoying.

feline
Whole Tomato Software

United Kingdom
19189 Posts

Posted - Nov 29 2012 :  1:59:03 PM  Show Profile  Reply with Quote
When you get this problem, if you undo this refactoring and then re-run Add Include, do you get the same problem? I am wondering if this is something you can reproduce on demand when you see the problem.

When you have this problem, can you please place the caret into the file name on the problem #include line and look at VA's definition field, normally at the top of the editor. VA should be showing the full path of the file. What is VA showing you?

If you use Alt-g on this file name, what happens?

I am wondering if VA can find these header files, but the IDE cannot.

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

kieling
New Member

2 Posts

Posted - Nov 30 2012 :  02:28:29 AM  Show Profile  Reply with Quote
It seems like the behaviour is reproducible. On the include lines with the path missing nothing is displayed in the VA definition field. But Alt+G works on the type name within the code and opens the correct file. But Alt+G on the include line doesn't work.

Meanwhile I was able to fix this part of the problem. I had switched off the "Parse all files when opening a project" option because we have a huge code base and it takes a while to scan every time I open a solution. I switched it on again and did "clear" and "rebuild" too. Now VA finds the include files again.

Only the first problem with the relative paths persists. It seems that for some projects VA uses relative paths from the current file like
#include "../../xmlhistory/globexport/historyelement.hpp"
and for others relative paths from the %INCLUDE%-path, like
#include "base/z96util/globexport/map.hpp".
But within the same project it has always the same reproducible behavior.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 30 2012 :  7:01:36 PM  Show Profile  Reply with Quote
- Just to double check, can you please see if the registry entry is still the same? I shouldn't change but you never know.
- Are the files you are including part of the same project when the including works and when it doesn't?
- Can you please list here or send in your directory list both from your Include Directories and Additional Include Directories?
Also, please share an example of an absolute path of a file from which you use Add Include (and doesn't work), and the included file's absolute path.
I am thinking about recreating a test project here to see if I can reproduce the problem.

You can send in the paths using the following form if you don't want to expose information publicly:
http://www.wholetomato.com/support/contact.asp

Please include the URL of this topic in the description field so we can match it up.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jan 08 2013 :  4:27:17 PM  Show Profile  Reply with Quote
Being continued via email.
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