Source Insight 3.x Frequently Asked Questions

Licensing and Prices

Q: What is the price?  Do you have volume discounts?  Do you offer site licenses?

A: We offer volume discounts and group licenses in bulk.  You can get a price quotation from our secure order form.

Q: Do you offer "floating" licenses?

A: We currently do not offer floating licenses, because they require complicated license management.  We do offer group licenses in bulk.  Please email us for details.

Q: Do I need a separate license of Source Insight for each machine in my office?

A: The license allows installing one other copy onto a laptop or other portable computer, as long as you are the only user of the machines. 

Q: Do I need a separate license to take Source Insight home and work?

A: No, as long no one else can be using your copy at work at the same time.

Q: I lost my original disk and I can't find my serial number anymore.  What can I do?

A: If you sent in your registration to us, then we will be happy to tell you what your serial number is.  If you did not register with us, we cannot issue replacement serial numbers, unless your company already has a site license agreement with us, or you can provide us with a valid sales receipt or invoice. We may be able to help you if we can locate your original order based on your information.

System Requirements

Q: What operating systems does Source Insight run on?

A: Source Insight is a Win32 bit program that runs on Windows 7/Vista/XP/2000.  We do not have a Unix or a non-Intel WinNT native version.

Installation

Q: Can I install Source Insight on a Network?

A: Source Insight should not be installed onto a network drive. You should install Source Insight onto each workstation you plan to run it from.

Q: Do I need to use an Administrator user account to install or run Source Insight?

A: No. You need at least Power User or an equivalent user level of permissions to install Source Insight. However, you are able to run Source Insight from the basic User account. Windows 7 and Vista users: Right-click on the setup program icon, and select "Run as Administrator" to run the setup program.

Q: Can more than one user run Source Insight on the same machine?

A: Yes - Each logged in user gets their Source Insight settings.

Opening Files

Q: When I double click on a file icon in Windows Explorer, a new instance of Source Insight opens.  How can I get the existing instance to open the file?

A: You need to add or edit the shell "open" command to invoke Source Insight.

  1. In an Explorer window, select Tools > Folder Options: File Types.
  2. Locate the C File type, or add one.
  3. Click the Advanced button
  4. Edit the "open" shell command to read:

"c:\insight\insight.exe" -i "%1"

Where c:\insight is the directory where you installed Source Insight.  The -i command line option tells Source Insight to send the rest of the command line to an already running instance of Source Insight.  Be sure to surround the %1 with double quotes so that file names with spaces in them are handled correctly.

Custom Commands

Q: When I run a Custom Command that is supposed to capture program output, nothing happens. 

1. If your program redirects stdout or stderr, this can confuse Source Insight into losing output.  You will have to either remove the redirection, or have your program send its output to a result file.  Then change the custom command to type out the results file.  For example, if the "Run" string in the Custom Command dialog used to say "mymake.exe", then change it to "mymake.exe;type logfile.txt" where logfile.txt is the program output.

2. Make sure the program sihook.exe is in your path or in the \Insight directory (where you installed Source Insight into).  The sihook.exe program is required to launch the custom command.

3. Make sure the correct program is running and the current working directory is correct.  When a custom command runs, the current work directory is not set to anything in particular.  You should put a "cd" command in the Run string before calling your command.  For example, "cd %j;mymake" will change the working directory to current project directory, then run mymake.

4. If your custom command invokes the command shell, make sure on NT that you use "cmd" instead of "command" as the shell program.  For example, instead of "command /c mybatch.bat", use "cmd /c mybatch.bat".

Context Window

Q: My Context Window disappeared and I can't get it back.

A: This may be caused by a corrupted configuration file.  You will have to restart Source Insight without your configuration file.

  1. Run Source Insight, and select Options > Save Configuration. Check to box at the top that says "All settings". Click the Save button.
  2. Note the directory where the Save dialog box opens.  This is the directory where your configuration file is normally stored. It will probably be in a folder such as "My Documents\Source Insight\Settings". Just cancel the dialog without saving.
  3. Exit Source Insight.
  4. Go to the folder found in step#2 above, and find the file called GLOBAL.CF3.
  5. Rename GLOBAL.CF3 to something like OLD.CF3
  6. Run Source Insight again.  All options should be back to the defaults.
  7. Select Options > Load Configuration.  Clear the top check box and turn on all the lower checkboxes except for "Display and Windows".   Press the Load button and select OLD.CF3 to load. This will load all your other settings, except for the positions of the windows.
  8. After loading OLD.CF3 (minus the "windows" settings), your Context Window should be back.  We're sorry for the inconvenience.

Printing

Q: How can I print just the selected text?

A: Source Insight 3.x supports printing the selection by using the "selection" option in the Print dialog box.

Source Insight 2.1 does not support printing the selection only.  You can have this functionality by using this PrintSelection editor macro.  See the macro file for instructions.

Q: How can I print the syntax coloring?

