Wiki

Case Status
Log In

Wiki

 
Whole Tomato Software - Home
  • RSS Feed

Make Add Include refrain from giving precedence to shortest path

Specify a path preference in the options dialog for Visual Assist. See Add Include Directive.

Visual Assist build 2283.2 and older

When using Add Include to generate a #include directive for a symbol, Visual Assist assumes you prefer the #include directive with the shortest path to the symbol's header file given the include paths of your project. That shortest path might be relative to the current file, i.e., contain the "..\" characters.

For example, consider the following directory structure:

myProject\package1\implementation\class1.cpp
myProject\package1\class1.h

When editing class1.cpp, Add Include for symbol Class1 declared in class1.h may generate a directive containing a reference relative to class1.cpp:

#include "..\class1.h"

If "myProject\" is an additional include directory, you may prefer Add Include generate references that aren't the shortest:

#include "package1\class1.h"

Visual Assist build 1862 and newer

You can tell Visual Assist to refrain from giving preference to the shortest paths by setting the following in the registry:

HKCU \ Software \ Whole Tomato \ Visual Assist X \ <IDE spec> \ AddIncludePreferShortestRelativePath = 0

Return to 1 to restore the default behavior.

Visual Assist build 2042 and newer

If any of the three "Limit to filename" entries in the "Add Include style" drop-down are selected in the options dialog of Visual Assist, AddIncludePreferShortestRelativePath is ignored.