Once having created a project and it is open, you next need to add source files to the project. This can happen two ways.
If you created a new file in Source Insight and save it for the first time, Source Insight will ask you if you want to add the file to the current project. This will be the most natural way to add a file if you are writing new code and are creating new source files a lot.
If you already have existing source files and you want to add them to the current project, use the Add and Remove Project Files command. This command allows you to add any existing files, including whole directory trees, from anywhere on your disk to the current project. See “Add and Remove Project Files”, and “Add File List”.
Adding a file to a project has the following effects:
• The file name is stored in the file name database for the project. Whenever Source Insight displays a list of files, that file name will be in the list. Therefore, for example, when you use the Open command, the file name will be in the list box.
• The file is parsed based on its language type. Symbol definitions are added to the project’s symbol database. The language parser used for each file is determined by its document type. See also “Document Types”.
• The file’s modification date is recorded in the file name database, so that Source Insight will know to synchronize the project symbol database if the file was modified outside of Source Insight, for example by a source control system.
• The way the name of the file is displayed is changed. The file name becomes “normalized” to the project’s source directory.
• The file will become part of the project code base, which is searched when showing symbol relations, such as call trees.