Browse Global Symbols Dialog box

Symbol

The name of the symbol to be looked up. This text box is automatically loaded with the first word in the current selection when the dialog box comes up. You can type any symbol name into this text box.

Symbol List

This list displays a list of all symbols in the project. If a search pattern was given in the Symbol Name text box, then this is a list of all the symbols that satisfy the search pattern. Below the symbol list, the currently selected symbol’s type and file of origin are displayed.

The types of symbols in the list are controlled by the settings accessed with the Symbol Types button.

As you type, Source Insight will display partial matches in the Symbol List. For example, if you type “Pch”, then the first item in the list (in sorted order) that starts with “Pch” is selected in the list. The match is not case sensitive and leading underscores are ignored.

If you have symbol syllable matching enabled (in Preferences: Typing) then the Symbol List will also show matches on syllables, which you may type in any order. For example, if you type “cre win” (note the space between items), the Symbol List will show all symbols that have “Cre” and “Win” somewhere in the name.

To temporarily toggle syllable matching on and off, prefix your entry with a space character.

You can specify a regular expressions style search pattern to search for symbols by typing a question mark (?) and then the search pattern, and click the Jump button. All the symbols that match the pattern are placed in the Symbol List. For example, to find all symbols beginning with “Delete” and containing “Foo”, you could type “?^Delete.*Foo”.

Jump

Click this to jump to the definition of the currently selected symbol. If an item is selected in the Symbol List, then that is the current symbol. Otherwise, the symbol typed in the Symbol Name text box is used.

If the symbol name text box starts with a question mark (?), then Source Insight will replace the list with all the symbols that match the search pattern that follows the question mark; the dialog box will remain open.

Info

Click this button to run the Symbol Info command on the selected symbol.

References

Click this button to search for references to the selected symbol.

Insert w/Args

Click this button to replace the current selection with the name of the symbol, followed by the parameters as they appear in the symbol definition, if the symbol is a function.

Insert Name

Click this button to replace the current selection with the name of the symbol.

List

Click this button to create a cross-reference list of the symbols currently listed in the Symbol List. A new file is created and named Symlist.txt. Each line of the file contains a symbol name, and the file and line number where it’s defined.

Symbol Types

This button is used to specify what types of symbols will be included in the symbol list and what types of symbols will be searched for when using a regular expression in the symbol name text box.

Making a Cross Reference Listing

You can have Source Insight create an output file that contains a list of symbol names.

To create a symbol cross reference list

1. Run the Browse Project Symbols command.

2. Click the List button. A new file named Symlist.txt will be created containing a list of all the symbols displayed in the Symbol List, along with the file and line number where the symbol is found.

To create a partial symbol cross reference list

1. Run the Browse Project Symbols command.

2. Click the Symbol Types button to specify the desired types of symbols to appear in the list.

3. Type a search expression in the Symbol Name text box. You must begin the pattern with a ? character to indicate that it is a pattern. For example, “?Word” searches for all symbols containing the substring “Word”.

4. Click the Jump button to replace the list contents with all the symbols that match the pattern. When the search is done, all the matching symbols will appear in the Symbol List box.

5. Click the List button to create the symbol list.

6. Fix up the arguments in the function call to be appropriate.

To Search for a Function by Name

Let’s say you want to call a function but can’t remember its name. You know it has “Insert” and “Char” in its name. This example assumes you have enabled the symbol syllable matching when you created the project.

1. Select the place in your file where you want to insert the function call.

2. Run the Browse Project Symbols command.

3. Type “Insert Char” in the File Name text box and wait a moment. Note the space between the two words. Source Insight will use the syllables you typed to filter the Symbol List to show all symbols with Insert and Char in the name. This technique only works if each word you type starts with an uppercase letter.