Browsing Multiple Directories

Related Topics:

Generating a Browser Database Source Browsing Databases

For all projects except a User Makefile project: When you created or edited your project (see Creating a New Project and Editing a Project), if you asked the Sun WorkShopTM programming environment to generate source browsing information during compilation, Sun WorkShop merges all the browsing directories for you. Then when you search in Pattern Search Mode or Source Browsing Mode, all the source directories in your project are automatically searched.

For a User Makefile project: If you keep your source files in several directories, you will most likely run the compiler in each of these directories. By default, the compiler generates a separate source browsing database in each directory. Since the Sun WorkShopTM programming environment browses only one database at a time, it searches only that part of your application located in the current directory. You can override this default behavior by importing databases.

Use the the sb_init file if you want to work with source files whose database information is stored in multiple directories. The text file sb_init is used to obtain control information about the source browsing database structure.

To import databases:

1. Identify where your sb_init file resides.

The sb_init file by default is stored in the SunWS_config directory (or the directory set by the SUNWS_CONFIG_NAME environment variable) in the current working directory.

2. Add an import command to the sb_init file for each directory in which the compiler is executed by typing:

import absolute-or-relative-pathname

Use the import option to search your entire source tree for source files and browser databases by adding an import command to the sb_init file for each directory in your source tree.


Note - Because source browsing uses sb_init to search browser databases (including object files) in multiple directories, include import commands for both source and object directories in your sb_init file.

3. Browse the directory containing the SUNWS_config directory (see Starting Source Browsing).