Hello,
For our projects we have very specific include directories that dictate how an #include can reference a file. Specifically you can only reference files relative to the root of the make project. For example, given:
\\src
\\src\\game
\\src\\game\\root.h
\\src\\game\\root.cpp
\\src\\game\\foo
\\src\\game\\foo\\foo.h
\\src\\game\\foo\\foo.cpp
\\src\\game\\bar
\\src\\game\\bar\\bar.h
\\src\\game\\bar\\bar.cpp
Including "foo.h" from root.cpp should look exactly like:
#include "game\\foo\\foo.h"
To make this work I have set the C++ include directory in VS to be only "c:\\src" and turned off inheriting defaults.
However there is something visual assist is assuming or I am missing in configuring our tools that is causing confusion when visual assist generates it's include suggestions. From root.cpp the initial include suggestions are:
Besides all of those being invalid for our purposes the biggest problem is that the 'game' folder is missing, the source code type item in the root of the include directory I specified.
If I type #include "game/" and hit alt-space, then the suggestions actually look correct:
How can I make this the default behavior when suggesting includes? If you want I can send you the sample project I created to replicate this problem.
One last wrinkle... This is really only a problem if we have our solution/project files in a subfolder of src (e.g. /src/vcproj). Moving them to the root (/src) yields nearly ideal results:
Having those extra includes I can write off as just the nature of dealing with C++, but it seems visual assist is dependent on the location of the vcproj file when it comes to assembling a complete suggestion list.