Synchronizing Project Files

Sometimes files are edited without using Source Insight. For example, you may be using a source control system that updates files on your machine, or you may have files that are machine generated by your build process. When that happens, Source Insight has to re-parse those out-of-date files to bring the Source Insight project up to date. That process is called synchronizing the project. Normally, this is done automatically in the background for you.

The synchronize process ensures that the entire project is up to date. It scans each file in the project and updates the symbol database for each file that has been modified since Source Insight had the file open last. Files that were part of the project that don’t exist anymore are removed from the project. As an option, you can have the synchronization automatically add new files that it finds to the project.

You can synchronize a project in one of two ways:

You can turn on the “background synchronization” option in the Preferences: General dialog box. Synchronizing the project will happen in the background while you continue to edit in Source Insight. This option is on by default. See also “General Options”.

You can run the Synchronize Files command, which synchronizes the project on demand. See also “Synchronize Files”.

Normally, if you open a file that has been modified since Source Insight had it open, the symbol database is updated automatically when you open the file. By automatically synchronizing, the update is transparent to you. However, if a symbol is moved from one file to another, you may find that Source Insight loses track of where the symbol is, unless both files are in sync with the project. In addition, if new symbols have been defined, Source Insight won’t know about them until the containing file is synchronized.