Some programming languages provide a facility for including other source files. In C/C++ this is achieved using the
#include
preprocessor directive. The
Include Browser
lets you display
Includes
and
Included by
relationships simultaneously.
Using the Include Browser
Start the
Include Browser in one of the following ways:
from the
Windows
menu, select
New View -> Include.
To see further relationships, after selecting a file in the
Include Browser
window, use the right and left pointing-hand tool icons to show files included by the selected file (black connection arrows) and files that include the selected file (red connection arrows).
To determine the number of levels shown for a query, enter a positive integer in the
Levels
text entry box.
Reducing Displayed Information
Holding down the right mouse button on a symbol in the
Include Browser
window brings up a popup menu that allows you to show or hide include information.
Include Browser Window, Right Mouse Button Down
This is useful when the
Include Browser
displays more information than you need, and you'd like to hide all relationships but the particular one you're interested in.
Include Preferences
You'll find preference settings for the
Include Browser
window in the
Include
tab of the
Preferences
dialog. To find this dialog, select one of the following:
In the
Symbol Browser,
from the
File
menu, select
Project Preferences. In the
Include Browser, from the
Edit
menu, select
View Preferences.
Choose the
Include
tab.
Include Tab of the Preferences Dialog
Layout
Display order:
Left to right
displays the include hierarchy from left to right;
Top to Bottom
displays it from top to bottom.
Display layout style:
Select
Tree
to display includes in tree layout; select
ISI
to display them in ISI layout.
Vertical space:
Enter the number of vertical pixels between symbols in the
Include Browser
window.
Horizontal space:
Enter the number of horizontal pixels between symbols in the
Include Browser
window.
Include directories
Locate Headers
Uncheck this box to prevent included files from being parsed.
In the
Include Directories
box you can choose which directories should be searched for include files. Using the set of directories shown in Include Tab of the Preferences Dialog, for example, if
stdio.h
is a reference then Source-Navigator looks first for the file
/usr/include/stdio.h, then for ./stdio.h, and so on down the list. The order of the list is important, because the first file found is the one that will be used by the
Include Browser.