Setting Source Folders

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 > General > Paths and Symbols
  2. Click on the Source Location 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 Project Explorer 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
Indexer
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