A: Source Insight 3.x support printing the syntax coloring and formatting. Before printing, select File > Page Setup and make sure that the check box that say "Print syntax formatting" is checked. Version 2.x cannot print syntax coloring.

Q: How can I print the Relation Window?

A: You can print the graph view of the Relation Window by right-clicking on the Relation Window and selecting Print Relation Window. There currently isn't a way to print the outline view. However, you can copy the outline text to the clipboard, paste it into a new text buffer, and then print that buffer. In outline view, right-click on the Relation Window and select Copy List to copy the outline view text.

Working with Project Files

Q: How can I add a whole source tree to my project?

A: Select Project > Add and Remove Project Files.  Change to the top directory you want to add, and click the "Add Tree" button.  This will add the whole subtree starting with the currently displayed directory.

Q: How can I delete a bunch of files from my project easily?

A: You can do this a number of ways.

  • In the Project window, show all the files and make a multi-file selection and press the delete key. 
  • Select Project > Add and Remove Project Files and make a multi-file selection in the lower list and click the Remove button.
  • If you are trying to delete a set of files with the same extension, for example all *.h files, then you can run Project > Add and Remove Project Files , click the "Remove Special" button, enter *.h in the input field, press Enter, then press the "All" button to remove all the *.h files.

Q: Is there an easy way to maintain a list of files in the project?

A: Select Project > Add and Remove Project Files, and click the "Add From List" button. This takes an input text file containing a list of project files and/or directories and ensures they are added to the current project.  This allows you to maintain a list of files that should be used to create a project.

The input file must contain one file per line.  If the file is actually a directory, then all the files in the directory are added to the project.

You can create a snap-shot of your project in a file list file by using the Project > Project Report command.  In the Project Report dialog, turn off all checkboxes.  Press OK.  When finished, delete the top and bottom few lines that are not file names.  Then save the report file as your file list file. If your file system is case-sensitive, then before using Project Report, select Options > Preferences: Display and check the box that says "Show exact case of file names".

Note however, that Source Insight will not remove any files from your project if they do not appear in the file list file.  The Project > Synchronize Files command (and the background processor) will automatically remove files that don't exist anymore on disk.

Document Types

Q: The changes I make in the Document Options dialog box are not having any effect. Why?

A: First, make sure you are editing the correct document type. Open your source file, right-click on it, and select Document Options. Note the document type selected in the dialog box. It should be the type you are wanting to change.  If not, then some other document type has a file filter field that contains a wildcard that matches your source file.

Secondly, make sure the check box that says "Use options from Default type" is not checked. If it is checked, then the options are taken from the document type named "Default".

Q: How do I setup Document Options to control parsing?

To check the document options:

1. Right-click on the source file and select Document Options.

2. Note the document type in the upper left of the dialog box.  It should indicate the correct type of source file, for example: "C Source File".  If this is not the case, you probably have the file filter field incorrectly set.  See "How do I setup the Document Option File Filter?".

3. If the document type is correct, look at the Parsing options in the lower left of the dialog box.  The "Language" should be set to the correct language.  If not, select it now.

Q: How do I get Source Insight to recognize my new file type?

See below.

Q: How do I setup the Document Option File Filter?

A: The file filter is what associates a type of file with a document type.

To check the document options file filter:

1. Right-click on the source file and select Document Options.

2. Note the document type in the upper left of the dialog box.  It should indicate the correct type of source file, for example: "C Source File".  If this is not the case, you probably have the file filter field incorrectly set. 

The file filter field should contain one or more wildcards.   The wildcards must be separated by a semi-colon (;), or a comma (,). 

For example:    "*.c;*.h;*.h2"

Or:    "*.c;otherfile.abc;cmd*.x"

Note that you can used an unambiguous name in the file filter field to override the normal association.

Q: How do I add a new Document Type?

A: You need to use the Document Options command.

  1. Select Options > Document Options.
  2. Click the "Add Type" button, and give your document type a name, such as "Abc File".
  3. In the file filter field, enter a wildcard that describes the file type. See: How do I setup the Document Option File Filter?
  4. Set all other document options the way you want it.  
  5. Optional: In Parsing section, you can pick a language for the document type.  If you are adding a document type that Source Insight does not have a language built-in for, then you can add a custom language. If you want to add a custom language select "<New Language>" in the Language list.
  6. Click the Close button when you are finished.

Custom Languages

Q: How do I import a custom language file into Source Insight?

A: Follow these steps:

1. Select Options > Preferences. Click the Languages tab.

2. Click the Import button. Select and load the custom language file (.CLF)

3. You should now see the new language in the list of languages.

4. Click the Document Types button to open the Document Options dialog box.

5. If you don't have a document type already created for the type of language file, you will need to create one now. If you already have a document type created, select it in the list and go to step 7.

6. Click the Add Type button to create a new document type.  Give it a name that describes the type of file. For example, "Ant File". Click OK and then fill in the file filter text box with a wildcard.  For example, "*.ant".

