Import External Symbols

The Import External Symbols command lets you import symbol information from external sources, such as .NET assemblies, Java classes, standard C/C++ header libraries, and other source trees. The symbol informa­tion is used for symbolic auto-completion while you type, and to show function or class definitions, and sym­bol syntax formatting.

The imported symbols are put into special "import library projects" to contain the imported symbols. This replaces the functionality of the "Project Symbol Path" feature from version 3.x. For example, you could use it to create symbols for SDKs, or the STL, or the C-runtime header files.

The Global Import Library List

Source Insight maintains a single global import-library list that is used for all projects, or in the case where you don't have a project open. The import list is searched when a symbol needs to be found. The list is searched in the order it appears in this dialog. To manage this list, select Project > Import External Symbols.

The Project-Specific Import Library List

Each project also contains an import-library list, which is only used when that project is the current project. The import list is searched when a symbol needs to be found. The list is searched in the order it appears in this dialog. To manage the project-specific list, select Project > Import External Symbols for Current Project, or select Project > Project Settings, and click the "Import Symbols" button.

What is an Import Library?

An import library is a special Source Insight project that contains imported symbols - the symbols come from an external source, such as a .NET assembly or Java class. Symbols can be imported from the following types of files:

When you import symbols from one of these sources, a new hidden Source Insight project is created to hold the symbols, and Source Insight opens and searches these import projects automatically.

Import projects have an "_import_" prefix in their name. You can open an import project by holding down CTRL and selecting Project > Open Project. The project list will contains all your projects, plus the import projects.

Import Library Dialog

This dialog is used to edit the import library list.

inset_28_1.jpg

 

 

Library list

This is the import library list. It is a list of the external libraries currently imported. Source Insight searches libraries in the order they appear in this list. You can use the Move Up or Move Down buttons to rearrange the list.

Add...

Adds a new external library to the list. The "Add Library Symbols" dialog will appear.

Delete

Deletes the selected library from the import list. You will also be prompted to remove the corresponding Source Insight project that holds the symbols.

Once you delete a library from the import list, Source Insight will no longer search for symbols in it.

Properties...

Displays information about the selected library, such as what file it was imported from.

Move Up / Move Down...

Moves the selected library up or down in the list. Source Insight searches for symbols in the library list in the order they appear in this dialog box. Therefore, the listing order may be significant to you.

Add Library Symbols

This dialog is used to import symbols from an external file into a new Source Insight import library.

When you import a file or set of files, a new import project is created to hold the symbols, and the project is added to the import library list.

inset_29_1.jpg

 

Import from an INCLUDE path

This imports symbols from source files found on the INCLUDE environment variable directory path. The INCLUDE environment variable should be defined in your environment. If not, you can enter any directory path. All the directories in the path will be scanned for source files and added to the import library.

Use this to import the standard C and C++ header files, and/or the standard Windows headers files, or any header library or source code library that is not already part of your Source Insight project.

Import from a source code tree

The specified directory tree will be scanned for source files and added to the import library.

This is useful for importing symbols from an external source code library that is not already a part of your Source Insight project. For example, you can refer to symbols in a third-party runtime library, or a third-party library's header files.

.Import a directory tree of .NET assemblies

This imports an entire directory tree of .NET assembly files.

You can use this to import an entire version of the .NET Framework. This allows auto-complete to work for the packages that have been imported into a C# source file using the using statement.

Import a Java jar file

This imports a single Java .jar file.

Import a directory tree of Java classes

This imports an entire directory tree of Java .class files. For example, you can import an entire Java package hierarchy.

Import from a another Source Insight project

Click this to import symbols from another existing Source Insight project. This doesn't actually create the project. It just adds the project to the import list.

Import single file

Click this to import a single .dll, jar, or .class file.