Setting Source Folders

Note that source folders can only be currently used with Standard Make projects. Managed Make projects treat the entire project as a source folder.

Source folders are a way to cut down on a project's indexing scope. You can mark the folders that are part of your day to day work or part of a subsystem that you work on. All files inside source folders will be indexed and are, thus, searchable. Note that any files pulled in by a file inside a source folder will also be indexed.

Set source folder

To setup source folders:

  1. Right click on the project and select Properties > C/C++ Project Paths
  2. Click on the Source tab
    By default the entire project is a source folder, which means everything will be indexed. This is reasonable for smaller projects but definitely not recommended for large projects.
  3. Click Add folder to add the folders. A dialog will explain exclusion filters have been added to nesting folders. You will see that the folder you added will be excluded from the project folder (in order to avoid including a folder twice). Repeat until all the folders have been added.
    Note: Don't forget to remove the project folder (which appears by default) otherwise everything will be indexed.
  4. Click OK. Your view in C/C++ projects will now change. You should see your source folders designated with a "C" and all other source and header files icons that are in a non-source folder will change to a "hollow" C or H.

Related concepts
C/C++ search
C/C++ Indexer
C/C++ Indexer Progress Bar

Related tasks
Selection Searching for C/C++ elements

Related reference
C/C++ search page, Search dialog box
C/C++ Project Properties, Indexer


IBM Copyright Statement