7. In the Parsing section of the Document Options dialog box, select the newly imported language in the language drop-down list. This is what associates your document type with the custom language.

8. Click the Close button to close Document Options. Then click OK to close the Preferences dialog box.

Parsing and Finding Symbols

Q: Can I add my own language parser? How can I add my own Parsing?

A: Source Insight allows you to add a new Custom Language.   Please refer to the online help topic "Custom Languages".

Q: Jump To Definition says "Cannot find <symbol>"

Q: I have a source code file open, but the symbol window (on the left side) does not show ANY symbols.

A: See: How do I setup Document Options to control parsing? 

If the document options are correct, then there is probably a parsing problem.  See "Source Insight wont parse my file".

Q: I'm looking at a symbol definition in the source code and the symbol window (on the left side) does not show its definition.

A: See:  Source Insight wont parse my file 

Q: Source Insight won't parse my file.

A: There are various reasons why Source Insight may fail to parse your file.  Things to keep in mind are:

  • C/C++ Preprocessor macros are not expanded before parsing.   If you have a weird macro that expands to be part of a definition, then it's quite possible that Source Insight will be confused.  Also, extraneous tokens that are #defined to white space can confuse the parser. You may be able to work around this by adding token macros to the c.tom file stored in your "My Documents\Source Insight" folder. See the online help under the topic of Token Macro Files.
  • Using #ifdef/else/endif to split up a definition will sometimes confuse Source Insight. If you need to do this, you will have to define a conditional variable inside of Source Insight to control how #if-like statements are expanded. See the online help under the topic of Condition Variables.
  • Check that the correct document options are set.   See "How do I setup Document Options to control parsing?"
  • If you don't know what bit of code might be confusing Source Insight, try bi-secting your source file until symbols show up in the symbol window.  Select the top half of your file and delete it.  Keep doing that until some symbols show up.  Once symbols show up, you know the chunk you just deleted contained something that affected the parsing problem.  Note that text before (sometimes way before) a particular declaration can affect how it is parsed. If you still stumped, feel free to send us a copy of your source file and we will be happy to look into the problem.

Q: Source Insight won't find symbols on the Project Symbol Path.

A: The project symbol path allows you to use the "Jump to Definition" command and to have the Context Window show definitions for symbols that are in the project symbol path (if they are not already in the current project).   We will use the term "common project" to mean a project, other than the current project, that is on the symbol path.

Things that don't work with the project symbol path:

  • If you are typing in a name, only symbols in the current project are partial-matched while you are typing.
  • The Look Up Reference command only works on files in the current project.
  • Source Insight will only allow one program instance to access a project at a time. If another instance has the common project open, SI will silently skip over that project if it is on the project symbol path.
  • Projects that are not currently open are not synchronized with file changes in the background.  If your common projects files change, you need to explicitly open them once in a while to get them synchronized.

If you are still having a problem, try this:

1. Open the common project (the one on your project symbol path) and run the Project > Synchronize Files command. This will ensure that the whole project is parsed and symbolic information is saved for the project.

2. Next, use the Search > Browse Project Symbols command to locate the symbol you think should exist in the common project. 

If you cannot find the symbol in the common project while the common project is open, then either the symbol's file is not added to the project, or the file is not being parsed for some reason. 

If the symbol is found in the common project, then return to the other project and see if you can use the "Jump to Definition" command to find the symbol.

General Problems

Q: Source Insight just crashes or exits when I start it.

A: Here are a few things to try:

1. If possible, it would be good to reboot your system and try it again. A system resource may be locked or in low supply.

2. If that didn't work, quit SI and go to the directory where you created your current project. Find the file called <projectname>.WK3 - this is the workspace file associated with the project. Delete that file or rename it for later. Start SI again and see if that fixed it.

3. If that didn't work, quit SI and go to the folder "My Documents\Source Insight\Settings". Find the file called GLOBAL.CF3 - that is the configuration file that contains your customizations. To start SI in a default state, rename it to something like OLD.CF3. Start SI again and see if that fixes it . If it did fix it, you can try reloading some of your customizations again using the Options > Load Configuration command and loading portions of OLD.CF3.

4. If that didn't work, you may have a bad project state. Quit SI and run it from the command line like this: insight /pc

this runs SI but does not open the current project. If this works okay, then there must be a problem with the project. If you open the project using the Project > Open Project command and it crashes, that confirms it. If that is the case, it would be best to re-create the project.

Typing and Editing Operations

Q: The keys on the numeric keypad don't work as expected.

The numeric keypad keys / * - + are bound to these commands by default:

Key Command
/ Scroll Half Page Up
* Scroll Half Page Down
- Function Up
+ Function Down

If you want those keys to function normally by just inserting the character on the key top, then you need to unassign those keys from the commands.

Use the Options > Key Assignments dialog box to find those commands and delete the key assignments for each of them. When the key assignments are removed from those keys, they will function normally.

Q: Does Source Insight support UNICODE files? 

A: Source Insight 3.x does not yet support UNICODE files.