Home

Contents - KESSLER Software

image

Contents

1. Saving Configurations Configuration WT RR Source Insight User Manual CHAPTER 5 Saving and Restoring Workspaces Contents Where Are Configuration Files Stored s scscccccssscsscssccsccssccsccssccsecceccscscessscssecesese 107 LOAAING A CONFIGUIATION srecsescsseseccccscecrsccseccscccscescscscsscccsccseccscssecsscssecsscssecesess SAVING a CONFIGUIATION IIIA Loading and Saving Workspaces Managing Tasks With Workspaces seen ee eene en nennen aenean ees ea etna essen sena x ysreidta uis MU Mee Factors That Affect Performance ss Speeding Up Program Features esee esee seen senes tns en etae tn stans estne enses etna ena Files Created by Source Insight cessere e cerne eene e eere nete te seres ens enue Files in the Program Directory 4 eese esee eee ee eene en aeneae tae tn sean etna tane enses etna saa Per User Data Files Created for Each User Configuration Template for All Users Files Created for Each Project ee eese eee eese eee ee seen seen etna teneat nets sees e tna ena COMMAND REFERENCE eee eee e eee soos eee esee esee eese eese eeessssssssssssssssseseeees 121 Commands OVEPVICW ccvcccssssccdesevescoascevecsoassectscsvecsssscesdssocvasccssocbosavascascdescoscssbesscees 121 About Source Ins
2. 339 GetC rrentProj p 339 GetProjDir hprj 340 GetProjFileCount hprj 340 GetProjFileName hprj ifile 340 GetProjName Hpr RR 340 GetProjSymCount hprj eese eese eese ee eene eene neta sense en sense tns ease tassa sess tastes sna 340 GetProjSymLocation hprj isym eee ee eere eene eene ee nere eene enata senses etas tnstnsno 340 GetProjsymName hprj isym esee eee ee eere eene eene rasta tn etae tn sense tn stas ena sno 340 NewProj proj name 341 OpenProj proj name 341 RemoveFileFromProj hprj filename 341 SyncProj hprj sesseseesessssossesoesesossesossose 341 SyncProjEx hprj fAddNewFiles fForceAll fSupressWarnings 341 Miscellaneous Macro FUNCTIONS eee eee eee eee eee eere eee e een ee eee tn nee e eene eee eeaa 342 DumpMacroState hbufOut puUt eee ee eee eee e eere eere eee eo eene etna seen s stans eae eS 342 GetProgramEnvironmentinfo 342 GetProgram INFO ro sita o coso eaa 342 Other Information about Macros ecce ee ee eee eee eroe eee eene ee teen eee eterne eee eena 342 DO DUQGING etta M 342 TE TAE MIO TRI I 342 No Self Modifying Macros 342 Sample Macros 0343 Event Hand lets vecwsssscsscscccssscsscsavascaccssssesscessas
3. SYNTAX DECOLATIONS m Syntax Formatting Tile Horizontal Tile One Window Tile TWO WINT OWS seccceccssccsccsccceccscccsccseccsccsccssccseccscssncsscssecsecesccsscssecsscesecesecsecsseees WIES rav PE M Toggle Tea d oro pasos supro oks Ost oa o tsss TOP Of File re Top of Window Touch All Files in Relation Typing Options Mofa o SAEC NEAREST UNGOA II EPOE IE D E OT Vertical Sro BAL RR View CliDscsscsscccscendcsesossonseteascsansenccdeaossonssbenseseasenacteansosesceonsensasesncssoaseaescobnseveasenases View Relation Outline es View Relation Window Horizontal Graph Source Insight User Manual Contents View Relation Window Vertical Graph sssessessesessesoesosoosoososossocoocossocoocosoocoososoosoososoee 288 Window List M 289 Word Left M 290 Word Right 290 Zoom Win dOWesscsicsarscicsccessscssccdcescescscsssesdcbaatsadiaccesssccidsscssessust scsasssessecesdssissdsescs 290 CHAPTER 6 MACRO LANGUAGE GUIDE euer ee eee eee ee eee eee eee ens sssssssssssssesssseeees 2 1 Macro Language Overview ecce eene e eee ee en enne etas assets ases tonos ases tensa eee eos 291 Basic Syntax Rules eese eese enses een e
4. taoti ri GUE WOOL oct dE Cut Word Left Delete Delete All Clips Delete Character RR eea Delete Clip TD Delete File oem CH P TRE EER Delete LINC eR S Display Options Document Options Draft View Drag Line PP Drag Line DOWN P 167 DI LINC P 167 Drag Line UP MOre X 167 Duplicate Duplicate Symbol vi Source Insight User Manual Contents zeli etetere ios 167 E abl Event H ndlers eoe seed ee eee ueas aa aab esa cesa ae eere sa on Ta o e pee ee pore Uora e PER osaan 169 End OF Llie s esseeeeevese eat eene nece cea eve saos eb sorit s o oleae ES ao cava Cep ao Uv vaa en rav ev aes a aoa aE 169 End of Selection 169 3 4 169 Exit and Suspend 2169 Expand Special 170 File Options 170 ISO i M M 174 FUNCTION DOWN oer oDe Siss 175 Function Up 4175 General Options 175 Go Back 178 Go Back Toggle 178 Go Forward 178 GO TO Fist LINK descccccatcatscccsctscscs dssecesescdasesscesedcscvecteicdsscteceussoicodsccetcssesesscessevicscicos 179 Clo Io B o mme RE 181 Go To Next Change 181 Go To P
5. Syntax Formatting and Styles ccccccscscscssescsssseseees How a Style Works Formatting Properties Parent Styles ccccccccrrcssccscsseccsceses How Styles Apply to Source Code cesses esee eese esses sensa staat na eaae essen stas ea sen Language Keyword Styles eee ee eese eee eese eese essen etae en etae en stes ta stas ta sens sa sen Ib Tafel iei AUC Reference Styles sesiet Inactive Code Style Comment Styles Syntax Decorations Controlling Syntax Formatting eee ee seen eene neenon enne nae en etna eta sonata sense tasa Searching and Replacing Text ee eeee eere scene eene eene en aetas eene tn estos ense tnses Searching for Symbol References RENAMING an Identifier e eee eere eese ee eene eene enean eene ot asiassa coidas o etas sa setas en Source Insight User Manual iii Contents Searching the Current File cccccccccccccceccessscccscccsccsscssccsscssccsecsscesecsscssessecssecsecees 84 Replacing in the Current File eee essere eee seen sense en sena netta tenens etas enses sn aea 84 Searching Multiple Files e eee esee ee sissit ies ti vts etae en setae aa sense tns s E asie Replacing in Multiple Files Searching for Keywords Regular EXPressiONns sssesssisecvsdss
6. eese eese esee ee eene enean aetas ense tn sese tn sense tss ta seas eeseno SymbolRootContainer symbol SymbolStructureType symbol Searching FUNCTIONS n EnTra GetSourceLink hbufSource InSource LoadSearchPattern pattern f MatchCase fRegExp fWholeWordsOnly 337 ReplacelnBuf hbuf oldPattern newPattern InStart InLim f MatchCase fRegExp fWholeWordsOnly fConfirm eere eese e esee seen eene tenen etae tasse tastes snae 337 SearchForRefs hbuf word fTouchFiles ccce eene eee eere enn eee eene eaae en 337 SearchInBuf hbuf pattern InStart ichStart fMatchCase fRegExp fWholeWordsOnly e eese esee eee ee ente eene tensa east s tense es eene to sess tastes seas enae 338 xiv Source Insight User Manual CHAPTER 7 Contents SetSourceLink hbufSource InSource target file InTarget 338 Project FUNCTIONS 338 AddConditionVariable hprj szName szValue sessesossesossessosossocsesossesossossessssose 338 AddFileToProj hprj filename CloseProj HPI eccccccscscsrcssccscsescscssesesees 339 DeleteConditionVariable hprj szName eee eee eene eene eere nere etna ea senses tnae 339 DeleteProj Proj name 4 ceres eene eese eene eene en sense a etna teneas etes tasas etas tassa ae 339 Emp tyProj Roe
7. Add Click this button to add a new custom language See also Language Properties on page 196 Delete Click this to delete the selected custom language Only custom lan guages can be deleted The built in languages cannot be deleted Import Click this to import a custom language into the list from a custom language file A custom language file CLF contains all the properties of a sin gle custom language Export Click this to export the selected custom language to a custom lan guage file CLF A custom language file contains all the properties of a single custom language You can export a custom language so that other people can import the language into their Source Insight configurations Properties Click this button to open the Language Properties dialog box Use this to control custom languages properties See also Language Proper ties on page 196 Keywords Click this button to edit the keyword list associated with the selected language type The Language Keywords dialog box will appear Doc Types Opens the Document Options dialog box Special Displays options that are specific to the selected language Not all languages have special options Project Specific Conditions Click to edit the conditions defined that are spe cific to the current project only These conditions are only in effect when the current project is open and only for files that belong to the project Global Conditions
8. Browse Project Symbols Lists all the symbols in the current project From this dialog box you can e Find symbols based on parts of their names e Look at symbol definitions e Jump to symbol definitions e Insert a call to a function into your source file e Generate a cross reference listing The Browse Project Symbols command automatically selects the first word in the selection before the dialog box comes up The word is also loaded into the symbol name text box of the dialog box The word is selected so that you can use the Insert buttons to replace the symbol name Source Insight User Manual 129 Command Reference Chapter 5 Tip Instead of using this dialog box which is modal you can use the Project Window s symbol list view The Project Window is modeless it can float or dock to the side of the application window Furthermore the Context Win dow shows the declaration of the item you select in the Project Window symbol list Browse Global Symbols Dialog box Browse Project Symbols xj Symbol 201 symbols Doc j W DocisClip E DoclsClip References Ill DocisOpen DoclsScratch Insert w Args E DocisSearchOutput DocldLastCreated E DocldNew insert Name Ig DocldoctFromCpi E DocinsertEmptyLn List E DocinvalAlPageBreakDisplays E DocinvalAllSws E DocinvalAlSwSelBars Symbol Types DocinvalClients E DocinvalPagination Close Ii DocinvalParsingAndDisplay E DocinvalTglLooks DoclsOutO
9. C Source File i Changes File Code Tips text file Ss Custom Command Output Default Diff File aat ditor Macro File of Autotext em 96 3 19 1998 B DeleteLine ern 192 4 23 2002 E InsertFuncHeader em 1784 8 23 2001 B ListFuncParams em 923 8 23 2001 B Replace em 404 5 18 2000 B Test em 6657 6 5 2002 B TrimSpaces em 980 8 27 2001 i B X em 44 10 26 2001 Fortran File tura Negar Source Insight User Manual 221 Command Reference Project File Browser Chapter 5 Displays the File Browser view in the Project Window This view allows you to browse around your disk Sinew Project lt gt EQ Ystu H A Common GC Msdn GC vbo8 H O VIntDevo8 Gl Vss ch C Websrc GO Win2k DDK sms ce stulVC98 include Modified 4 G B Accctrl h 26877 4 1ll 2t 3 Aclapi h 17877 4j1i 2t Aclcls h 3735 d4j24jic 3 Aclsid h 747 4 24j1 G Acuh 10116 5 23 2t Acsmatc h 260 4 24 1t G Acssvcc h 267 4 24 1t 3 Activecf h 833 4 24 1 3 Activeds h 1161 4 11 2C B Activex mak 38805 4 24 1 G Activex rcv 3794 4j24j 1t 3 Activex ver 2053 4 24 1 3 Activscp h 113532 5 30 2t B Activscp idl 28767 S 30 2t ec c Ue Project File List Displays all project files in the Project Window This is a flattened list of all files in the current project regardless of directory Sinew Project
10. Project Symbol Classes Displays project symbols by class in the Project Window Project Symbol List Displays all project symbols in the Project Window Project Window Properties Displays the properties of the Project Window Recent Files A submenu contains recently opened file names Refresh Relation Window Updates the Relation Window with the relation for the currently selected symbol Relation Graph Properties Displays the Graphing properties of the Relation Window Relation Window Toggles the Relation Window on and off Relation Window Properties Displays the properties of the Relation Window Reload File Reloads the current file from disk losing ALL changes since saving Run Project Custom tool command Run the project executable Save A Copy Saves the current file to a new file but does not replace or affect the cur rent file Search Project Searches for text or keywords across all project files Searching Options Specifies options for handling the Search Results Setup Common Projects Creates common external projects Source Insight User Manual 359 Appendix Upgrading From Older Versions Chapter 8 Table 8 1 New Commands Added Since Version 2 x Command Summary Setup HTML Help Finds the HTML Help file on your disk Show Relations Updates the Relation Window to show information about the selected symbol
11. Search Results Window Multi filesearchand The Search Results window is created whenever you run the Search Files or replace operations output to the Search Results window Lookup References commands Each line in the Search Results window corre sponds to a match in some file at some line number Matches listed in the Search Results window contain source links which are hypertext like links to the locations where the matches were found EEICT el ee DT Noose SOS lo I nae elas Source Links connect two locations These links connect Search Results with matches SLSCRSER SR SRE RE E n Daetezbateiiicwaibelid EEE yy sf Brod OS aam Serres tans Sem ess tas nem deeem et Braver cn Ym Sd Figure 3 18 The Search Results window has a source link on each listed match Each source link corresponds to a location in a file at some line number The window above the Search Results is the target location of one of the source links Each set of matches in the Search Results window has a search heading that lists the pattern that was used to search followed by a match count The search headings are parsed by Source Insight and each search pattern appears in the symbol window on the left side of the Search Results window to provide an overview Source Insight User Manual 43 Window Tour Chapter 3 For example a typical search heading might look like GetStockObject 23 mean
12. WF KEEPMINIACTIVE Boce ig Ei i The Context Window azie ss renders information IsWindowEnabled 1i Methodo about the selected identifier in the source Boot CWnd TIBI TESTIS o const A t file window In this case me itis showing the definition of the selected Mpc Une af ber function return IsWindowEnabled m hWnd class mem a return m pCtriSite IsWindowEnabled xl aj e l INS Figure 3 12 The Context Window on the bottom shows the declaration of the selected symbol You can toggle the Context Window on and off by running the Context Win dow command The Activate Global Symbol List command makes it visible and then sets the focus on the Context Window text box so you can type the name of a symbol to locate it in a list of symbols similar to the Browse Project Symbols dialog box Previewing Files The Context If the Project Window is in front the Context Window shows the file currently Window shows file selected in the Project Window If the Clip Window is in front then the Con previews when text Window shows the clip contents for the selected clip selecting files in the Project Window Showing Declarations and Definitions When you click on an identifier name in a source file window the Context Window will show you the symbol s declaration automatically Functions and other symbols show up in the Context Window along with their parameters and other definition information Source Insigh
13. Click the List button to create the symbol list 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 2 3 Select the place in your file where you want to insert the function call Run the Browse Project Symbols command 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 Browse Local File Symbols The Browse Local File Symbols command lists all the symbols in the current file that are at the file scope From this dialog box you can look at the symbol defi nition jump to the symbol or insert a copy of the symbol definition into the current selection 132 Source Insight User Manual Chapter 5 Browse Local File Symbols The Browse Local File Symbols command automatically selects the first word in the selection before the dialog box comes up The word is selected so that you can use the Insert buttons to replace the symbol name Browse Local Symbols xj Symbol Symbols 105 Jump Addcn IB Act
14. Click to edit the global condition set Global conditions are defined for all projects The total set of conditions defined for any given project is a combination of both the project specific and the global condition sets The project specific conditions will override global conditions with the same name See also Edit Condition on page 167 194 Source Insight User Manual Chapter 5 C C Options Java Options HTML and Scripts Options Language Options Special Language Options When you click the Special button in the Preferences Languages dialog box the Special Language Options dialog box appears This dialog box controls special options for built in languages Special Language Options E x ues oem Ignore namespace declarations JV Parse standard COM macros r Java Options Ignore package declarations m HTML and Scripts Default script language Visual Basic v Ignore namespace declarations If checked then namespace declarations are simply ignored in C code All symbols declared within the namespaces are considered at the file scope as though you did not write the namespace declara tion If not checked the default then symbols declared within namespaces are con sidered in the namespace scope Parse standard COM macros If checked then the standard COM helper prepro cessor macros such as STDMETHOD are recognized and parsed Note that if you already have
15. Meaning A single word that specifies the action to be taken See the table below for possible values sFile The filespec parameter can be any valid path Use dou ble quotes around complex path names with embedded spaces It can also be the name of an executable file sExtraParams Optional parameters It specifies the parameters to be passed to the application that ultimately runs The for mat is determined by the verb that is to be invoked and the application that runs sWorkingDir The working directory when the command runs If empty then the project home directory is used windowstate sVerb Values An integer that specifies the size and state of the window that opens Valid values are 1 normal 2 minimized 3 maximized The sVerb parameter is a single word string that specifies the action to be taken by Shell Execute sVerb Value Table 6 8 Values for sVerb Parameter Meaning edit Opens an editor for the file explore The function explores the folder specified open The function opens the file specified The file can be an executable file or a document file It can also be a folder print The function prints the document file specified If filespec is not a document file the function will fail properties Displays the file or folder s properties Source Insight User Manual 321 Macro Language Guide Chapter 6 Table 6 8 Values for sVer
16. Month current month number January is 1 DayOfWeek day of week number Sunday is 0 Monday is 1 etc Day day of month Hour current hour Minute current minute Second current second Milliseconds current milliseconds Internal Macro Functions Source Insight provides many built in internal macro functions There are functions for manipulating strings file buffers windows projects and symbol information 310 Source Insight User Manual Chapter 6 String Functions The syntax for calling an internal macro function is the same as for calling a user defined macro function For example hbuf GetCurrentBuf call GetCurrentBuf function String Functions String functions are provided to allow string manipulation Unlike in C you don t have to worry about memory management of strings or declaring buffers to hold strings AsciiFromChar ch Returns the ASCII value of the given character ch If ch is a string with more than one character only the first character is tested cat a b Concatenates strings a and b together and returns the result CharFromAscii ascii code Returns a string containing a single character that corresponds to the ASCII code in ascii code islower ch Returns TRUE if the given character ch is lowercase If ch is a string with more than one character only the first character is tested IsNumber s Returns TRUE if the string s contains a numeric string Non numeric strin
17. Qualify references to members If enabled Source Insight will verify that the member declaration exists before formatting it with the Ref to Member styles If disabled then Source Insight will format tokens with the Ref to Member style if the tokens look syntactically like a member reference There is no guar antee that the member actually exists For example PtrFoo gt somemember looks like a member reference FooThing somemember looks like a member reference Qualify references to functions If enabled Source Insight will verify that the function declaration exists before formatting it with the Ref to Function or Ref to Method styles If disabled then Source Insight will format tokens with the reference styles if the tokens look syntactically like a function call There is no guarantee that the function actually exists For example SomeFunction x looks like a function reference Tile Horizontal The Tile Horizontal command arranges all windows so they are not overlap ping The tiling algorithm will attempt to make windows wider than they are tall This is useful for viewing 2 or more files on top of each other 282 Source Insight User Manual Chapter 5 Tile One Window Tile One Window The Tile One Window command minimizes all but the current window The current window is grown to fill most of the Source Insight window s workspace area Tile Two Windows The Tile Two Windows command
18. The items in the Options Group control general options for different display elements in the program Page Number in status bar If checked then the current page number that con tains the current selection is also displayed in the status bar The page number is calculated from the size the printer font selected in the Document Options command plus syntax formatting options and the settings made in Page Setup Cascade new windows If checked Source Insight will cascade new windows down the screen in the conventional Windows way If not checked Source Insight will position new windows exactly at the same location as the current window The new window will cover the old window Maximize new windows If checked then Source Insight will automatically maximize newly opened windows If not checked then Source Insight will just open the windows in the normal MDI fashion Horizontal scroll bars for each new window If checked then each new source file window created will get a horizontal scroll bar Vertical scroll bars for each new window If checked then each new source file window created will get a vertical scroll bar Smooth scrolling windows If checked then windows will scroll more smoothly instead of jumping one line at a time Smooth scrolling only takes place if you are not scrolling continuously but rather one or two lines at a time If you start editing or scrolling quickly then smooth scrolling speeds up too If not checked the
19. aaral elealg Figure 1 3 The Relation Window is showing references to a type and indirect references through a function Source Insight User Manual 5 Introduction Chapter 1 Syntax Formatting Syntax Formatting is an important Source Insight innovation that renders information in a dense yet pleasing and useful way It provides vastly improved display capabilities including full rich text formatting with user defined styles Source Insight applies styles automatically based on lexical and symbolic infor mation about your project See also Syntax Formatting and Styles on page 74 E Sinew Project Source Insight Beta LineFormat c Loraj E File Edit Search Project Options View Window Help Work laj x Qd EE Gxme oc asame sescasaramejmogagd i LineFormat c E PASS 3 scan FTO tokens and emit DINS Setup xp s for computing character and tab widths amp include main h E FMTVIRTTOKENS stcSpecNestFirst xp 0 ee xpFixed lt 0 fica dxpExpand 0 etii pd pOut e flirgdxp viNoFliCache e viNoQuickFmt AssertBeginFormat Reset pointers to start of line ichRaw e fli ichLineFirst ttmClassStuft tokpos ch szLine ichRaw cchIndentAdded e ttmFuncCalls eS j For All Pfto in Rofto nitFormat i i i BB FormatFinSession for pfto e flirgfto pfto lt pftoMac pfto E FormatSignalDocClose 1 PCH pchLimFto FLAG fWhiteCh E FormatSignalOptionChange
20. CLI in addi tion to ordinary text files Time stamping When you save a file with Source Insight and you have a project open Source Insight records the files modification time in the project If you open a project file and the files modification date is newer than the date recorded in the project then Source Insight will re synchronize the file project symbol database for that file By automatically synchronizing Source Insight allows you or oth ers in your development team to use another text editor or a source control sys tem and still maintain Source Insight s project databases See also Synchronize Files on page 277 What Happens when you Start Source Insight When you start Source Insight it first looks in the Registry to see what project needs to be opened Then it opens that project thereby loading that project s configuration and workspace Loading a workspace causes all the previously opened files to be reopened If file names are specified on the command line then the files listed in the workspace are usually not reopened If a project is opened the current working directory may be changed to the project s source directory Recovering From Crashes The recovery file is saved in the back ground while you edit You control how often the recovery file is saved in Pref erences General Periodically your unsaved edits are saved in a temporary recovery file This saving process is very fast and you will
21. CloseProj hprj Closes the project hprj DeleteConditionVariable hprj szName Deletes a new conditional parsing variable used to evaluation conditional state ments such as if while parsing code Hprj is a handle to the project If hprj is hNil then the variable is deleted from the global condition list The name of the variable is given in szName There are two condition lists the global list and the project specific list When you open a project the two lists are merged with the project specific list taking precedence over entries in the global list See also AddCondition Variable on page 338 See also Conditional Parsing on page 61 DeleteProj proj name Delete the project named in proj name If that project is currently open then the user is asked if they want to close it first If the user does not close the project then the project is not deleted EmptyProj Empties the project by removing all files from the project The actual files themselves are not affected Returns True if successful or False if errors GetCurrentProj Returns the handle hprj of the currently open project Source Insight only allows the user to open a single project at a time however from the macro lan guage more than one project can be open Source Insight User Manual 339 Macro Language Guide Chapter 6 GetProjDir hprj Returns the source directory path of the project hprj GetProjFileCount hprj Retu
22. Renames the given buffer to szNewName The file on disk is also renamed If the buffer is a member of an open project then the file is renamed in the project SaveBuf hbuf Saves a file buffer to disk Hbuf is the buffer handle SaveBufAs hbuf filename Saves a file buffer a different file name Hbufis the buffer handle Filename is the name of the new file SetBufDirty hbuf fDirty Sets the dirty state of the given buffer to fDirty A dirty buffer is one that has been edited since is was opened or saved A dirty buffer contains changes that have not been saved When the user closes a dirty buffer Source Insight prompts to save the file You can use this function to un dirty a buffer so that the user is not prompted to save it SetBuflns hbuf In ich Sets the cursor position insertion point to line number In at character index ich in file buffer hbuf A macro error is generated if the given file buffer is not already displayed in a source file window SetBufSelText hbuf s Replaces the currently selected characters in the file buffer hbuf with the string s This is useful for replacing the text of a word selection A macro error is gen erated if the given file buffer is not already displayed in a source file window This is the simplest way to insert new text into a buffer For example this code inserts new text into the current buffer at the current insertion position hbuf GetCurrentBuf SetBufSelText
23. Scroll Right The Scroll Right command scrolls the active window to the right by one tab size SDK Help The SDK Help command takes the word in the current selection and looks it up in the Windows Software Development Kit help file For example if you selected TextOut in your program and ran the SDK Help command a Help window for the TextOut Windows function would open You must have a Windows SDK help file installed on your computer to use this Any help file for WinHelp 3 1 or greater may be used it does not have to be an SDK help file If you often want to perform help lookups from Source Insight using a different help file that will work just fine You can tell Source Insight what WinHelp file to run for the SDK Help com mand by running the Change the SDK Help File command Source Insight User Manual 253 Command Reference Chapter 5 Search Search Scope The Search command searches the current file or selection for a specified pat tern x Find Options Search Cancel Case Sensitive Forward IV Use Regular Expressions C Backward whae me IV Wrap Around IV Select When Found Selection Files Whole Words Only Whole File Find Add the pattern you want to search for in this text box Search Click this to begin searching Cancel Click this to cancel the command Whole File Click this button to search the whole file from top to bottom and place
24. Simple Tab Inserts a regular tab overriding the Smart Tab mode Smart Beginning of Line Special version of Beginning of Line command Smart End of Line Special version of End of Line command Smart Tab command When used at various positions moves the selection to the next field A field is defined as an interesting position in the current context Source Dynamics on the Web Opens the Source Dynamics web site in your Internet browser Special Edit A submenu contains special editing commands Style Properties Sets formatting properties for display styles Symbol Lookup Options Sets options for looking up symbol definitions Symbol Window Properties Displays the properties of the symbol window on the left of each source window Sync File to Source Control Project Custom source control Gets the latest version of the selected file Sync to Source Control Project Custom source control Gets the latest version of all project files Syntax Formatting Specifies syntax formatting options for displaying source files Toggle Case Toggles the case of the selected text Touch All Files in Relation Touches all files referenced in the Relation Window Typing Options Specifies typing and editing options Undo Check Out Custom source control Reverses the check out of the current file Uppercase Converts the selected text to uppercase Window Li
25. Sort Symbols By Type Sorts the symbol entries listed in the Symbol Window by symbol type For example all structs will appear together followed by all functions etc By default the Symbol Window is sorted by line number occurrence If you want all Symbol Windows to be sorted this way by default then right click on the Symbol Window and run the Record New Default Properties com mand on the Symbol Windows right click shortcut menu Source Dynamics on the Web This command opens your web browser and goes to the Source Dynamics web site Start Recording The Start Recording command turns on the command recorder While record ing any command you run will also be recorded This allows you to record a single series of commands which can be played back with the Play Recording command To stop recording use the Stop Recording command or just play the recording back with the Play Recording command You can keep only one recording at a time The recording is saved with the workspace Stop Recording The Stop Recording commands turns off the command recorder The Start Recording command is used to start the recorder The command recorder allows you to record a single series of commands which can be played back with the Play Recording command Style Properties Style properties are combined with the parent style This command allows you to set formatting properties for display styles For more information about how sty
26. Table 6 5 Identifier Naming Conventions Name fThing Meaning f means flag or boolean fThing means Thing is True TRUE m a non zero value e g 1 FALSE a zero value i e 0 In zero based line number InFirst first line number in a range InLast last line number in a range inclusively InLim limit one past the last line number in a range hbuf handle to a file buffer hwnd handle to a window hprj handle to a project hsyml Handle to a symbol list Any other names Standard Record Structures general string variables Record structures are similar to C data structures A record variable is actually a delimited list of name value pairs Record variables are used in the same way that a struct would be used in C Record variables are returned by some internal macro functions because it is a convenient way to return multiple values This section describes the record structures used by the internal macro func tions in Source Insight Bookmark Record A bookmark is a position in a file buffer The Bookmark record has the follow ing fields Field Description Name The bookmark name File The file name of the bookmark position In The line number position ich The character index on the line Source Insight User Manual 305 Macro Language Guide Chapter 6 Bufprop Record A Buf
27. The Open Project command allows you to open a new current project It first closes the existing current project if any since Source Insight only allows one project open at a time You can also open a project by dragging a project file PR from Windows Explorer onto the Source Insight window or specifying a project file in the Open dialog x Project Name ni Metacs c metacs Mfc c wstul wc98 mfc Cancel Browse Project Name Type the name or part of the name of the project you would like to select Project list Displays a list of all the projects you have created or opened on your machine Select the project you want to open here This list is simply a record ing of known projects You may have other projects that are not listed here To open those click the Browse button and locate the project file Browse Click this button to bring up the standard Open dialog box which allows you to browse around your disks Locate a project file with a PR exten sion Once you select a file and close the Open dialog box the file you selected will be loaded into the Project Name text box Then click OK to open it Page Down The Page Down command scrolls the active window down by one window full with one line of continuity Source Insight User Manual 215 Command Reference Chapter 5 Page Setup Title Strings group The Page Setup command allows you to control the layout of text on printed pages t
28. Typing Files Languages SymbolLookups Display Remote Options apply only when running in a Remote Desktop or Terminal session Remote Session Options r Remote Session Options These check boxes disable display behaviors that can be slow if your remote connection is not very fast Source Insight User Manual 241 Command Reference Chapter 5 Font Scaling Sets the percent of overall text scaling in the program Most text including source code and lists are scaled by this percentage The Rename command renames the current file The file does not have to be saved on disk Ifthe file is part of the current project the project is adjusted to reflect the new name You may also move the file to a new directory with this command but you cannot move the file to a different drive The Rename command does not save the file Renumber The Renumber command reorders numbers found in the current file or just the current selection If the selection is extended when the Renumber com mand is used then only the selection is processed If the current selection is an insertion point then the whole file is processed Renumber also works on a column selection I x C Octal Help Radix Numbers Auto Auto Decimal C Start at PEE C Hex Offset NENNEN Radix Select a radio button in this group to specify the radix of the numbers generated by the Renumber command Auto Use the radix of the origi
29. Typing in a source file window If the auto completion feature is not enabled then the Context Window shows prefix matches or symbol defi nition if unique For example if you typed Insert then the Context Win dow will show all symbols that begin with Insert It there is only one sym bol named Insert then the Context Window will show the declaration of Insert 36 Source Insight User Manual Chapter 3 The Context Window dynami cally decodes base types Context Window Table 3 1 Context Window Behavior Continued Your Action Context Window Result Selecting a file in the Project Win Shows the file contents dow Selecting a clip in the Clip Window Shows the clip contents Selecting an item in the Relation Shows the selected symbol s defini Window tion If the symbol in the Relation Window is a reference then the Con text Window shows the location ofthe reference Decoding Base Types to Show Structures The Context Window also can determine the base structural type of a symbol by climbing up the type hierarchy That is typedefs are decoded all the way back to the base structure type For example if you have code like this struct S 0 x 43 typedef S T typedef T PT PT ptvar ptvar foo If you select the foo in ptvar foo then the Context window will find the declaration of PT ptvar and decode the type hierarchy until it finds the struct S andit will display the declaration o
30. and h If you also have C source files with h2 extensions then you can add h2 to the File Filter list of the C Source File document type eee Ae ene Whenever Source Insight displays a list of files such as in the Add Files dialog box the list is an expansion of the union of all File Filter text boxes in all defined document types In other words when you add new document types those files will also appear in the file lists Make options the same as Default type If checked then the Editing Options and the Status Bar Options will be taken from the Default document type This allows you to define many document types but control their options from one location the Default document type s record The parser settings are not affected and they remain unique to each document type If not checked then Editing Options and the Status Bar Options will be taken from the each individual document type record Include when adding to project If checked then the Add File command and the automatic add file feature will include this type of file when looking for new files to add to the project Emulate screen fonts when printing If checked then Source Insight will attempt to select the same fonts for the printer as you have selected for the screen If you are using a TrueType screen font that should work fine If not checked then the font setting of the Printer Fonts button is used when printing Line up white space This opti
31. csccsssssssssscccssccccccccccccccccssssssssssccssscscsssscsees 45 lioe 45 Project Features 47 Creating a Project 47 Proje t Directories M 47 Normalized File NAMES 48 TAO Project List esr H 49 Adding Files to a Project s scccccsssssssssccsccsssssccsccssccscccccscccecsscsscesecsecesecsscssecssessecooes 49 Removing Files from a Project 50 Closing Projects 50 Opening Projects 50 Removing a Project 451 Changing Project Settings esee eene neenon aont n einen einen snas eas en aenean 51 Working in a Team Environment eeee eee esee eene eee nean wee 51 USING d NCtWOFk 52 Adding Remote Files to a Project 52 USING SOUPCE A 53 Understanding Symbols and Projects ccscccccscscsscscscssscscccsccseccscssssccssccessee 54 Languages Used to Parse Source Files eee e eee ee eee essen senes en etae ea etae ta sn ann 54 AS LT Ios P 54 Updating the Symbol Database 55 File Names Are Like Symbols 55 Synchronizing Project Files ssseesessesessosoososossoccosossoe 55 Using Common Projects The Project Symbol Path sssesesssseesosseseesosoosessosossocsocossesossoe 56 Searching the Project Symbol Path ecce ee esee e sees eene en setae en etae ea sense tasa sea 57 Working With No P
32. gles the syllable matching on and off If you encounter a lot of disk thrashing while trying to match any syllables in lists then your project may be just too big for the available memory 114 Source Insight User Manual Chapter 4 Relation Windows can require a lot of processing It takes more work to show refer ences Performance Tuning In Preferences Typing turning off both Match syllables and Match mem bers will speed it up more and return list filtering to version 2 1 functionality Speeding Up Building and Synchronizing Projects A very large project will take a while to build or rebuild To speed it up you can try the following e n Project Settings turn off Quick browsing for symbol syllables This index option uses a lot of memory and slows the indexing process e n Project Settings turn off Quick browsing for member names This index option can use a lot of memory also e Reduce the number of document types i e file types that are added to your projects By default Source Insight comes with many document types defined such as Visual Basic files and ASP files If you have files like that in your source tree but you have no need to work on them then remove them from your project You can permanently exclude those document types from your projects by running Document Options and un checking the check box Include when adding to projects for each type of document you want to ex
33. Any number of workspace file names may also be intermixed with regular file names For example insight3 100 file c myset vw print c myset2 wk3 This will open both the files and the workspace files 102 Source Insight User Manual Chapter 4 Command Line Syntax Command Line Options The following options may be included on the Source Insight command line Suppressing New Program Instances i rest of command line This option will direct the rest of the command line to an already running instance of Source Insight if any If there are no instances already running then a new instance is started Example insight3 i myfile cpp This will locate an already running instance of Source Insight and tell it to open myfile cpp Running a Source Insight Command c lt commandname gt This option will start Source Insight and run the specified command The command can be a built in command or a defined custom command or a macro command Specifying a Project to Open p lt projectname gt This option closes the current project if any and opens the project given in projectname If the project does not exist Source Insight will give an error message Example insight3 p myproj Closing the Current Project pc This option closes the current project if one is open No other project is opened Example insight3 pc Using a Temporary Project pt lt projectname gt This option closes the current pr
34. Each time the Relation Window expands a symbol to show a new level the rela tionship represented by the expansion is based on the type of symbol being expanded That means each Relation Window can potentially show multiple relationships See also Relation Window Properties on page 233 Call Graphs The function call graph relationships can be filtered to show only what you consider the most interesting paths The Call Graph Filtering button in the Relation Window Properties dialog box takes you to a dialog box that lets you control the filtering by specifying particular functions you want to exclude You can also filter functions out by code metrics constraints Note that Source Insight considers C macros legitimate function like symbols and so C macros may show up in a call graph You can filter them out in the Call Graph Filtering dialog box if you want Multiple Relation Windows You can have more than one Relation Window by right clicking on a Relation Window and selecting the New Relation Window command Having two or more Relation Windows lets you view multiple types of relationships or track different targets at the same time For example one window could show you what functions are called by the selected function and another window could show you what functions make calls to the selected function Customizing the Relation Window The Relation Window Properties command is accessed from the Relation Win dow toolbar o
35. If new files appear in your project directory or subdirectories they can also be added automatically to your project by running the Synchronize Files com mand Source Insight User Manual 19 Setup and Quick Start Chapter 2 20 Source Insight User Manual cara Window Tour This chapter describes the user interface and different windows available in Source Insight Source Insight Application Window The user interface of Source Insight consists mainly of e The main menu and toolbar area at the top e The source file windows that you edit files in e Tool windows which can dock or float Source Insight is an MDI Multiple Document Interface application This means that each source file you open has its own child window contained within the Source Insight application window Source Insight User Manual 21 Window Tour Chapter 3 The main Source Insight application window contains the main toolbar at the top You will spend most of your time working in source file windows Main menu and p Dixi toolbar area e idt Search Prod Optens Ven Wim Bp Wo iex Wuna xot se 2o aSa An Hone jor Bost ezza Winfrm cpp out References lt 51 Source file window SAEN for editing and irel KOL CFraneind magctiatanadarapesa viewing code 3 OnteloPromotAdde D GetMessageBar CRect border reqoest W OnEnceridie r W SetMessage Text switch aBorderced Bl SetMessageText 1 Wl DestroyDockBars Symbol
36. Ig FormatSignalDocE dit I FormatSaveState I8 FormatRestoreState indi Assert pfto2cch 2 0 L on pchLimFto tokpos ech pfto cch Bg PE fWhiteCh e pftoccch 1 amp amp FWhiteCh tokpos och E FormatSetLanguageAtLn j convert word at tokpos pch into an sz chLimSave pchLimFto pchLimFto chEos E FormatSetlchSeek I FormatSetwordwrap E FormatSetStcO verride Ig FormatViewLineNumbers Ig FormatViewSelection j reset no character expansion Ig FormatSetNoCmtHide dxpExpand 0 FormatGetNoCmtHide IE FormatSetT extO verride Ig FormatSetMin amp scentDescen E FormatSetStrategy E FormatSetFonllnfoMode E PchGetLineNumSprintfString Ig CacheFormatT aglnfo E CacheFmtsT gl j reset assume no kcap mi kcapCur amp kcapNone Change formatting if style code changes if stc changes AND not white or props change OR faddsel changes a a 7 stc changes E DypShadow lfsetFromFrq mptagtsteDel STC pftosste fmts stcCur mptagtstcRet Ig StcDclFromPtag AND not white space or property transition required ifdef NOTUSED Ba 3i endif NOTUSED E StcRefFromT agt FGetBolCommentStateFrom4 fWhitech tokpos ch szLine ffrqSameAsBase _fmts chpCur kul kulNone _fmts chpCur kbo kboNone E _fmts chpCur covBack _fmts chpBase covBack E FScanForBolComment E FFormatRefToLocal Ig FCacheFormatContainerT agt E FFormatRefToGlobal E FF
37. Language Options on page 193 Custom languages can also be exported and imported To Add a Custom Language Adding support for a new language is basically a two step process 1 Add the language using Options gt Preferences Languages See Language Options on page 193 2 Add the Document Type that refers to the language by using Options gt Document Options See Document Types on page 66 Note The Document Options dialog still allows you to add a custom parsing pat tern directly into the document type properties in lieu of adding a new lan guage However you have more control by adding a new custom language and using your document type to point to the new language 58 Source Insight User Manual Chapter 4 The Net Frame work class library symbols are stored in the NetFrame work project HTML and ASP are actually compound languages which may contain embedded scripts Programming Languages The Language Options topic in the Command Reference contains more details on custom language properties Net Framework Support When editing C files Source Insight can perform symbol completion for the Net Framework class library symbols This is accomplished by keeping a Net Framework project on your machine The Net Framework class library symbols are stored in the NetFramework project that Source Insight creates Source Insight stores the project in the Net Framework folder inside
38. Table 4 1 Source Control Commands Command Name Action Check Out Checks the current file out of the Source Control project so that you can edit it Check In Checks the current file into the Source Control project You should use Check In after you are fin ished editing a file and want to put it back into the main Source Control project for other team mem bers to access Undo Check Out Reverses the action of a Check Out This does not check the file back in Sync to Source Control Updates all the files in your local project so they are Project current with respect to the Source Control project Sync File to Source Con Updates the current file so it is current with respect trol Project to the Source Control project Source Insight User Manual 53 Source Insight Concepts Chapter 4 Source Control Toolbar The Source Control toolbar contains buttons for each of the source control commands Check In Sync To Source Control Proiget 260 8 ga g Check Out Undo Sync File To Source Check Out Control Project Figure 4 4 The Source Control toolbar Understanding Symbols and Projects The symbol data base is automati cally updated when files change Source Insight parses symbol definitions dynamically out of your source files while you edit Symbol information is stored on disk in an indexed symbol database which is integral to the project The symbol database is updated incrementally as
39. The Cursor Left command moves the insertion point left by one character Cursor Right The Cursor Right command moves the insertion point right by one character 144 Source Insight User Manual Chapter 5 Cursor Up Cursor Up The Cursor Up command moves the insertion point up by one line Custom Commands Custom commands are similar to command shell batch files They allow Source Insight to spawn any command line driven tool and to capture its out put Custom commands can also execute Windows programs Customs commands can execute and then return to Source Insight The out put of shell custom commands can be captured into a file for editing or can be pasted into the current selection Custom commands are stored as part of the current configuration Custom commands can be used to spawn compilers source control programs and file filters such as sort Tip A shortcut for editing a custom command is to hold down the Ctrl key while selecting the command The Custom Commands dialog box will appear for that command Custom Command Dialog box xl ustom Commands Command Check Out r Source Links in Output Parse Links in Output Pattern Contains Add Remove Run ss Checkout r Browse ee Dir Help r Output Control Iconic Window Save Files First Wait Until Done Capture Output v Pause WhenDone J Share Files Run Paste Output BeepWhenDone Exit to Wi
40. To explore your Windows 98 ShellExecute explore C My Documents documents file folder To launch Internet Explorer ShellExecute iexplore 150 Source Insight User Manual Chapter 5 Custom Commands Action Custom Command Run String To preview a file in Internet ShellExecute iexplore f Explorer To search for files in the cur ShellExecute find j rent project folder Running Custom Commands in the Background When Source Insight spawns a Custom Command shell program it actually runs a program called Sihook3 exe Sihook3 exe in turn spawns the command and performs the output capturing You can run a custom command and click back on the Source Insight window to continue editing with Source Insight while the custom command runs in the background Creating a Compile and Build command You can launch a compiler from Source Insight using a custom command and have the output captured and parsed for error messages Then you can use Go To First Link and Go To Next Link to view each error in your source files To create a simple Compile command To create a simple Compile command using the Microsoft C compiler 1 Run the Custom Command command 2 Type Compile File in the Name text box 3 Inthe Run text box type cl This invokes the compiler on the cur rent file You could also invoke a make program or a batch file here instead If you use a batch file you must run the comman
41. Tracking Options Automatic Expansion Options Fort Espand duplicate branches Levels f Text Color M View Relationship Back Color For Types Contents For Functions References Graph For Variables Constants References gt Help For Classes Derived Classes v Group multiple references into one item Call Graph Filtering Symbol Types Columns Cancel ddddddi M Show file names Show line numbers Show code metrics None Font Text Color Back Color Click on these to select the font text color and background color respectively of the Relation Window These apply to the outline view only Graph Click on this button to open the Relation Graph Properties dialog box From there you can adjust the options for the graph view of the Relation Win dow Click the Tracking Options button to control what the Relation Window tracks It can track the symbol that appears under the cursor or it can track the enclos ing function or data structure where the selection is located This section specifies how deep the Relation Window should expand automati cally You can override this on an individual basis by right clicking on a node in the Relation Window and selecting Expand Special Levels The number of levels to expand below the root node 234 Source Insight User Manual Chapter 5 View Relationship Group Column
42. but there are a couple of benefits e Syntax formatting works for references to it e Variables are initialized to the empty string value nil so they are not confused with literal values when used without being initialized For example macro SomeFunction var localx localx is displayed with Ref to Local style localx 0 A local variable cannot be access outside of its function Variable Initialization Variables are initialized by simply assigning a value to them It may be useful to initialize a variable to the empty string A special constant named nil is used for that For example S nil s is set to the empty string S same thing Global Variables The global statement is used to declare global variables For example macro SomeFunction global last_count A variable that is declared with the var statement or created by assignment is considered local to the function that contains the statement However the glo bal statement is a way to declare a variable whose scope is global instead of local That means you can access it from multiple functions 296 Source Insight User Manual Chapter 6 Global variables hold their values for the whole Source Insight session Variables When the global statement is encountered the variable is entered into the glo bal scope variable table The variable is initialized to nil This example shows how you mi
43. custom parsing expressions you define Source Insight also makes heavy use of memory mapped files This is a Win32 feature whereby files can be mapped into virtual address space so that a file looks like a block of memory to a program Source Insight uses memory mapped files to provide the fastest possible access to source files and database files When Source Insight memory maps a project database file it will take up a rel atively large amount of virtual address space as soon as the file is opened As Source Insight accesses different records in the database the operating system will commit increasingly more physical memory to hold the database file con tents The operating system will always keep some memory in reserve for other programs and the system to use The size of a project database is proportional to the number of declared sym bols in the project Therefore if your project is very large the amount of mem ory used by Source Insight can be over 100 megabytes However you must realize that most of the memory in use as reported by the Task Manager or other performance monitoring tools represents portions of the symbol data base mapped into memory Source Insight does not require this much physical memory Physical Memory Capacity If your projects are large Source Insight will require more memory Having more RAM in your system will improve performance At least 64 megabytes of RAM is the recommended minimum fo
44. e 356 Improved Editing and Display FeatUteS s esseseesosoesecsosoosecoosossecoosossocoososoosoesosoososseee 357 NeW Command S seses eeie oce eno tori S Sepe e Vp e Une aue ka epe Vn e saeva eroe eo Va tego asa ve ege Un udg 358 New Command List eese eee eee enean atnn File Format Compatibility with Older Versions CHAPTER 9 LICENSE AGREEMENT eeee eee eee eee eee ees sssssssssss sess sees eee seeeeeeeeeeeeeess SOD xvi Source Insight User Manual Source Insight 3 5 User Manual Copyright 2004 2006 by Source Dynamics Inc 1 26 2006 Source Insight Version 3 5 Copyright 1987 2003 by Source Dynamics Inc This documentation and the software described in it are copyrighted with all rights reserved Under the copyright laws neither the documentation nor the software may be copied photocopied reproduced translated or reduced to any electronic medium or machine readable form in whole or in part without the prior written consent of Source Dynamics Inc Disclaimer of Warranties and Limitation of Liabilities This manual and the software described in it were prepared by Source Dynamics Inc and are subject to change without notice Source Dynamics Inc assumes no liability resulting from any inaccuracy or omissions contained herein or from the use of the information or programs contained herewith Source Dynamics Inc makes no expressed or implied warranty of any kind with regard to these
45. file is the one specified in the Setup HTML Help command See also Setup HTML Help on page 265 Indent Left The Indent Left command outdents the lines intersecting with the current selection to the left by the size of one tab stop Lines that begin with are not indented Indent Right The Indent Right command indents the lines intersecting with the current selection to the right by the size of one tab stop Lines that begin with are not indented Source Insight indents lines to the right by inserting a tab character Source Insight User Manual 183 Command Reference Chapter 5 If you have the Expand tabs to spaces option on for the current document type then spaces equivalent to a tab stop are inserted instead of a tab character Insert ASCII The Insert ASCII command inserts a character that you specify with its ASCII code I xi ce pe Auto Character Code C Decimal lI Cancel C Hex Radix Selects the input radix of the character code you typed If Auto is selected then the input radix is determined from the text you type For exam ple if you type 0x20 then the radix is assumed to be Hex and ASCII 32 is inserted Character Code This is the ASCII code of the character you want to insert 184 Source Insight User Manual Chapter 5 Insert File Insert File The Insert File command pastes the text of another file into the current selec tion Insert File x File
46. o Yes Click to save and close the file No Click to close the file without saving it Changes you ve made will not be saved Cancel Click to cancel the Close command The file will remain open and it will not be saved 136 Source Insight User Manual Chapter 5 Close All Close All The Close All command performs a Close command on each open file For any files that you have changed but not saved Source Insight will ask if you want to save them Unsaved Files I Util c toolbox If you have any captured custom command windows open and the custom command is still running those windows are not closed Close Project The Close Project command closes the current project When the project is closed all open files are also closed Source Insight does this by performing the Close command on each open file The workspace and configuration files for the project are also saved Close Window The Close Window command closes the current window Since a file can appear in more than one window closing a window does not neccessarily mean you will close the file buffer too If you close the only window showing a file then the file is closed also Source Insight User Manual 137 Command Reference Chapter 5 Color Options Activates the Preferences Colors dialog box which allows you to specify the colors of user interface items Preferences ij x CI Window Background C Selection
47. on page 190 To determine the formatting of any given word in a window Source Insight locates the word in the keyword list of the appropriate language type The key word list contains a style name which in turn implies the formatting associated with the style Source Insight User Manual 77 Source Insight Concepts Chapter 4 Declarations are formatted with a Declare style References to symbols are formatted with a Ref to style Therefore starting with a file name and a word in the file Source Insight derives the word s style with this relationship Document Language File Name F gt Type oe Keyword List m Style Used word in source Figure 4 12 The style used for a word in source text is determined by the keyword list of the language of the document type of the file in question Declaration Styles Wherever a symbol is declared or defined its name is formatted with an appro priate Declaration style There are declaration styles for different types of things like structs classes unions functions etc For example a structure might look like this typedef struct CLIP HSZ hszSource where it came from HSZ hszWhat ff what it is CLIP The structure name CLIP is shown in the Declare Struct style The member fields inside the struct are shown in the Declare Member style Reference Styl
48. right click on the Symbol Window and select Record New Default Properties 28 Source Insight User Manual Chapter 3 Floating Windows This records the window s width symbol sorting and symbol type filtering and uses those parameters as the new default for new windows created subse quently Floating Windows Floating windows Floating tool windows can float in front of the main application window and canbedockedtoan they can be docked to the edge of the window By dragging a floating window edge ofthe main toan edge ofthe main window you can dock it to the main window The tool Source Insight windows are window Project Window a multi mode window that shows project files and symbols Context Window a context sensitive information window Clips Window shows clipboard like clips for easy copying and pasting Relation Windows shows call trees class trees and other relationships FlnitF ont flac FInitFontso ji create _feePlain fcePlainhfont GetStockObject DEVICE_DEFAULT_FONT fceDlain dev devScreen InitFce vsci hdcScratch amp _fcePlain return fTrue end fiw gt Clips a TexthomFomatBesininFormatc a x sprintf szPrompt Cannot save to read only file Zs szFile a Shutdown Font modi Clipboard id ShutDownFont Sig SignalT mcChange tmeSFROT Again PFCE pfce pfceNext for Gica ies naaras pfceNest pfcec ofceMext if pfceshfont hfontNil Del
49. s prototype This only works if the selected symbol is a function Key Assignments The Key Assignments command allows you to assign or reassign keystroke combinations to commands The mouse buttons can also be assigned to com mands The key assignments are part of the current configuration Source Insight User Manual 187 Command Reference Chapter 5 Key Assignments Dialog box Key Assignments b xj Command Keystrokes fet z l Activate Clip Window Cancel Navigation Activate Context Symbol Lis Navigation Activate Context Window zi Navigation Activate Project Window Run Navigation Activate Relation Window Navigation Activate Search Results Assign Navigation Activate Symbol Window See Nw d Had Navigation Beginning Of Line Navigation Beginning Of Selection amen List Navigation Blank Line Down Navigation Blank Line Up Mmi Navigation Block Down Navigation Block Up Navigation Bookmark zi Help Opens and selects the Clip Window Command You can type into this text box to narrow down the command list so that you can find the command you want easily With syllable matching you can simply type a word contained within any command name Command list Lists all the Source Insight commands including macros and custom commands that you ve defined When you select a command here the keystrokes list is loaded with all the keystrokes currently assigned to the selected command Keystroke
50. symbol_name Returns the location of the symbol name specified in symbol_name The loca tion is returned in a Symbol record An empty string is returned if the symbol is not found See also Symbol Record on page 309 This function performs a look up operation the same way that Source Insight looks up symbols when you use the Jump To Definition command If the sym bol is not found in the current project or any open file then all the projects on the project symbol path are searched as well If more than one declaration is found for symbol_name then the user is presented with a multiple definition list to select from You can also call GetSymbolLocationEx for more control over how the lookup operation is performed and to locate multiple definitions of the same symbol name 332 Source Insight User Manual Chapter 6 Symbol Functions This example looks up the definition of a symbol and displays its source file and line number symbol Ask What symbol do you want to locate loc GetSymbolLocation symbol if loc Msg symbol was not found else Msg symbol was found in loc file at line loc lnFirst Locating File Names GetSymbolLocation can also look up file names By giving a simple file name as the symbol name parameter GetSymbolLocation can look up the file in the project or on the project symbol path and return the fully qualified path to the file in thelocation file field This ca
51. the list is filtered down to Cmdlang c 60696 7 17 2002 show only files that match LangVB cpp 52742 7 10 2002 Transparency what you type regardless of Insert c 51733 8 29 2002 directory LangBase cpp 56823 10 24 2002 Ti c 118862 8 29 2002 Rex c toolbox 32689 8 18 2002 Parse c 86656 10 7 2002 LangPerl cpp 54949 2 1 2002 Cmdtag c 62897 8 29 2002 Cmdstyle c 37764 7 10 2002 Toolbar 31679 8 29 2002 49049 4 12 2001 EACEA TENNAN These buttons switch the Project Window view The views are 1 File List View lists all files in the project File Directory View lists files by directory File Type View lists files by document type Symbol List View lists all symbols in the project Symbol Class View lists symbols by class and type UR WN Figure 3 6 The Project Window areas The Project Window can be either docked to a side of the Source Insight main application window or it can float in front At the bottom of the Project Window is a small toolbar with buttons for open ing a project and adding and removing files from the project 30 Source Insight User Manual Chapter 3 Project Window Opening Files Quickly To open a file double click on the file name in the Project Window Right click on the Project Window to bring up the Project Window shortcut menu Typing into the text box at the top of the Project Window filters the list down to only files that match what you type The directory where the file exists is not
52. would allow you to save only the display settings such as screen colors and screen size while leaving other parts of the configuration unspecified This grouping contains a check box for each configuration part Check the items you want to save here Save Displays the standard Save dialog box You can select the configuration file you want to save to with this dialog box Source Insight User Manual 251 Command Reference Chapter 5 Having Multiple Configurations You can keep several favorite configurations After setting up the current con figuration the way you like it in Source Insight use the Save Configuration command to save each configuration to a different file When you want to change configurations use the Load Configuration command and specify the name of the configuration file you want to open When the configuration file is opened it replaces the current configuration Note Once you load a configuration file it will be automatically saved to the cur rent configuration file that is in effect By default that file is Global cf3 in your Source Insight program directory Make sure you make a backup of Global cf3 if you want to keep it See also Load Configuration on page 204 Save Selection The Save Selection command saves the currently selected text to a new file The new file will remain open The file may be a new file or an already existing file The file may also be a file that is already open i
53. you can surf your project the way you would a web site You can just double click on a local or global symbol and Source Insight takes you to the definition or can pop up a quick information window You can click on a symbol and within seconds have a list of all references to that symbol any where in the project A symbol browsing dialog box allows you to perform reg ular expression searches to locate symbols Project Level Orientation Entire source directory trees even multiple directories across your network can be added to a Source Insight Project You can specify a file name quickly without having to know what directory it is in Source Insight automatically maintains its own database of symbols and indexes for each project Project reports and cross references can also be generated When your source control program updates files in the project Source Insight notices and incrementally updates the symbol information for you automatically Team Programming Support Changes made by any member of a programming team are reflected automati cally because the entire code base is scanned and resynchronized as needed Programmers need not be concerned with the organization of the project and its files because they can instantly jump to the definition or usages of any sym bol and can access modules and other symbols without having to know what directory machine or file they are in Source Insight gives each programmer the leverage to
54. 1 endif Usus t M i declared in the file i FreeHsw Tove tgvs e Yaysp w htw Each symbol has an ToFron SwzList PSW psw Psyw hsw icon to identify its type E DelFromSw ist E dn dd You can click the icon Irons j cen to drag and drop B GetSwac psw tgvsSave tgvs whole symbols Gl WadProcSw if tgus tgsort tgsort 09 ISSN SetSmwTgsort hsmv break eintMsgSw B PaintScrollCarmer Text area of source a a FSwHasGrowBox case EN CHANGE window E GetScroliComerrc psmw orevEdite edit field A Heiser FFilterSmv hsmw HdcSwLock bye Symbol window toolbar LER El return E x d Line 2287 Col 16 DoSwCommend Figure 3 4 A Symbol Window appears at the left side of each source file window At the bottom of the Symbol Window is a small toolbar There are controls for sorting the list and a button for running the Browse Local File Symbols com mand You can right click on the Symbol Window to bring up its shortcut menu Customizing the Symbol Window Right click on the Symbol Window and select Symbol Window Properties to change its settings See also Symbol Window Properties on page 276 Changing the Width of the Symbol Window To change the width of the Symbol Window click on the right edge of the win dow and drag Permanently Changing the Width of the Symbol Window To permenantly change the width of the symbol window and all future Symbol Windows in other files resize the window by dragging the right edge Then
55. 227 19 as applicable Manufacturer is Source Dynamics Inc 22525 SE 64th Place Suite 260 Issaquah WA 98027 USA 11 MISCELLANEOUS If you acquired the SOFTWARE in the United States this EULA is governed by the laws of the state of Washington If you acquired the SOFTWARE outside of the United States then local laws may apply If you have any questions concerning this EULA or wish to contact Source Dynamics for any reason please write Source Dynamics Inc 22524 SE 64th Place Suite 260 Issaquah WA 98027 USA or call 425 557 3630 or send electronic mail to support sourceinsight com 364 Source Insight User Manual Index c l d Block Up 128 n ex Bookmark 128 Bookmark Functions 328 Bookmark Record 305 Bookmarks 89 A BookmarksAdd function 328 BookmarksCount function 329 About Source Insight 122 BookmarksDelete function 329 Activate Global Symbol List 122 Bookmarksltem function 329 Activate Menu Commands 122 BookmarksLookupLine function 329 Activate Relation Window 122 BookmarksLookupName function 329 Activate Search Results 123 Bottom of File 129 Activate Symbol Window 123 Bottom of Window 129 Add and Remove Project Files 123 Break and Continue 303 Add and Remove Project Files Dialog Box 124 BrowseFiles 129 Add File 125 Browse Global Symbols Dialog box 130 Add File List 127 Browse Local File Symbols 132 AddConditionVariable function 338 Browse Project Symbols 129 AddF ileToProj function 339 A Browse Project S
56. 349 event DocumentSelectionChanged sFile eere eee eese eese eee ee een enano 349 jn event ProjectOpen sProject eee e eee eene eene seen etes aetates netos etta se tos s tasses eto event ProjectClose sProject censere eese eee eee eren etas en senses senses sense tne tasenoes Statusbar Events eee event StatusbarUpdate sMessage CHAPTER 8 APPENDIX UPGRADING FROM OLDER VERSIONS eee eeeeeeeeee eee eeeeeees 3D 1 Upgrading from Version 3 1 or Version 3 0 ccce crees eene eee eene enean 351 Per User Data Folder wore 352 Per User Project List 352 Project File StOraGe RR disies 352 Net Framework Support sessccssccssscsssscsssccssccssscssccsssccssssssescsssssssssssssssossssssscsssssssssoes 353 Upgrading from Version 2 zcrsccccscscsscscsscsccsesssccsescscssccssssscssenes 353 Installing Version 3 wee 353 Opening Older Projects wee 353 Finding Your Old Projects es 353 Loading Old Customizations eres eere eese eene enean tn atn tn eias in etna eas en seno 354 Using Version 3 and Version 2 Together eese eee eene eene enne eene n einen ena enan 354 What s New in Version 3 eese cene eene eene eene en neon etes enn sens eonue 354 Improved Language Features e 355 Improved Browsing and Analysis Features
57. All com mands A file can also be saved by answering Yes to the Save changes to file mes sage when you try to close a changed file If the file is new and has never been saved before or the file is read only then the Save command runs the Save As command instead The Save As command allows you to specify the name of the file to be saved Save A Copy Saves the current file to a new file but does not replace or affect the current file The newly saved file is left open as just another file buffer This is a handy way to duplicate a file 248 Source Insight User Manual Chapter 5 Save All Save All The Save All command saves all files that are open and have changed since they were saved last Save Modified Files Dialog Box All files that require saving will appear in the Save Modified Files dialog box Select the files to be saved here and click OK This dialog box also appears if you use the Close All command or exit Source Insight when files require sav ing Save Modified Files E Unsaved Files 1 3 CmdPref c ix EJ Util h toolbox Saving Without Prompts If you want Source Insight to just save all files without showing the Save Modi fied Files dialog box then use the Preferences Files dialog box and select the check box that says Save All operation saves without prompts Saving When You Switch to Another Program To make Source Insight automatically saving modified files when
58. Expand Special Used inside tree lists this expands the selected item a specified number of tree levels Source Insight x Number of levels to expand Number of levels to expand Type the number of levels beyond the selected node that you want to expand the tree For example if you type 1 then one level below the selected node is revealed File Options This command activates the File page of the Preferences dialog box It allows you to set file loading and saving options 170 Source Insight User Manual Chapter 5 File Options File Options Dialog box Colors Syntax Formatting Syntax Decorations Searching Remote General Typing Fles Languages Symbol Lookups Display Opening Files JV Sharing Let other programs modify files JV Reload extemally modified files in background Note Reload Modified Files command will also reload files IV Ask before reloading modified files IV Assume Z ASCII 26 is End Of File Saving Files JV Make backup files when saving Save All operation will query on each file separately Save All operation saves without prompts Save all files when Source Insight program is deactivated JV Preserve Undo data and revision marks after saving Save over read only files without prompting Remove extra white space when saving Other IV Allow editing read only file buffers IV Confirm all file deletions Default file format Windows CR LF X Sh
59. FinitSwMgrClasses ptReserved IE wndProcSw 1 line 1873 2 line 1873 Vipdebug def B Vipship def apudgzgziai sisesm sS Figure 3 15 The Relation Window is showing references to a type and indirect references through a function The Relation Window runs in the background and tracks what symbols you have selected You can use it to view class hierarchies call trees reference trees and more The beauty of the Relation Window is that you don t have to do any thing special It works in the background while you work but you can interact with it when you want to You can also have several Relation Windows open each showing different types of information Source Insight User Manual 39 Window Tour Chapter 3 Outline and Graph Views The Relation The Relation Window has two types of views Outline view and Graph view Window can display The Graph view shows symbols as graph nodes with lines connecting them in Outline or Graph The Relation Graph Properties command available on the Relation Window FIN right click shortcut menu gives you control over the appearance of the graph view References C References lt lolx Name GetDigFontMetrics 306 DrawOpenLb 449 IE wndProc bout 256 E Draw amp boutTest 326 E GetLwListRc 2531 E GetLwEditRc 2636 Ig GetLwPromptRe 2658 E SizeLwStatic 2760 E GetSmwTwRe 1026 GetSmwEditRe 1051 pinioio
60. HTML Help Use this command to locate the HTML Help file on your disk that will be used by the HTML Help command If you have Microsoft MSDN or Microsoft Developer Studio tools installed you will probably want to select the compiled HTML help collection file that is the main help file for the developer tools The file has a col extension That will allow you to invoke HTML Help on Windows development APIs from within Source Insight Setup WinHelp File This command allows you to locate the WinHelp help file on your disk to be used for the SDK Help command A system Open File dialog box will appear and allow you to pick the HLP file to be used Show Clipboard The Show Clipboard command opens a window which displays the clipboard You cannot edit or select in the clipboard Show File Status The Show File Status command shows the current file s size in lines and bytes in the status bar It also shows whether the file has been changed since it was saved last and if it is read only Simple Tab Simple Tab Inserts a regular tab overriding the Smart Tab mode This is useful if you have the Smart Tab option enabled The Smart Tab mode alters the behavior of the regular Tab key Sometimes the Smart Tab results in unwanted Source Insight User Manual 265 Command Reference Chapter 5 results Use the Simple Tab command to just insert a regular tab without any special effects Smart End of Line Moves the cursor general
61. IMPORTANT READ CAREFULLY This Source Insight End User License Agreement EULA is a legal agreement between you either an individual or a single entity and Source Dynamics Inc for the Source Dynamics SOFTWARE identified above which includes the User Manual any associated SOFTWARE compo nents any media any printed materials other than the User Manual and any online or electronic documenta tion SOFTWARE By installing copying or otherwise using the SOFTWARE you agree to be bound by the terms of this EULA If you do not agree to the terms of this EULA do not install or use the SOFTWARE If the SOFTWARE was mailed to you return the media envelope UNOPENED along with the rest of the package to the location where you obtained it within 30 days from purchase 1 The SOFTWARE is licensed not sold 2 GRANT OF LICENSE a Evaluation Copy You may use the SOFTWARE without charge on an evaluation basis for thirty 30 days from the day that you install the SOFTWARE You must pay the license fee and register your copy to continue to use the SOFT WARE after the thirty 30 days If you continue to use the SOFTWARE after the thirty 30 days without paying the license fee you will be using the SOFTWARE on an unlicensed basis b Redistribution of Evaluation Copy If you are using SOFTWARE on an evaluation basis you may make cop ies of the evaluation SOFTWARE as you wish give exact copies of the original evaluation SOFTWARE to any one and
62. IV List Line Text Include Source Links Browse Normalize File Names Search Click this button to begin the searching in the selected files or the file named in the File Name text box Select All Click to select all the files in the file list Browse Click this button to show the Open File dialog box so that you can browse your disks to locate a file to be searched When you select a file in the Open File dialog box its full path will be placed in the File Name text box Find Type the pattern to be found in this text box The pattern can be a regular expression File Name The name of the file to search You may also add a series of wildcard specifications and click the Search button and Source Insight will replace the file list with the results of the wildcard expansion If the Project Wide option is on the wildcards are expanded over the whole list of files in the current project otherwise the wildcards are expanded in the current directory If the Project Wide option is on Source Insight will search the project symbol for file names added in the File Name text box so you don t have to include a directory specification for those files 256 Source Insight User Manual Chapter 5 Options Group Search Files File list If the Project Wide option is on then this list displays all files in the current project If the Project Wide option is off then this list displays all the files in the current working d
63. Improved Language Features Language specific features such as parsing and symbol lookup have changed significantly in version 3 0 Some of the changes include The context sensitive symbol lookup engine can track class and struct members and decode class inheritance dynamically without compiling Version 2 1 does not track field members or inheritance Supports nested C and Java classes and structures Supports C class and function templates Supports C namespaces Supports interpolated C structs and unions i e inlined structures Supports C template classes and functions Supports anonymous structs and unions User definable token substitution macros can replace source code tokens upstream of Source Insight s parsers so it can handle variations in key words and preprocessor usage User definable compile time constants used for marking ifdef branches active or inactive Code metrics New built in language parsing and display support Perl and PerlScript Visual Basic and VBScript JavaScript and JScript HTML ASP and JSP with embedded script C C Sharp User defined custom language support Source Insight User Manual 355 Appendix Upgrading From Older Versions Chapter 8 Improved Browsing and Analysis Features Source Insight continues to excel at proving first class access to symbolic infor mation in your programs New Relation Window shows dynamic call trees class trees and refer ence trees tha
64. Insight Concepts Chapter 4 Source Insight will search all the projects on the project symbol path if it doesn t find a declaration in the current project pens 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 e You can turn on the background synchronization option in the Prefer ences 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 on page 175 e You can run the Synchronize Files command which synchronizes the project on demand See also Synchronize Files on page 277 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 transp
65. Insight User Manual 161 Command Reference Chapter 5 Files are matched to Document Types using wildcard filters Document Type This pull down list contains a list of all the document types you have defined so far When you select a document type from this list the other text boxes in the dialog box are updated to reflect the properties of that document type The first entry in the list is always the Default document type which you may modify but not remove When the Document Options dialog box first comes up the document type of the current file is automatically selected here Add Type Click this button to add a new document type You will be prompted for the document type name Remove Type Deletes the selected document type This action is not undo able Auto Indent Click this to change the Auto Indent settings for this document type See also Auto Indenting on page 166 File Filter This text box should contain a delimited list of file name specifica tions The entries in the list can be delimited with a space a semi colon or a comma Each entry can be either an unambiguous file name or an ambiguous wildcard file specification The entries should not contain a drive letter or a full path that includes backslashes For example GIUM Given a file name Source Insight will identify the files document type by searching all defined document types looking for a match on a file specification in the File Filter
66. Insight are deleted The Remove Project command will not delete your source files Remove Project xj Project Name p 5 Test2 c si TestRemote Thunk Cancel adi Help Project Name Add the name of the project you want to remove 240 Source Insight User Manual Chapter 5 Remote Options Project list Displays a list of all projects opened or created on your computer Select the project you want to remove here Since the process of creating and adding source files to a large project can be somewhat time consuming Source Insight confirms that you indeed want to remove the project Source Insight x j Are you sure you want to remove project C Documents and Settings Ray Gram My DocumentslSource InsightlProjects TestRemotelTestRemote Click No to cancel the Remove Project command The project will not be removed If the project you selected to be removed was previously open then it will be closed at this point Click Yes to confirm that you want to remove the project Remote Options The Remote Options dialog box allows you to set options for how Source Insight behaves when used in a Terminal Server or Remote Desktop session In a Terminal Server session Source Insight runs on a remote machine but the desktop is displayed on a local machine The settings you make in this dialog box only apply when you run in a Terminal Server or Remote Desktop session I x General
67. Name File Name The name of the file to insert You may also type a series of wildcard specifications and click the Insert button and Source Insight will replace the file List contents with the results of wildcard expansion The wildcards are expanded in the current directory File list If the Project Wide option is enabled then this list displays all files in the current project If disabled then this list displays all the files in the current working directory The current directory path is displayed at the top of the list box Insert Click Insert to insert the contents of the file in the File Name text box If the File Name text box contains one or more wildcard specifications then Source Insight will replace the File List contents with the results of the expan sion The wildcards are expanded in the current directory Show Dirs Click this button to toggle the list box contents between showing file names and showing only subdirectory names Source Insight User Manual 185 Command Reference Chapter 5 Browse Click this button to bring up the standard Windows Open dialog box which allows you to browse around your disks Project Wide If checked the file List will show all the files that have been added to the current project If not checked the file List will show files in the current directory only This option is always unchecked if no project is open Insert Line The Insert Line command inserts a new empty line befor
68. Parsing While you edit your files Source Insight parses your project files This allows you to locate classes methods functions and more without having to compile your files Once a file has been added to your project the names and locations of the sym bol definitions in the file are stored in the project s symbol database The sym bol definition can be found quickly using the following techniques Remember you can right click on many objects in Source Insight to bring up the object s shortcut menu Some of the following commands are on the shortcut menus Symbol Navigation Commands These commands are the most commonly used commands to navigate to sym bol definitions or function callers Jump to Definition command The Jump to Definition command jumps to the declaration of the symbol under the cursor See also Jump To Definition on page 187 Type Alt equal or Ctrl double click with the left mouse button to invoke the command You can also right click on the symbol and use the shortcut menu to run this com mand After locating the symbol the symbol s file is opened displayed in a window and the symbol name is selected If you have more than one symbol with the same name in your project Source Insight will ask you to select the one you want Jump to Caller command The Jump to Caller command jumps to the caller of the function under the cur sor See also Jump To Caller on page 187 You can right click on the symbo
69. Release Build C Debug Build C Game Core Battle C Game Core EnemyAl Figure 4 2 An example of a project source tree The project source directory in our game example is C Game We have source code in the Presentation Core and Core subdirectories Our Source Insight project will include files from all these directories Normalized File Names When Source Insight displays a file name and the file is part of a project it arranges the name and path to make it easier to see and select the base file name without all the directory paths getting in the way This process is called nor malizing the file name This is an important feature because many projects have files spread out across multiple subdirectories and flattening out the directory tree makes it easy to type and select the most significant part of file names 48 Source Insight User Manual Chapter 4 Anormalized file name always begins with the leaf file name followed by the directory path in parentheses The Project List contains a list of the recently created projects on your machine Use the Add and Remove Project Files command to add your files to the project Projects A normalized file name always begins with the leaf file name and it s followed by the directory path in parentheses Furthermore the directory path shown is relative to the project s source directory unless
70. ViCWS ccrecceccesccecceccseccsscceccsccssccscssccsccsscsecsecescssecssessscsscsecsseceees 31 Vnn 34 Previewing Hg S E 35 Showing Declarations and Definitions eee e essen eene enean eene en etas ea eta sen 35 Decoding Base Types to Show Structures esee esee eene sesenta seen een sonata sense ta stn 37 Customizing the Context WindOW ecce seen eene enses enata seen sense ta sense tn stas eta sen 38 Source Insight User Manual i Contents RELATION WING OW sssccscoZnescessensavasesSeensssdeessseecssinsssenoescensesbaneeseootescsscssdeessgacevesees 39 Outline and Graph VieWS ccecccssrcsssccsssccesccssscsssscsssccssscssscsssssssssssssssssssssscsssssessees 40 Relationship Types RR 40 Relation Window Performance ssscrsscsssscsescsssccssscsssscssssssscsssccsssscssssssssssessssssssssssosses 40 REIAIONSNID RUIES csessscssssccessccsessssscavsenseecassonssevessscasedecseensvonssevesssuasssesdeudsvoessevessesses 41 Call Graphs 41 Multiple Relation Windows 41 Customizing the Relation WindOW ee eee seen enean etna enne aene tn seta senses season 41 e IIo Wind OW I 42 Pate d oA Well forent 42 Creating A New 0 To 42 CIP Storage e SaaS 43 S arch Results Window e 43 CHAPTER 4 SOURCE INSIGHT CONCEPTS
71. a record variable in a similar way userinfo name myname set name field of userinfo You can initialize an empty record by assigning nil to it userinfo nil make a new empty record userinfo name Jeff begin adding fields Record Variable Storage Record variables are stored simply as strings Each field is stored as a field name value pair delimited with semi colons For example name Joe Smith age 34 experience guru If you wanted to construct a whole record variable string from scratch you would have to surround it in double quotes and escape each embedded quote Source Insight User Manual 299 Macro Language Guide Chapter 6 You can use file buffers as arrays mark with the backslash character like this C programmers should be used to this rec name Joe Smith age 34 experience guru However it is just easier to assign a field at a time to it For example Rec nil initializes as an empty string Rec name Joe Smith Rec age 34 Rec experience guru The fields in the record do not have to be in any particular order There is no pre declared structure associated with record variables so you are free to attach new fields whenever you want by simply assigning a value to them For example Location GetSymbolLocation symname Location myOwnField xyz append a field when you feel like it Array Techniques The S
72. and newer this enables the use of XP them ing and visual styles in dialog boxes menus window frames and other user interface elements Changing this setting requires restarting Source Insight Enable Animations Enables simple animations to show when input focus changes to a floating tool window and when floating windows are rolled up or rolled down You might want to turn off animations if your video card per formance is slow Sort Window menu by usage and Sort Window menu by title Use these radio buttons to specify the sorting order of the window names on the Window menu If Sort Window menu by usage is selected then the window names are sorted with the most recently used window at the top If Sort Window menu by title is selected then the window names are sorted alphabetically Styles Edits style properties See also Style Properties on page 270 Source Insight User Manual 157 Command Reference Chapter 5 Character hori zontal spacing options are useful with proportional fonts Spacing Click this button to change character spacing options See also Char acter Spacing Options on page 158 Character Spacing Options Character spacing options are used to control the horizontal and vertical spac ing of characters This dialog box lets you adjust how Source Insight computes the width of spaces tabs and common delimiters The first two settings have no effect unless Line up white space is enabl
73. appears Click Add Tree and let it add all the relevant files to the JavaStandard project Then click Close You should be back to your old project Now auto complete should work for the packages that have been imported into the file C C Language Features ifdef s are respected when condition values are specified in the Edit Condi tions dialog box If you are using C C for programming Source Insight has some special fea tures that you should be aware of Working with Inactive Code ifdef Support Source Insights C C and Resource File parsers can recognize inactive blocks of code that are disabled at compile time with ifdef if and elif directives The Options gt Preferences Language dialog box has a set of Conditions but tons that allow you to edit the list of known conditional constants You can also edit the conditions using the Edit Condition command on the right click menu of a source window By default Source Insight ignores the conditional directives altogether It attempts to make sense of all branches in a conditional compilation construct Often this works well because declarations in the conditional branches do not interfere with each other 60 Source Insight User Manual Chapter 4 Inactive code is formatted with the Inactive Code style C C Language Features However sometimes a tricky declaration may be broken in the middle with an ifdef This will often confuse Source Insigh
74. appears in its own source file window This window is where you do all of your regular editing A source file window is an MDI window 26 Source Insight User Manual Chapter 3 Symbol Windows Source file windows When you open a file that has a language attached a Symbol Window will be display file buffers attached to the left side of the source file window You can control whether a Symbol Window is used by selecting Document Options and setting the Use symbol window check box accordingly See also Document Options on page 161 Symbol Window Text area of source file window boc EN clio NN Dlex cpp Creates a new OLEX object x Diex Createtooc hdoc c plang 88 include mein h e vfUseRlexCeche Bl DiexNew al DiexFree DiexClone OlexPtesFromLn POLEN pdlexNew new plex pil DiexCountLw E DiexProtect DiexUnprotect DiexFDeedPerseLn al DexFDoedFmiLn pdiextio Bl DiexLnocfromLn Cette pati OlexRevLongSync DiexSatFunA angSync idet CPP Dex a ans Spans Create hdoc plang chof Lexspan pat return piil jlex with zero ed out elements xmi HpiNewFromArray 0 cbof L LnMacDoc hdoc plal fre W FSieToDoc W LnFromLn D RlexFromin W LnacfFromi n W AddLnoct W AddFlox D SetLaFirstinvel W Invalln ifdet DEBUG I ae Figure 3 3 A source file window which has a symbol window attached to the left side Symbol Windows Symbol Windows Symbol Windows a
75. be used in expressions in if ifdef ifndef and elif statements For example if VER 3 amp amp DEF OPEN 0 In this example two condition variables are used VER and DEF OPEN Each variable value can be specified using the Edit Condition command Source Insight User Manual 61 Source Insight Concepts Chapter 4 You can define how macros are expanded with Token Macros C Macros are normally not expanded by Source Insight Each condition variable can have any textual value As in C and C any numerical value that equals zero is considered False and any non zero value is c True Ignoring Condition Variables If you do not specify a variables value then any statement that includes that variable is skipped and simply ignored This is the default behavior for any if type statement For example if VER 3 amp amp WINVER gt 5 int a 1 else int a 2 endif If both VER and WINVER are defined using Edit Condition then the expres sion in the if statement will be evaluated and only one of the branches will be active However if either of those variables are not defined in Source Insight then both branches will be active Editing the Condition Variables To edit the value of a conditional variable right click on it and select Edit Con dition When you edit the condition list Source Insight will ask you if you want to re parse your whole project You should ma
76. box Disable Case Sensitive and enable Preserve Old Case Confirm Each Replacement If checked Source Insight will confirm each replacement by prompting you Confirm Each File If checked Source Insight will confirm each modified file by prompting you Include Read Only Files keep buffers open If checked then replacements will be made inside of read only file buffers Source Insight will not attempt to save the file as the replacement operation progresses The files will be left open and modified allowing you to save the files yourself If not checked then read only files will be skipped Note that this options works independently from the Pref erences Files option Allow editing read only file buffers You can make Source Insight automatically save over read only files while replacing if you enable the Preferences Files option Save over read only files without prompting Restore File The Restore File command restores the current file to its original contents as it was when it was first opened Reverting will lose all changes you made since it was first opened even if you saved the file The file that is saved on disk is not altered Only the open file buffer is restored You should use caution with this command since it effectively undoes any sav ing you performed on the file Note that you can use the Undo command to undo the Restore File operation Source Insight User Manual 247 Command Reference Chapter 5
77. ccccccccsccccsssssccsccccsssssccsccsccsssscsssscccssssssecscceseessesscceees 320 PutEnv env name value ecce eee eee eene eee eene aae e ette tnos sese testen esses eee sense see 320 RunCmd cmd name e eeee esee e eee eee eene eae eee eetnoun RunCmdLine sCmdLine sWorkingDirectory fWait wee SetReg reg key name value s ssssessessesossesoesossessesossesossossesossossesossesssssssosossosoe 320 ShellExecute sVerb sFile sExtraParams sWorkingDirectory windowstate 321 Window List FUNCTIONS eno oo sese rre ee etra dn rao ren eoe ao eaa a aao rea oo ska krdn i ror Eee iaa i dE 322 WndListCount WndListltem index Wiridow FUNCTIONS inso eve sonos o seu v Tiv ee epo a eara UE vU Oeo a Uva Pasa aee oso evan rns ocio pee d devi De ope CloseWnd hwndQ GetApplicationWnd GetCurrentWnd i GetNextWnd AWNG PETS bso s secs ssos sestese GetWndbuf Hwrdd sssntesssnssssecedscassosacdedenessssevecsssecvinctesonseessevedestasnasscevecssieneiosteces GetWndClientRect hwnd ee GetWndDim hwnd sevsescsocossecesscsccossconiccnsceseseussocevsscvsscncoosdecesecesscascsesessesersscssses GetWndHandle hbuf eere e eee eee ee ee eerte nna a ee tens eese eese enses esee enses eee teen GetWndHorizScroll hwnd GetWndLineCount hwnd GetWndLineWidth hwnd In cch ae GetWndParent hwnd cccccccccsccccscscsssccccsc
78. change and the files you had open in the previous session with the project are reopened 50 Source Insight User Manual Chapter 4 Set project indexing options with the Project Settings command Working in a Team Environment When a project is opened the current working directory is changed to the project s source directory Removing a Project To remove a project use the Remove Project command This command removes all the project data files that Source Insight creates and associates with the project Your source files are not deleted See also Remove Project on page 240 Changing Project Settings The Project Settings command allows you to set various options that govern the current project If no project is currently open then the Project Settings command allows you to set the default options inherited by subsequently cre ated projects When you create a new project the Project Settings dialog box appears You may specify whether the project has its own private configuration or if it uses the global configuration file You can also indicate where the project s source directory is and what types of symbol information should be indexed See also Project Settings on page 225 Working in a Team Environment Source Insight is designed to work well in team programming situations As team programmers contribute to the code base Source Insight automatically recognizes their contributions and updates its symbolic
79. check box is off then this is a one way link Scrolling the linked window will not scroll the other one Linkage Result Link A to B Window A has a link to window B Scrolling win dow A will cause windows A and B to scroll but not the other way around Link A to B to C Windows may be linked to windows that are in turn linked to other windows Scrolling window A will cause all windows to scroll Scrolling win dow B will scroll B and C Window links can even be circular In other words a window may be indirectly linked to itself This is sometimes useful to get all the linked windows to scroll regardless of what window you actually caused to scroll Another way to get all windows to scroll is to use the Link All Windows command to turn on the Link All Windows mode or just turn on the Two Way check box Source Insight User Manual 203 Command Reference Chapter 5 Line Window To This list contains all windows other than the current window Select the window you want to link to here Select lt none gt if you want to unlink the window Two Way Turn this on to link both windows so that scrolling either of them will scroll the other Turn this off to only perform a one way link Load Configuration The Load Configuration command allows you to load a new configuration file into the current configuration You are able to load the whole configuration file or just part of it Note Itis wise to keep a backup copy of you
80. dialog box below the symbol name If known the symbols size in lines is displayed also Text Window This scrollable window contains the contents of the source file where the symbol is defined Close Click this to close the window Jump Click this to close the Symbol Info window and jump to the symbol defi nition directly References Click this button to search for references in the whole project to the symbol Leave File Open Click this button to leave the file displayed in the list box open This button is disabled if the file is already open If you leave the file open you can select the file name from Window menu after the window closes Source Insight User Manual 273 Command Reference Chapter 5 Symbol Lookup Options Sets options for the way Source Insight looks up symbol definitions This com mand activates the Symbol Lookups page of the Preferences dialog box x Find symbols across different language types IV Search project symbol path if symbol not found Search symbol path even if symbol is found in current project JV Use Net Framework symbols with C Project symbol path cvstuNVCS8 Include NCStandard C Microsoft SDK coresdk Add Project to Path Create Common Projects Parse locally before lookup Source Insight will ensure that the symbolic infor mation for the current file is completely up to date before trying to lookup a symbol This option comes into play when you are editin
81. distribute the evaluation SOFTWARE in its unmodified form via electronic means Internet BBS s Shareware distribution libraries CD ROMs etc You may not charge any fee for the copy or use of the evalu ation SOFTWARE itself but you may charge a distribution fee that is reasonably related to any cost you incur distributing the evaluation SOFTWARE e g packaging You must not represent in any way that you are sell ing the SOFTWARE itself Your distribution of the evaluation SOFTWARE will not entitle you to any compen sation from Source Dynamics You must distribute a copy of this EULA with any copy of the SOFTWARE and anyone to whom you distribute the SOFTWARE is subject to this EULA c Registered Copy After you have purchased the license for SOFTWARE and have received the serial num ber enabling the registered copy you are licensed to copy the SOFTWARE only into the memory of the number of computers corresponding to the number of licenses purchased The primary user of the computer on which each licensed copy of the SOFTWARE is installed may make a second copy for his or her exclusive use on a portable computer Under no other circumstances may the SOFTWARE be operated at the same time on more than the number of computers for which you have paid a separate license fee You may not duplicate the SOFT WARE in whole or in part except that you may make one copy of the SOFTWARE for backup or archival pur poses You may terminate this license at a
82. e eese eene enne en tense ea staat ta senses staat essen sess tna Adding New File Types eere sees eene eese enean etna en etas ea staat tas tn sese tasses senses etna Editing the Document OptiOns eee ee eee ee eese eee en eene en sense en etse ea staat ta sese sesos isses Typing Symbol Names with Syllable Indexing What is a Symbol Syllable Symbol Indexes for Projects e eese eee eese esee essen een eene tasas testen sese ea sese tasa Setting Index Options for Projects eere seen eese en eene en etna etna ea tease a etas ea eas en Controlling Syllable Matching 4 eese eene eene neenon eene en stent ea sense ta sense tasa Using Syllable Matching esee sees eene srias stos iaoei aetas ense enses senses etna Using Syllable Shortcuts eee eese eese esee essen seen een stat ta stes ta sense tastes senses etna Analysis Features TETTE TETTE X Symbol Navigation Commands Project Window Symbol List Call Trees and Reference Trees Context Window Command Line Symbol Access Finding References to Symbols Creating a Project Report eee ee esee esee eee eene en neta et en aetas aetas etas etos estas sens etna Smart RENAMING
83. each project Unlike the other customizations listed previously the project settings are stored in the project and not in a configuration file Project Specific Configurations If you want a project to have its own configuration use the Project Settings command to specify that When a project has its own configuration file then all the user preferences change when you open the project Saving Configurations Customizations are stored in configura tion files You can customize many aspects of Source Insight such as the color of the screen and the assignments of keystrokes to commands This collection of options is called a configuration Configurations usually contain information that rarely changes You usually set up your configuration once when you install Source Insight and perhaps occasionally you may modify it to suit your needs or changing tastes 106 Source Insight User Manual Chapter 4 The configuration file is updated when change options Saving Configurations A configuration contains most of the options specified on the Options menu and the Preferences dialog box which include the following things e Display Options e Language Options e Syntax Formatting Styles e Syntax Decorations e Key Assignments e Menu Assignments e Toolbars e Custom Commands e Document Types and Options e Page Setup e File Options e General Options e Symbol Lookup Options e Typing Options The configuration in effect whil
84. entry to force Source Insight to use a local drive for the per user data folder In regedit find the key HKEY_CURRENT_USER Software Source Dynamics Source Insight 3 0 Paths Add a new string value named UserDataDir Set the string value to the full path of the folder you want to user for per user data You will need to restart Source Insight after that and you may have to recreate your projects Source Insight User Manual 117 Source Insight Concepts Chapter 4 Files Created for Each User Each user logged into Windows gets their own personal data folder known as My Documents Source Insight creates a Source Insight folder under the My Documents folder to contain user specific data The user data directory contains the user specific global configuration file the user preferences global cf3 file and the workspace file for the no project open mode and project data The following folders are created in the current user s Source Insight folder File or Folder Description Backup Folder containing backup versions of files that are saved with Source Insight Clips Folder containing clips files which are listed in the Clip Window You can also copy your own text files to this directory and they will be included automatically in the Clip Window Projects Folder containing Source Insight projects cre ated on your machine Each project gets its own sub folder inside this
85. file buffer is saved If you want to get control before the file is saved then you can use the DocumentSave event event DocumentChanged sFile Called when the file buffer is edited by the user This event is handled asynchro nously That is it is not called as the user is typing It is called after a moment of idleness This allows you edit the file inside this event handler Note because this function is called asynchronously it is possible the sFile file may not be open event DocumentSelectionChanged sFile Called when the user selects text or moves the cursor in the current file This event is handled asynchronously That is it is not called as the user moves the cursor It is called after a moment of idleness Note because this function is called asynchronously it is possible the sFile file may not be open Project Events Project Events apply to opening and closing Source Insight projects event ProjectOpen sProject Called after the project is opened event ProjectClose sProject Called before the project is closed Statusbar Events Statusbar events occur when the statusbar text changes Source Insight User Manual 349 Macro Event Handlers Chapter 7 event StatusbarUpdate sMessage Called when the contents of the statusbar changes This event is handled asyn chronously That is it is not called at the exact moment the statusbar changes It is called after a moment of idleness This allows you edit the f
86. hbuf new text SetCurrentBuf hbuf Sets the active file buffer to the buffer whose handle is hbuf The current buffer is the file buffer that appears in the front most source file window Source Insight User Manual 319 Macro Language Guide Chapter 6 Environment and Process Functions Environment and process functions allow you to get and set registry and envi ronment values and also to run internal and external commands GetEnv env name Returns the value of the environment variable given in env name Returns an empty string if the environment variable does not exist GetReg reg key name Returns the value associated with the registry key named reg key name The key value is stored under the key path HKEY CURRENT USER Software Source Dynamics Source Insight 2 0 Returns an empty string if the key does not exist IsCmdEnabled cmd name Returns TRUE if the command specified in cmd name is currently enabled A command would not be enabled if Source Insight cannot run it due the state of the program For example the Save command is not enabled if there are no open source file windows PutEnv env name value Sets the environment variable named env name to value RunCmd cmd name Runs the command specified by cmd name This allows you to run special commands namely custom commands which are defined with the Custom Commands command RunCmdLine sCmdLine sWorkingDirectory f Wait Spawns the giv
87. in the current working directory of the current drive that are not already a part of the current project If you select a file from this list box the file name is loaded into the File Name text box The current working directory is displayed above the list box This list box will not display files that are already part of the project Also only files that belong to document types that have the Include when adding to project option turned on are included in the list See also Document Options on page 161 Add Click this button to add the file named in the File Name text box to the project and close the dialog box If the File Name text box contains wildcard characters the wildcards will be expanded and displayed in the File list box and the dialog box will not be closed If one or more files are selected in the File list box then all selected files are added to the project Select All Click this button to select all the files contained in the File list box 126 Source Insight User Manual Chapter 5 Add File List Add Dir Click this button to add a whole directory to the project If the Subdirs Also check box is enabled then this will recursively add all files in the whole subdirectory tree Show Dirs Click this button to toggle the list box contents between showing file names and showing subdirectory names Subdirs Also If checked then Source Insight will recurse through all subdirec tories when the Add button is clicked
88. information More over as large amounts of new code are added to a project or moved from mod ule to module you will appreciate Source Insight s ability to keep track of everything for you Source Insight User Manual 51 Source Insight Concepts Chapter 4 Adding local files to your project is recommended If needed you can add source files to your project from remote drives Using a Network Source Insight works best if each team member has their own local copies of the project source files on their own local machine Typically the master copies of the source code are kept on a central server i 1 Main Server a with master copy of Source Control software FTN project source code copies files between server and workstation er SSS SSS Workstation Workstation with local copy of with local copy of source code En source code Workstation Source Insight with local copy of recognizes when files change source code and updates local symbol database information Figure 4 3 A typical network of source controlled workstations Adding Remote Files to a Project For whatever reason you may want to access your source files directly from the project server not from local copies of the file Of course you are free to ope
89. information while you type or click on things For example if you click on a function call the Context Window will display the function s definition If you click on a variable the Context Window will decode its declaration to show you its base structure or class type 34 Source Insight User Manual Chapter 3 Context Window The Context Window also will automatically display files selected in the Project Window symbols in the Relation Window and clips selected in the Clip Win dow Mfc Project Source Insight Winfrm cpp src E loj xj s Ele Edit Search Project Options View Window Help Work 218 xj Oct ER S xmeIOC jages na a ea we 0M 2 a Wintmepp get top level parent frame window first unless this is a child window CFrameWnd pParent GetStyle amp wS_CHILD this GetTopLevelFrame OnHelpHitTest s ASSERT pParent NULL El OnCommand if dwFlags amp FS DEACTIVATE FS ACTIVATE adi E AfxlsDescendant t c chc update parent window activation state een BOOL bActivate lt dwFlags amp FS DEACTIVATE lli ShonOnnedWidows BOOL bEnabled pParent EITETRTTTISRESSTES E OnEnable E i fal NotifyFloatingWindows if bActivate amp amp bEnabled AW pParent this E PreCreateWindow t a n x E Create Excel will to Activate itself when it receives a lll CreateView WM NCKCTIVATE so we need to keep it from doing that here E OnCreateClient m nFlge
90. insertion point left to the next enclosing parentheses Paren Right The Paren Right command moves the insertion point right to the next enclos ing parentheses Parse Source Links The Parse Source Links command searches the current file for a specified pat tern Whenever it finds a match it creates a source link at that location The source link links the source line in the current file to the file and line number that was parsed using the pattern Parse Source Links i x File then Line C Line then File OK Pattern oneal File then Line and Line then File Select File then Line if the first group in the pattern expression is the file name and the second group is the line number With this setting the second group i e the line number is optional Select Line then File if the first group in the pattern expression is the line num ber and the second group is the file name Pattern Contains the regular expression used to search the command output for file names and line numbers This text box must contain a valid regular expression that contains groups for the file name and the line number The contents of this text box are saved in the current workspace The Parse Source Links command is useful if you have some kind of log file that contains compiler output and error messages You just open the log file and 218 Source Insight User Manual Chapter 5 Paste run the Parse Source Links comman
91. is a numeric keyboard value that is returned by GetKey You can use CharFromKey to convert a key value into a character Inputs char the character part of the keystroke It is not case sensitive fCtrl non zero if the CTRL key is included fShift non zero if the Shift key is included fAlt non zero if the ALT key is included The char parameter can have some special values Table 6 6 char Parameter Values and Their Meanings Char Value Meaning a Z Simple alpha characters Fx Function Key number x e g F10 Nx Numeric keypad character x e g N for key Up Down Left Right Arrow keys Page Up Page Down Other special keys Insert Delete Home End Tab Enter 314 Source Insight User Manual Chapter 6 Buffer List Functions Examples of Key Assignments assign Ctrl C to Page Down command key KeyFromChar c 1 0 0 Ctrl C AssignKeyToCmd key Page Down assign F9 to Close Project command key KeyFromChar F9 0 0 1 Alt F9 AssignKeyToCmd key Close Project Examples of input functions input a keypress and decode it key GetKey if IsFuncKey key Msg cat Function key FuncFromKey key if IsAltKeyDown key Msg Alt key down if IsCtrlKeyDown key Msg Ctrl key down ch CharFromKey key if Ascii ch 13 Msg You pressed Enter else if toupper ch S Search Files Msg s Display a message window s
92. is circular so eventually you will end up at your starting point You can use the Selection History command to show the list That command shows each position along with the function or enclosing symbol at each loca tion Go Back Toggle The Go Back Toggle command toggles between running the Go Back com mand and the Go Forward command Using Go Back Toggle repeatedly will toggle you between your last two positions Go Forward The Go Forward command moves the insertion point to the next location in the selection history which is a circular list of the last 100 positions you ve vis ited See the Go Back command for more details 178 Source Insight User Manual Chapter 5 Go To First Link Go To First Link The Go To First Link command locates the first source link and does the fol lowing 1 It selects the link line in the link source file 2 Itselects the link line in the link target file 3 It ensures both files are visible on the screen in windows If the current window was maximized when this command was used then only the link target file will be made visible The Go To Next Link and Go To Previous Link commands do the same thing except with the next and previous source link respectively First Source Link The first source link is the first link in the link source file with which a Go To Link Location command was used For example if you used the Search Files command to create a Search Results file cont
93. is enabled you can simply type the member names of classes or structures instead of having the type the class or structure name fol lowed by a dot and the member name Un checking this will save on disk space and memory Quick browsing for symbol syllables Check this to allow syllable indexing When this option is enabled you can type partial syllables and find symbols containing those syllables Un checking this will save on disk space and mem ory If your project is large then Source Insight may operate slowly when browsing or synchronizing files with the symbol database If both check boxes are turned off then the Browse All Symbols dialog box and the Project Window symbol list filtering will revert to simple prefix matching However the Symbol Window on the left side of each source window and the Project Window file list will still allow syllable browsing Controlling Syllable Matching You can control whether lists are affected by syllable matching in the Prefer ences Typing dialog box The check box Match syllables while typing controls whether syllable matching is active or not regardless of whether the project set ting indicate that syllables are indexed in the symbol database Asa shortcut you can toggle the use of syllable matching by prefixing what you type with a space character For example if you turned syllable matching off in the Preferences Typing dialog box you can use it selectively by adding a space cha
94. jumping See also Symbol Record on page 309 GetSymbolLocationFromLn hbuf In Returns the Symbol record of the symbol that exists at line number In within the buffer hbuf The symbol at In is a symbol whose declaration includes the given line number In See also Symbol Record on page 309 JumpToLocation symbol record Jumps to the location given in symbol record This opens the file in the Sym bol record and moves the cursor to the symbol defined there This works the same way as the Jump To Definition command 334 Source Insight User Manual Chapter 6 Symbol Functions The Symbol record is returned by the GetSymbolLocation function See also Symbol Record on page 309 JumpToSymbolDef symbol_name Jumps to the definition of the symbol named symbol_name This opens a file and moves the cursor to the symbol defined there This works the same way as the Jump To Definition command SymbolChildren symbol Returns a new symbol list handle containing the children of the given symbol The children of a symbol are the symbols declared within the body of the sym bol For example the children of a class are the class members symbol contains a Symbol record See also Symbol Record on page 309 You should call SymListFree to free the symbol list handle returned by Symbol Children You can use the Symbol List functions to access the symbol list returned by this function Example This example looks up the
95. list will be filtered based on what you type Pressing Enter or Esc will re activate your source file window again Add and Remove Project Files Add only text files to your projects Use Document Options to control what types of files are added to projects This command lets you to add and remove your source files from the current project This is the primary way to add a large number of files to the project With this command you can add and remove single files groups of files and whole source directory trees What Files Should You Add to a Project Source Insight projects should consist of program source files and text files only It doesn t make any sense to add a binary format file to a Source Insight project For example adding an EXE file to your project would have no benefit The document types that are defined by default correspond to the types of source files you probably want to use with Source Insight Normally only those types of files should be added to a project The Document Options dialog box contains the check box Include when add ing to projects You can use this check box to control what file types Source Insight will automatically add to your project or what file types will be dis played in the list box in the Add and Remove Project Files dialog box Source Insight User Manual 123 Command Reference Chapter 5 Add and Remove Project Files Dialog Box Add and Remove Project Files x Fi
96. loaded into the File Name text box This list box will not display files that are already part of the project Project Files List Lists all the files currently added to the project You can select files from this list and click the Remove buttons to remove the files from the project Close Closes the dialog box keeping the changes you made Add Adds the selected file s to the project If a directory is selected then the current directory switches to that directory 124 Source Insight User Manual Chapter 5 Add File Add File Add All Selects all the items in the File Name list and adds them to the project If any directories are included then their contents are added too Source Insight will prompt you first to see if you want to include the directories Add Tree Click Add Tree to add a whole source tree to your project When a directory is selected this adds the whole directory tree to the project That is all the directories in the sub tree are scanned for files that match known document types and they are added to the project Remove Tree When a directory is selected this removes all files found in that directory tree Show only known document types Only files that belong to known document types are included in the file list Furthermore only document types that have the Include when adding to project option enabled are included You can change the known document types with the Document Options command I
97. lt gt dod Docfetch c li dacIL c Dock c toolbox Dock h toolbox dockXml cpp toolbox Doclang cpp DocLex c Docmrk c DocProj cpp Docsel c XmlDocBase hpp toolbox 38 103860 13142 66251 10054 10 9 2002 9 23 2002 9 20 2002 8 23 2002 8 10 2002 3 27 2002 7 3 2002 6 1 2000 10 22 200C 7 15 2002 8 20 2002 10 23 2001 Y 86643 7488 2053 8671 48 13760 3271 24309 218 Sao ef 222 Source Insight User Manual Chapter 5 Project Symbol Classes Project Symbol Classes Displays project symbols by category in the Project Window CStandard Project lt gt g n x k Namespaces X Classes 375 ble ee 2875 6B Structures 8290 UJ Unions 444 it Type Definitions 24910 E Enumerations 2406 Constants 79264 Enum Constants 17002 Variables 3369 4 amp External Variables 4987 E Functions 1849 4 Function Templates 1207 E Methods 5620 W Macros 35908 B Function Prototypes 47661 f f EI PEE EHE eee BHR a t8 2 ie Project Symbol List Displays all project symbols in the Project Window You may find this view more useful than the Browse Project Symbols command F7 Unlike the modal dialog box the Project Window is modeless and the Context Window and the Relation Windows will slave to it Sinew Project Structure Member
98. mouse clicks and those assignments are part of a configuration Keystrokes and mouse clicks are assigned to commands For example the Ctrl O keystroke is assigned to the Open command More than one keystroke may be assigned to a given command Use the Key Assignments command to customize the keyboard Commands are assigned to menus For example the Open command is assigned to the File menu Use the Menu Assignments command to customize the contents of the menus Source Insight also allows you to define custom commands which are useful for launching the compiler and other external tools from Source Insight See also Custom Commands on page 105 Source Insight User Manual 121 Command Reference Chapter 5 About Source Insight The About Source Insight command brings up a window that contains the copyright message and the version number of Source Insight You should refer to this window to get the version number and build date of Source Insight Activate Menu Commands e Activate Edit Menu e Activate File Menu e Activate Help Menu e Activate Option Menu e Activate Project Menu e Activate Search Menu e Activate View Menu e Activate Window Menu e Activate System Menu e Activate System Doc Menu The Activate Menu commands activate and drop down the menu from the menu bar You can also just press and release the Alt key to activate the Source Insight menu bar then just type a letter to activate the corresponding menu Fo
99. name gt CF3 Shares global configuration file The project shares the global configuration with other projects The global configuration file is stored in the Source Insight program directory and it is named Global cf3 This controls the settings of condition compilation values Conditions Click to edit the conditions defined that are specific to the cur rent project only The conditions are only in effect when the current project is open and only for files that belong to the project Another quick way to edit the conditions is to use the Edit Condition command The Project Source Directory This should contain the path of the main location of your source files You might consider this the home directory of the project When Source Insight displays file names it will show them relative to this directory If you leave this text box blank then Source Insight will use the project data directory where you created the main project file with the PR extension Letting you specify a different project source directory is useful if you want the project data files kept in a separate directory from the source files The project data files are stored where you specified the PR file but the source files can be somewhere else For example you could create a project stored locally on your workstation and add files from a remote network drive to the project The file names will not contain extra path information if you specify the network drive p
100. open Browse Click this button to bring up the standard system Open dialog box which allows you to browse around your disks Load Search String The Load Search String command loads the contents of the current selection into the current search pattern The search pattern is what is in the Find text box of the Search and Replace commands Lock Context Window This command locks the Context Window so that its contents don t change When the Context Window is locked it does not track your actions Lock Relation Window Toggles Relation Window locking When locked it will not automatically update You can still use the Show Relation command to manually update the Relation Window You can also click on the Refresh Relation Window button in the Relation Window toolbar Source Insight User Manual 207 Command Reference Chapter 5 Lookup References The Lookup References command searches the current project for references to a selected symbol For example click inside BeginPaint run the Lookup Ref erences command and Source Insight will open a Search Results window which lists all the places that reference BeginPaint in your project Source Insight uses its symbol indexes to make the searching fast References can be found in all source code text including comments and potentially inactive ifdef branches However you can control whether these places are searched or not Note The Search Project command is the sam
101. or when a single directory is selected and Add is clicked If not checked then Source Insight will only add the selected files or the files in the selected directory and will ignore sub directories Browse Click this button to bring up the standard Windows Open dialog box which allows you to browse around your disks If you select a file in this dialog box its path will be placed into the File Name text box Remove Click this button to switch to the Remove File dialog box AddFile List The Add File List command allows you to add file names and directories speci fied in an input file to the current project This is a useful way to let you or a project administrator maintain a list of source files and or source directories which can be used to build a Source Insight project This can be done in lieu of adding the files by hand Advanced Options This allows you to selectively disable internal optimizations in Source Insight This can help to narrow down a possible bug If you report a bug you may be asked to make changes in the Advanced Options dialog box to help trouble shoot a problem Normally you should have no need to use this feature Back Tab The Back Tab command moves the cursor to the left by one tab stop Backspace The Backspace command backs over the character to the left of the insertion point If the selection is extended the text in the selection is deleted instead Beginning of Line The Beginning of Li
102. own configuration file Shares global configuration file Shope Conditional Parsing Help These condition values are project specific Conditions They are merged with the global condition list found in Preferences Languages Project Source Directory the main location of your source files me Browse Store function local symbols in database Local variables get displayed with syntax formatting faster but the symbol database can increase in size by a factor of 2 or more ron Quick browsing for member names You only type the member names of classes and IV structures to browse but the symbol index and memory usage can increase by a factor of 2 or more Quick browsing for symbol syllables You only type one or more syllables to locate IV symbols but the symbol index and memory usage can increase by a factor of 4 or more Source Insight User Manual 225 Command Reference Chapter 5 Configuration Options Conditional Parsing The Source Directory The Project Source Directory is the home directory of your source files This specifies what configuration is used when the project is opened The con figuration is what holds most of your user customizations such as key bindings Project has its own configuration file This means the project has its own private configuration file which is stored in the project directory The name of the project configuration file is lt project
103. parents For example Class1 Member1 This type of index is always maintained and is used by Source Insight to navigate to symbol definitions Member Name Index This indexes only the structure and class member names of symbols For example a member function named Help inside of a class named Document would have a full name of Document Help but the mem ber name index will contain Help This index allows you to get to the member quickly without specifying the class or structure it belongs to Syllable Index This indexes the syllables in a symbol s name This index allows you to find symbols when you only know one or more parts of its name Source Insight User Manual 69 Source Insight Concepts The Project Settings dialog box specifies syllable and member indexing options Enable and disable syllable matching in the Preferences Typing dialog box Type a space char acter in front of a syllable to toggle syllable matching for an individual case Type syllables into any text box associ ated with a list box You can type multiple syllables Chapter 4 Setting Index Options for Projects Syllable and Member indexing takes up index space on disk and in memory It also slows database access a little bit You can control what is indexed in the Project Settings dialog box Two check boxes control indexing Quick browsing for member names Check this to allow member name index ing When this option
104. past life You may be one of the cleverest developers in the world but if you can t find all the myriad pieces of your program or can t get your head wrapped around the code then you will not be very productive Enter Source Insight _ Your Program Source Insight nc a ue g Der G Source Insight was designed to enhance your ability to understand and modify your program Our company mission is to increase programming team pro ductivity by clarifying source code presenting information in a useful way and allowing programmers to modify software in large complex projects You The Solution Think of your programs source code as a free form database of information It has not only classes members and functions in it but it has many important comments You do have comments don t you Your source code also has a history In fact many large programs have a long lifetime that includes contributions by many programmers over many years Some of it is not pretty but you have to live with it Source Insight acts as an information server that surrounds your project s source code With it you can have instant access to symbolic and textual infor mation in your program Whether you are new to a project or an old timer Source Insight will give you useful leverage to stay productive 2 Source Insight User Manual Chapter 1 Feature Highlights Feature Highlights Source Insight is a pr
105. ps 66048 3 26 9 E mena uaua O Base PSI 1476 3 20 9 0 Iselect3 O Base WK3 10794 3 20 9 H A Kpems O Changes tx 29855 5 29 9 H A Microsoft Office Q clips Q Microsoft Visual Studio Global cf 32502 3 11 9 H 0 Multimedia Files G Global cf3 68230 3 26 9 0O My Documents O Global wk 6068 3 11 9 H O PartitionMagic4 O Global wk3 10770 3 22 9 H 0 Program Files d Insert em 1182 11 7 9 CiPsfonts fll insiaht cnt 22364 1 7 97 BE gs ea es ases Figure 3 8 Project Window File Directory view Symbol List View Symbol List View shows a list of all symbols in the project symbol database shows all the This is similar to what used to be shown in the Browse All Symbols dialog box E To locate a symbol quickly type a part of the symbol name and the list will be project filtered down as you type 32 Source Insight User Manual Chapter 3 Project Window You can also perform a regular expression search for symbol name by prefixing the regular expression with a question mark For example Insert Stack will find all symbols that have Insert followed by zero or more characters fol lowed by Stack Sinew FORS gt Structure in Tixh at ine 438 5 lines 7 x Lines of Code i CachedTav i PCachedTav 3 CachedTawList CachedTavList PCachedTavList cCachedTavMax cTavCacheHit cTavCacheTest CacheStagTav 13 e eal es tav zl B EF me AJ ome EST Figure 3 9 Project Win
106. 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 Source Insight User Manual 133 Command Reference Chapter 5 Jump Click to jump to the definition of the currently selected symbol If an item is selected in the Symbol List then that is the selected 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 perform a search and the dialog box will remain up Info Click to run the Symbol Info command on the selected symbol References Click to search for references to the selected symbol Insert w Args Click to replace the current selection with the name of the sym bol followed by the parameters as they appear in the symbol definition Insert Name Click to replace the current selection with the name of the symbol List Click 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 t
107. references are concentrated among objects Call Graph Filtering Click this button to use the Call Graph Filter dialog box This allows you to control what symbols participate in the call tree calculation See also Call Graph Filter on page 236 Symbol Types Click this button to view the Symbol Type Filter dialog box This allows you to filter out specific types of symbols from the Relation Window output See also Symbol Type Filter on page 237 This group specifies what columns should appear in the outline list view The Relation Window can be sorted by clicking on any column header Show file names Shows the file name column Show line numbers Shows the line number column In most cases the line number is where the given symbol is referred to Show code metrics Shows the selected code metrics column Only one code metrics column is allowed Relationship Rules The relationship shown in the Relation Window depends on the type of sym bol You can specify what relationship is shown for different symbol types For example you could set the relationship viewed for functions to Calls and the Source Insight User Manual 235 Command Reference Chapter 5 relationship viewed for classes to Inheritance Thus when you select a func tion the Relation Window shows a call tree and when you select a class name the Relation Window shows the class inheritance hierarchy Each time the Relation Window expands a symbol to s
108. see if the mark you typed matches an existing bookmark name If it does then the Go To button become the default button Pressing Enter will position you to that mark If the bookmark you ve just typed does not exist then the Set button becomes the default button Pressing Enter will create a new bookmark Marks list Displays a list of all the bookmarks currently set Each item in the list shows the bookmark s name the file it s in and the line number it s on When you select an item in the Marks list the mark name is loaded into the Name text box Go To Click this button to jump to the mark that is selected in the Marks list Set Click this button to create a new bookmark The mark s name is taken from the Name text box If the bookmark name is already in the list i e it already exists then its position will be redefined Remove Click this button to delete the selected marks Bottom of File The Bottom of File command makes an insertion point at the last line in the current file Bottom of Window The Bottom of Window command makes an insertion point at the last visible line in the active window Browse Files The Browse Files command brings up the standard system Open File dialog box so that you can browse the regular file system and open any file This is unlike the regular Source Insight Open command which brings up the Project Win dow which lists only the files in the current project regardless of directories
109. selected lines to their original contents when the file was first opened Fur thermore the Restore Lines command can be undone with the Undo com mand Mixing both Undo and Restore Lines can be very useful Undo All The Undo All command undoes all the editing changes to the current file since the last time it was opened See Also Undo Redo Redo All commands Vertical Scroll Bar This command toggles the vertical scroll bar in the current on and off If you want all windows to have a vertical scroll bar or not you should use the Preferences Display Options dialog box option Vertical Scroll Bar for each new window Source Insight User Manual 287 Command Reference Chapter 5 View Clip On Clip Window toolbar and right click menu The View Clip command displays the selected clip in a source file window If you close the window you will be asked if you want to retain the clip in the Context Window View Relation Outline This command changes the Relation Window so it displays its tree data in a tex tual outline format See also Relation Window on page 39 View Relation Window Horizontal Graph This command changes the Relation Window so it displays a tree graph view that grows horizontally from left to right See also Relation Window on page 39 View Relation Window Vertical Graph This command changes the Relation Window so it displays a tree graph view that grows vertically from top to bottom See
110. state that changes from session to session Dur ing an editing session you may have several files open Each file has text selected in it Each file may have bookmarks that you set This information is part of a workspace A workspace contains the following things e The names of the files you have open e Selections in each file e Bookmarks you may have set e Selection history where you have been in each file e The size and position of each source file window e Search and replace strings e Source links e Dialog box typing history e The command recording see Start Recording on page 270 When you exit Source Insight the current workspace is saved in a workspace file When Source Insight starts it restores the previous session s workspace If a project is not open then the name of the current workspace file is Glo bal wk3 If a project is open the name of the current workspace file is either projectname WK3 or Global wk3 depending on the settings in the Project Settings dialog Loading and Saving Workspaces To open a workspace use the File Open Workspace command You can use the File gt Save Workspace command to save the contents of the current workspace to any other workspace file Managing Tasks With Workspaces By using multiple workspaces you can group your tasks and save them indi vidually For example let s say you have two different tasks on which you are working For task 1 you open all th
111. string name of the command Example key GetKey AssignKeyToCmd key Open Project Beep Gives a single beep CharFromKey key code Returns the character associated with the given key code Returns zero if the key code is not a regular character key code key code is a numeric keyboard value that is returned by GetKey and Key FromChar You can use CharFromKey to convert a key code into a character 312 Source Insight User Manual Chapter 6 User Input and Output Functions CmdFromKey key_value Returns the string name of the Source Insight command currently mapped to key_value The command returned is the name of the command that gets invoked when the user presses key_value key_value is a numeric keyboard value that is returned by GetKey and Key FromChar You can use CharFromKey to convert a key value into a character Example key GetKey cmd name CmdFromKey key msg That key will invoke the cmd command EndMsg Takes down the message box started by StartMsg FuncFromKey key code Return the function key number 1 12 for F1 F12 from a function key code Returns zero if key code is not a function key code key code is a numeric keyboard value that is returned by GetKey and Key FromChar You can use CharFromKey to convert a key code into a character GetChar Waits for the user to press a key and returns a single character GetKey Waits for the user to pr
112. style may specify bold italic You can edit each styles formatting properties with the Style Properties command See also Style Properties on page 270 74 Source Insight User Manual Chapter 4 Formatting styles are applied to source code elements Styles contain formatting instruc tions that can be combined with other styles Syntax Formatting and Styles There are several pre defined styles You can also add your own The styles are stored in the configuration file How a Style Works When a style is applied to text it combines with the underlying text properties The basic text properties are set in each document type font settings You can control this with the Options gt Document Options command Style properties are combined with the basic text properties Styles also can inherit properties from other parent styles See also Parent Styles on page 76 The formatting properties of all the applicable styles are combined with the font selected in a given file s document type Document Default Type Font Ly Combined font style Qu gt formatting Figure 4 9 Style properties combine with each other and with the default font set in the Document Options dialog box Formatting Properties Each style is like a list of formatting differences from its parent style For exam ple if a style has the bold property then bold is added to t
113. the Preferences Files option Save over read only files without prompting Smart Tab When the Smart Tab command is used at various positions in your source code Source Insight moves the selection to the next field A field is an interesting position depending on the current context Smart Tab lets you move the cur sor around easily especially when typing new function calls When the Smart Tab option is on Preferences Typing then pressing the regu lar Tab key will invoke the Smart Tab command The Simple Tab command simply inserts a tab and avoids the Smart Tab behavior Therefore if you have the Smart Tab option turned on you can use the Simple Tab command to occa sionally override the Smart Tab behavior Smart Tab Examples Here are some examples starting with step 1 as the initial selection state and steps 2 and later are the new selections after using Smart Tab The current insertion point is marked by and a selected range of text is underlined like this 268 Source Insight User Manual Chapter 5 Sort Symbol Window Example 1 1 Beg inPaint hwnd pps 2 BeginPaint hwnd pps Example 2 1 BeginPaint hwnd pps 2 BeginPaint hwnd pps 3 BeginPaint hwnd pps 4 BeginPaint hwnd pps 5 BeginPaint hwnd pps Example 3 1 ResetAbc 2 ResetAbc Smart Tab works like a regular tab when you use it at the beginning or end of line text or on a line that doesn t ha
114. the file is unchanged If lines are inserted or deleted from the file the line number is going to be off However you can call Get SourceLink again to get an updated line number ProgEnvinfo Record The ProgEnvInfo record contains information about the environment where Source Insight is running Field Description ProgramDir The Source Insight program directory where the program file is stored TempDir The temporary files directory BackupDir The backup directory where Source Insight stores backups of files that you save ClipDir The directory where clips are persisted ProjectDirectoryFile The name of the project directory file The project directory file contains a list of all the projects that have been opened ConfigurationFile The name of the currently active configuration file ShellCommand The name of the command shell The command shell depends on the operating system version you are running UserName The registered user s name UserOrganization The registered user s organization SerialNumber The registered license serial number Proginfo Record The ProgInfo record describes the version of Source Insight that is running It has the following fields Field Description ProgramName The name of the program i e Source Insight versionMajor The major version number If the version number is 1 02 0003 then the major version is 1 Source Insight User Manual 30
115. this dia log box means that a space character will have the same width as the character 1 Do not confuse the character with its numeric value 1 Source Insight does not interpret the characters numeric value 158 Source Insight User Manual Chapter 5 Display Options Source Insight computes the width based on the space width character so that spaces will scale correctly independent of the font and the font size used Working with Wide Fonts You may want to change this setting if you are working with a font that has unusual character widths or if you just want to expand or contract your white space and indentation amounts A narrower character will shrink the white space and a wider character will expand it This width is independent of the tab width setting specified in the Document Options dialog box because the tab width is specified as a number of fixed width character columns The common delimiter character controls the width of delimiters in a way sim ilar to spaces The delimiters affected are and which are typically narrow characters in most fonts Layout tabstops using monospaced calculations This option controls how tab widths are displayed If checked then the width of a given tab will calculated assuming that you were using a monospaced font This will generally make tabbed columns of text line up even if you are using a variable pitched font for displaying your source code Layout spaces usin
116. to add the file to the current project No Click to not add the file to the current project The file will still be saved 250 Source Insight User Manual Chapter 5 Save Configuration Save Configuration The Save Configuration command saves the current configuration to a configu ration file that you specify You can save the entire current configuration to a file or just a specified subset of it When a configuration file is loaded that contains a configuration subset it only affects the settings it contains For example you could save only keyboard set tings to a configuration file and name it MyKeyboard When MyKeyboard is loaded it will only affect the keyboard Save Configuration i x All Configuration Settings M Individual Settings Cancel v General Display amp Windows Help Keys Menus Search amp Replace Project Report Doc Options Replace Doc Options Merge Custom Commands Replace F Custom Commands Merge Page Setup Language Options Styles Relation Window Toolbars All Configuration Settings If enabled then all parts of the configuration are saved Disable this to save only individual parts that are defined in the Individ ual Settings group below Individual Settings Turning off the All Configuration Settings check box allows you to select the parts of the configuration you want to save For example this
117. type the name of a macro in the Browse Project Symbols dialog box and jump to its definition Running Macros You can run macros by invoking the macro command directly with a keystroke or menu item or by using the Run Macro command to begin running macro statements at the current cursor position Macros as Commands Source Insight considers macro functions that have no parameters to be user level commands Macro commands appear in the command lists of the Key Assignments and Menu Assignments dialog boxes This allows you to place macro commands on the menu or in the keymap You can also run commands directly from those dialog boxes Ifa macro function has parameters it will not 292 Source Insight User Manual Chapter 6 You can run macro statements in your source file comments Macro Language Overview appear as a command in the command lists and you wont be able to assign a keystroke to it or put it on a menu Tip A shortcut for editing a user level macro command is to hold down the Ctrl key while selecting the command The macro function source code will appear for that command If you create a new macro command function in a macro file you must save the macro file and allow Source Insight to synchronize it with the project database files before the macro command will appear in menu and key assignments command lists You can also store macros in the Base project or any other project on the project symbol pat
118. usually not notice that anything is being done You will not be interrupted The recovery file actually only contains pointers to other files Therefore it is small and fast to write out By saving edits incrementally to the recovery file Source Insight insures you against a system failure power outage or crashes Source Insight will recognize when a recovery needs to be done the next time yourun it The Preferences General command allows you to set how often the recovery file is synchronized You can specify this recovery time in seconds The default value is every 15 seconds If you make the recovery time smaller the recovery file is updated more often If you make it larger the recovery file is updated less often If you make it too long you will be able to do many changes to your files without the changes being recorded in the recovery file You should the keep the period as short as possible However the more frequently the recovery file Source Insight User Manual 99 Source Insight Concepts Chapter 4 An orphaned recovery file signals that a crash occurred Verify the results of a recovery before saving is updated the slower Source Insights performance becomes However on fast machines it is not noticeable so you might as well make it very short e g 5 sec Recovery Procedure If you have been editing and a crash occurred before you could save your files then simply run Source Insight again Source Insigh
119. when you are finished accessing them Source Insight automatically cleans up dynamically allocated resources when a macro terminates However Source Source Insight User Manual 329 Macro Language Guide Chapter 6 Insight may run out of resources if you allocated many handles without freeing unused handles SymListCount This function returns the number of symbols in the symbol list Use SymLis tItem to access the symbol record at a particular index in the list See also Symbol Record on page 309 SymListFree hsyml This function deallocates the given symbol list SymListInsert hsyml isym symbolNew This function inserts a symbol record into the symbol list hsyml The symbol is inserted just before isymBefore If isymBefore is 1 then the symbol is appended to the end of the list The symbol record is given in symbolNew See also Symbol Record on page 309 SymListltem hsyml isym This function returns the Symbol record at the zero based index isym in the symbol list hsyml The size of the symbol list is returned by SymListCount See also Symbol Record on page 309 Index values start at zero and continue up to one less than the value returned by SymListCount This example enumerates all symbols in the symbol list csym SymListCount hsyml isym 0 while isym csym symbol SymListItem isym do something with symbol Msg symbol name symbol name isym isym 1 S
120. window also has a source link to the location of each line con taining the word you looked up The Lookup References command is context sensitive so that if finds only the correctly matching references given the scoping context Renaming an Identifier To rename an identifier across all project files using a smart context sensitive method use the Smart Rename command Ctrl Single Quote Smart Rename is a context sensitive form of a global Search and Replace See also Smart Rename on page 266 Source Insights search index makes the search very fast This is the easiest way to replace a single word identifier with a new string In addition you can have Source Insight produce a log of replacements in the Search Results window Each replacement line is listed along with a source link to the location of each line that was changed Smart Rename is also excellent for renaming local scope variables Searching the Current File The Search command AIt F searches the current file for a search pattern The search can be forward or backwards In addition the search can be batch style where the search output results are placed in a Search Results window See also Search on page 254 The Search Forward F4 command repeats the last search allowing you to advance through the file finding each occurrence of a pattern The Search Forward for Selection command searches for the next occurrence of the first word in the current selection Th
121. you work See also Context Window on page 34 Command Line Symbol Access You can jump to a symbol by using the f lt symbol gt option on the Source Insight command line when you start Source Insight For example insight3 f myfunc This will position to the symbol named myfunc You can also simply give the name of the symbol on the command line without a special command option as though it were a file name In this case Source Insight will try to determine whether the symbol you specified is either a file or a parsed symbol You can list as many symbols on the command line as you like just as with file names Source Insight User Manual 73 Source Insight Concepts Use Lookup Refer ences to find refer ences to symbols quickly Use Smart Rename to perform context sensitive renaming across project files Chapter 4 For example insight3 myfunc fcb init This will open all files where the symbols myfunc fcb and init are located See also Command Line Syntax on page 101 Finding References to Symbols The Lookup References command can be used to quickly find all textual refer ences to the word in the current selection For example to find all calls to TextOut put the insertion point inside of the TextOut word and run the Lookup References command A Search Results window will be built which will list all references found The Browse Project Symbols Browse Local File Symbols
122. 185 Language Options 164 193 197 Insert Line 186 Language Properties 196 Insert Line Before Next 186 Language support Insert New Line 186 C C 60 Insert the CD ROM 16 Languages Used to Parse Source Files 54 Installation License Agreement 363 choosing a drive 16 Line Numbers 202 Installing on Windows NT 2000 XP 15 Link Installing Source Insight 15 jump to 187 Installing Version 3 353 Link All Windows 202 Internal Macro Functions 310 Link Record 307 Internet style searching 85 Link Window 203 IsAltKeyDown function 313 Listing Key Assignments 190 IsBufDirty function 318 Load Configuration 204 IsBufRW function 318 Load File 206 IsCmdEnabled function 320 Load Search String 207 IsCtrlKeyDown function 314 Loading a Configuration 108 IsFuncKey function 314 Loading and Saving Configurations 106 islower function 311 Loading and Saving Workspaces 109 IsNumber function 311 Loading Old Customizations 354 isupper function 311 LoadSearchPattern function 337 IsWndMax function 326 Locating File Names 333 334 IsWndMin function 326 Lock Context Window 207 IsWndRestored function 327 Lock Relation Window 207 Lookup References 208 J Lookup References Dialog box 208 Lookup References speeding up 116 Java Language Editing 60 JavaStandard Common Project 60 M Join Lines 186 Jump To Base Type 186 Machine Speed performance factors 110 Jump To Caller 187 Macro Functions 292 Jump to Caller command 72 Macro Language Guide 291 Jump To Definition 187 Macro Language O
123. 3 Copy To Clip 144 CopyBufLine function 316 Crash Recovery options 177 Crash recovery 99 Crashes recovery procedure 100 Create A Project where to store 213 Create Command List 144 Index Create Key List 144 Creating a New Clip 42 Creating a Project 18 47 Creating a Project Report 74 Creating Common Projects 17 Creating Source Links 91 Current Project 46 Cursor Down 144 Cursor Left 144 Cursor Right 144 Cursor Up 145 Custom Commands 105 145 command line substitutions 148 creating a compile command 151 dialog box 145 running in the background 151 running the command shell 148 shellexecute 149 shellexecute examples 150 the run field format 148 Custom Languages 58 comments and ranges 198 custom parsing 201 properties 196 range definition 199 Custom Parsing 201 styles for 202 Custom Parsing Expression 202 Custom Parsing Expressions speeding up 112 Customizing keyboard 187 Customizing menus 211 Customizing Source Insight 105 Customizing the Context Window 38 Customizing the Relation Window 41 Customizing the Symbol Window 28 Customizing with the Preferences command 220 Cut 152 Cut Line 152 Cut Line Left 153 Cut Line Right 153 Cut Selection or Paste 153 Cut Symbol 153 Cut To Clip 153 Cut Word 153 Cut Word Left 153 D Debugging 342 Declaration Styles 78 Declaring a Variable 296 Decoding Base Types to Show Structures 37 definition jump to 187 DelBufLine function 316 Delete 154 Delete All Clips 154 Dele
124. 4 ChECKPOINE AI B H 134 Source Insight User Manual v Contents Clear Highlights ERR 134 Clip ud ojo Ta Arc M 135 Clip Window Properties eee eee ee eere eroe eere aero eee ae ee en e eene eene sean e aestas eaae 135 CIOSE 136 Close All 2 137 Close Project 2 137 Close Window Color Options we 138 Command eT T PPS 139 Complete Symbol E ias insi 139 Context Window 140 Context Window Properties 140 COPY 142 Copy Line 143 Copy Line Right e 143 COPY 4 ELy EP 143 Copy SYMDOI scandscsSecsescecassecessscvsstdcotscanscontenseassessdnassasssassesseasivassdecdssonssisssoscessoosoons 143 Copy To Clip 144 Create Key List 144 Create Command List 144 Cursor Down e 144 Cursor Left se e 144 RIELE dile 144 CUISOF UD steieaicivsesersosercsvssesosisoode esbsdessssspedss sososo oosi s esotisd eosesetsosonddootoetdsooet6it 145 Custom Commands 145 Cut 152 Cut Line 152 Cut Line Left e 153 Cut Line Right e 153 Cut Selection OF PAStC sccccscscscsscccsccseccscescccsccssccscccsccsccssscscssecesessecssessscescsscesoss 153 GUESVIMDO ssscsssssssessenssssocsecensensssasevsssnscenscaseenseasesssecscenssesseoesssssoansensesscsdscanssaseess GU GIG c
125. 7 Macro Language Guide Chapter 6 Field Description versionMinor The minor version number If the version number is 1 02 0003 then the major version is 2 versionBuild The build number of the version If the version number is 1 02 0003 then the build number is 3 CopyrightMsg The Source Dynamics copyright message fTrialVersion True if the program is a Trial version fBetaVersion True if the program is a Beta version ExeFileName The name of the executable file cchLineMax The maximum number of characters allowed in a source file line cchPathMax The maximum number of characters supported in a path name cchSymbolMax The maximum number of characters allowed in a symbol s full name cchCmdMax The maximum number of characters allowed in a command custom command or macro command name cchBookmarkMax The maximum number of characters allowed in a bookmark name cchInputMax The maximum number of characters allowed in a dialog box text input field cchMacroStringMax The maximum number of characters allowed in a macro string variable InMax The maximum number of lines supported in a source file integerMax The maximum integer value supported integerMin The minimum integer value supported a negative number Rect Record A Rect record describes the coordinates of a rectangle The Rect records has the following fields Field Description Left The left pixel coordinate of the rectangl
126. 7 Extending the Selection 95 F Factors That Affect Performance 110 File Buffer Basics 97 File Buffer Functions 316 File Directory View 32 File Format Compatibility with Older Versions 361 File List View 31 File Names Are Like Symbols 55 File Options 170 File Options Dialog box 171 File Types View 33 Files how they arelocated 102 files adding to project 49 associating with document type 67 68 built for each project 119 document options 161 document types 66 loading 206 new 212 normalized names 48 opening 101 what to add to a project 123 Files Created by Source Insight 117 Files Created for Each Project 119 Files Created for Each User 118 Files in the Program Directory 117 Finding a Symbol 104 Finding References to Symbols 74 Finding Your Old Projects 353 First Source Link 179 Floating Windows 29 Folder Options 174 folders for Base project 118 for NetFramework project 118 for settings 118 My Documents 113 117 program 117 project 118 fonts Clip Window 135 Context Window 141 fixed width 83 for Draft View 167 for printing 164 220 horizontal spacing options 158 in style properties 272 lining up white space 163 Project Window 225 Relation Window graph nodes 232 Source Insight User Manual 367 Relation Window outline 234 scaling in remote sessions 242 setting per source file type 164 spacing 159 suppressing changes in syntax formatting 83 Symbol Window 277 used by syntax formatting 280 working with wi
127. 73 creating a new window 213 graph views 288 locking 207 outline view 288 printing 221 refreshing 72 speeding up 115 the type of relationship 236 Relation Window Performance 40 Relation Window Properties 233 Relation Window Properties Dialog Box 234 Relationship Rules 41 235 Relationship Types 40 Reload File 238 Reload Modified Files 239 remote files adding to a project 52 Remote Options 241 Remove File 239 Remove Project 240 RemoveFileFromProj function 341 Removing a Project 51 Removing Files from a Project 50 Rename 242 RenameBuf function 319 Renaming 74 Renaming an Identifier 84 Renumber 242 Repeat Typing 243 Replace 243 Replace Files 245 ReplaceInBuf function 337 Replacing in Multiple Files 85 Replacing in the Current File 84 Restore File 247 Restore Lines 248 Restoring Lines 287 RunCmd function 320 RunCmdLine function 320 Running a Command from command line 103 Running Inline Macro Statements 293 Running Macros 292 S Sample Macros 343 Save 248 Save A Copy 248 Save All 249 Save All Quietly 250 Save As 250 Save Configuration 251 Save Modified Files Dialog Box 249 Save Selection 252 Save Workspace 252 SaveBuf function 319 SaveBufAs function 319 Saving a Configuration 108 Saving and Restoring Workspaces 109 Saving Configurations 106 Saving When You Switch to Another Program 249 Saving Without Prompts 249 scroll bars 183 287 Scroll Half Page Down 252 Scroll Half Page U
128. 8 Numeric Keypad Keys 189 o Open 214 Open Project 215 OpenBuf function 318 Opening Files 101 Opening Files Quickly 31 Opening Header Files 187 Opening Older Projects 353 Opening Projects 50 Opening Workspaces 102 OpenMiscFile function 318 OpenProj function 341 Operating Systems recommendations 112 Operator Substitutions syntax decorations 81 Operators 301 Other Information about Macros 342 Outline and Graph Views 40 P Page Down 215 Page Setup 216 Page Up 218 Paren Left 218 Paren Right 218 Parent Styles syntax formatting 76 Parse Source Links 218 Parsing 72 coding tips 65 Parsing Considerations 65 Partial Configurations 204 Paste 219 Paste From Clip 219 Paste Line 219 Paste Symbol 219 PasteBufLine function 318 Performance Factors 110 Performance Tuning 110 Index Persistence 342 Physical Memory Capacity performance factors 112 Play Recording 220 Preferences 220 Preprocessor Token Macros 62 Previewing Files 35 Print 220 Print Relation Window 221 PrintBuf function 318 ProgEnvInfo Record 307 ProgInfo Record 307 Programming Languages support 58 Project adding files 49 adding remote files 52 changing settings 51 closing 50 closing current project 103 directories 47 features 47 index settings 110 settings 106 size 110 specific configurations 106 token macros 64 Project Data Directory 47 Project Document Types 221 Project File Browser 222 Project File List 222 Project Fu
129. 9 ie gione Sem es Portas nem deeem it Pene c IO jud Figure 4 15 The Search Results window and a source file window that shows the source link destination Source Links are bi directional so you can use the Jump To Link command to go from the link source to the target or from the target back to the source In addition the link information is maintained as you edit your files just as bookmarks are A link is only removed if you delete its link source line or close the link source file Searching and Source Links The search results placed in the Search Results window by the Search Search Files and Lookup References commands contain Source Links The link source file is the Search Results temporary file and the link target for each link is the location of the matching patterns in the various files that were searched 90 Source Insight User Manual Chapter 4 The Parse Source Links command creates source links in the current file Custom command output can contain source links for errors Navigation Using Source Links Source links are part of the current workspace which means it is part of the ses sion state If you save the Search Results to a new file name the Source links will be retained in the current workspace For example you could search for one pattern save the Search Results to S1 OUT do a second search and both S1 OUT and Search Results will have their source links If you close the Sea
130. Bar Bill Printed Default Text C Printed Window Background E Change Marks LJ Saved Change Marks EJ End of File E Application Background I Use color gradients Item list Lists the display items that can be colorized The list contains the fol lowing items Table 5 1 Display Items with Color Settings Display Item Description Default Text Plain text that has no other style applied Window Background The color of the screen window background Printed Default Text The printed color of plain text Printed Window Background The printed background color Change Marks The color of the change marks that appear in the left margin alongside lines that have been edited but not saved Saved Change Marks The color of the change marks that appear in the left margin alongside lines that have been edited after the changes have been saved to disk 138 Source Insight User Manual Chapter 5 Command Shell Table 5 1 Display Items with Color Settings Display Item Description End of File The color of the area that appears below the end of files Application Background The color of the main application frame window that contains the source file windows Use color gradients If checked then smooth color gradients are used in some parts of the user interface If not checked then solid colors are used Color Click this button to select a new color Styles Edits the style properties Reset Resets th
131. Contents Contents CHAPTER 1 CHAPTER 2 CHAPTER 3 INTRODUCTION eee ee eee ee ooo oos eee esee eese esee esee enssssssssssses sesso esee eeeeeeeeeeeeeees T Menu 2 Feature e ET To 8p 3 BCTHELGIIIHITI c 14 Technical SUPPOFt eee M 14 SETUP AND QUICK START ecce eee ee eee eee eee esee esses eeeessssssssssssseeeeees 15 Installing Source Insight eene eene eene eene eene nennen ernst tn sena eene sss EES Installing on Windows NT 2000 XP eene eene nennen enean enean sensn atas in einen Upgrading from Version 2 eee esee e eene eene eaten tnn etas na staat ese ta sesta sess stas es sena Upgrading from Version 3 0 and 3 1 Insert the CD ROM eee eene nenne Choosing a Drive for the Installation Using Version 3 and Version 2 Together Configuring Source Insight cesse eee eese eese e eene en sense a sense ea etse ta staat eas ta seas en Entering Your Serial Number Creating Common Projects Creating C Project WINDOW TOUR se e 1 Source Insight Application WiNdOW sesssssessessossossoseoessocsossossoseoeesossossoseoseosesse 21 Bere o Teen Source File Windows Symbol WINKOWS met FLOATING WINGOWS m Project Window Opening Files Quickly Project Window
132. E then each file that contains word will have its last modified time stamp set to the current time This function is similar to the Lookup References command Word can con tain more than one word but this function is much faster if it is a single word Source Insight User Manual 337 Macro Language Guide Chapter 6 This example creates a new search results file and searches for references macro LookupRefs symbol hbuf NewBuf Results create output buffer if hbuf 0 stop SearchForRefs hbuf symbol 0 SetCurrentBuf hbuf put buffer in a window SearchInBuf hbuf pattern InStart ichStart fMatchCase fRegExp fWholeWordsOnly Searches for pattern in the buffer hbuf The search starts at line number InStart and character index ichFirst SearchInBuf returns a Sel record which spans the matching text If nothing is found then an empty string is returned See GetWndSel for a description of the Sel record If fMatchCase then the search is case sensitive If fRegExpr then the pattern contains a regular expression Otherwise the pat tern is a simple string If fWholeWordsOnly then only whole words will cause a match SetSourceLink hbufSource InSource target file InTarget Creates a new source link The link source buffer is hbufSource The link source line number is InSource The link target file is given as a path string in target file The link target line number is InTarget Returns True i
133. Each File v Smart Reference Matching IV Skip Inactive Code Skip Comments IV Include Read Only Files keep buffers open Old Name Add the name of the identifier to be renamed The word under the cursor is automatically loaded for you The position of the cursor is significant because Source Insight will determine exactly which symbol you want to rename based on the local scope context You can add any string into this text box however the rename operation is optimized and much faster for single word strings Also if you type anything into this text box Source Insight will have to re establish exactly what symbol you are trying to rename based on the initial cursor position If you are renaming a member variable or a local variable you will notice that the Old Name text box contains the full symbol name including the container symbols For example it might say DocDraw paintStruc where DocDraw is a function name and paintStruc is a local variable In a sense paintStruc is a member of the DocDraw function New Name Add the new name here For members you should only add the new member name and omit the symbol container qualifiers Output Search Results If checked then the results of the search will be output to the Search Results window This provides you with a log of changes made to each occurrence The Search Results window will list the text the way it was before the replacement with the New N
134. Elements defined in the scripts are also dis played in the symbol window and are saved in the symbol database You can specify the default scripting language to use in HTML or ASP in the Options gt Preferences Languages dialog box Click on the Special button and select the default language where it says Default script language Source Insight User Manual 59 Source Insight Concepts Chapter 4 Java Language Editing To use symbolic auto completion with the standard Java packages you need to have the package source code on your machine or available through a net worked drive You also need to have a JavaStandard common project to refer to the source To create a JavaStandard Common Project 1 In the Options gt Preferences Symbol Lookups dialog box click the Create Common Projects button 2 In the Common Projects dialog box click on the Standard Java Libraries check box then click the Browse button next to it Navigate to the direc tory that contains the source code usually in one of the JDK Java Src sub directories Select the directory click OK 3 Then click Continue in the Common Projects dialog box At this point a Save As dialog box will appear to let you pick the name and location of the JavaStandard project It should go in the same directory as your JDK or one of its subdirectories Click Save 4 Next the Project Settings dialog appears just click OK 5 Next the Add and Remove Project Files dialog
135. Extends selection to the right by one char acter Select Line Shift F6 Selects whole line Select Line Down Shift Down Extends selection down a line Select Line Up Shift Up Extends selection up by a line Select Match Alt Selects up to the matching brace paren theses or quote mark Select Sentence Shift F7 Selects whole sentence Ctrl up to the next period Select Word Shift F5 Selects whole word and Double click L Mouse Select Word Left Ctrl Shift Left Extends selection to include the whole word on the to the left Select Word Right Ctrl Shift Right Extends selection to include the whole word on the to the Right Source Insight User Manual 95 Source Insight Concepts Chapter 4 Table 4 8 Selection Commands Command Key Description Select To Shift L Mouse Extends the selection to the current mouse location This is assigned to the mouse Select To Top Of File Shift Home Selects up to the begin ning of the file Select To End Of File Shift End Selects up to the end of the file Select To End Of Line Selects up the end of the current line Toggle Extend Mode When on movement keys extend the selec tion The Toggle Extend Mode command toggles Extend Mode on and off When Extend Mode is on and you use a movement command such as Cursor Left the current selection is extended in that direction See also Analysis Features on page 71 Selection Shortcuts Source I
136. IS allocate whole plex with zero ed out elements B AddLnact if plesNewohplini To cbof n7 LnMacDoc hdoc puil ffalse E AddRlex Retina delete sac References x s nix nva n return pNill cm Iac MS d 8 ifdef DEBUG A E eg Dlex a rr pdlexNew hdoc lt amp endif gt DEBUG sl pdlexNew blang pdlexNew cProtec Dlex Create nt HplNewFromArray 9 Function in Plex toolbo PL PTET E Co cbPlex cB cbElem 1 8l HplNewFromArray HPL hpl PPL ppl if hpl HplNewCb cbPlex cbElement iMac 4 return hplNil AMR ales oR Pe sess Figure 1 1 Source Insight uses innovative syntax formatting relationship graphing to illuminate source code design and dynamic Always Up To Date Information Because programs are constantly under development it s important that even symbols in code that will not compile can be browsed in with up to the second accuracy Source Insight automatically builds and maintains its own high per formance symbol database of functions methods global variables structures classes and other types of symbols defined in your project source files Source Source Insight User Manual Introduction File Name Chapter 1 Insight maintains its symbol database to provide browsing features instantly without having to compile the project or having to depend on the compiler to provide browser fi
137. If fSuppressWarnings then Source Insight will not issue warnings if it has errors opening files Source Insight User Manual 341 Macro Language Guide Chapter 6 Miscellaneous Macro Functions These function dont fit neatly into other categories but are useful DumpMacroState hbufOutput This function appends text describing the current state of the running macro to the buffer hbufOutput The macro state consists of the values of all variables and the execution stack This function is useful when debugging macros GetProgramEnvironmentinfo Returns a ProgEnvInfo record which contains information about the environ ment where Source Insight is running See also ProgEnvInfo Record on page 307 GetProgramInfo Returns a ProgInfo structure which contains information about Source Insight See also ProgInfo Record on page 307 Other Information about Macros Debugging Source Insight does not contain a debugger for macros However since macros are interpreted you can easily figure out what s going on by using the Msg function at strategic points in your code to output strings and variable values See also Msg s on page 315 To begin executing a macro statement at the current cursor position use the Run Macro Just put the insertion point on the line you want to start running at and invoke the Run Macro command You can dump the execution stack and variable state of a running macro by callin
138. In addition each file name may be optionally preceded with a plus sign only In this case the file is opened along with the other files in the current workspace For example insight3 file c This will open FILE C along with all the files in the current workspace If one or more files are specified on the command line without the plus sign prefix then the files previously open in the current workspace are not opened Instead only the files specified on the command line are opened For example insight3 file c other c This will open only FILE C and OTHER C The previously opened files in the current workspace are not opened How a File is Located When a relative file name path is given on the command line Source Insight first tries to find the file relative to the directory that you started Source Insight in If it can t find the file and a project is open it looks for the file in the projects file list In other words you can start Source Insight in any directory and give it a file name and if the file is in the current project Source Insight should find it If there happens to be a file with the same name in the startup directory or rela tive to it then Source Insight will open that file Opening Workspaces In addition to regular text files you may also specify the name of a workspace file for Source Insight to open For example insight3 myset wk3 This will open all the files in the workspace file myset wk3
139. Insight will open other secondary projects to search for symbol declarations However each instance of Source Insight only allows you to open one project at a time 46 Source Insight User Manual Chapter 4 Projects Project Features Source Insight projects have several important features A project logically groups related files When you specify a file to be opened you don t have to tell Source Insight the files drive or directory Source Insight figures out where all the project files are even if they are in different directories or drives See also Command Line Syntax on page 101 Source Insight maintains a symbol database which contains data about all symbols declarations in the project You can use Source Insight to locate symbols very quickly When source files are saved the symbol database is automatically updated incrementally so that Source Insight always knows where a symbol is When files are changed external by a source control system for example Source Insight will automatically synchronize those files with the project symbol database Source Insight can show symbol relationships in the project such as call trees reference trees and class hierarchies Source Insight maintains a reference index which greatly speeds up project wide searches for symbol references The reference index is updated incrementally as you edit and save your files Each project has its own session workspace When a projec
140. OD Post ONSUBMIT writecookie lt table CELLSPACING 0 BORDER 1 3 lt tr gt azr soe a Line 20 Col3 Writecookie INS Figure 1 6 Embedded script in ASP and HTML is also shown with syntax formatting Keyword Searches Like an Internet Search on Your Code Base The Search Project command allows keyword style searching similar to an Internet search engine This lets you find sections of code that refer to one or more topics within a specified number of lines For example you might type save disk copy or duplicate and Source Insight will find all references to the words save disk and either copy or duplicate that occur near each other as well as word variations such as saves saved and saving See also Search Project on page 259 Symbolic Auto Completion When you begin to type an identifier name Source Insight will pop up a list of potential identifier names Source Insight can show you function and variable 8 Source Insight User Manual Chapter 1 Feature Highlights names as well as class and structure fields up to many levels of depth Source Insight decodes the types of variables including inheritance on the fly Quick Access to All Symbols and Files Source Insight provides more useful programming information than any other editor Not only are symbol definitions tracked dynamically but also informa tion is offered in its most useful form With Source Insight
141. Of File command extends the selection from the insertion point to the end of the file Select To Top Of File The Select To Top Of File command extends the selection from the insertion point to the beginning of the file Select Word The Select Word command selects the whole word at the insertion point To use this command with the mouse Point and click the left mouse button at a word while holding the Ctrl key down The whole word gets selected Now while still holding the left button down you can drag and extend the selection in whole word increments Select Word Left The Select Word Left command extends the selection from the insertion point to the beginning of the current word 262 Source Insight User Manual Chapter 5 Select Word Right Select Word Right The Select Word Right command extends the selection from the insertion point to the end of the current word Selection History The Selection History displays a list of places that you have been in the cur rently open files The selection history is part of the current workspace Selection History X Position AppendS zCchM ax in Util c toolbox Line 2526 m E GetDisplayNameOlT av in Tay c Line 574 E FGetSymbolParent in Lookup c Line 4376 Ig LbProcMark in Cmdmark c Line 357 3 MAK in Mrk h Line 45 E LbProcMark in Cmdmark c Line 335 Ig DigProcMark in Crdmark c Line 243 E DigProcMarkPrev in Crdmark c Line 309 Ig LbProcMark in Cmdm
142. Preferences dialog box Source Insight User Manual 141 Command Reference Chapter 5 Automatic Symbol Tracking Activate Tracking Group Copy Symbol Tracking Options This dialog box displays options that guide what the Context Window will pay attention to Symbol Tracking Options x r Automatic Symbol Tracking C OF Track selected symbol i e under cursor C Track the enclosing function or class Activate Tracking Inside of comments Inside of string constants Help Inside all file types not just code files As you move your cursor around in a source file the Context Window tracks the symbol under the cursor or around the cursor This group of options tells the Context Window what to track Off Select this to disable automatic symbol tracking Track selected symbol i e under cursor Select this to have the Context Win dow look up the definition of the symbol currently under the typing cursor Track the enclosing function or class Select this to have the Context Window show the definition of the function or class that contains the typing cursor This is useful to have a function definition and formal parameters visible in the Context Window while you edit the function This group controls when the automatic tracking is activated Inside of comments Select this to have the Context Window look up symbols when the cursor is inside of comments Inside of str
143. R Refresh Relation WindOW seszsssssasssssssrsosssssssasoasonosasorosnosssossososasossss tssssssotonssstssssests Relation Graph Properties Relation Mao o viii Source Insight User Manual Contents Relation Window Properties s csecccssscsssscsescsssscssscssscssssscssscsssssssscssssssnssssscsssssoeses 233 Relation Window Properties Dialog BOX ss sesesseseesessoscosocoosocsocoosocsocoososoosoososoecooeosoee 234 ROIOG File ccscssssesssenseusvesaseccenssoccaassaccensanssdsdevesdesensevsseassoaseaneessvoassadssussucssttevesseseass 238 Reload Modified Files 20239 Remove File 0239 Remove Project 0 240 Remote Options Rename Renmber cisescasessocsoscsessecsecbesstenvoccseosecesbsbecsebesacsssieescsecscsenacestedoccieosossieebesseostecsesss Repeat Typing Replace Replace Files Restore File Restore Lines Save Mri A COPY o oesi SEESE SQVO AMI EASE EA EEE A EEE EE EEE OE EE E Save All Quietly 250 Save As ee ee eene 250 Save Configuration 257 Save Selection 252 Save Workspace 252 Scroll Half Page DOWN RR 252 Scroll Half Page Up sssscssccsscceccsccscccsccseccecscccsscesecssccsscesccscssecssccssccscssecsscssscssessocssess 252 Scroll Left 4253 Scroll Line Down 253 Scroll Line Up 253 Scroll Right 253 SDK Help 253 N
144. RPT which contains a list of files and symbols in the current project Project Report q x Files V Size Modification Date OBJ Size v Normalize File Names Cancel IV Line Count Help M Symbols Include Symbols Symbol Types Line Numbers Parameters Sort by Occurence C Name Files Turn on these check boxes to include the corresponding information Include Symbols If checked then symbols will be listed under each file If not checked then no symbol information will be listed in the project report Line Numbers If checked then the line number where the symbol is defined is listed by the symbol name Sort by If Occurrence is selected then symbols will by listed by line number If Name is selected then symbols will be listed by symbol name Symbol Types Click this button to indicate what types of symbols will be included 228 Source Insight User Manual Chapter 5 Project Window command Project Window command The Project Window is a floating dockable window that displays a list of the files in the current project Double clicking on an entry in the Project Window list opens the file Dragging a file onto the Project Window from Explorer or File Manager adds the file to the project There is also a toolbar at the bottom of the Project Window for other commands relating to projects The Project Window can be toggled on and off by running the Project Window command Yo
145. Restore Lines Save The Restore Lines command restores a block of edited lines back to their origi nal contents The lines will be as they were when you first opened the file if hdc hNil hfont0ld SelectObject hdc hfont GetTextMetrics hdc txm AEX Alt er ch txm tmMaxCharWidth 4C Paste Altt Duplicate Select Function or Symbol Shift Revision marks in the Bookmark crm margin indicate what lines Go To Line Alt G will be restored Jump To Link Alt Up Line Nurnbers Alt Shift L Restore Lines i Trnures Restoring lines will lose those changes you made since it was first opened even if you saved the file The file that is saved on disk is not altered Only the lines in the open file buffer are restored The Restore Line command is undo able This gives you a powerful out of order undo capability You can access the Restore Lines command quickly by right clicking in the selection bar left margin area next to a block of modified lines and choosing it from the right click menu You can see what lines are modified by turning on line revision marks See Preferences Display command The Save command saves the current file to disk The file is saved to its current name Prior to saving any changes you made to the current file were only present in the unsaved version you were editing The file on disk never is changed until you save the file by using the Save Save As or Save
146. Source Insight or a bug in Source Insight Whatever the reason it is still a good idea for you to scroll through each recovered file to see that everything looks intact before you actually go ahead and save the files If Source Insights recovery file was dam aged or not written entirely or the failure occurred while the recovery file was being updated then Source Insight may unwittingly trash your file while it thought it was recovering it If you find that the recovery didn t work correctly do not save the file Close the file without saving it The original unsaved file will still be intact although without your last changes saved 100 Source Insight User Manual Chapter 4 Command Line Syntax Note Before a recovery can take place the recovery system requires that the original files you had open previously must still exist and be unchanged since Source Insight opened or saved them If you need to perform a recov ery you should do it right away before any of the original files are modi fied Command Line Syntax insight3 Source Insight s command line has the following syntax option 4linenumber file file file symbolname Optional parameters are shown here inside brackets Any number of options files and symbol names may be given on the command line Each option given on the command line must be preceded by a dash ora forward slash Specifying File Arguments Each file
147. Source Insight uses a language abstraction to encapsulate the properties of vari ous programming languages For a given file buffer the file s name determines its document type The docu ment type determines its language The Options gt Document Options dialog box is used to associate a document type with a file name and a language Source Insight supports languages by displaying source code with syntax for matting parsing symbol definitions out of the code and storing symbolic infor mation in the project s symbol database Symbol declaration parsing is controlled by the language type associated with the file s document type To see a list of the currently supported languages use the Options gt Prefer ences Languages dialog box New languages are added to the list from time to time in program updates Languages in Source Insight are divided into two categories Built In and Cus tom Built In Languages Source Insight contains built in optimized support for several languages including C C Java IDL ODL Perl C ASP Visual Basic and others Most built in languages support extra features like finding references and gen erating call trees Custom Languages You can also add your own custom language support to Source Insight using the Preferences Languages dialog box A custom language is a simple generic language that specifies syntax rules syntax formatting keywords and simple parsing expressions See also
148. When you edit a token macro file you must save it to disk before Source Insight will re parse your open files However Source Insight will not automatically re parse your whole project You should make all your changes to the token macro file first then use the Rebuild Project command to re parse your whole project Source Insight User Manual 63 Source Insight Concepts Chapter 4 Each project can have its own token macro file which merges with the global file Until your project is re parsed the symbol information stored in Source Insight s symbol database will not reflect the changes you made to your token macros Project Specific Token Macros Each project can have its own set of token macro files Source Insight does not create them automatically but you can yourself A project token macro file is saved in the project s data directory When Source Insight parses a source file it combines the project token macros with the global set saved in the Source Insight program directory The project token macros take precedence over the global ones By adding project specific token macros you can tailor the token macro expansion for each project individually 64 Source Insight User Manual Chapter 4 Some coding styles affect parsing correctness C C Language Features Parsing Considerations Having symbols found by error tolerant pattern matching rather than strict language parsing has important implications Th
149. Window deus BarCheci shows symbols our Relation Window defined in each file E OnUpdareKevindicaro shows references W OnUpdateContextHel BI OnUpdaterrameTite aun call trees and other I preise if isBecthorder em S222 relationships I eerta ifs rder IsBectiall Context Window Bl GetAcivefreme automatically o shows declarations Soreness lt joj and other eim ima r information while a SSS DREN you click on things al or type Status bar zl Une 2003 p31 36 Cal 15 Crame Wind NegetsteBorderSpace ms Figure 3 1 The main Source Insight program window showing a source file window with a symbol window attached on the left side and a Relation Window docked to the right edge The Context Window appears docked at the bottom edge Toolbars The main toolbar appears at the top of the Source Insight program window You can toggle the whole main toolbar on and off with the View gt Toolbars gt Main Toolbar command The View gt Toolbar The main toolbar is made up of smaller sub toolbars Each sub toolbar can be menu item controls displayed independently using the View gt Toolbars menu You can also drag whattoolbarsare the sub toolbars around within the main toolbar visible The position of each toolbar is saved in the configuration file automatically Each toolbar icon corresponds to a Source Insight command Please refer to the Command Reference chapter for information o
150. Windows 283 Symbol Tracking Options 142 238 Tile Vertical 283 Symbol Window command 276 Time stamping 99 Symbol Window Properties 276 To Search a Set of Files 258 Symbol Window Permanently Changing Width 28 Toggle Insert Mode 283 Symbol Windows 27 ToggleWndMax function 328 SymbolChildren function 335 Token Macro Files 63 Source Insight User Manual 373 Token Macro Syntax 63 opening 102 Token Macros 62 63 saving and restoring 109 tolower function 312 working with multiple 252 Toolbars 22 Top of File 283 X Index Top of Window 283 Touch All Files in Relation 283 XposFromlch function 328 toupper function 312 Transparent Floating Windows 30 Z Typing Options 284 Zoom Window 290 Typing Symbol Names with Syllable Indexing 68 c ndo 286 ndo All 287 ndoing All Changes 287 ndoing Cursor Movement 287 pdating the Symbol Database 55 pgrading from version 2 0 or 2 1 353 from version 3 1 or 3 0 351 Upgrading from an Earlier Version 15 16 User Data Folder 174 User Input and Output Functions 312 user level commands defined 104 CI CIC C CIC Ci V Variable 295 Variable Arithmetic 298 Variable Initialization 296 Variable Name Expansion 297 Version 3 using with Version 2 17 354 Vertical Scroll Bar 287 Vertical Spacing Options 159 View Clip 288 View Draft 166 View Relation Outline 288 View Relation Window Horizontal Graph 288 View Relation Window Vertical Graph 288 View Toolbar 24 Virtual Memory Capa
151. abase from scratch It may take more time than the Fix database file corruption method If you cancel it the symbol database will be only partly complete Source Insight will only have knowledge of symbols in the files that have been scanned The background synchroniza tion will complete the parsing Alternatively you can complete the process by using the Project gt Synchronize Files command Record New Default Properties Redo Redo All On the Symbol Window right click menu This makes the current settings of the window become the new Default settings for new windows For the Symbol Window this records the window s width symbol sorting and symbol type filtering and uses those parameters as the new default for new win dows created subsequently The Redo command reverses the effect of the Undo command In effect as you edit Source Insight makes a list of the changes you ve made to each file The Undo command backs up through that list and the Redo command advances through the list You can also use the Redo All command to reverse all the Undo actions Source Insight keeps Undo Redo history for each open file independently Reverse the effect of all Undo actions This brings the file all the way back up to date with your last change It is equivalent to running the Redo command repeatedly until there is nothing left to Redo 230 Source Insight User Manual Chapter 5 Redraw Screen Redraw Screen The Redraw S
152. abc matches a tab character followed by int abc s matches a single space character Example sif matches a space character followed by if w matches a single white space character In other words Ww matches either a tab or space character Example wwhile matches either a tab or space character followed by while Matching 0 1 or More Occurrences and matches zero or more occurrences of the preceding character The fewest possible occurrences of a pattern will satisfy the match Example a b will match b ab aab aaab aaaab and so on matches one or more occurrences of the preceding character Example a will match ab aab aaab aaaab and so on but not just b Matching Any in a Set of Characters ERE When a list of characters are enclosed in square braces then any character in that set will be matched Example abc matches a b and c but not d When a caret appears at the beginning of the set the match succeeds only if the character is not in the set Example abc matches d e or f but not a b or c 86 Source Insight User Manual Chapter 4 Regular Expressions Sets can conveniently be described with a range A range is specified by two characters separated by a dash such as a z The beginning character must have a lower ASCII value than the ending character Example a z matches any character in the range a through z but not A or 1 or 2 Sets can contain mult
153. achine will not be able to access them However you may use the same location for both folder locations To edit the project source directory location use the Project Settings com mand See also Project Settings on page 225 Project Source Directory The project source directory is what you consider the main location of your source files The project source directory is typically the topmost or root directory that contains most of the source files You might think of this as the home directory of the project Source Insight normalizes project file names relative to this directory See Figure 4 2 on page 48 By default Source Insight makes the project source directory the same as the project data directory You can actually set the source directory to any location on your disk after the project is created by using the Project Settings command See Where Should You Create A Project on page 213 for more information about choosing a location for your project Once a project is created in a given directory you can add files to it from any directory and any drive including network drives and UNC paths As an example let s say we are creating a project for a game program We want to divide the source files into categories and create a directory for each category We create the necessary directories and create a project whose root directory is C Game Project Root C Game C Game Presentation C Game Core C
154. acseseceavsseceesessacsseenezessessctesecesescee 343 MACRO EVENT HANDLERS e eee eee eee ee eee eee sees eese se esee esssssssssssssseeeee SAD Macro Event Handlers Event Handler USES cccsccscsscscccccsccscesccccsccccesccscesccsesccssesccscescssesccscesccsesscsoes Adding Event Handlers to Source Insight e sesseesessossossoseseeseesossossoseosessesosoose 347 Enabling Event Handlers 4347 Editing Event Handler Files 4347 Errors in Event Handlers 4347 Synchronous Vs Asynchronous Events 4347 o dell 348 AD PliGation mb 10 Leere p CD D 348 event AppsStart 348 event AppShutdownY 348 event AppCommand sCommandQ Source Insight User Manual xv Contents DOCUMENT EVENTS ciscscccesvcsceatcscsssesccscssscessdetcesesssecsuesecs cosceusssesedecceecesesesconseesss 348 event DocumentNew sFile ecccccccccssscccccccccssssscesccsscssscsssccescssssecsccessessscescesees 348 event DocumentOpen sFile e ecce eee eee eere e eee eee eo see eo seen aetas eaae etas e neon 348 event DocumentClose sFile eee ee eee ee eee eee etn nnne e ee ttn nna e eee eats sees eee een a aae ee 349 event DocumentSave sFile e eee eee ee ee eee eene nae e eee enn aee e eee tns sees e ee een ssa e ee 349 event DocumentSaveComplete sFile e 349 event DocumentChanged sFile e
155. add a new parsing expression to the list See also Custom Parsing Expression on page 202 Delete Click this to delete the selected expression Edit Click this to edit the expression See also Custom Parsing Expression on page 202 Delete All Click this to delete all the expressions from the list Source Insight User Manual 201 Command Reference Chapter 5 Custom Parsing Expression When you click the Add or Edit button in the Custom Parsing dialog box the Custom Parsing Expression dialog box appears Custom Parsing Expression X Regular expression pattern This text box contains the regular expression used to parse a symbol definition out of a file The expression should contain one group The group describes what part of the matching pattern is the symbol name Using a custom pattern allows you to parse symbols out of files for which Source Insight has no built in knowledge For example the following string parses sections out of INI files like WIN INI NING ANNI For more information see Regular Expressions on page 85 Finds this symbol type This pull down list specifies what type of symbol is found by the parsing pattern The list contains all of the possible symbol types The symbol types are fixed and cannot be extended The symbol type also determines the syntax formatting style used to display the symbol Styles for Custom Parsing Symbols The symbol type specified for the custom parsing exp
156. adow Enable this to put a drop shadow on each node Connection Line options control the way the lines that connect nodes appear 232 Source Insight User Manual Chapter 5 Relation Window Type Selects the style of lines that connect nodes Direct Lines are drawn straight between nodes e Orthogonal Lines are drawn with right angle bends e Splined Lines are drawn as curves Line Color Selects the color used for connection lines Thick Line Enable this to make connection lines thicker Arrows Enable this to put arrowheads on the connection lines If the Spacing percentage is small the arrowheads are omitted due to the lack of inter node space Unique backward line color Enable this to have reverse flowing lines drawn in a separate color Use the Backward Line Color button to select the color Backward Line Color Selects the color used for reverse flowing lines Relation Window Toggles the Relation Window visibility This shows or hides all Relation Win dows Relation Window Properties The Relation Window Properties command is accessed from the Relation Win dow toolbar or shortcut menu You control what relationships are shown from this dialog box and how the window displayed Source Insight User Manual 233 Command Reference Chapter 5 Relation Window Properties Dialog Box Automatic Symbol Tracking Automatic Expansion Options Relation Window Properties 4 1 xj m Automatic Symbol Tracking OK
157. after the command runs Save Files First If checked Source Insight will perform a Save All command prior to executing the command The Save All command will prompt you for each file that has been edited to see if you want to save the file If not checked the command will be executed without saving any changed files The unsaved changes will be retained when the command completes and con trol returns to Source Insight If the command should cause a crash Source Insight will be able to perform a recovery and all changes will be intact See also Recovering From Crashes on page 99 Pause When Done If checked Source Insight will display this message in a DOS box when the command completes Press any key to return to Source Insight If not checked the DOS box will terminate after the command completes Beep When Done If checked Source Insight will beep when the command ter minates Wait Until Done If checked then Source Insight will suspend itself until the command finishes If not checked then Source Insight will run the command and continue You will be able to switch back to the Source Insight window and continue working while the command runs in the background 146 Source Insight User Manual Chapter 5 Source Links in Output Custom Commands Exit Source Insight Source Insight will exit after launching the program These options specify how the output is to be treated after the command fin ishes You m
158. aining source links and then you used the Go To Link Location command on a line in the Search Results win dow the first source link is determined to be the first link in the Search Results window The Go To First Link Go To Next Link and Go To Previous Link commands are used to quickly skip from link to link and are especially useful when the source links are connecting compiler error messages and program source lines Using Links With Compiler Errors If you spawn the compiler from Source Insight using a custom command and the output is captured and parsed for error messages then you can use Go To First Link and Go To Next Link to view each error in your source files When you define the Compile File custom command you should have the Parse Source Links option on Source Insight will then search the compiler output and setup source links for each error message In this case the link sources are each error message in the compiler output file The link target for each link is the file and line number given in each error message Source Insight User Manual 179 Command Reference Chapter 5 To view source lines with errors To run a build or compile command and let Source Insight position to each error message 1 Run the Compile File or Build Project custom command which is defined as described at Creating a Compile and Build command on page 151 2 Assuming there are errors when the compiler finishes
159. al Parsing dialog box which displays all the defined conditions The list you get to edit depends on which one is selected in the Edit Condition Set control Enable Event Handlers This command is a toggle that enables or disables macro event handlers For more information see Chapter 7 Macro Event Handlers on page 345 End of Line The End of Line command moves the insertion point to the end of the current line End of Selection The End of Selection command moves the insertion point to the end of an extended selection If the current selection is not extended this command does nothing Exit The Exit command exits the Source Insight program Source Insight will ask you if you want to save each file that has been changed but not saved When Source Insight exits it saves the current workspace file so you may resume your session when you run Source Insight the next time Exit and Suspend The Exit and Suspend command writes a Source Insight recovery file out and then closes Source Insight without saving any files This allows you to exit Source Insight and save your edits without altering any files Run Source Insight again to recover your edits Warning Do not alter the files that Source Insight had open before you run Source Insight a second time to recover your changes Source Insight s recovery system relies on the original files being left unchanged Source Insight User Manual 169 Command Reference Chapter 5
160. al version of the file with Source Insight When the developer is satisfied that they want to keep the changes made they check it back in using their source control software This effectively copies the file from the developer s local machine back to the main project server When another developer wants to get the latest and greatest version of the source files they use the source control software to synchronize their local directories with the main project server This effectively copies newer files from the project server to the developer s local workstation machine Source Insight recognizes when files change by checking each files last write timestamp and the files size When it detects that a file has changed it re parses the file and updates the Source Insight symbol database on the devel opers local machine Source Control Commands Source Insight has several standard Custom Commands built in to handle source control operations The Options Custom Commands dialog box lets you edit the commands By default they are setup to support Microsoft Visual Source Safe However you can easily change them to support other source control or version control systems The source control commands appear in the table below Their exact meanings are really based on how you choose to set them up in the Custom Commands dialog box See also Custom Commands on page 145 Source Insight defines the following command semantics
161. ally you would put your name in the Cover string text box so that someone at the printer could identify the source of your print job If not checked then no cover page is printed Header per column If checked then a header will be printed above each col umn This only has an effect if the number of columns is set to two or more If not checked then a single header is printed at the top of the page Footer per column If checked then a footer will be printed below each column This only has an effect if the number of columns is set to two or more If not checked then a single footer is printed at the bottom of the page 216 Source Insight User Manual Chapter 5 Formatting Options Page Setup The formatting options control how syntax formatting is output to the printer These options work independently of the screen settings which you control in the Preferences Syntax Formatting dialog box Print Syntax Formatting If enabled all syntax formatting effects will be printed as well as displayed on the screen Print in color If enabled then color is used for printing If your printer is not a color printer then colors will be displayed in shades of gray If you disable this option then all text regardless of on screen color is printed in full black or white However text that is colored near a neutral gray is printed in gray Header and Footer Codes A header is a title printed at the top of the page A footer is a tit
162. also Relation Window on page 39 288 Source Insight User Manual Chapter 5 Window List Window List Manages the list of open source windows and file buffers It also lists file buffers that are not visible in any window Window List E Window Ix Activate 11 Cmd ine 2 Cmdwind c 3 Dlg c toolbox A 4 Dig h toolbox Close Window 5 Find c 6 Format c 7 Hub c 8 LangBase cpp 9 LanglF cpp Save As D Listbox c toolbox Listbox h toolbox B Lookup h C Notes tst D Popsym c Restore E Search Results F Silcont c 3 F G Ste toolbox Tile Horiz H Sw h Undo c Tile Vert J Util c toolbox K UtillL c toolbox L C siNwKS H Help M_c Sinsiaht3 utils em ml Done Save Minimize ne Window list Contains a list of all open source windows and file buffers that may be open in the background that do not appear in a window You can sort the window list by name or by recently used order To sort the list click on the header titles at the top of the list Activate Brings the selected window to the front Close Window Closes the selected windows Save Saves the selected files Save As Performs a Save As command on each selected file Minimize Minimizes the selected windows Restore Restores the selected windows Tile Horiz Tiles the selected windows horizontally so they are generally wider than they are tall Tile Vert Tiles the selected windows vertically so they are generally taller th
163. ame command renames a symbol in all the appropriate contexts You can rename local variables instantly Saving a file preserves its undo and change history and displays two stage revision marks Line number display Visible page breaks and page numbers Visible right margin User defined Work menu Improved file handling during save operations Miscellaneous improvements to the UI including Better window docking Customizable fonts and colors for all windows Dialog box position memory Multiple selection lists Improved toolbars Source Insight User Manual 357 Appendix Upgrading From Older Versions New Commands Chapter 8 New Command List The following table summarizes new commands in version 3 5 that have been added since version 2 x of Source Insight Table 8 1 New Commands Added Since Version 2 x Command Summary Activate Relation Window Opens and selects the Relation Window Add and Remove Project Files Adds and removes files from the current project This replaces the old Add Files and Remove Files commands Advanced Options Allows you to enable and disable various internal caches This is pro vided for troubleshooting Build Project Custom tool command Builds the project Check In Custom source control Checks in the current file Check Out Custom source control Checks out the current file Checkpoint Saves the current file to d
164. ame string Confirm Each Replacement If checked Source Insight will confirm each replacement by prompting you Confirm Each File If checked Source Insight will confirm each modified file by prompting you Source Insight User Manual 267 Command Reference Chapter 5 Smart Reference Matching This tells Source Insight to use its language infor mation and the cursor scope context to determine exactly what symbol is being renamed and to make sure it only renames strict references to it Skip Inactive Code If enabled then only code that is active under conditional compilation is searched You must first specify known conditions in the Prefer ences Languages dialog box in order for Source Insight to know what condi tions are active or not Conditional compilation only applies to some languages Skip Comments If enabled then symbol references inside comments will not be renamed Include Read Only Files keep buffers open If checked then replacements will be made inside of read only file buffers Source Insight will not attempt to save the file as the replacement operation progresses The files will be left open and modified allowing you to save the files yourself If not checked then read only files will be skipped Note that this options works independently from the Pref erences Files option Allow editing read only file buffers You can make Source Insight automatically save over read only files while renaming if you enable
165. an they are wide Source Insight User Manual 289 Command Reference Chapter 5 Word Left The Word Left command moves the insertion point to left by one word Word Right The Word Right command moves the insertion point to the right by one word Zoom Window If the current window is not already maximized the Zoom Window command maximizes it If the current window is already maximized the Zoom Window command restores the window to its un maximized size 290 Source Insight User Manual cw Macro Language Guide This chapter describes the Source Insight macro language The Source Insight macro language syntax is similar to C This chapter assumes you are familiar with basic programming concepts Macro Language Overview Source Insight provides a C like macro language which is useful for scripting commands inserting specially formatted text and automating editing opera tions Macros are saved in a text file with a EM extension The files are added to your project or to any project on the Project Symbol Path or to the Base project Once a macro file is part of the project the macro functions in the file become available as user level commands in the Key Assignments or Menu Assign ments dialog boxes Basic Syntax Rules Source Insight s macro language is not case sensitive As with most other lan guages white space is ignored Semi colons are not required but are ignored Variable names must begin with a lette
166. and Symbol Info dia log boxes also have References buttons which do the same thing See also Lookup References on page 208 Creating a Project Report The Project Report command will create a report file containing a symbol cross reference and statistics about the files in your project See also Project Report on page 228 Smart Renaming The Smart Rename command is a context sensitive form of a global search amp replace It renames an identifier across all project files using a smart context sensitive method Source Insight s search index makes the search very fast This is the easiest way to replace a single word identifier with a new string In addition you can have Source Insight produce a log of replacements in the Search Results window Each replacement line is listed along with a source link to the location of each line that was changed See also Smart Rename on page 266 Syntax Formatting and Styles Syntax Formatting uses rich text formatting based on program infor mation Syntax Formatting is an important Source Insight feature that renders informa tion in a dense yet pleasing and useful way Source Insight uses information gathered from its parsers to format source code Identifiers can be displayed in different fonts or font sizes along with a variety of effects such as bold and italics Formatting is applied with styles A style is a set of formatting properties For example a
167. and Windows Headers This project is intended to include the standard Windows C and C include files and or source code Source Insight will attempt to locate them by looking in your registry however you will have to confirm their location Click the Browse button to the right to locate the folder that contains the source files 264 Source Insight User Manual Chapter 5 Setup HTML Help Standard MFC Files This project is intended to include the MFC Microsoft Foundation Classes include files and or source files Click the Browse button to the right to locate the folder that contains the source files Standard Java Libraries This project is intended to include the Java develop ment kit source code for the standard Java packages such as java lang Source Insight will attempt to locate them by looking in your registry however you will have to confirm their location Click the Browse button to the right to locate the folder that contains the source files Net Framework This project is used for symbolic auto completion in C If you are not using C you do not need to select this project You don t need to specify a directory for this project because Source Insight creates it for you Continue Click the Continue button to proceed and create the common projects that are checked For each project that is checked Source Insight will ask you to add files to that project The Add and Remove Project Files dialog box will appear Setup
168. are composed of individual statements Groups of two or more state ments are enclosed with curly braces A statement can be one of the following A macro language statement element such as an if or while statement These statements are described later A call to a user defined macro function You define and save macro functions in a macro source file A call to an internal macro function such as GetCurrentBuf Source Insight provides many built in functions They are described in a later section An invocation of a Source Insight user command such as Line Up or Copy All user level commands in Source Insight are available to the macro language To calla user command use the name of the command by itself without parameters Parentheses are not used If the command contains embedded spaces in the command name you must replace the spaces with underscore characters For example to call the Select All command the statement should look like Select AII Function and variable names are not case sensitive Statement syntax is generally the same as in C or Java except that semi colons are not required and are ignored If your fingers are used to typing them you don t have to change your habits 294 Source Insight User Manual Chapter 6 Variables Variables do not have a type Variables Here are a few example statements hbuf OpenBuf file c call internal function SaveBufAs hbuf filenew c
169. arent 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 Using Common Projects The Project Symbol Path You might have a set of headers files from a library that you often use with mul tiple projects You could add these files to each of your projects but that would be redundant A better solution is to create a single project for each set of com mon header files These projects can be put onto a path and Source Insight will search the path whenever it looks up a symbol and cant find it in your project This path is called the project symbol path When Source Insight looks up a symbol it searches the currently open files the project symbol database and the projects in the project symbol path You can edit the project symbol path using the Preferences Symbol Lookups command See also Symbol Lookup Options on page 274 The project symbol path is a delimited list of projects that Source Insight will search through when looking up a symbol The project symbol path is located in the Preferences Symbol Lookups dialog box The project symbol path enables you to create smaller self contained projects but still have the ability to locate symbols in other projects The Base project See als
170. argument may be one of the following types e Aregular file name Source Insight allows you to omit file extensions In this case Source Insight tries to find a match within the current project as though you typed lt filename gt If more than one file exists with that name then a list will be shown and you will be able to pick the exact file e A symbol name Since Source Insight treats file names as symbols each file argument can be more generally thought of as a symbol Source Insight will open the file where the symbol lives and jump to its location You may specify any number of symbols If the symbol name conflicts with file names without extensions or with other symbols then a list will be shown and you will be able to pick the exact symbol instance e The name of a workspace file including the WK3 extension Source Insight will open all the files contained in the workspace e The name ofa configuration file including the CF3 extension Source Insight will load the given configuration file Opening Files On the Source Insight command line you can specify files following the options Each file name may be optionally preceded by a plus sign and a line number If this is done the file will be displayed with that line number vis ible Source Insight User Manual 101 Source Insight Concepts Chapter 4 For example insight3 100 file c This will open FILE C and position the file so that line 100 is visible
171. aring Enable this to allow other programs to modify the files that are open in Source Insight In other words a file that is open in Source Insight can be writ ten over by another program Turning this on will cause Open and Save opera tions to be a little slower and it will use more disk space for each open file Disable this to give Source Insight exclusive write access to the files Files will still be opened in read only mode except during Save operations However other programs will not be able to open the same files for writing This is also a little faster Reload externally modified files in background Turn this on to enable Source Insight to detect that files have been modified externally Files are reloaded automatically Files are checked every few seconds and whenever the Source Insight application window comes to the front Each modified file is reloaded silently without any prompting unless the Ask before reloading modified files option is on or you have edited the file in Source Insight Source Insight User Manual 171 Command Reference Chapter 5 If disabled you can still run the Reload Modified Files command to manually force Insight to reload any modified files that are found Ask before reloading modified files If enabled then Source Insight will prompt you when it detects that a file has been modified externally to see if you want to reload it If disabled then Source Insight will automatically reload externa
172. ark c Line 333 E DigProcMarkPrev in Crdmark c Line 316 Ig DigProcMark in Cmdmark c Line 243 2 LbProcMark in Search Results Line 2 muU MaDe nha arle in Cmn lo m Linn 202 GoTo Cancel Help ddi Position Displays a list of all selection history positions Each item in the list shows the file and line number If the position is within a symbol the symbol is also shown For example if you were inside of a function then the function name is in the list too Go To Click this button to jump to the selected position Setup Common Projects This command asks you to indicate what common projects you would like to build This command runs automatically after you install Source Insight for the first time You can also invoke this command directly at any time after that from the Preferences Symbol Lookups dialog box What Are Common Projects Most Source Insight users make use of standard libraries such as the C C runtime libraries or the standard Java packages In order for Source Insight to provide symbol completion and other symbolic features for standard libraries you need to setup separate projects for those libraries Source Insight will resort to searching these common projects if a symbol cannot be found in your current project Source Insight User Manual 263 Command Reference Chapter 5 The Setup Common Projects command will help you build projects for those libraries The proje
173. ast enough you can turn off many options to improve performance albeit with less functionality In most cases you can return to version 2 x functionality and speed by selecting the correct options Source Insight has many new performance optimizations that allow it to pro vide more functionality with minimal speed loss Project Size The size of a project has a large effect on the performance of certain features in Source Insight The project size can be measured in number of files and in number of declared symbols To find out how large your project is use the Project Project Report com mand and note the top lines ofthe report At the top of the project report Source Insight prints the number of files the number of symbols and the num ber of symbol index entries in the project You can also see these same statistics in the Project gt Rebuild Project dialog box at the bottom of the dialog box You do not have to rebuild the project to see the statistics Source Insight 3 5 handles even more symbol information than version 2 1 did However the symbol indexes have grown in size This may affect very large projects Project Index Settings The Project Settings dialog box contains options for indexing your project If you enable all the indexing options and your project is large you may hurt per formance 110 Source Insight User Manual Chapter 4 Syllable indexing a large project can be slow and memory int
174. at you are doing You can click on an identifier and the Context Window will automati cally show the symbol s definition If the identifier is a variable the Context Window will decode its declaration to show you its base structure or class type The Context Window also will automatically display files selected in the Project Window symbols in the Relation Window and clips selected in the Clip Win dow Call Graphs and Class Tree Diagrams The Relation Window is a Source Insight innovation that shows interesting relationships between symbols It runs in the background and tracks what sym bols you have selected With it you can view class hierarchies call trees refer ence trees and more See also Relation Window on page 39 The beauty of the Relation Window is that you don t have to do anything spe cial It works in the background while you work but you can interact with it when you want to The Relation Window can be viewed either graphically or in outline format You can also have several Relation Windows open each showing different types of information References lt C zox IE wndProcDockFloat 1 line 2889 2 line 2889 BlwndProcLw _ 1 line 1742 MINMAXINFO 2 line 1742 tagMINMAXINFO ptMaxPosition ptMaxSize Ig mdPullDownMenu ptMaxTrackSize ptMinTrackSize GI FInitSwMgrClasses ptReserved E wndProcsw 1 line 1873 2 line 1873 B Vipdebug def Vipship def
175. atabase information known for the current source file Suppress warning messages Source Insight will not inform you of problems such as not being able to open or read a file Syntax Decorations This command specifies syntax decoration options for displaying source files It activates the Syntax Decorations page of the Preferences dialog box Source Insight can replace some common operators with more useful symbolic characters The Syntax Decorations command lets you control which decora tions are used Its important to remember that symbol decorations and substitutions do not change the text in the source file only its representation on the screen changes to show the special symbols You still need to type the operators normally when editing your code or when searching for them See also Syntax Decorations on page 278 x General Typing Files Languages Symbol Lookups Display Coles Syntax Formatting Syntax Decorations Searching Remote Source Insight can substitute decorative symbols for certain operators and automatically add some display elements Display Substitutions JV Use operator substitutions listed below Doc Types v Pointer field reference uses right arrow v Not Equal I Equal uses IV Less Than or Equal lt v Greater Than or Equal gt IV Assignment 7 uses left arrow Division Logical AND amp amp Logical OR Il IV Scale nested parenthese
176. ath to the source files as the project source directory This feature is helpful when you are not allowed or unable to create project data files in the same directory as the source files Some project administrators will allow you read only access to the source code share point and do not want you to put any Source Insight files there You can change the project source directory setting in the Project Settings dia log at any time after the project is created The project source directory path is stored with the project data in a relative format The path is relative to the directory with the PR file That allows projects that were created on one machine to be opened remotely from another without confusing the logical drives It also allows copying whole project direc tory trees to new locations Some Custom Command string meta character substitutions are also affected by this path setting The j project source directory and v project source directory volume letter refer to this path value and not where the PR file is 226 Source Insight User Manual Chapter 5 Symbol Database Options Project Settings These options affect what is stored in the project s symbol database You should choose these options before you add a bunch of files to your project If you change these options after the project is already built then the project will need to be rebuilt Source Insight will rebuild it for you Store function loca
177. ax formatting keywords and simple parsing expressions See also Custom Languages on page 58 Document Options Document Type Make File z m Font Options IF Emulate screen fonts when printing Iv Line up white space Screen Fonts Courier New 9 Printer Fonts Courier 3 m Parsing Language Makefile z Language Custom Tag Type No Custom Parser z Custom pattern pm File filter mak Add Type Remove Type Make options same as Default type Iv Include when adding to projects Line Col Symbol C Line Col Char Byte Status Bar Options Close Auto Indent Help Editing Options Word Wrap Expand tabs M Enter key new line I Show line numbers T Show right margin Tab width 4 Margin width ag Visible tabs Iv Symbol Window I Show page breaks Preferences x Languages Language CLanguage C Language C Language amp Change History CSS HTML IDL ODL 3 INI File Java Language Notes Perl Language Resource File Search Results SI Macro Language SQL amp Takon Macrae Conditional Parsing JavaScript Bt Project Specific Conditions Global Conditions Figure 1 7 Files are mapped to Document Types Document Types are mapped to a Language You can add new Document Types and Languages 12 S
178. ay Apply Styles for Language Elements Source Insight will apply styles to display tokens based on their lexical and con textual meaning Each option in this group enables successively more elaborate formatting Symbol declarations Declarations of symbols are formatted with the appropri ate Declare styles For example a function name will appear in the Declare Function style where it is declared Function local symbol declarations Declarations of local function scope vari ables and other symbols will be formatted with the appropriate Declare styles This includes local variables and function parameters References to function local symbols References to local function scope vari ables and symbols are formatted with the appropriate Ref to reference styles For example references to i e usages of a local variable will have the Ref to Local style References to non function local symbols References to symbols declared out side of function scopes such as class scopes and the global scope are formatted with the appropriate Ref to reference styles This option requires more work and it will slow down the display somewhat The reference information is cached so once a piece of code is rendered it usually will display quickly afterwards References to members References to structure and class members are format ted with the Ref to Member style The veracity of the member ref
179. ay tell Source Insight to parse through the captured output to find specific warning or error messages Parse Source Links The command output will be searched for source link pat terns The patterns typically will match warning and error messages If a pat tern match is found Source Insight inserts a source link at that line The source link is used to link the warning or error message to its target source line If Parse Source Links is enabled you must have a valid search expression in the Pattern text box Pattern contains File then Line and Line then File This indicates the order of the groups in the pattern expression Select File then Line if the first group in the pattern expression is the file name and the second group is the line number With this setting the second group i e the line number is optional Select Line then File if the first group in the pattern expression is the line num ber and the second group is the file name Pattern Contains the regular expression used to search the command output for file names and line numbers This is ignored if the Parse Source Links option is disabled If the option is enabled then this text box must contain a valid regular expression that contains groups for the file name and the line number See also Regular Expressions on page 85 Define Click this button to define the command named in the Name text box If the command already exists it is redefined Remove C
180. b Parameter sVerb Value Meaning find Launches the Find Files application found on the Start menu empty string Ships this parameter to ShellExecute Examples To browse a web site ShellExecute open http www somedomain com 1 To open a document file ShellExecute open somefile doc 1 To explore your Windows documents file folder ShellExecute explore C Documents and Settings 1 To launch Internet Explorer ShellExecute iexplore 1 To preview a file in Internet Explorer ShellExecute iexplore somefile htm 1 To search for files in the current project folder ShellExecute find filespec 1 Window List Functions A window list is a collection of source file window handles There is only one window list in the Source Insight application It contains all the source window handles You can use the window list to enumerate through all source file win dows WndListCount This function returns the number of windows in the window list Use WndLis tItem to access the window handle at a particular index in the list WndListltem index This function returns the window handle at the given index The size of the window list is returned by WndListCount Index values start at zero and con tinue up to one less than the value returned by WndListCount 322 Source Insight User Manual Chapter 6 Window Functions This example enumerates all t
181. becsvuceecestecsseneneseecovecseuscseectevecses Source Insight User Manual vii Contents LOA CONFIGUIATION REM a osiin Howe lg eser tnt LOA EY olea Strid E P Lock Context Window Lock Relation Window Lookup References Make Column Selection New Clip mr M New Relation Window New Project New Window Next File Next Relation Window View Paren Left Paren Right Parse Source LInks usado esce eo sesa esescea cessa on ses ena depe euena va eene yea Vae casa n s eae es n aee aed ru Ded Paste From Clip Paste Line Paste Symbol Play Recording Preferences Ze 2adBioecnayu P M Project File BrOWSEL RR Project File List Project Symbol Classes Project Symbol List Project Window Properties eere eene eene sees sensn setae aetas eaae tn sense tn sese tn seas ena Project Settings p Project REPOST toost asas Project Window command s sesessessesecsosoesocossocsosoesocsosossecoososoocoososoosossosoosossosoesossose Rebuild Project Record New Default Properties Reform Paragraph B
182. ble O e Alias All d Function 4 ig Function Template Ba iB Method e E Macro O B Function Prototype Help CB Method Prototype Bd Structure Member O C Event F C Class Pmnertv zi Source Insight User Manual 237 Command Reference Chapter 5 Symbol Tracking Options This dialog box displays options that guide what the Relation Window will pay attention to Symbol Tracking Options P i x m Automatic Symbol Tracking C Off Track selected symbol i e under cursor Cancel C Track the enclosing function or class Activate Tracking Inside of comments Inside of string constants Help Inside all file types not just code files Fg AutomaticSymbol As you move your cursor around in a source file the Relation Window tracks Tracking the symbol under the cursor or around the cursor This group of options tells the Relation Window what to track Off Select this to disable automatic symbol tracking Track selected symbol i e under cursor Select this to have the Relation Win dow look up the definition of the symbol currently under the typing cursor Track the enclosing function or class Select this to have the Relation Window show the definition of the function or class that contains the typing cursor This is useful to have a function definition and formal parameters visible in the Relation Window while you edit the function Activate Tracking This gr
183. c symbols to this list If a symbol is in the exclusion list then Source Insight will not expand the symbol in the call graph display 236 Source Insight User Manual Chapter 5 Relation Window Properties Dialog Box Exclude C Macros Check this to omit C function like macros from the call graph If this option is off then function like macros are expanded in the call graph as though they were an actual function Code Metric Filter This section specifies the code metrics criteria for filtering out symbols If enabled symbols will only be included in the call graph is the symbols code metric value is within an acceptable range From the Code Metric Filter drop down list select the code metric that you want to use as the criteria or select None if you don t want to use this option Minimum value A symbol must have a code metric value of this or greater to be included Maximum value A symbol must have a code metric value of this or less to be included If the value is set to 1 then there is no maximum Symbol Type Filter The Symbol Type Filter dialog box appears whenever you ask to specify symbol types to be used to filter an operation or listing Symbol Type Filter x Symbol Type OK J Namespace BJ Class jet Class Template Cancel 4 O Interface S Structure EJ aj Union t Type Definition EJ amp Enumeration EJ 3 Constant 3 t l Enum Constant Variable O Extemal Varia
184. cKey key code e eese ee seen eese eese eene ee seats sense ases eene en etse ea seas en siess KeyFromChar char fCtrl fShift fAlt Msg S Ice i S Buffer List FUNCTIONS ssccscssccocscssesesssocccccascarecvgvevensconcecccosscssscseatocecenssocssosessenss BufListCount BufListltem index Fil Buffer F lctlOns sooo ooo res eoo rona soa a eoa eo e etna rep rh Roa oa aseo eaae aieo Pe o eos E tease APpPendBufLin je P so ClearBuf hbuf CloseBuf hDUf osse eiie aso eee eee aeneo aka eoa es anao sas ee iednst n s kae ciae peo s n cosses arose edo CopyBufLine hbuf In 4 esee esee ee eene eee eene eene en setae en sensns essen sense enses etas ioi DelBufLine hbuf In GetBufHandle filename GetBufLine hbuf In GetBufLineCount hbuf eee e ee eee eene eee eee etos aae e eee ens esee ee ee ens osse esee sense se ee GetBufLineLength hbuf In 4 eeeee crescens eene eese en eene ea sense ea senses staat ene tasenaes GetBufLnCur hbuf GetBufName hbuf GetBufProps hbuf GetBufSelText hbuf ee eene ee ee eere tree ee eaa eene Pee eee ee nee eee e enn eee e eae enn ooe eS GetCu rtentBUf 4 555 edes ees sea e eia eH ook a esa ppn le a a2 o e aate PVP ee o oben epos a e sapore Rao Se een UR UE InsBufLine hbuf In s IsBufDirty hbuf ISBUFRW hb
185. caled Nested Parentheses Source Insight can display nested parentheses in different font sizes to make it easier to identify matching sets This even works across multiple lines i TIR UINT iMin UINTJLim gt gt 1 Goto Arrows Another useful decoration is the goto arrow An up or down arrow appears in goto statements which points in the direction of the target label krel krelCalls goto LSet Source Insight User Manual 81 Source Insight Concepts Chapter 4 End Brace Annotations Source Insight can also add automatic end brace annotations to the closing curly brace in C C and Java code This makes it easier to deal with nested if while switch and other blocks of code end switch pch end if stcNewWord stcString gt end if FWhitech pch fWhitech Controlling Syntax Formatting You have great control over what and how Source Insight formats your code Changing Style Properties Change style The Style Properties command lets you control the formatting properties of formatting with the each style You can also add your own styles and import and export them Style Properties command Figure 4 14 The Style Properties dialog box is where you set a style s formatting options 82 Source Insight User Manual Chapter 4 Control how styles are used in the Syntax Formatting dialog box Use Draft View to temporarily see your files with
186. call internal function Select A1l call user level command Select All Copy call user level command Copy Line Up call user level command Line Up x add2 n call user defined macro function add2 You can stop execution using the stop statement If you run a Source Insight command with a dialog box from a macro the dia log box appears The following table summarizes the basic macro language statements Table 6 1 Macro Statements Statement Description break Exits a while loop if cond else Tests a condition continue Continues a while loop at the top return n Returns n from a function stop Stops executing the macro while cond Loops while cond is true You define variables by simply assigning a value to them They do not need to be declared However you can use the var statement to explicitly declare a vari able Variable names are not case sensitive Variable names must begin with a letter or underscore not a digit All variables are string variables There are no types like in C and no need to declare variables This makes working with variables very easy There is no need to do conversions or casts In addition there is no need for string mem ory management Source Insight User Manual 295 Macro Language Guide Chapter 6 Declaring a Variable The var statement declares a single local variable var variable_name You don t have to declare variables
187. called when specific events occur Instead of using the macro keyword to define a function you use the event keyword For example event FileOpen sFile Event handler functions do not return a value They cannot be used to abort the event or to return a value to the program Also take note of the spelling of the event function parameters They must be spelled correctly Event Handler Names Event handler names and their function parameters are pre defined Your event handlers must use the exact spelling of the function names and parameters Source Insight User Manual 345 Macro Event Handlers Chapter 7 The following are events supported by Source Insight Application Events event AppStart event AppShutdown event AppCommand sCommand Document Events event DocumentNew sFile event DocumentOpen sFile event DocumentClose sFile event DocumentSave sFile event DocumentSaveComplete sFile event DocumentChanged sFile event DocumentSelectionChanged sFile Project Events event ProjectOpen sProject event ProjectClose sProject Statusbar Events event StatusbarUpdate sMessage Event Handler Uses You can use event handlers for many things but a few ideas are e Monitor and log activity For example you can log actions to a log file and later use that information to analyse what parts of a project have been edited e Synchronize another program or file with act
188. can be anywhere on the line when you use this command 152 Source Insight User Manual Chapter 5 Cut Line Left Cut Line Left The Cut Line Left command cuts all the characters to the left of the insertion point on the current line Cut Line Right The Cut Line Right command cuts all the characters to the right of the insertion point on the current line Cut Selection or Paste The Cut Selection or Paste command performs a Cut command if the current selection is extended or it performs a Paste command if the selection is an insertion point If you assign this to a key or mouse button this command makes moving text around easy because you only have to press a single key or mouse button To use this command 1 Select the text you want to move by clicking and dragging with the left mouse button 2 Click the mouse button or press the key to cut the text 3 Point and click the mouse button to select the new location 4 Click the mouse button or key to paste the text Cut Symbol On the Symbol Window right click menu The Cut Symbol command cuts the selected symbol Cut To Clip The Cut To Clip command copies the contents of the current selection to a clip buffer that you name and then deletes the text The Clip Window is activated when you use this command so that you can specify the destination clip name Cut Word The Cut Word command cuts the word to the right starting at the insertion point Cut Word L
189. cepts Chapter 4 The filealias txt file contains file name aliases used to determine the document type Adding new docu ment types makes Source Insight aware of new types of files Associating Special File Names Some files in your project may not have any file extension For instance the standard C header files such as complex do not have file extensions This situation makes it difficult to use wildcard specifications to associate a file with a document type For that reason Source Insight uses a special file named filealias txt to create file name aliases for the purpose determining the file s doc ument type The filealias txt file is stored in your Source Insight program directory You can edit this file By default it contains the names of the standard C header files The format of filealias txt is as follows oldfilename newfilename This maps oldfilename to newfilename before determining the file s document type For example algorithm algorithm h When Source Insight sees the file algorithm it uses the alias algorithm h when determining the document type of the file Adding New File Types The union of all document types becomes Source Insight s file vocabulary That is when Source Insight shows you the files in a directory it will only dis play files that belong to currently defined document types In addition when Source Insight automatically adds files to a project it will only add fi
190. chronizing When this period expires Source Insight checks the file time stamps and begins the synchronization process in background Use stricter confirmation dialog If checked then when Source Insight confirms an operation you will be required to type yes to confirm it Keep dialogs on the same monitor as the main window If checked then dialog boxes will be forced onto same monitor as the main Source Insight application window If not checked then Source Insight remembers the positions of dialog boxes regardless of what monitor they were on Enable event handlers If checked then macro event handlers are enabled For more see Chapter 7 Macro Event Handlers on page 345 Go Back The Go Back command moves the insertion point to its previous location Source Insight keeps a selection history which is a circular list of the last 100 positions you ve visited The selection history is global to all open files not just the current file If you have used an Internet browser with Back and Next buttons you will be familiar with the Go Back and Go Forward commands in Source Insight Using Go Back to View a Function Call Chain The Go Back command works nicely with the Jump To Definition command If you jump to a function definition you can use Go Back to go back to the func tion caller This process can recurse many times You can use Go Back and Go Forward to traverse the call chain forward and backward The selection history
191. city performance factors 111 Visible Tabs 165 Ww wide fonts working with 159 Wildcard Matching 85 Window Functions 323 Window List 289 Window List Functions 322 Window Toolbar 24 Window Tour 21 WndListCount function 322 WndListItem function 322 Word Left 290 Word Right 290 Workspaces loading and saving 109 374 Source Insight User Manual
192. cked then only the structure name is included in the list Show enum constants Includes enum constants in the Symbol Window If not checked then only the enum type name will appear in the list Show local definitions If checked then function local declarations are also shown in the Symbol Window under each function Apply Now Applies the changes you made in this dialog box to the Symbol Window Symbol Types Click this button to open the Symbol Type dialog box where you can filter out different types of symbols from the Symbol Window 276 Source Insight User Manual Chapter 5 Sync File Windows Font Click this button to pick the font used to draw the Symbol Window Text Color Click this button to pick the color of the text in the Symbol Win dow Back Color Click this button to pick the background color of the Symbol Window Sync File Windows The Sync File Windows command scrolls all windows showing the current file to same location as the current window Synchronize Files The Synchronize Files command synchronizes the current project with all the source files in the project The command scans each file in the project and updates the symbol database for each file that has been modified since Source Insight parsed the file last In addition files that were part of the project that don t exist anymore are removed from the project As an alternative you can have the synchronization happen in the backgro
193. ckup m Clips Folder CADocuments and Settings Ray Gram My Documents Source Insight Clips PA Main User Data Folder This is the main folder for storing Source Insight infor mation on your machine Source Insight creates several sub folders inside this folder If you make a change to this then all the sub folders that appear below it in this dialog box are automatically updated 174 Source Insight User Manual Chapter 5 Function Down By default this folder is My Documents Source Insight As such there is a separate folder for each user on the machine Changing your User You may want to change this folder location if you prefer to have your personal Data Folder My Documents folder on a network drive Source Insight can become slow if it has to constantly access data across the network In that case you should change the folder location to a folder somewhere on you local machine Settings Folder This is the folder that will contain you configuration files which has your customizations Projects Folder This is folder that will contain your project data files Each project will have a sub folder within this folder Backup Folder This is the folder where backup source files are saved Clips Folder This is the folder that will contain clips which are accessed from the Clips Window Function Down The Function Down command moves the insertion point to the next function or method defined in the current file Fu
194. clude from your projects e Break your project into smaller projects If you want to still use the Jump To Definition command between the projects you can add the sub projects to the project symbol path which is defined in the Preferences Symbol Lookups dialog box Speeding Up Relation Windows The Relation Window is a new feature in version Source Insight 3 0 Its pur pose is to show relationships between symbols It works like the Context Win dow in that it works in the background and automatically shows information about what is selected For example if you select a function call it can show you the call tree starting at that function The Relation Window can require a lot of processing Some relationships are slower to compute The relationships fall into three categories listed here from fastest to slowest Contains show the contents of the current symbol For example show members of a struct e Calls show what other symbols are referred to by the current symbol For example show functions that are called by the current function e References show what other symbols refer to the current symbol For example show functions that call the current function For very large projects the References relationship will be by far the slowest to compute The performance seems very acceptable on a Pentium II machine with a moderate sized project about 200 000 lines of code Limiting the relations to non reference type
195. comes normalized to the project s source directory e The file will become part of the project code base which is searched when showing symbol relations such as call trees Removing Files from a Project To remove a file from the current project s file list use the Project gt Add and Remove Project Files command When a file is removed from a project all the symbols found in that file are removed from the project s symbol database Source Insight will not actually delete the file from the disk See also Add and Remove Project Files on page 123 Closing Projects To close the current project use the Close Project command Closing a project is a lot like quitting Source Insight asks you if you want to save each file you have opened that you ve changed then it closes all files Instead of actually quitting Source Insight continues with no project open Opening Projects To open a different project use the Project Open Project command See also Open Project on page 215 Source Insight only allows you to have one project open at a time so if you already have a project open it will ask you if youre sure you want to close the current project Assuming you do close the current project the Open Project command will display a list box of existing projects from which to choose When a project is opened the project s configuration file and workspace file are loaded which means the display menu and keystroke configuration may
196. command key such as an arrow key or by pressing Esc If you want to search again just type F12 twice it will load the old pattern and find again 182 Source Insight User Manual Chapter 5 Incremental Search Mode Incremental Search Mode Once you press F12 you enter the incremental search mode Once in the incre mental search mode e F12 will search again for the current string or it will load the current string with the previous one if the current string is empty e Shift F12 will search backwards e Backspace reduces the search string e Esc will cancel and return to the initial position e Enter will stop and leave the selection at its current position Any key that maps to a command will exit the incremental search mode and leave the selection at its current position and then the command will execute e Any other simple key is added to the current search pattern which is dis played at the bottom in the status bar e The search buffer is left with the last successful search pattern The incremental search pattern is not case sensitive unless you type an upper case character Incremental Search Backward Searches backwards incrementally in the current file See also Incremental Search on page 182 Horizontal Scroll Bar This command toggles the horizontal scroll bar on and off in the current source file window HTML Help Looks up the currently selected word in the HTML Help file The HTML Help
197. cord See also GetWndSel hwnd on page 325 See Selection Record on page 309 ToggleWndMax hwnd Toggles the window hwnd between maximized and restored sizes XposFromlch hwnd In ich Returns the pixel x position number given character position ich on the line number In in the given window The x position is relative to the left edge of the whole window The line does not actually have to be displayed in the win dow at the time this function is called See also IchFromXpos hwnd In xp on page 326 Inputs Parameter Description hwnd The window In The line number that contains the text to be measured If In is out of range then 1 is returned ich The character index which is the zero based index of a character on the specified line If ich exceeds the num ber of characters on the line then the x position of the end of the line is returned Note You can use the IchFromXpos function to perform the reverse mapping Bookmark Functions All bookmarks are kept in a single bookmark list You can use the bookmark functions to enumerate through all bookmarks and to add and remove book marks The bookmark list is persisted in the workspace file BookmarksAdd name filename In ich Adds a new bookmark The new bookmark name is in name The bookmark position is in the file filename at line number In at character index ich Returns True if successful or False if errors 328 Sou
198. creen command redisplays the whole Source Insight screen Reform Paragraph The Reform Paragraph command re formats the selected paragraph of text so that all the lines in the paragraph are as wide as possible within the margin width for the current document type If you have an insertion point selection then the enclosing paragraph is reformed If more than one paragraph is selected then all the paragraphs in the selection are reformed If the first line of the paragraph is indented then all subsequent lines in each paragraph will be indented by the same amount A paragraph of text is assumed a series of lines bounded by blank lines You can specify the margin width in the Document Options command under the current file s document type For example before running Reform Paragraph The quick brown fox jumped over the lazy dog and other mysterious sentences After running Reform Paragraph the lines are made as wide a possible within the margin The quick brown fox jumped over the lazy dog and other mysterious sentences Refresh Relation Window This command refreshes the Relation Window re computing its contents Normally the Relation Window updates automatically based on your selection If you prefer that the Relation Window not automatically update you can either lock it with Lock Relation Window command or use the Relation Window Properties command to set the Automatic Symbol Tracking to None Th
199. cssssssessccecesssscssccceesesssssscessssssescceseseees GetWndRect NWN ccccccccccsscccccccccssssssccsscesessscessccesscessecscccescesssseceesessssesceeseceses GetWndSel hwnd GetWndSellchFirst hwnd GetWndSellchLim hwnd ies GetWndSelLnFirst hwnd cccccccscsssssscssscesssssscsssccssesssesssccsssssssesscessessscsccessesees GetWndSelLnLast HWI cccccccccsssssscssccesscssccsscccsssssscssscccesesssscscccesssssesccesscsses GetWndVertScroll hwnd IchFromXpos hwnd In xp IsWndMax hwnd we IsWnaMiri HWA sccikccsscecssscisssesonesoncsossecssseccoscsesestssseccsocossbubacesosdncsusesdsosvensceecees IsWndRestored NWI ccccccccssssssssccccsssscescccsssssscesscccesssssscccecsssssscescesessssessscsees MaximizeWnd hwnd Mee MinimizeWnd NWN cccccccccccccscssscccsceccessccsscccssessscssccccsccscsssccccessessessccesesssseses NewMWhnd buf siscniscvsscccisccascchecsesenassccossnasccascctsccbscsascocssusscutacssosdussecosssessesebeneee ScrollWndHoriz hwnd pixel count ay ScrollWndToLine hwnd IIn cccccccsssssscscrecsessscsscessssssessscessssesssscccesessssesscesesssseeses Source Insight User Manual xiii Contents ScrollWndVert hwnd line COUNT cccccccssssssccssccecsssscscscccsssssscsccessesssececseseees 327 SetCurrentWnd hwnd ecce eee eene eene eee tano eaae eee enna esee e eese enses sete ee enase sese eos 327 Se
200. cts you build are added to the project symbol path so Source Insight can provide symbol completion and other symbolic features for those libraries from within your own projects Set Common Projects Dialog box For each common project you are asked to locate the directory where the cor responding files are located on your disk If you installed the source code for your libraries on your disk then you can take advantage of Source Insight to use the source code as a basis for the projects For instance you might click on the C function strtok and Source Insight will locate the source code for strtok Each common project created here is appended to the project symbol path which can also be edited in the Preferences Symbol Lookups dialog box Note Selecting a project to rebuild in this dialog box will replace the existing project if any Also building a large project such as the C C Runtime and Windows Header project may take a few minutes Setup Common Projects E x In order for Source Insight to provide symbol completion and other symbolic features for standard libraries you need to setup separate projects for those libraries Skip This Please select the projects you want to build or rebuild below Standard C C and Windows Headers Browse C Avstu WC98 Include Standard MFC Files Browse C wstu C98 MFC Standard Java Libraries Browse Java Net Framework Standard C C
201. d 76 Source Insight User Manual Chapter 4 Styles are automati cally applied to source code text You can associate your own keywords with any style Syntax Formatting and Styles In the figure below is an example of how styles might combine for a function declaration Default Font Tahoma 9pt Document Type Style Declaration Bold Style Declare Function 120 Tahoma 10 8pt Bold Figure 4 11 Style properties add up on top of the default font specified by the document type How Styles Apply to Source Code Styles are automatically applied to source code text With the exception of comment styles you cannot explicitly apply a style yourself like in a word pro cessor The applicable language parser is used to assign styles based on lexical information The topics below describe what types of styles are applied Language Keyword Styles The simplest application of styles is for formatting language keywords Each language contains a keyword list Each keyword list associates a keyword for example while with a style The keyword list is editable and is stored in the configuration file Source Insight will recognize a keyword and apply the asso ciated style to the keyword You edit the language keyword list in the Prefer ences Languages dialog box or by invoking the Keyword List command directly See also Keyword List
202. d Paste Line The Paste Line command moves the insertion point to the beginning of the cur rent line and executes the Paste command Cut Line Copy Line and Paste Line can be used together to quickly move whole lines around in a file Paste Symbol On the Symbol Window right click menu The Paste Symbol command pastes the text in the Clipboard just before the selected symbol in the Symbol Window Source Insight User Manual 219 Command Reference Chapter 5 Play Recording The Play Recording command plays back a command recording Commands are recorded by using the Start Recording command If the recorder is on when you use the Play Recording command then recorder is automatically turned off first Preferences Print Lets you specify user options This one multi page dialog box contains several tabs for various types of options such as Display Files and Syntax Formatting For more specific information See also General Options on page 175 See also Typing Options on page 284 See also File Options on page 170 See also Language Options on page 193 See also Symbol Lookup Options on page 274 See also Display Options on page 155 See also Color Options on page 138 See also Syntax Decorations on page 278 See also Syntax Formatting on page 280 See also Searching Options on page 260 See also Remote Options on page 241 The Print command prints the current file The standard Windo
203. d A link will be setup for each line in the log file containing an error message Searching and Source Links on page 90 Maintaining Multiple Parse Patterns If you often have more than one type of parse pattern that you want to use you can use Custom Commands to define a custom command for each type that simply echoes the file and parses source links from the output Each custom command can have its own parse pattern so you can save many parse patterns this way For example 1 From the Options menu select Custom Commands 2 Click the Add button and type Parse Type 1 in the Name text box 3 Inthe Run text box type command c type f This command line will type out the contents of the current source file 4 Check the Parse Link in Output box 5 Type the parse pattern you want in the Pattern text box When you run this command the current file will be typed out captured by Source Insight and parsed for source links using the parse pattern stored with the custom command Paste The Paste command copies the contents of the clipboard to the current selec tion If the current selection is already extended it is deleted before pasting Paste From Clip The Paste From Clip command copies the contents of a clip buffer to the cur rent selection The Clip Window is activated when you use this command so that you can specify the source clip name Double clicking on a clip in the Clip Window also runs this comman
204. d then the tab is inserted just to the left of the selection In any case if one or more whole lines are selected then the tab key indents the whole lines Indent commands effect preprocessor statements If checked then the Indent Right and Indent Left commands will indent and outdent lines that start with C preprocessor statements such as ifdef If this is not checked then indenting has no effect on those lines Use Smart Paste This modifies paste behavior in two ways when you are past ing whole lines of text e Ifyou have an insertion point anywhere on a line then the pasted whole lines are inserted above the current line If the insertion point is at the end of a line then the new lines are pasted below the current line e The pasted text is automatically indented to match the destination This works with Paste Paste Line Drag Line Up Down commands the Clip Window and drag and drop You also can enable Smart Paste on a per document type basis in the Docu ment Options dialog box Always select pasted text after pasting whole lines If checked then when you paste whole lines they are selected after pasting After pasting select This indicates where the selection should end up after using a paste command This section customizes the way the auto completion feature works The auto completion window appears after you type a character Its purpose is to reduce the number of characters you have to type by automatically
205. d processor first For example cmd c mybatch bat 4 Turnon the Parse Source Links option The default parse pattern is setup to parse the compiler error messages from the compiler output 5 Turn on the Save Files First option so that your file is saved before running the compiler 6 Click the Define button to save the new command Alternatively you can click the Menu or Keys buttons to define the new command and run the Menu Assignments or Keyboard Assignments commands which will allow you to put the command on a menu or assign a key to it The Parse Source Links option causes Source Insight to search the compiler out put and setup source links for each error message In this case the link sources are each error message in the compiler output file The link target for each link is the file and line number given in each error message Source Insight User Manual 151 Command Reference Cut Cut Line Chapter 5 To Build a Project with Microsoft Developer Studio 1 2 Run the Custom Command command Select the Build Project command in the Command drop down list The Build Project custom command is predefined when you install Source Insight In the Run text box type the following C MsDevPath msdev project dsp make rebuild Where MsDevPath is the path to your msdev exe program and project dsp is the name of the Developer Studio project This line invokes msdev exe to rebuild the giv
206. d specifies a file and line number The Bookmark command also displays the function or symbol where the mark is located Bookmarks are useful for keeping track of particular locations of interest in your files The marks you have set are saved in the current workspace so they will be preserved from session to session Bookmarks are maintained as you edit your files For example if you set a mark on a particular line and then insert lines before that one the mark will still be on the original line of text even though the actual line number may have changed If the line that the mark is set at is deleted or the file is closed then the mark is deleted also Navigation with the Selection History The Selection History is a circular list of recently visited position Usethe Go Back and Go Forward commands like you would in an Internet browser The selection history is a circular list of your last 100 selection positions in the currently opened files You can use the Selection History command to display and jump to positions in the selection history The Selection History command also displays the func tion or symbol where each history item is located along with its file and line number Go Back and Go Forward commands If you know how to use the Forward and Back buttons in an Internet browser then you should understand the Go Back and Go Forwards commands com pletely The Go Back and Jump To Definition commands make it easy
207. d the Redo com mand advances through the list Undo information is saved for each open file independently Undoing Cursor Movement The Undo command does not undo cursor movements as with some other edi tors In Source Insight the best way to back up through the history of cursor movements is to use the Go Back command and conversely the Go Forward command Undoing All Changes You can use the Undo command several times in a row to undo several changes In addition you can use the Undo All command to undo all changes made to the current file since the last time it was opened The Undo History The undo history is maintained after you save a file as long as the file is open Undo history is lost when the file is closed or if you use the Checkpoint com mand to perform a final save You can control whether undo is normally avail able after saving by using the Options gt Preferences Files dialog box It is possible to save a file and then undo the few last edits After that the file saved on disk represents a state that has more edits than the current file buffer This can become confusing To help Source Insight displays the file name with an asterisk whenever the loaded buffer differs from the file saved on disk If you try to undo to a point before the file was saved you will prompted to con firm you want to do that Restoring Lines An alternative to Undo is the Restore Lines command This command restores the
208. ddi Doc Options Merge Custom Commands Replace Custom Commands Merge Page Setup Language Options Styles Relation Window Toolbars All Configuration Settings Turn this on to load all parts of a configuration file Turn this off to load only individual parts that are defined in the Individual Set tings group below Individual Settings Turning off the All Configuration Settings check box allows you to select the part of the configuration you want to load For example this would allow you to load only the display settings such as screen colors and screen size while leaving other parts of the current configuration the same This grouping contains a check box for each configuration part Check the items you want to load here Configuration parts that consist of lists of named items such as document types and custom commandis can either be loaded or merged Doc Options Replace Check this to replace all the current document options with the document options in the configuration file Doc Options Merge Check this to merge the document options in the config uration file with the existing document options Merging means that the ones in the file being loaded replace document types with the same name and docu ment types that only exist in the file are added to the current list of document types already loaded Any other existing document types are retained Custom Commands Replace Check this to
209. de fonts 159 Formatting Properties 75 270 FuncFromKey function 313 Function Down 175 Function Up 175 G General Options 175 General Options Dialog box 176 GetApplicationWnd function 323 GetBufHandle function 316 GetBufLine function 317 GetBufLineCount function 317 GetBufLineLength function 317 GetBufLnCur function 317 GetBufName function 317 GetBufProps function 317 GetBufSelText function 317 GetBufSymCount function 331 GetBufSymLocation function 331 GetBufSymName function 331 GetChar function 313 GetCurrentBuf function 317 GetCurrentProj function 339 GetCurrentWnd function 323 GetCurSymbol function 332 GetEnv function 320 GetKey function 313 GetNextWnd function 324 GetProgramEnvironmentInfo function 342 GetProgramInfo function 342 GetProjDir function 340 GetProjFileCount function 340 GetProjFileName function 340 GetProjName function 340 GetProjSymCount function 340 GetProjSymLocation function 340 GetProjSymName function 340 GetReg function 320 GetSourceLink function 336 GetSymbolFromCursor function 334 GetSymbolLine function 332 GetSymbolLocation function 332 GetSymbolLocationEx function 333 GetSymbolLocationFromLn function 334 GetSysTime function 313 GetWndBuf function 324 GetWndClientRect function 324 GetWndDim function 324 GetWndHandle function 324 GetWndHorizScroll function 324 GetWndLineCount function 324 Index GetWndLineWidth function 325 GetWndParent function 325 GetWndRect function 325 GetWndSel func
210. definition of a symbol and displays its children symbolname Ask What symbol do you want to locate symbol GetSymbolLocation symbolname if symbol nil Msg symbolname was not found else hsyml SymbolChildren symbol cchild SymListCount hsyml ichild 0 while ichild lt cchild childsym SymListItem hsyml ichild Msg childsym symbol was found in childsym file at line childsym lnFirst ichild ichild 1 SymListFree hsym1 SymbolContainerName symbol Returns the container component of the symbol s name symbol contains a Symbol record See also Symbol Record on page 309 Every symbol name is divided into path components which are separated by dot characters For example a symbol name might be myclass member1 In this example member1 is contained by myclass Source Insight User Manual 335 Macro Language Guide Chapter 6 SymbolDeclaredType symbol Returns a Symbol record of the declared type of the given symbol symbol contains a Symbol record See also Symbol Record on page 309 SymbolLeafName symbol Returns the leaf or right most component of the symbol s name symbol contains a Symbol record See also Symbol Record on page 309 Every symbol name is divided into path components which are separated by dot characters For example a symbol name might be myclass member1 In this example member1 is conta
211. der this contains the Base project Thus all users have their own version of the Base project By keeping user data under My Documents your data are secure and private and you are guaranteed to have write access to it Per User Project List Each user now has their own list of projects as seen in the Open Project com mand The project list file is stored in the user Projects folder You are still able to click the Browse button in the Open Projects dialog box to locate other projects not listed As long as you have file access permissions for the project you will be able to open it The project will then be added to your project list Project File Storage Project Settings for each project specify two folder locations e Project Data Directory this is where Source Insight stores its project data files For example the pr file is stored here By default Source Insight creates a project data directory inside the Projects folder when you create a new project Project Source Directory this is the main location of your project source files In earlier versions of Source Insight this was called the project root directory By maintaining these two separate folder locations you can store your Source Insight data separate from your source files Furthermore your Source Insight project files are always kept in your own user data area and other users on the machine will not be able to access them You are still free to use the same
212. different number of tabs than it appears on the screen Here is an example Let s say somebody wrote this in Notepad using Courier New a fixed pitch font with tabs between columns so that X and Y and Q and R line up Both the words narrow and wide fit within column 0 one tab stop as shown below Tab stop 0 1 2 3 Line 1 narrow X Q Line 2 wide Y R Now in Source Insight with rich formatting narrow fits within a tab width but wide doesn t If Source Insight just pushed Y over by one more tab stop this is what you get Tab stop 0 1 2 3 Line 1 narrow X Q Line 2 wide Y R Now Y is aligned with Q The rest of the columns don t line up anymore In fact this is exactly what happens if you turn off Line up white space in Docu ment Options When Line up white space is enabled Source Insight tries to help the situation by lining up tab positions like this Tab stop 0 1 2 3 Line 1 narrow Q Line 2 wid e v R Source Insight User Manual Chapter 5 Document Options If your code looks like it does above then you may want to specify a different space width character such as M or W which are wider letters in most fonts This would have an effect like this where all tab stops would be wider Tab stop 0 1 2 Line 1 narrow X Q Line 2 wide Y R This also works the oth
213. do it again There is also a user level command named Enable Event Handlers that can be assigned to a menu or a keystroke Note For security reasons you cannot run the Enable Event Handlers command from a macro Editing Event Handler Files Source Insight will ignore event handlers in any file that is modified and unsaved Therefore if you are editing an event handler source file Source Insight will not try to execute the handler while you are editing it Once you are done with the editing save the file Source Insight will once again execute the handlers when the file is saved Errors in Event Handlers If an event handler causes a syntax error or runtime error then all event han dlers are disabled for the rest of the Source Insight session You will see a Macro Error warning message To enable event handlers again simply restart Source Insight Synchronous Vs Asynchronous Events Some event handlers are called immediately when the event occurs These are called synchronous events An example is DocumentNew It gets called as soon as the user creates a new document Source Insight User Manual 347 Macro Event Handlers Chapter 7 However some events are called shortly after the event occurs usually after a short amount of idle time These are called asynchronous events They are asynchronous because it would destabalize Source Insight if a user written macro were to be called at the exact time
214. double matching brace or parentheses click on it or use Alt equal E Selecting the Enclosing Block The Select Block command Ctrl minus selects the enclosing block An enclosing block is one that is surrounded by either a parentheses square brace or curly brace If you repeat this command it will select the next outer most block Selecting a Whole Line To select a whole line of text simply click in the selection bar A whole line of text will be selected If you hold the mouse button down and drag whole lines will be selected The Select Line command Shift F6 also selects a whole line Selecting the Whole File To select the whole file hold down the Ctrl key and click the mouse in the left margin Or use the Select All Ctrl A command Selecting a Paragraph of Text For files that do not have a language parser attached See Document Options on page 161 you can double click in the selection bar to select a whole para graph of text A paragraph is defined as a group of text lines surrounded by blank lines Selecting Between Lines Source Insight allows you to select in between lines by providing a wedge shaped cursor when the cursor is near the start of a line and slightly above or below it When you click at that point with the mouse Source Insight selects the space between the lines If you start typing Source Insight automatically inserts a line break first This is a handy way to insert a new line File Buffe
215. dow Sybmol List view File Types View File Type View shows a breakdown of files by document type Sinew Project ni xl Document Type Lines of Code Asm Source File Batch File C Source File C Source File C Source File B CmtSet cpp B CmtSet hpp B Dlex cpp B DocLang cpp B DocProj cpp HB Funi cpp B Lang hpp 3 Esa cn es ecalg Figure 3 10 Project Window File Types view shows a categorical list of files Source Insight User Manual 33 Window Tour Chapter 3 Symbol Class View Symbol Class View shows a breakdown of symbols by symbol class and type Sinew Project lt gt g nml x Symbol Type 6 Structures 550 u Unions 67 t Type Definitions 1382 E Enumerations 67 Constants 3694 tl Enum Constants 355 Variables 1442 Functions 5891 amp Function Templates 1 ig Methods 319 Macros 1425 gt BORO aln qa z cg Figure 3 11 Project Window Symbol Class view shows a categorical listing of symbols in the project f f Ee p 2 8 Context Window The Context Window shows symbol informa tion based on context The Context Window is a Source Insight innovation that automatically pro vides relevant information while you are viewing and editing your source code The Context Window is a floating dockable window that displays contextual
216. e Top The top pixel coordinate of the rectangle Right The right pixel coordinate of the rectangle Bottom The bottom pixel coordinate of the rectangle 308 Source Insight User Manual Chapter 6 Standard Record Structures Selection Record A Selection record describes the state of a text selection in a window The Selection record has the following fields Field Description InFirst the first line number ichFirst the index of the first character on the line InFirst InLast the last line number ichLim the limit index one past the last of the last character on the line given in InLast fExtended TRUE if the selection is extended to include more than one character FALSE if the selection is a simple insertion point this is the same as the following expression sel fRect sel InFirst sel InLast sel ichFirst sel ichLim fRect TRUE if selection is rectangular block style FALSE if the selection is a linear range of characters The following fields only apply if fRect is TRUE xLeft the left pixel position of the rectangle in window coordi nates xRight the pixel position of the right edge of the rectangle in win dow coordinates Symbol Record The Symbol record describes a symbol declaration It specifies the location and type of a symbol It is used to uniquely describe a symbol in a project or in an open file buffer Symbol records are returned by severa
217. e smart matching feature is smart enough to rename local scope variables as well as global or class scope identifiers See also Smart Rename on page 266 Source Insight User Manual 7 Introduction Chapter 1 Mixed Language Editing Source Insight supports HTML and Active Server Page files ASP and JSP with embedded script The embedded script can be browsed symbolically and dis plays with appropriate syntax formatting E Sitest Project Source Insight Beta Prefer2_asp c wstulmsdn 2000jan 1039 samples wid98 content prefer lo x Eie Edit Search Project Options View Window Help Work 18 x nBU SIXA 2c anam PH ee TD Dok HGS PMaOR Bec Prefer2 asp lt i LANGUAGE VBSCRIPT 96 E lt SCRIPT LANGUAGE If this ASP has not been run be a y The index values for the dr z Ne E If Request Cookies intssce BODY leftMargin 40 lie MBG 0 ntFG 0 Else MBG Request Cookies intbecolor ntFG Request Cookies intrecolor End If P oce LANGUAGE Javascript This function i of op d s nection Writ document cookie intBGColor document Fre Hocument cookie intrecolor document Fret H script style H1 e styla gt lt html gt lt BODY leftMargin 40 link 500000 vUnk 505050 BGCOLOR lt t Request Cookies BG lt font FACE verdana Arial Helvetica COLOR nequest Cookies FGColor s gt gt form NA Pref ACTION Prefer asp METH
218. e 62 For example define ourpublic public class D ourpublic B This causes a problem because Source Insight doesn t know that the keyword ourpublic really means public Document Types A document type is a file classification that is defined with the Document Options command Source Insight uses each files name to determine what its document type is Font for Default Style Document File Name F gt TS m gt Language Type Editing Options Figure 4 7 The file name determines the document type The document type determines the font the language type used to parse the file and display it with syntax formatting and other editing options 66 Source Insight User Manual Chapter 4 The document type determines the language and editing options fora file type A file is associated with a document type by its name and or extension Document Types The Document Options command allows you to define new document types or change the built in types See also Document Options on page 161 Document Options E E x Document Type File filter c Source File gt m Font Options Use options from Default type Emulate screen fonts when printing JV Include when adding to projects IV Line up white space zs Trebuchet MS rm Status Bar Options Screen Forts 8 Line Col Symbol C Line Col Char Byte Print
219. e Incremental Search command F12 finds matches as you type the charac ters See also Incremental Search on page 182 Replacing in the Current File The Replace command searches the current file for a search pattern and replaces the pattern with a new pattern The range of replacement can be the whole file or just the current selection See also Replace on page 243 84 Source Insight User Manual Chapter 4 The Search Files command searches across multiple files The Replace Files command replaces across multiple files The Search Project command can do an Internet style search on your project Regular Expressions Searching Multiple Files To search for a pattern across all project files or other non project files use the Search Files command See also Search Files on page 255 The Search Files command is similar to the Search command except you can specify what files you want to search The results of the search are placed in the Search Results window The search results also contain hidden information called source links If you are just looking for single whole word references across your whole project the Lookup References command is much faster See also Lookup References on page 208 Replacing in Multiple Files The Replace Files command is similar to the Replace command except you can specify what files you want to do the replaces in See also Replace Files on page 245 If
220. e Name text box so you don t have to include a directory specification for those files File list If the Project Wide option is on then this list displays all files in the current project If the Project Wide option is off then this list displays all the files in the current working directory The current directory path is displayed above the file list Source Insight shows only files for known document types in the current direc tory The document types are specified with the Document Options command Project Wide This check box controls whether the File list shows all the files in the project or just the files in the current working directory Include Subdirectories If this check box is checked then any selected directo ries are recursively searched This option and the Project Wide option are mutually exclusive To recursively search a set of directories 1 Uncheck the Project Wide check box 2 Checkthe Include Subdirectories check box 3 Select one or more directories in the file list You can also type a file wildcard specification in the File Name text box to limit the search to particular file extensions or names Case Sensitive If checked Source Insight will only find matches if the case matches exactly Use Regular Expressions If checked the Old and New patterns are assumed to be regular expressions One Occurrence Line If checked only the first occurrence of the Old pattern on each line is replaced If not c
221. e Source Insight is running is called the current configuration When you make customization changes or load new configura tions the configuration file on disk is updated too Configuration Files When you exit Source Insight the current configuration is saved in a configu ration file When Source Insight starts it restores the configuration of the pre vious session If a project is not open then the name ofthe current configuration file is glo bal cf3 and it is stored in your Source Insight program directory where you told the Setup program to install Source Insight If a project is open the name of the current configuration file is either project name cf3 or Global cf3 depending on the settings in the Project Settings dia log Where Are Configuration Files Stored Configuration files are normally saved in the Settings folder inside the My Doc uments Source Insight folder Each user that logs in and runs Source Insight gets a user data directory inside the My Documents Source Insight folder Therefore each user on a particular machine will have their own preferences stored separately Tip It is wise to keep a backup copy of your global configuration file which will Source Insight User Manual 107 Source Insight Concepts Chapter 4 end up containing all your customizations Once you use the Load Config uration command or make a change to the customization settings inside Source Insight the configurat
222. e as C You can also use parentheses to group expressions Table 6 3 Operators Operator Meaning and add and subtract and multiply and divide l Invert or Not E g True equals False i and i pre and post increment i and i pre and post decrement B logical OR operation amp amp logical AND operation l logical NOT EQUAL operation Source Insight User Manual 301 Macro Language Guide Chapter 6 Table 6 3 Operators Operator Meaning logical EQUAL operation lt less than gt greater than lt less than or equal to gt greater than or equal to string concatenation QvarQ variable expansion used inside of quoted strings to expand a variable in the string Since variables may contain non numeric values relational operators are treated thus Table 6 4 Relational Operators for Strings Operator Meaning zo strings must be equal case sensitive l strings must not be equal case sensitive lt strings are converted to numbers and then compared gt Empty strings or strings that are non numeric result in a lt runtime error gt Conditions and Loops if else and while The Source Insight macro language supports if and while statements The if Statement The if statement is used to test a condition and execute a statement or state ments based on the condition The if statement has the following syntax if conditi
223. e as Lookup References but with different option state See also Search Project on page 259 Lookup References Dialog box The Lookup References command is very similar to the Search Project com mand In fact each dialog box is identical However each dialog box has its own persistent state x Eind References To fNolntemalLeading Close Search In jal Project Files m Help Options MV Case Sensitive Search Method Jv whole Words Only Look Up Reference Skip Inactive Code Skip Comments Lines of Context Search Only Comments a V Smart Reference Matching Touch files and cause recompile Find word variations Find References To Type the symbol name you want to locate The word under the cursor is automatically loaded into this text box Source Insight will use the context of the cursor position to determine the exact symbol instance you want If you invoked Lookup References from a symbol dialog box or window then Source Insight keeps the exact symbol references along with this text box Typically you would type the name of an identifier in your program however you can type any string here and a project wide search will be performed The search is very fast if you type a single word only Search In This drop down list contains a list of document types You can use this list to restrict the search to only a particular type of file or just the current 208 Source Insight User Manual C
224. e button This setting only has an effect if the Emulate screen fonts when printing option described above is turned off Language list This pull down list contains a list of all the languages defined in Source Insight Select from this list to specify how Source Insight should parse and display the current document type For example to parse the document as a Java source file select Java Language from the list You can also select None to use no parser To add a new custom language select the item lt New Language gt Language Click this button to open the Language Options dialog box From there you can add a new language and edit the properties of a language For example you can edit the syntax formatting keyword list that is associated with each language Each language type has its own keyword list See also Lan guage Options on page 193 Custom Tag Type This pull down list specifies what type of symbol is found as a result of using the custom parser pattern in the Custom Pattern text box The list contains all of the possible symbol types One of the entries in the list says No Custom Parser If that item is selected then Source Insight does not use the custom pattern If any other item is selected in the list then the custom pat tern should contain a regular expression pattern for parsing symbol names out of the file Custom Pattern This text box should contain a valid regular expression with one group i
225. e color options to the initial defaults Command Shell The Command Shell command is a Custom Command that launches a shell command box from Source Insight Complete Symbol This command completes the entry of a symbol name when you are typing thereby saving you from typing the whole name If auto completion is enabled then the Complete Symbol command invokes the auto completion function The popup auto completion window will appear DOC doc doc h amp arg phdd hralpcd locSwitch phd fathadiene Switch retur 6 hstFile 4 hstlTos htgl htg E Figure 5 1 The Auto Completion window appearing after typing Source Insight User Manual 139 Command Reference Chapter 5 If auto completion is not enabled and the Context Window is visible then as you type a symbol name the Context Window begins showing you the names of symbols that partially match what you have typed so far The Complete Symbol command replaces the whole word you are typing with the complete name of the symbol For example let s say that you have a function called InitWindowState As you type in the letters InitWi the auto completion window or the Context Win dow narrows what you ve typed down to a unique function InitWindowState The Complete Symbol command will replace what you ve just typed with the whole name InitWindowsState The auto completion settings affect how the completion function works You ha
226. e completion window is showing will insert the selected item in the list If this option is dis abled then a Tab key just inserts a tab In any case the Enter key can also be used to insert the selected item This section customizes the way that auto completion works while typing in symbol and file lists Match syllables while typing Enables syllable matching by default If this option is disabled you can still match syllables by inserting a space character first followed by your input Match members while typing Class and struct members are matched according to your input A full symbol name is like a path that starts with the symbol s top most container For example a class member might be named MyClass member Enabling this option will allow you to just type member If disabled then only full symbol names are matched You can still use this fea ture even if disabled by prefixing your input with a dot 7 like this member The Undo command reverses the action of the last editing command in the cur rent file For example if you type some new text and perform Undo the text you typed is removed Alternatively if you delete a line and perform Undo the line reappears 286 Source Insight User Manual Chapter 5 Use the Go Back command to undo cursor movement Undo All In effect as you edit Source Insight makes a list of the changes you ve made to each file The Undo command backs up through that list an
227. e guidelines e Ifyou currently have version 2 x installed on your machine you should install version 3 5 into a different directory than version 2 x e Dont run instances of version 2 x and version 3 5 at the same time e Creating separate projects for version 3 5 is recommended although the project files are somewhat upward and downward compatible e You can open a version 2 x project but you will have to click the Browse button in the Open Project dialog box to locate the old PR file yourself If you installed version 3 5 in a new directory recommended then ver sion 3 5 will have no foreknowledge of the old projects already created e You can open your old configuration file with the Options gt Load Con figuration command Point to your old 2 x directory and your old CF file Note that new configuration files have a CF3 file extension Configuring Source Insight A Source Insight item will be added to the Programs menu of the Start menu After the Setup program finishes copying files to your hard disk Source You will be asked to type your name and organization in the sign on window This window only appears this one time Entering Your Serial Number Source Insight asks you to enter a serial number when you run it If you are only evaluating Source Insight you do not need a serial number Source Insight will run without a serial number for 30 days Click the Try button to continue evaluating Source Insight without a s
228. e it or cancel the Save As opera tion on each file If not checked Source Insight will go ahead and automatically save all files that have been modified since the last time they were saved Save all files when Source Insight program is deactivated If checked Source Insight will automatically perform a Save All command when the Source Insight application window loses focus i e every time you activate a different application This enables you to work with another editor or IDE that has the same files open For example if you switch to your IDE application then Source 172 Source Insight User Manual Chapter 5 File Options Insight will automatically save all edited files to disk If not checked Source Insight will not save files when deactivated Save over read only files without prompting If checked then Source Insight will save over a read only file without warning you it is read only Actually you will be warned the first time you attempt to save over a read only file in a ses sion If not checked then Source Insight will prompt you for each read only file that is saved You will still have the option of overwriting a read only file on a file by file basis When Source Insight saves over a read only file the file is changed to read write Note Thisoption is not recommended as you may accidentally write over valu able files that are read only for a good reason This option may be of use if your source co
229. e matching option 116 Source Insight User Manual Chapter 4 Files Created by Source Insight The Smart Rename command also uses these same mechanisms Files Created by Source Insight Source Insight creates the following files and file types on your hard disk Files in the Program Directory The following files are created in the installation directory when Source Insight is installed The installation directory is the destination directory you specified when you ran the setup program File Description Insight3 exe The Source Insight program Insight hlp The Source Insight Help file ReadMe txt Text file containing last minute notes Sihook exe Utility program used by Source Insight to launch Custom Commands FileAlias txt File name alias file used to override the document type associated with a given file name CLF Custom Language File this file is created by the exporting a custom language from the Preferences Languages dia log box Per User Data Folder In Windows the My Documents folder is a virtual folder that exists separately for each user Source Insight stores per user data inside My Docu ments Source Insight Your Source Insight project data files are kept in your own user data area and other users on the same machine will not be able to access them If possible locate your My Documents folder on your local drive If you can not do that then you can set a registry
230. e source files can have syntax errors They don t have to be compiled That means symbols will be found in source code that doesn t even com pile or is in an intermediate state which is most of the time Preprocessor macros are not expanded before Source Insight parses the code This may sound bad but in reality it works quite well Source Insight parses your program at its most abstract level at the same level as it was written Among other things this also allows call trees to con tain function like macros Symbol declarations are parsed from all of the source code not just what was active at the time of compilation For example C C code inside of ifdef endif clauses are also added to the symbol database even if the ifdef branch is not active when you compile This can be a great help if you are working on a multi state program and you need to be aware of all cases not only what the compiler sees If you do want to omit inac tive code blocks you can define condition values with the Edit Condi tion command or in the Preferences Languages dialog box The text in comments and constants is also indexed for searching Source Insight is focused on source level code not just what the compiler transforms into object code All header files are assumed accessible in all source files Source Insight does not notice what header files are included in each particular source file Therefore all symbols are known at all points This is t
231. e source files for that task and begin working When you want to stop working on task 1 you use the Save Workspace command to save the file Session1 Close all files and open the source files to begin work ing on task 2 When you want to stop working on task 2 and resume working on task 1 use the Save Workspace command to save the file Session2 then use the Open Workspace command to open the task 1 session Session1 Source Insight User Manual 109 Source Insight Concepts Chapter 4 Performance Tuning Pentium Il or better is recommended Project size affects performance and memory usage Use Project Report to see project size Statistics Project Settings control indexing options for projects Depending on the size of your project and the type of machine you have you may want to tune Source Insight for better performance The Preferences dia log box and the Project Settings dialog box both contain options that affect performance Factors That Affect Performance Source Insight was designed to push some of the limits of functionality for a programming editor As such it has features that can stress a system that is too slow or not optimized for it This section describes factors that you can control which affect Source Insight s performance Machine Speed A Pentium II class machine or faster is recommended to take advantage of all the features of Source Insight If your machine is not quite f
232. e the line the selection is on The cursor does not have to be at the beginning or end of the line If Auto Indent is turned on then the new line will be indented even with the line below it Insert Line Before Next The Insert Line Before Next command inserts a new empty line after the line the current selection is on If Auto Indent is turned on then the new line will be indented even with the line above it Insert New Line The Insert New Line command inserts a new line starting at the insertion point This is just like pressing Enter except the cursor does not move to the next line Join Lines The Join Lines command joins the line the insertion point is on and the next line so that it forms one single line If the selection is extended then all the lines intersecting with the selection are joined Jump To Base Type Moves the cursor to the most base structure type of the selected variable or type For example consider the following code struct MyStruc int afield int anotherfield P MS type is defined as struct MyStruct typedef struct MyStruct MS MS ms declare ms with a type of MS x ms afield If you put the cursor in ms in the assignment statement or anywhere the ms variable appears the Jump To Base Type command will jump to the definition 186 Source Insight User Manual Chapter 5 Jump To Caller of struct MyStruc because that is the most base structure type of the variable It won
233. e types of symbols to display in the symbol lists that are displayed in the Project Window Automatically arrange when resizing If enabled the Project Window will automatically resize its columns when you resize the window If disabled then the columns widths are fixed unless you change them Stack list vertically For the file browser view this places the directory list above the filelist Disable this to show them side by side If the Automatically arrange when resizing option is enabled then the Project Window will switch 224 Source Insight User Manual Chapter 5 Project Settings the orientation automatically depending on the aspect ratio of the Project Win dow Show file details in directory display This is used in the File Directory view only If enabled then file details such as the file size are displayed in the file list Font Text Color Back Color Click on these to select the font text color and background color respectively Project Settings The Project Settings command allows you to set various options that govern the current project If no project is currently open then the Project Settings com mand allows you to set the default options inherited by subsequently created new projects The Project Settings are saved with the project data file in the project directory These settings are independent of the configuration file Project Settings E x r Configuration OK Project has its
234. e vertical scroll state of the window hwnd The vertical scroll state is the line number that appears at the top of the window IchFromXpos hwnd In xp Returns the character index given a pixel x position xp on the line number In in the given window The character index is the zero based index of a char acter on the specified line The line does not actually have to be displayed in the window at the time this function is called See also XposFromIch hwnd In ich on page 328 Inputs Parameter Description hwnd The window In The line number that contains the text to be measured If In is out of range then 1 is returned xp The x position which is relative to the left edge of the whole window If xp exceeds the width of the line then the total number of characters on the line is returned Note You can use the XposFromlch function to perform the reverse mapping IsWndMax hwnd Returns TRUE if the window hwnd is currently maximized IsWndMin hwnd Returns TRUE if the window hwnd is currently minimized 326 Source Insight User Manual Chapter 6 Window Functions IsWndRestored hwnd Returns TRUE if the window hwnd is currently not maximized and not mini mized MaximizeWnd hwnd Maximizes or zooms the window specified by hwnd MinimizeWnd hwnd Minimizes or iconizes the window specified by hwnd NewWnd hbuf Creates a new window and displays the file buf
235. e window GetWndHandle hbuf Returns a window handle for the front most window that displays the file buffer specified by hbuf GetWndHandle returns hNil if the file buffer is not in a window Since a file buffer may appear in more than one window GetWndHandle searches through all windows in front to back order So if the specified file buffer is the current buffer in the active window the handle for that window is always returned GetWndHorizScroll hwnd Returns the horizontal scroll state of the window hwnd The horizontal scroll state is the pixel count of the scroll GetWndLineCount hwnd Returns the vertical size of the window hwnd in lines This is the maximum number of lines potentially visible in the window If the file buffer does not fill the entire window GetWndLineCount will still return the maximum number of lines 324 Source Insight User Manual Chapter 6 Window Functions GetWndLineWidth hwnd In cch Returns the width of a specified line of text in the given window Inputs Parameter Description hwnd The window In The line number that contains the text to be measured If In is out of range then 1 is returned cch The count of characters to measure on the line If cch is set to 1 then the whole line length is measured This function allows you to measure the width of characters in a given window Since the font used by each window is determined by the files document type the w
236. easily understand and edit large detailed projects created by groups of programmers Find References Quickly Source Insight s symbol indexes allow you to locate references to symbols across the project in seconds and create a listing containing active source links to all locations See also Lookup References on page 208 Hyper Source Links to Link Compiler Errors and Search Results Source Links let you jump between interesting places instantly Source Links are hypertext like links that connect a location in one file with a location in another file Source Links are used to link search results with matches and to link compiler errors with their targets You can also parse file specifications out of any file and create links to those files Source Links are actively maintained as files are edited You can insert text anywhere in a file and the links will be Source Insight User Manual 9 Introduction Chapter 1 retained on the correct lines See also Searching and Replacing Text on page 83 Fast Project Wide Search and Replace Source Insight can quickly search and replace in project files The result of each search is added to a Search Results window which contains active source links to all the search matches Source Insight s search index makes project wide searches take only a few seconds Regular expression search patterns are sup ported Project Window With Multiple Views Source Insight s Project Wind
237. echnically inaccurate with respect to how a compiler will see your program but in most cases it works well Some programming styles may cause symbols not to be found by Source Insight The default parsing that Source Insight uses works very well with most programming styles In the event that you have some declara tions types that Source Insight can t recognize you can add Token Mac ros which expand during a preprocessing phase or you can add a custom parsing regular expression pattern Coding Tips for Good Parsing Results Because regular C C preprocessing is not performed by Source Insights parsers you might want to keep the following thoughts in mind as you write new code Try not to have ifdef endif blocks break up an individual declaration If it cannot be avoided and Source Insight doesn t parse the code correctly you will need to define the condition value using Edit Condition so that Source Insight will disable the inactive block of code causing the confusion See also Condi Source Insight User Manual 65 Source Insight Concepts Chapter 4 tional Parsing on page 61 For example void MyFunc ifdef XYZ int paraml int param2 else long paraml long param2 endif Try not to replace standard language keywords or combinations with defined substitutions If you cannot avoid this then you will need to define Token Mac ros to support them See also Preprocessor Token Macros on pag
238. eclare Namespace Declare Package Background Below Line E X Save Declare Parameter Declare Prototype Shadow Set w Expanded E v Reset Declare Resource 4 Declare Struct Inverse IB Feed White pace Declare Template Declare Template Pe Print together Jon Help Declare Typedef with next line Declare Union Select a style name from the list then view and modify its settings Note means the property has no effect Style Name list Lists all the syntax formatting styles When you select a style in this list its properties are loaded into the controls to the right A sample of the style is also displayed in the sample box Parent Style This is the parent style in the style hierarchy The current style inherits its formatting from the parent style Add Style Click this button to add a new user defined style Delete Style Click this button to delete a user defined style The standard built in styles cannot be deleted Load Click this button to load a new style sheet from a configuration file Save Click this button to save the current style sheet settings to a new configu ration file The file will contain only style properties and wont contain other Source Insight User Manual 271 Command Reference Chapter 5 Font Options Colors Options Spacing Options elements that can be stored in a configuration file If you load this configu
239. ect TO mtcr 262 Select To End OFFIC mmc a S 262 Select To Top Of File soos 262 Select Word 262 Select Word Left c 262 Select Word Right lt 263 Selection History 263 Setup Common Projects esee ee eee ene eee eee en aeta aee en atas etna setas setas sense etas e tas e ens sas 263 Setup HTML Help t H 265 Setup WinHelp File 265 Show Clipboard 265 Show File Status 265 Simple Tab e 265 Smart End of Line wooo 266 Smart Beginning of Line eere eese eese eese en senno ea sense bietes sisa st tns ea setas ease tassa roS 266 Smart imu 266 Smart Tab 268 Sort Symbol Window 269 Sort Symbols By Line 269 Sort Symbols by Name c 269 Sort Symbols By Type e 270 Source Dynamics on the Web ecce eese eese eese en etant ea sense en sese tn sense enses sens eas ena 270 Start RECOFAING M 270 Stop Recording 270 Style Properties 270 Symbol Info e 273 Symbol Lookup Options c 274 Symbol Window command s 276 Symbol Window Properties eee neon neenon enean en eene tn sene tn sense ense aae tn sena eaa 276 Syne File WINAON RR KjeTa To T2 4g FX E
240. ect symbol path Working With No Project Open When no project is open Source Insight searches the files that are currently opened If the symbol is not found then every project in the project symbol path searched If the symbol is still not found then the Base project is searched The Base Project The first time you run Source Insight it automatically creates a project named Base The Base project is the last place that Source Insight will search for sym bols It is implicitly at the end of the project symbol path In other words if Source Insight is looking up a symbol and it can t find it in either an open file the current project or any of the projects in the project symbol path then it looks in the Base project for the symbol Note You donot have to add the Base project to the project symbol path Source Insight automatically searches it as though it were in the list This gives you a convenient place to save common symbols Any symbol stored in the Base project is visible from any other project For example you could add all of the standard C C include files to the Base project The Base project is also a good place to add your favorite Source Insight editor macro files Source Insight User Manual 57 Source Insight Concepts Chapter 4 Programming Languages The document type of a file determines the language Parsing is controlled by the language type associated with the file s docu ment type
241. ects up to the matching brace parentheses or quote mark For example if the insertion point is just before an open brace this command selects up to and including the closing brace Select Next Window The Select Next Window command changes the active window focus to the next window This command cycles through all open windows If the active window is maximized when this command is used the next win dow is shown as maximized also Select Paragraph Source Insight User Manual 261 Command Reference Chapter 5 The Select Paragraph command selects the entire enclosing paragraph A para graph of text is assumed to be a series of lines bounded by blank lines Select Sentence The Select Sentence command selects up to the next period Select Symbol The Select Symbol command selects the entire enclosing symbol For example if the current selection is inside of a function the Select Symbol command selects the whole function including the lines that precede the function up to the bottom of the previous symbol Select To The Select To command is used with the mouse to extend an existing selection up to a new point To use this command point and click the left mouse button while holding down the Shift key The selection will be extended up to the place you pointed at If you pointed to a position already within the selection then the selection will be shrunk to that location Select To End Of File The Select To End
242. ed in the Document Options dialog box Character Spacing Options E x Horizontal Spacing These options affect the width of characters drawn when a proportionally spaced font is used AND the Line up white space option is turned on in the Document Options dialog box Cancel Spaces are the same width as this character in the current font Note tab widths are based on this width also Common delimiters are the same width as this character in the current font JV Layout tabstops using monospace calculations IV Layout spaces using monospace calculations Vertical Spacing JV Smaller line heights reduces font leading Horizontal Spacing Options Horizontal spacing options affect the width of characters drawn when a propor tionally spaced font is used and the Line up white space option is enabled in the Document Options dialog box If enabled Source Insight will attempt to use a fixed width for spaces and tabs so that spaces and tabs line up the same way they do with a fixed pitch font Programs generally look better with this turned on if you are using a proportional font The Space Width Character The space width character controls how wide a single space is and therefore the displayed width of tab characters tabs are some number of spaces wide Source Insight computes a space to be same width as this character in whatever font is used for displaying For example the character 1 specified in
243. ee eere eere eene eene en nera aetates enne tensa sens 92 Moving Through a File cese esee esee neenon etna en sense en sense tn ette etae tn seas desrota t0 92 Scrolling Commands 93 Selection Commands 93 Extending the Selection 95 Selection Shortcuts 96 File Buffer Eisc eR 97 IIucu mm 99 What Happens when you Start Source Insight coser esee esee seen eene en sensn atnae 99 Recovering From Crashes eere esee eene eerte esee esteso eet oss eto sense ense ene senes ossosa 99 RECOVELY zi oT ze V 4 REPRE 100 WATININGS 100 Command Line Syntax eee eere cete seen esee eene sensns eins noes 101 Specifying File Arguments 101 Opening Files wee 101 Opening Workspaces wee 102 Command Line OPTIONS e eee eene ee eee eee enean eee o seen eene eene sean sean eee ao seas senes eaae 103 User Level Comman di eese esee eee eee tenete tenens tastes etas tn sensns sosta stas enan 104 CUSTOM Commands soon eit trao t resonet ana eru ero epe ves vus sepe epe evo e Pres STE KSE 105 Customizing Source Insight eese e eene e eee eee eene ente tn ato asuneita 105 Loading and Saving Configurations 4 eese eese esee neenon eene tn sensns ta etna tna ena 106 Project Settings p
244. eft The Cut Word Left command cuts the word to the left starting at the insertion point Source Insight User Manual 153 Command Reference Chapter 5 Delete The Delete command deletes any file on disk including the currently open file Delete All Clips This command deletes all user clips from the Clip Window The Clipboard is a special clip that cannot be deleted Delete Character The Delete Character command deletes the character at the insertion point If the current selection is extended it deletes the whole selection Delete Clip On Clip Window tool bar and right click menu The Delete Clip command deletes a clip file from the Clip Window and from disk Delete File The Delete File command deletes a file from the disk and removes it from the current project if it was part of the project If you specify the current file then that file is closed and deleted Delete Line The Delete Line command deletes the current line Unlike the Cut Line com mand the clipboard is not effected 154 Source Insight User Manual Chapter 5 Display Options Display Options This command brings up the Display page of the Preferences dialog box These options are part of the current configuration I i x Colors Syntax Formatting Syntax Decorations Searching Remote General Typing Files Languages Symbol Lookups Display Display Elements JV Status Bar v Relation Window s v Tool Bar P
245. en you can use the Refresh Relation Window command to manually calculate the Relation Window contents Source Insight User Manual 231 Command Reference Chapter 5 Relation Graph Properties Node Options Connection Line Options Displays the graphing properties of the Relation Window The graphing prop erties apply when the Relation Window is in a graph mode not the outline mode Relation Window Graph Properties i xj r Graph Layout OK Horizontal left to right Spacing C Vertical top to bottom Er Cancel Back Color Nodes Type Box Font Text Color Help C Oval Border Color Node Color nr IV Drop Shadow M Connection Lines Type C Direct Thick Line Orthogonal v Arrows Splined v Unique backward line color Line Color Backward Line Color Back Color Click this to select a background color for the graph window Graph Layout Selects the layout mode for the graph You can choose either top to bottom or left to right Spacing Type a percentage that represents the scale factor of the inter node graph spacing A large percentage value will make the nodes spread out more Node options control the appearance of node elements in the graph Type Selects the shape of nodes Font Selects the font used inside of each node Border Text Back Color Selects the colors used for the node borders text and background fill Drop Sh
246. en command line string in sCmdLine This returns non zero if successful or zero if errors If sWorkingDirectory is not Nil then the working directory is used If sWork ingDirectory is Nil then the current project home directory iis used If fWait is non zero then the function will not return until the process is fin ished Otherwise it returns immediately If the process is another windows application it returns immediately regardless of fWait SetReg reg key name value Sets the value associated with the registry key named reg key name The key value is stored under the key path HKEY CURRENT USER Software Source Dynamics Source Insight 2 0 The key is created if it doesn t exist already 320 Source Insight User Manual Chapter 6 Environment and Process Functions The SetReg and GetReg functions give you a way to store your own Source Insight related information between sessions ShellExecute sVerb sFile sExtraParams sWorkingDirectory windowstate Performs a ShellExecute function on the given file This lets you tell the Win dows shell to perform an operation on a specified file The nice thing about ShellExecute is that you don t need to know what specific application is registered to handle a particular type of file For technical back ground information see the ShellExecute function in the Windows Shell API documentation ShellExecute Parameters Parameter sVerb Table 6 7 ShellExecute Parameters
247. en project Turn on the Parse Source Links option The default parse pattern is setup to parse the compiler error messages from the compiler output Turn on the Save Files First option so that your file is saved before building the project Viewing Compiler Errors To view source lines with errors 1 Run the Compile File custom command which is defined as described above Assuming there are errors when the compiler finishes the error messages will be in the Compile File window Source Insight will automatically setup the source links and run the Go To First Link command The first error message and the erroneous source line will be selected and made vis ible Run the Go To Next Link command The next error message in the Com pile File window is selected and the target of that link is shown as was the first error Continue to use the Go To Next Link command until all the links error messages have been visited If there are no more links then Source Insight beeps and the message No links will appear in the status bar The Cut command copies the contents of the current selection to the clipboard and deletes the selection Note that although the Cut command deleted the current selection you still have that text saved in the clipboard You could reverse the deletion by following the Cut command with a Paste command The Cut Line command copies the current line to the clipboard and deletes the line The cursor
248. en you save new files for the first time Source Insight allows you to change their names and asks if you want to add them to the current project Another way to create a new file is to use the Open command and specify a file name that does not exist Source Insight will ask you if you want to create the file Assuming you do Source Insight will create a new unsaved file with the name you specified New Clip The New Clip command creates a new clip buffer You will be prompted for a clip name You should not add extensions to the clip name zi New Clip Name dere Cancel New Relation Window This creates a new Relation Window You can have as many Relation Windows as you like Each window has its own set of options For example you could select a function name and have one Relation Window showing what other functions it calls and another Relation Window showing who calls the selected function Alternatively you could have one Relation Window tracking the current selec tion and another tracking the enclosing function New Project The New Project command creates and opens a new project Since Source Insight allows only one project open at a time Source Insight will ask you if it s okay to close the current project if any before proceeding If you refuse to close the current project the New Project command is canceled Where Should You Create A Project When you select a file in the New Project file dialog box
249. ene ta sense ea sense tn stas senses sense assess Soa EESE 291 METRE e RR 295 Declaring a Variable e crece esses eene en seen sesenta setas enses senses tasses Esis 296 Variable Initialization esee e eee e eene enean eene ease n aetas a etas sinon V aoi 296 Global Variables RR 296 Variable Name Expansion s sssesseesoesooesoesooesossocsocesossocesoosoosocesocesoesocesossossocesossocesoee 297 Expanding Variables in a String 297 Variable Arithmetic 298 Indexing Into Strings 298 Record Variables 299 Record Variable Storage 20299 Atray TCCANIQUES E ET ES 300 Special Constants sscrssasssssacssesnvcosncosseosasesavesensnssenctesenenssenassevctessscessannesectseseee 301 OPEL ji 301 Conditions and Loops if else and while eec eese eee eene nennen 302 Naming Conventions Standard Record Structures BOOKIMGPK R cord Poem BUPDIOP RECOM e DIM RECON oi ute coe cie sete va etus A peoe de pes se desee eua ane b a Que ETE SNA Link Record ProgEnvinfo Record ProgInfo Record Rect Record Selection Record ds Autore Ne rael io RR SYSTIME RECOM mde p Internal Macro Functions StriNG FUNCTIONS AscliErornCliatr Chi ccsscscaccasecossssacncascsssesssecasoissovnnscsuasoosdsdcesessssecsssicasoiss
250. ensive Large projects can use a lot of virtual memory Performance Tuning The symptoms of too large an index are e Disk thrashing while building or rebuilding a large project with little progress is being made It is normal for a very large project to require a significant amount of disk access near the end of the rebuilding phase e Opening or closing a project takes a long time e Synchronizing individual files is slow e The Browse Project Symbols dialog box F7 is slow to come up accom panied by a lot of disk activity It is normal for this to pause a second or two the first time you use it e Over 1 or 2 million index entries on a 128 megabyte system If you have a large project over 200 000 symbols you should try turning off the symbol syllable indexing You can find out how large the database is by select ing Project Rebuild Project and looking at the statistics on the bottom of the dialog box Just cancel this dialog box when you are done If the number of index entries is over 1 million then things can start to slow down Adding more memory to your machine will improve performance To remove the syllable indexing run the Project gt Project Settings command and turn off Quick browsing for symbol syllables Then use the Rebuild Project command to recreate your project from scratch Symbol Memory Usage Source Insight uses about 16 bytes of RAM for every symbol index entry in a project A project with all the sy
251. entage of horizontal spacing to add to charac ters Fixed White Space This option only applies if you have selected a proportion ally spaced font Fixed pitch fonts such as Courier New are not affected If enabled Source Insight will attempt to use a fixed width for spaces and tabs so that tabs line up the same way they do with a fixed pitch font Programs gener ally look better with this turned on if you are using a proportional font See also Character Spacing Options on page 158 272 Source Insight User Manual Chapter 5 Symbol Info Print together with next line If enabled Source Insight will try to keep the text on the same page as the following line when printing Symbol Info The Symbol Info command displays a pop up window showing the definition of the symbol under the cursor This is a quick way to check the definition of an identifier Symbol Info E x GetDisplayName0fT av Function in Tav c at line 555 41 lines void AAEN AES Ee Clea ay pray ptav PSZ szName TAVEH taven int scope SZA szTag TINS tins int cHode lt 0 int scopeLast lt ptav ctag 1 FLAG fEllipseadded fFalse L I kt Jump References Open file in a window Symbol Name Type and Location The symbols name type and location are displayed at the top of the window Source File The source file name and line number where the symbol is defined are displayed at the top left of the
252. entries for these macros in your c tom token macro file then this option has no effect Ignore package declarations If checked then package declarations in your Java files are ignored Any symbols declared after the package statement are consid ered in the global package scope That is they are all in the same virtual package If not checked the default then any symbols declared after a package state ment are considered in that package scope Default script language You can specify the default script language to use in HTML and ASP files with this control The default script language is only used if another language is not specified in the script Source Insight User Manual 195 Command Reference Chapter 5 Language Properties This command displays the properties of the currently selected language The Language Properties dialog box appears when you click the Properties button in the Preferences Language dialog box Source Insight supports two types of languages Built in and Custom You can alter a few options for built in languages For custom languages you can con trol all the parameters for a generic language Language Info The Info page is used to edit the name of the language and a comment Click ing the Keywords button opens the Language Keywords dialog box MyLanguage Properties Source Insight User Manual Chapter 5 Language Properties Basic Language Options Each lan
253. er Fonts Courier 8 m Parsing Editing Options Language Word Wrap Tab width fa c Language Language V Allow auto complete Macin widi po E EM IV Allow Smart Paste ag z Custom Tag Type No Custom Parser i Ne z r Enter key gt newline Visible tabs Custom pattem Show line numbers IV Symbol Window Show right margin Show page breaks Figure 4 8 The Document Options dialog box Document Specific Options The document type is key to determining how Source Insight treats a file Most importantly it controls what programming language is associated with each file A document type also specifies editing and display options such as the tab width word wrap auto indentation display font and others To see what document type is associated with the current file right click on the source file window and select Document Options The file s current document type is automatically selected in the dialog box Tip Associating Files with Document Types The Document Options command associates a document type with a filename wildcard For any given file Source Insight determines the document type by matching its name with the filename wildcards specified in all defined docu ment types For example c files belong to the C Source File document type while asm files belong to the Asm Source File document type Source Insight User Manual 67 Source Insight Con
254. er way when the text looks a lot narrower than it would be in a fixed pitch font Document Options The document type determines the language and editing options fora file type The Document Options command allows you to define editing and display options based on the file name or extension of the file you are currently editing Document Types A document type is a file classification that is defined in the Document Options command Source Insight uses each files name to determine what document type it has Document types allow you to associates different types of source files with different behaviors in Source Insight Document Options Dialog box Document Options E x Document Type File filter Add Type e Source File cpp hpp cxx hx el Remove Type m Font Options Use options from Default type J Emulate screen fonts when printing IV Include when adding to projects IV Line up white space Screen Fonts Minia MS Printer Fonts Courier 9 r Status Bar Options Line Col Symbol C Line Col Char Byte Parsing r Editing Options Language Word Wrap Tab width n c Language gt Language IV Allow auto complete Margin width 80 Dan T Tp IV Allow Smart Paste Ei No Custom m MEAN IV Enter key gt new line Visible tabs Custom pattem Show line numbers IV Symbol Window SSS Show right margin Show page breaks Source
255. erence can be controlled with the Qualify references to members option Special comment styles Source Insight supports special comment styles that are controlled by special 1 4 comment heading tokens and the placement of comments If this option is enabled then Source Insight will apply the appro priate comment style to those special comments Source Insight User Manual 281 Command Reference Chapter 5 Comment Headings Comment heading styles are comments that begin with a single digit in the range 1 to 4 For example 1 This is heading one 2 This is heading two When the comment styles are used the x at the beginning of the comment is hidden and the heading style formatting is applied to the rest of the line Inactive conditional code blocks Code contained in inactive conditional code blocks are formatted with the Inactive Code style An inactive code block is one contained in an inactive ifdef if elif or else branch You control the state of the conditions with the Edit Condition command Symbol Reference Lookups When a potential reference is encountered Source Insight must verify that the symbol is declared somewhere This section controls how Source Insight resolves references to symbols declared in the project as it renders source code Search in the Project Symbol Path Source Insight will search not only the cur rent project for a declaration but also all the projects in the Project Symbol Path
256. erial number If you have paid for a Source Insight license then you should enter your serial number when prompted Once a valid serial number is entered Source Insight s evaluation time limit is removed and it will be unlocked indefinitely Note The license serial number applies to the machine not the user All local users on the same machine will have this license serial number Creating Common Projects Source Insight will ask you at this point if you want to create common projects In order for Source Insight to provide symbol completion and other symbolic features for standard libraries such as the C Runtime or Java standard pack ages you need to setup separate projects for those libraries Source Insight will Source Insight User Manual 17 Setup and Quick Start Chapter 2 A project is a collec tion of source files resort to searching these projects if a symbol cannot be found in your current project For each common project you are asked to locate the directory where the cor responding files are located on your disk If you installed the source code for your libraries on your disk then you can take advantage of Source Insight to use the source code as a basis for the projects For instance you might click on a call to the function strtok in the C Runtime Library and Source Insight will locate the source code for strtok The projects that you create at this point are automatically added to the pr
257. es References to symbols that are not actual declarations are formatted with an appropriate Reference style There are reference styles for different types of symbols For example a code fragment might look like seek the class name token The call to SeekTokenLnIch is formatted with the Ref to Function style The C macro function HdocOfTgl is formatted with the Ref to Macro style which helps up know just by looking at it that it is a macro The parameter hpar is formatted with the Ref to Parameter style so we know it is a local parameter of the current function The identifier htglLocal is formatted with the Ref to Local Variable style so we know it is a local variable in the current function The kswaChangeMark constant is formatted with the Ref to Con stant style 78 Source Insight User Manual Chapter 4 Reference styles are very useful but consume some processing power Inactive code is formatted with the Inactive Code style Syntax Formatting and Styles Reference formatting gives you a lot of information without having to ask for it It becomes instantly obvious if you have misspelled a function name or whether you are using a constant or a local variable or a global variable You should be aware that enabling reference formatting can slow the display down in some cases Source Insight needs to perform symbol lookup operation each time it encounters a potential
258. es that are whole words If not checked then Source Insight will also find matches that are embedded in words Skip Inactive Code If enabled then only code that is active under conditional compilation is searched You must first specify known conditions in the Prefer ences Languages dialog box in order for Source Insight to know what condi tions are active or not Conditional compilation only applies to some languages Skip Comments If enabled then comments will not be searched Search Only Comments If enabled then only comments will be searched This is mutually exclusive with the Skip Comments option The comment options slow the search down a little Source Insight User Manual 257 Command Reference Chapter 5 Search Results These options affect what appears in the Search Results after the search is com pleted List File Names If checked then the file name where the match was found is inserted in the search results If this option is on and List Line Numbers and List Line Text are both off then a file name is inserted in the search results only once if any matches were found in the file That is only one match per file is listed in the search results List Line Numbers The line number in the file where the match was found is listed in the search results List Line Text The source text of the line where the match was found is listed in the search results Include Source Links If checked then source links are als
259. ess a key and returns the key code The key code is a special numeric value that Source Insight associates with each key You can use the CharFromKey function to map a key code into a character GetSysTime fLocalTime Returns a SYSTIME record which contain string representations of the time and date See also SYSTIME Record on page 310 If fLocalTime is non zero then the local time is returned otherwise the system time expressed in Coordinated Universal Time UTC is returned IsAltKeyDown key code Returns TRUE if the ALT key is down for key code key codes contain the CTRL and ALT key state key code is a numeric keyboard value that is returned by GetKey and Key FromChar You can use CharFromKey to convert a key code into a character Source Insight User Manual 313 Macro Language Guide Chapter 6 IsCtriKeyDown key code Returns TRUE if the CTRL key is down for key code key codes contain the CTRL and ALT key state key code is a numeric keyboard value that is returned by GetKey and Key FromChar You can use CharFromKey to convert a key code into a character IsFuncKey key code Returns TRUE if key code is a function key or FALSE if not key code is a numeric keyboard value that is returned by GetKey and Key FromChar You can use CharFromKey to convert a key code into a character KeyFromChar char fCtrl fShift fAlt Returns a key value given a character and modifier key states A key value
260. eteObject pfcesArfont Figure 3 5 The Clip Window is an example of a floating window that stays in front of the main Source Insight window You can also dock it to the edge of the program window Tip To get a floating window to dock where you want it drag it so that the mouse cursor itself is near the edge where you want to dock the window Source Insight User Manual 29 Window Tour Chapter 3 Transparent Floating Windows Source Insight supports semi transparent floating windows This makes the floating windows a little like a HUD Heads Up Display in a game Floating windows If you are using Windows 2000 or Windows XP which supports translucent can be semi trans window modes then the floating windows will also have a button to toggle the parent on Windows window s transparency 2000 XP When a window is transparent you can also click through it to the text below it as long as you are not clicking inside an object within the floating window Project Window The Project Window appears when you run the Open command or run the Project Window command View menu The Project Window lists all the files and symbols in the project and it allows you to open files quickly regardless of what directory they are in 5 dud button The project name Sinew Project gt You can type a file name in i 9 7 2002 E this edit field As you type Cmdfind c 74469 7 17 2002 Roll up
261. ext 97 a whole line 97 between lines 97 matching parentheses and blocks 97 the enclosing block 97 the whole file 97 whole functions or symbols 96 whole words 96 Selection Commands 93 Selection History 263 Selection Record 309 Selection Shortcuts 96 Selections extending 95 Set Common Projects Dialog box 264 SetBufDirty function 319 SetBufIns function 319 Index SetBufSelText function 319 SetCurrentBuf function 319 SetCurrentWnd function 327 SetReg function 320 SetSourceLink function 338 Settings Folder 175 Settings folder 118 Setup and Quick Start 15 Setup Common Projects 263 Setup HTML Help 265 Setup WinHelp File 265 SetWndRect function 327 SetWndSel function 328 ShellExecute Commands 149 ShellExecute function 321 ShellExecute Parameters 321 Show Clipboard 265 Show File Status 265 Showing Declarations and Definitions 35 Simple Tab 265 Smart Beginning of Line 266 Smart End of Line 266 Smart Indent Options 166 Smart Rename 266 Smart Renaming 74 84 Smart Tab 268 Smart Tab Examples 268 Sort Symbol Window 269 Sort Symbols By Line 269 Sort Symbols by Name 269 Sort Symbols By Type 270 Source Control 53 Source Control Commands 53 Source Control Toolbar 25 54 Source Dynamics on the Web 270 Source File Windows 26 Source Insight Application Window 21 Source Insight Concepts 45 Source Links creating 91 parsing 218 with compiler errors 179 with search output 180 Source Links from Custom Command Output 91 spaces linin
262. f not checked then all file types are listed in the File Name list Remove File Removes the file s selected in the Project Files list Remove All Removes all files from the project The project will be empty Remove Special Brings up the Remove File dialog box which allows you to do special remove operations such as removing all h files Add from list Brings up the Add File List dialog box This asks you to specify an input text file that contains a list of files and directories to be added to the project The Add File command adds one or more source files to the current project This command existed in earlier versions of Source Insight however the Add Source Insight User Manual 125 Command Reference Chapter 5 and Remove Project Files command is a newer replacement which provides a central dialog box from which to add and remove files from your project Add to Project c si Sinew x C si toolbox Win cpp 23 Help G ico IMG Add Dir 3 Install lang Lic bt Lic2 bt Licnew txt Lintsi bat Lnih Lookup Work c Macros E msdevtest Newcmds txt Old c Oldlang cpp 23 oldmacro Z3 oldtix Oomacros cpp OTL Phones txt ne xl i File Name The name of the file to be added to the project You may type a file name or a wildcard pattern and press Enter If you typed a wildcard the pattern will be applied to the file list box File list box Contains a list of all files
263. f successful or False if not Target file does not have to exist The operation will not fail just because target file does not exist Also target file does not need to be open For consistent results target file should contain a fully qualified path name for afile However you may pass a simple file spec to this function and it will expand target file based on what files are included in the current project and on the project symbol path Source Links are destroyed when the source buffer closes or when the source line is deleted Project Functions Project functions allow you to open and close projects and get project informa tion AddConditionVariable hprj szName szValue Adds a new conditional parsing variable used to evaluation conditional state ments such as if while parsing code 338 Source Insight User Manual Chapter 6 Project Functions Hprj is a handle to the project If hprj is hNil then the new variable is added to the global condition list The name of the variable is given in szName and the value is given in szValue There are two condition lists the global list and the project specific list When you open a project the two lists are merged with the project specific list taking precedence over entries in the global list See also DeleteCondition Variable on page 339 See also Conditional Pars ing on page 61 AddFileToProj hprj filename Adds the given filename to the project hprj
264. f the field foo within struct Sy The Context Window also decodes class hierarchies dynamically That is it will travel up the class derivation hierarchy looking for members that are in scope Source Insight User Manual 37 Window Tour Chapter 3 Customizing the Context Window The Context Window Properties command allows you to change the Context Window settings You can turn off the base type decoding mentioned above and control how the context window tracks the cursor See also Context Win dow Properties on page 140 Context Window Properties re UL LE Lem RT Vr am um men CLE ABRE PaP c7 enuan nl Ee i Figure 3 14 The Context Window Properties dialog box 38 Source Insight User Manual Chapter 3 Relation Window Relation Window You can use the The Relation Window is a Source Insight innovation that shows the relation Relation Window to ship between the currently selected symbol and other things It works like the see function call Context Window by tracking what you are doing and showing relationship trees and reference information automatically The View Relation Window command toggles the rees Relation Windows on and off References C jnix IE WndProcDockFloat 1 line 2889 2 line 2889 Ig wndProcLw 1 line 1742 if MINMAXINFO 2 line 1742 tagMINMAXINFO ptMaxPosition ptMauSize E mdPullDownMenu ptMaxTrackSize ptMinTrackSize E
265. fSync Help DoclsWordWrappedText xl Class in Docker hpp at line 371 120 lines class Dock 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 pat tern 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 lead ing 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 130 Source Insight User Manual Chapter 5 You can search for symbols using regular expressions by prefixing your pattern with a que
266. fer hbuf in the window New Wnd returns a window handle or hNil if errors ScrollWndHoriz hwnd pixel count Scrolls the window hwnd horizontally by an amount given in pixel count If pixel count is less than zero then the scroll is backward in the line screen contents scrolls right If pixel count is greater than zero then the scroll is forward in the line screen contents scrolls left ScrollWndToLine hwnd In Scrolls the window hwnd to show the line number In at the top of the window ScrollWndVert hwnd line_count Scrolls the window hwnd vertically by an amount given in line_count Ifline count is less than zero then the scroll is backward in the file screen con tents scrolls down Ifline count is greater than zero then the scroll is forward in the file screen contents scrolls up SetCurrentWnd hwnd Sets the front most active window Hwnd is the window handle to activate SetWndRect hwnd left top right bottom Sets the new position ofthe given window The Z order is not affected The coordinates given are in the local pixel coordinate system of the window s par ent window If the window is the application window then the coordinate sys tem is the global screen pixel coordinate system Source Insight User Manual 327 Macro Language Guide Chapter 6 SetWndSel hwnd selection record Sets the selection state for the window specified by hwnd to the Selection record given in selection_re
267. folder Projects Projects db3 The Project List contains a list of all projects created on your machine Projects Base Folder containing project files for the Base project Project NetFramework Folder containing project files for the Net Framework project which contains symbol definitions for the NET Framework classes used with C Settings Folder containing your configuration settings files Settings Global CF3 Global Configuration the configuration user preferences file used when no project is open and when a project is open and the Project Set tings command specifies global configura tion c tom C C token macros RCO Crash recovery file which contains informa tion needed to recover unsaved changes after an abnormal termination These files only exist if a earlier session crashed Global WK3 Global Workspace the session state used when no project is open 118 Source Insight User Manual Chapter 4 Files Created by Source Insight Configuration Template for All Users If a configuration file named global cf3 is saved in the Source Insight program directory then Source Insight will copy that global cf3 file to any new users that run Source Insight Thus you can use the global cf3 file stored in the Source Insight program directory as a template configuration for all new users Files Created for Each Project When you create Source Insi
268. g Every time you type a character Source Insight considers the symbol data for the file to be stale If this option is enabled then the file will be parsed after you type anything If the option is disabled then Source Insight will use the possibly stale symbol data for the current file Enabling this option will make the symbol lookups more accurate but it is slower It will also cause the auto completion window to appear slower Most of the time lookups work fine when this option is turned off Find symbols across different language types If checked then Source Insight will lookup symbol definitions in any language regardless of the source lan 274 Source Insight User Manual Chapter 5 Symbol Lookup Options guage If unchecked the default then only symbols that are defined in the same language will be found Search symbol path if symbol is not found If a symbol cannot be found in the current project or any open file then Source Insight will search the projects listed in the project symbol path If it does search the symbol path then it searches through all projects in the symbol path Search symbol path even if symbol is found in current project When enabled all projects in the symbol path are searched every time Source Insight looks up a symbol even if the symbol was already found in either an open file or the cur rent project This is sometimes useful if you are working on an alternate ver sion ofa project with
269. g and Styles Syntax Decorations Source Insight can replace some common operators with more useful symbolic characters The Preferences Syntax Decorations command lets you control which decorations are used The symbolic characters are formatted with the Symbol Characters style If you use the Style Properties command to look at the Symbol Characters style you will see that it uses the Symbol font You may change the styles properties such as the color or font size but if you change the font name to something other than Symbol your syntax decoration symbols will probably not show up correctly Note It s important to remember that symbol substitutions do not change the text in the source file only its representation on the screen changes to show the special symbols You still need to type the operators normally when editing your code or when searching for them Operator Substitutions Common operators such as the pointer de reference right arrow gt or the assignment operator can be replaced with symbolic operators such as arrows For example instead of DIM dimLine Dim OfRgch hdc psnoMem tav sz 1 DrawNodeLine psnoMem tav sz hdc xp yp prc With decorations on the and gt are replaced with real arrows DIM dimLine Dim OfRgch hdc psnoMem tav sz 1 DrawNodeLine psnoMem tav sz hdc xp yp prc Boolean math and other operators can be substituted with decorative symbols too S
270. g monospaced calculations This aligns space characters to appear how they would if a monospaced font is used For example 4 spaces in a row would appear the same width as a tab stop if the tab width was 4 spaces Source Insight looks at each line and tries to determine simply when to apply this rule to a space character If it looks like you meant to line up columns man ually using spaces then it applies this rule It only applies the rule for 2 or more consecutive spaces Otherwise it calculates a space width to be the natural width of a space in the given font This option is on by default Using this option space size is natural unless it looks like you meant to line up columns by using tabs and spaces This is not an exact science Source Insight should be doing a good job of showing you how text lines up ina simple display even if you are using Syntax Formatting You can also use the Draft View command to see the simple text alignment Vertical Spacing Options These options control vertical line spacing Smaller Line Heights Check this box to compress the line heights in order to show more lines of text on the screen This is accomplished by reducing the amount of leading added to the font by the operating system Font leading is added to make vertical line spacing look pleasing in printed documents How ever it is not really necessary for editing source code Why All The Fuss About Spacing You may be wondering Why go
271. g the DumpMacroState function See also DumpMacroState hbufOut put on page 342 Persistence Global variables are preserved between runs but not between sessions Local variables are not preserved between runs or sessions However you can pre serve values by storing them in a file or writing and reading registry keys No Self Modifying Macros Make sure that a macro is not modifying itself while running Source Insight will abort any macro that attempts to edit a file containing a running macro 342 Source Insight User Manual Chapter 6 Event Handlers Sample Macros A macro file is in included with Source Insight called utils em This file con tains some useful functions and you may want to look at it to see some exam ples Event Handlers An event handler is a function written in Source Insight s macro language that gets called when specific events occur For more see Chapter 7 Macro Event Handlers on page 345 Source Insight User Manual 343 Macro Language Guide Chapter 6 344 Source Insight User Manual owns Macro Event Handlers This chapter describes event handler functions that are written in the Source Insight macro language An event handler is a function that gets called when specific events occur This chapter assumes you are familiar with the macro lan guage rules and syntax Macro Event Handlers An event handler is a function written in Source Insight s macro language that gets
272. g up with draft view 166 Spacing the Space Width Character 158 Special Constants 301 Special Language Options 195 Specifying a Project to Open 103 Specifying File Arguments 101 Speeding Up auto completion 116 building and synchronizing projects 115 lookup references 116 program features 113 relation windows 115 searching files 116 syntax formatting 113 typing in browse dialog boxes 114 372 Source Insight User Manual Index T splash screen suppressing 104 SymbolContainerName function 335 Standard Record Structures 305 SymbolDeclaredType function 336 Standard Toolbar 23 SymbolLeafName function 336 Start Recording 270 SymbolParent function 336 StartMsg function 315 SymbolRootContainer function 336 Statements 294 symbols Stop Recording 270 dotted path 54 String Functions 311 Symbols and Projects 54 strlen function 311 Symbols Toolbar 24 strmid function 311 SymbolStructureType function 336 strtrunc function 312 SymListCount function 330 Style Properties 270 SymListFree function 330 Style Properties Dialog Box 271 SymListInsert function 330 Styles SymListItem function 330 and syntax formatting 74 SymListNew function 330 applied to source code 77 SymListRemove function 330 changing properties 82 Sync File Windows 277 comment headings 282 Synchronize Files 277 for declarations 78 Synchronizing Files in Batch Mode 104 for draft view 166 Synchronizing Project Files 55 for inactive code 79 SyncProj function 341 for langua
273. ge elements 281 SyncProjEx function 341 for references 78 Syntax Decorations 81 278 how they work 75 end brace annotations 82 mapped from language keywords 77 scaled nested parentheses 81 parent styles 76 Syntax Decorations Command 83 single and multi line comment styles 80 Syntax Formatting 280 styles basic options 280 comment headings 80 controlling 82 Styles for Custom Parsing Symbols 202 parent styles 76 Support contacts 14 speeding up 113 Suppressing New Program Instances 103 turning off 83 Suppressing the Splash Screen 104 Syntax Formatting and Styles 74 sVerb Values 321 Syntax Formatting Command 83 Switching Off Syntax Formatting Temporarily 83 SYSTIME Record 310 Syllable Indexing 68 Syllable Matching 70 T Syllable Matching controlling 70 Syllable Shortcuts 71 Tab Width 165 Symbol Class View 34 tabs Symbol Database expanding 165 updating when saving files 55 making visible 165 Symbol Functions 331 setting width 165 Symbol Indexes for Projects 69 Team Working in Environment 51 Symbol Info 273 Technical Support 14 Symbol List Functions 329 Template f Symbol List View 32 for configurations 119 Symbol Lookup Options 274 Temporary Project specified on command line 103 Symbol Memory Usage 111 The if Statement 302 Symbol Naming 54 The Undo History 287 Symbol Navigation Commands 72 The while statement 303 Symbol Record 309 331 Tile Horizontal 282 Symbol Reference Lookups 282 Tile One Window 283 Symbol Syllable defined 69 Tile Two
274. ght declare and use a global counter variable macro SomeFunction global last_count this initializes it the first time through if last_count nil last_count 0 Global variables live as long as the Source Insight session That is they can con tain information between invocations of macro or event functions They are lost when you exit Source Insight The global statement is executed when it is encountered and it must be in the execution path of your statements You should put the global statement inside of a function Global variables are useful for adding counters and other persistent state They cannot hold any kind of handle because all handles are destroyed when a macro finishes So for example this will not work global hbuf hbuf OpenBuf abc txt In the above example the hbuf variable will contain a bogus handle as soon as this macro finishes Variable Name Expansion Identifiers are expanded to their string value if the identifier is the name of a defined variable otherwise they are used literally They are also used literally if they are surrounded by double quotes For example S abc same as s abc if abc is not defined OF abc Hello S abc same as s Hello if Hello is not defined s abc s equals abc To avoid unintentionally using the name of variable as its value you should get into the habit of declaring your variables with the var statement E
275. ght projects the following data files are created for each project In this list Name is the name of a given project File Description Name pr The main project file which contains a list of the files in the project Name wk3 The project workspace file Name cf3 The project specific configuration file Name po Project options Name ps Symbol definitions database Name pri Symbol references index Name pfi Project file index Name imd Name imb Main symbol index Name iad Name iab Auxiliary symbol index for members and sylla bles Source Insight User Manual 119 Source Insight Concepts Chapter 4 120 Source Insight User Manual CHAPTER 5 Command Reference This chapter is an alphabetical listing of all the user level Source Insight com mands Each command is described in detail in this chapter For overviews on important concepts please refer to Chapter 4 Source Insight Concepts on page 45 Commands Overview Assign keys to a command with Options gt Key Assignments Assign commands to menus with Options gt Menu Assignments A command is a user level operation that Source Insight performs when you select a menu item or type a keystroke For example the Open command opens a file the Save command saves a file Each command has a name and an action Commands are resources that can be assigned to menus keystrokes and
276. global cf in version 2 x Select that file and click OK The old configuration file will be loaded and saved automatically to global cf3 the new name of the global configuration file Using Version 3 and Version 2 Together You can use both version 3 5 and version 2 x together on the same machine They each use separate registry settings and should not conflict However you should follow these guidelines e Ifyou currently have version 2 x installed on your machine you should install version 3 5 into a different directory than version 2 x e Dont run instances of version 2 x and version 3 5 at the same time e Creating separate projects for version 3 5 is recommended although the project files are somewhat upward and downward compatible e You can open a version 2 x project but you will have to click the Browse button in the Open Project dialog box to locate the old PR file yourself If you installed version 3 5 in a new directory recommended then ver sion 3 5 will have no foreknowledge of the old projects already created e You can open your old configuration file with the Options gt Load Con figuration command Point to your old 2 x directory and your old CF file Note that new configuration files have a CF3 file extension What s New in Version 3 A lot has changed in Source Insight since version 2 x Here is a summary of the largest changes 354 Source Insight User Manual Chapter 8 What s New in Version 3
277. gs cause a run time error when used in arithmetic expressions isupper ch Returns TRUE if the given character ch is uppercase If ch is a string with more than one character only the first character is tested strlen s Returns the length of the string strmid s ichFirst ichLim Returns the middle string of s in the range from ichFirst up to but not includ ing ichLim That is s ichFirst through s ichLim 1 If ichFirst equals ichLim then an empty string range is specified Source Insight User Manual 311 Macro Language Guide Chapter 6 strtrunc s cch Returns string s truncated to cch count of characters tolower s Returns the lowercase version of the given string toupper s Returns the uppercase version of the given string User Input and Output Functions User input and output functions allow you to get input from a user or display output in a message window Ask prompt_string Prompts the user with a message box window displaying the string prompt_string The Ask message box has an OK button and a Cancel button Clicking the Cancel button stops the macro AssignKeyToCmd key_value cmd_name Assigns the key_value to command named by cmd_name Subsequently when the user presses the key_value the command is invoked key_value is a numeric keyboard value that is returned by GetKey and Key FromChar You can use CharFromKey to convert a key_value into a character cmd_name is the
278. guage has basic options that govern how Source Insight treats files with this language Built in languages such as C C have fewer options in this page than do custom languages MyLanguage Properties 1 x Info Options Comments and Ranges Custom Parsing General IV Contains program source code Case sensitive text Uses C preprocessor Allow smart tab Syntax JV Use Syntax Formatting Non AlphaNum identifer chars Detect comment styles Numbers Jv Detect numbers Qennn Hex C amp Onnn Octal Basic amp Hnnnn Hex Basic nnnO Octal Intel nnnnh Hex Intel nnnQ Octal Intel Snnnn Hex Motorola Contains program source code If checked then Source Insight will consider this a programming language Certain features are altered when a program ming language is used as opposed to a simple textuallanguage For instance references to declared symbols are displayed in the Ref to styles Case sensitive text This indicates whether the language is case sensitive or not This affects how keywords are matched as well as how symbols names are resolved in the symbol lookup engine Uses C preprocessor If checked then Source Insight will recognize if and ftifdef preprocessor directives Allow smart tab If checked then the Smart Tab feature will be enabled when editing this type of language If not checked then Smart Tab will perform like a simple tab Use Syntax Formatting If c
279. h Source Insight will search those projects when resolving macro names Note Source Insight will not add macro functions to the user level command list unless they are saved in Source Insight macro files using a EM extension Running Inline Macro Statements The Run Macro command starts executing macro statements starting at the line the cursor is on This allows you to run open coded macro statements in any type of file This is very useful for testing and debugging macro code Running inline macro statements is also useful for running short utility macro scripts stored inside of a program comment Remember to use the Stop state ment at the end or the macro interpreter will attempt to run past the end of the comment For example this inline macro inside a C file comment searches for references to the identifier ucmMax and causes recompilation of all the files that refer to it Source Insight User Manual 293 Macro Language Guide Chapter 6 To use it the user places the cursor on the first line of the macro and invokes the Run Macro command define ucmMax120 Macro touch all ucmMax references to run place cursor on next line and invoke Run Macro hbuf NewBuf TouchRefs create output buffer if hbuf 0 stop SearchForRefs hbuf ucmMax TRUE SetCurrentBuf hbuf put search results in a window SetBufDirty hbuf FALSE don t bother asking to save Stop J Statements Macros
280. hapter 5 Search Options Matching exact references slows the reference finding process Lookup References file If the Project Window is visible then you can also use this list to specify the files selected in the Project Window Search Method You can pick the search method to use from this list There are four different searching methods available e Simple String e Regular Expression interprets the pattern as a regular expression e Keyword Expression similar to an Internet search query e Lookup Reference searches for symbol references Lines of Context This only applies if you selected the Keyword Expression search method This specifies how closely in number of lines the keywords must occur in order to qualify as a match See also Keyword Expressions on page 210 Find word variations If enabled Source Insight will also find different ending forms of the keywords you specified For example if you specified the keyword open Source Insight will also find opens or opened or opening This option is only available for the Keyword Expression search method Case Sensitive Specifies whether the search is case sensitive or not Whole Words Only For the Lookup References mode this option is always on If you choose a different search method this will restrict matches to only whole words Skip Inactive Code If enabled then only code that is active under conditional compilation is searched Yo
281. hat are printed with the Print command Page Setup 1 X Columns f Borders around page Title Strings Cancel Dover sF amp amp D amp T Include cover page Header amp F Header per column Help Footer Page amp P M Footer per column More JV Print Syntax Formatting IV Print in color Columns Specifies the number of columns to print per sheet of paper Each column will get its own page number For example if you have two columns then each sheet of paper will get two pages of source code printed on it This is more useful if you print in landscape mode where the paper is wider than tall Borders around page If checked then a single line border will be drawn around the text on the page More Click this button to open the standard system Page Setup dialog box This dialog box allows you to set paper size margins and orientation i e Por trait vs Landscape You can also change the current printer settings from this dialog box The items in this group affect the titles printed on the cover page the top of the page header and the bottom of the page footer Cover Header Footer These text boxes specify the formatting codes to be used for the cover page and the header and footer on each page See Header and Footer Codes on page 217 for details on the format of the strings Include cover page If checked then a single cover page will be printed before all other pages Typic
282. have a Sym bol Window attached at the left side of their source windows Show page breaks Source Insight will show light horizontal lines that represent the printed page breaks The pagination is computed based on syntax format ting and the printer font that is selected Source Insight User Manual 165 Command Reference Chapter 5 Auto Indenting The auto indenting feature controls the level of indentation as you type new text Source Insight supports Simple and Smart types of auto indentation Not all languages support the Smart level Auto Indenting x Auto Indent Type Smart Indent Options C None V Indent Open Brace C Simple IV Indent Close Brace Smart Auto Indent Type Specifies the type of auto indenting Automatic indenting occurs when you insert new lines e None No special indenting occurs Source Insight will return the inser tion point to the very beginning of the next line when you insert a new line or word wrap e Simple Source Insight will automatically indent text to line up with the previous or following line e Smart Source Insight will automatically increase or decrease the inden tation level when you insert new lines Not all languages support smart indenting Ifthis button is selected then the Smart Indent Options are applied Smart Indent Options These check boxes determine how the smart indenting affects open and closing curly braces Desired Inden
283. he current line number any number Sw first word in the selection or the any word word under the cursor s name of a temp file where the d tmp vt0004 current selection is saved while the custom command runs a the current date 05 12 02 t the current time 08 23 sl 9 user is prompted for arguments any strings You can also postfix any of the above characters marked with with either of the following modifier characters Character Expands to Example o for all open files f o sm for all modified files Sm ShellExecute Commands ShellExecute lets Custom Commands support the ShellExecute function which lets you tell the you invoke Windows shell to perform an operation on a specified file The nice thing M about ShellExecute is that you don t need to know what specific application is commands registered to handle a particular type of file For technical background infor Source Insight User Manual 149 Command Reference Chapter 5 mation see the ShellExecute function in the Windows Shell API documenta tion To use this feature the Run string in the custom command needs to start with ShellExecute The format should be ShellExecute lt verb gt lt filespec gt lt optional parameters gt For example to browse a website ShellExecute open http www somedomain com The verb is a single word which can be one of the following e edit Opens an editor for the file e explore The function explores
284. he open window handles cwnd WndListCount iwnd 0 while iwnd lt cwnd hwnd WndListItem iwnd do something with window hwnd iwnd iwnd 1 Window Functions Window functions allow manipulation of source file windows File buffers are displayed in source windows An hwnd is typically a small integer value An hwnd of hNil indicates an error Window functions The functions use window handle hwnd parameters These are macro level use special macro handles to open source file windows Note that a macro hwnd is similar in con level hwnd parame cept but is not exactly the same as a window handle HWND in the Microsoft ters Windows API Each source window has a selection in it which describes what characters are selected See GetWndSel hwnd on page 325 for more information An hwnd param In some functions a window handle hwnd can also represent a handle to a eter can also repre system level window such as the application window System level windows do sent a system level not contain a file buffer or a selection The GetApplicationWnd function window returns a handle to the Source Insight application window CloseWnd hwnd Closes the window hwnd Closing a window does not close the file buffer dis played in the window GetApplicationWnd Returns a window handle to the Source Insight application window Note This is not the same as a system level window handle It is a Source Insig
285. he parent Each formatting item has the following possible states e On The formatting property is added E g Bold On e Off The formatting property is removed E g Bold Off e ANumber This number applies to items like scaling or font point size E g scaling 120 e FontName This applies to the Font Name item e NoChange The style has no effect on the formatting property It inher its the properties of the parent style Source Insight User Manual 75 Source Insight Concepts Chapter 4 Parent Styles Styles are orga Styles have a Parent Style property Styles inherit their formatting properties nized into a hier from their parent style This allows you to create a hierarchy of styles For archy example the built in styles contain a hierarchy for Declarations a portion of which looks like this Declare Function Declare Struct Figure 4 10 An example of a style hierarchy Style formatting Formatting properties in a style are combined with the parent style Thus the properties combine Declare Struct style inherits the formatting properties of the Declaration style with the parent That lets you affect changes to all declaration styles by altering the single Decla style ration style The topmost parent style is the Default Text style Its formatting properties are determined by the document types font settings You can change the parent style of any style using the Style Properties com man
286. he project data files cre ated by Source Insight However you can select a source file in the Project Window and delete it Default file format This specifies the default text file format used when Source Insight saves new source files The formats differ by their end of line charac Source Insight User Manual 173 Command Reference Chapter 5 ters which are indicated by CR for Carriage Return and LF for Line Feed The formats are e Window CR LF Unix LF e Mac CR Note that when Source Insight opens an existing file and saves it it will preserve the original file s format You can save to a different format with the File gt Save As command Folder Options This command activates the Folders page of the Preferences dialog box It allows you to specify the location of various data folders used by Source Insight These options are saved as part of the current configuration Folder Options Dialog box Preferences x General Typing Files Languages Symbol Lookups Display Colors Syntax Formatting Syntax Decorations Searching Remote Folders Main User Data Folder CADocuments and Settings Ray Gram My Documents Source Insight m Settings Folder CADocuments and Settings Ray Gram My Documents Source Insight Settings m Projects Folder CNDocuments and Settings Ray Gram My Documents Source Insight Projects en Backup Folder CNDocuments and Settings Ray Gram WMy Documents Source InsightNBa
287. he symbol name text box Cascade Windows The Cascade Windows command rearranges the windows by cascading them down the screen Checkpoint Saves the current file to disk and erases its change history and undo history You can think of this as a clean save operation It has the same effect as saving the file closing it and opening it again After using Checkpoint you will not be able to undo any prior changes In versions of Source Insight earlier than version 3 0 this command was simply known as Save because earlier versions did not preserve undo and change his tory after saving a file Checkpoint All Performs the Checkpoint command on all open files This saves all open files to disk and erases their undo and change histories After using Checkpoint All you will not be able to undo any prior changes in your files Clear Highlights Removes all word highlighting in all source windows Highlighting is applied by using the Highlight Word command 134 Source Insight User Manual Chapter 5 Clip Properties Clip Properties On Clip Window tool bar and right click menu The Clip Properties command allows you to edit the name of the clip Clip Window Properties This command brings up the Clip Window Properties dialog box and allows you to set options for the Clip Window Clip Window Properties l x IV Preserve clips between sessions IV Prompt for new clip name when text is dropped Delete clip after clip i
288. hecked then Syntax Formatting will be used when displaying files in this language Source Insight User Manual 197 Command Reference Chapter 5 Detect comment styles If checked then special comment styles will be detected See also Comment Styles on page 79 Non AlphaNum identifier chars This text box contains the set of all valid non alpha numeric identifier characters Alpha numeric strings are always consid ered identifiers Detect numbers If checked then numbers found in the text are formatted with the Number style The check boxes following this enable special number for mats for hex and octal numbers Comments and Ranges The Comments and Ranges page is where you specify how comments and other multi line range elements are parsed A quoted string is an example of a non comment multi line range element MyLanguage Properties X info Options Comments and Ranges Custom Parsing j g Mutil Comment Multi Line line Comment Single Line Add Click this button to add a new range element The Range Definition dialog box will appear See also Range Definition on page 199 Delete Deletes the selected range element Edit Opens the Range Definition dialog box so that you can edit the range element s properties See also Range Definition on page 199 198 Source Insight User Manual Chapter 5 Language Properties Delete All Deletes all range elements Range Def
289. hecked then all occurrences of the Old pattern on each line are replaced Whole Words Only If checked then Source Insight only finds matches that are whole words If not checked then Source Insight will also find matches that are embedded in words Skip Inactive Code If enabled then only code that is active under conditional compilation is searched You must first specify known conditions in the Prefer ences Languages dialog box in order for Source Insight to know what condi tions are active or not Conditional compilation only applies to some languages Skip Comments If enabled then comments will not be searched 246 Source Insight User Manual Chapter 5 Restore File Search Only Comments If enabled then only comments will be searched This is mutually exclusive with the Skip Comments option The comment options slow the search down a little Preserve Old Case If checked then Source Insight will replace text but retain the upper and lower case of the original text If not checked then Source Insight will replace text using the case exactly as it appears in the New text box This option is most useful when Case Sensitive is off This feature lets you replace all occurrences of a word regardless of case and still maintain the original case For example let s say you want to replace all abc and ABC with xyz and XYZ respectively Add abc in the Old text box add xyz in the New text
290. how a new level the rela tionship represented by the expansion is based on the type of symbol being expanded That means each Relation Window has the potential to show multi ple relationships For example a class might show its contents which consists of member functions Each member function might show its references The Type of Relationship There is a relationship in the list for Variables that is named Type of The Type of relationship yields the type of the variable Then the relationship rule for Types is applied It is a kind of indirect relationship For example let s say you set the Variable relationship to Type of and the Type relationship to References Now when you select a variable of a particu lar structure or class type the Relation Window will decode the variable s type then apply the References relationship rule and show the references to the variable type Call Graph Filter The Call Graph Filtering dialog box allows you to control what symbols partici pate in the call tree calculation Call Graph Filter X M Exclusions OK Exclude Symbols Iv Exclude C Macros M Code Metric Filter Help IN one X Mininum value m 1 Maximum value Cancel e Exclusions This section controls what symbols are filtered out of the call tree Exclude Symbols Click this button bring up the Exclude Call Graph Symbols list You can add specifi
291. how to install Source Insight and run it for the first time After setting up Source Insight we will take a quick tour Installing Source Insight Installing Source Insight is very simple and straightforward For the most part Source Insight is self configuring Installing on Windows NT 2000 XP Make sure you have In order to install Source Insight on Windows NT based systems you will need system permissions to have system permissions to install software and to modify the to install software HKEY_LOCAL_MACHINE registry hive However once Source Insight is on your machine installed it can be run from almost any user account Source Insight keeps sep arate preferences settings for each user Upgrading from Version 2 If you are upgrading from version 2 0 or 2 1 then you should review the infor mation in Upgrading from Version 2 on page 353 Source Insight User Manual 15 Setup and Quick Start Chapter 2 Upgrading from Version 3 0 and 3 1 Version 3 5 introduced some important changes in the way that projects and folders are used in an installation If you are upgrading from a version 3 0 or 3 1 then you should review the information in Upgrading from Version 3 1 or Version 3 0 on page 351 Insert the CD ROM To install Source Insight insert the Source Insight CD ROM in your CD or DVD ROM drive The setup program will start automatically If you have the auto run feature disabled on your machine then you wi
292. howing the string s The message box has a Cancel button that the user can click to stop the macro StartMsg s Display a message window showing the string s The message box has a Cancel button that the user can click to stop the macro The message window stays up after returning Buffer List Functions A buffer list is a collection of file buffer handles There is only one buffer list in the Source Insight application It contains the file buffer handles for all open source files You can use the buffer list functions to enumerate through all file buffers BufListCount This function returns the number of buffers in the buffer list Use BufListItem to access the buffer handle at a particular index position Source Insight User Manual 315 Macro Language Guide Chapter 6 BufListltem index This function returns the buffer handle at the given index The size of the buffer list is returned by BufListCount Index values start at zero and continue up to one less than the value returned by BufListCount This example enumerates all the open buffer handles cbuf BufListCount ibuf 0 while ibuf lt cbuf hbuf BufListItem ibuf do something with buffer hbuf ibuf ibuf 1 File Buffer Functions File buffer functions are used to create and manipulate file buffers and the text within them A file buffer is the loaded image of a text file File buffers are edited by the user and then saved back to disk wi
293. ht macro level handle value The returned handle can be passed to functions that do not assume a file buffer or selection such as GetWndDim and IsWndMax GetCurrentWnd Returns the handle of the active front most source file window or returns hNil if no windows are open Source Insight User Manual 323 Macro Language Guide Chapter 6 GetNextWnd hwnd Returns the next window handle in the window Z order after hwnd This is usually the previous window that was active GetNextWnd returns hNil if there are no other windows For example if hwnd is the top most window then GetNextWnd hwnd will return the next window down Note that if you are using SetCurrentWnd to set the front most active window subsequent calls to GetNextWnd are affected GetWndBuf hwnd Returns the handle of the file buffer displayed in the window hwnd GetWndClientRect hwnd Returns a Rect record which contains the client rectangle of the given window The coordinates are given in the window s local coordinate system The client rectangle does not include the window s frame or other non client areas See also Rect Record on page 308 GetWndDim hwnd Returns a DIM record which describes the pixel dimension of the given win dow hwnd See also DIM Record on page 306 The horizontal dimension returned is the width of the text area of the window only It does not include the left margin or the symbol window attached to the sourc
294. ht performs when you select a menu item or type a keystroke For example the Open command opens a file the Save command saves a file Each command has a name and an action Commands are resources that can be assigned to menus keystrokes and mouse clicks and those assignments are part of a configuration 104 Source Insight User Manual Chapter 4 Assign keys to a command with Options gt Key Assignments Assign commands to menus with Options gt Menu Assignments Custom Commands Keystrokes and mouse clicks are assigned to commands For example the Ctrl O keystroke is assigned to the Open command More than one keystroke may be assigned to a given command Use the Key Assignments command to customize the keyboard Commands are assigned to menus For example the Open command is assigned to the File menu Use the Menu Assignments command to customize the contents of the menus Source Insight also allows you to define custom commands which are useful for launching the compiler and other external tools from Source Insight Custom Commands Custom Commands are shell command that launch from inside Source Insight In addition to the standard commands that are built into Source Insight you can define custom commands Custom commands are similar to shell batch files They execute external command line programs and Windows GUI pro grams Source Insight allows custom commands to execute in the background The out
295. ht will momentarily highlight up to the matching parentheses or brace when you type a closing parentheses or brace This is useful for seeing that you are matching up your braces and parentheses while typing new source code Always use Symbol Windows Source Insight will automatically attach a symbol window to each new window it opens if the file is setup to be parsed for sym bols in the Document Options dialog box Each document type can also con trol whether it uses a symbol window Keep cursor in window when paging up and down If enabled then the inser tion point cursor will stay visible in the window as you page up and down If 284 Source Insight User Manual Chapter 5 Auto Completion Typing Options disabled then the insertion point will remain at its position in the text regard less of how you scroll Use block cursor shape If checked then the insertion point cursor will be block shaped instead of an I beam Use Smart Tab for field selections Causes the regular Tab key to invoke the Smart Tab command See Smart Tab Typing tab indents line regardless of selection If checked then typing a tab will indent the whole line Also the Back Tab command reverses the indent If not checked then typing a tab inserts a tab stop Typing tab replaces current selection If checked then inserting a tab will replace any selected text For example if you select a word then type a tab the tab replaces the word If not checke
296. idth of text can vary from window to window Syntax formatting also affects the width of text This function can be used along with ScrollWndHoriz to scroll a window to show a particular character Examples To find the width of the whole line at line 100 dim GetWndLineWidth hwnd 100 1 Msg Line 100 is dim cxp pixels wide To find the width of the first 3 characters on line 200 Dim GetWndLineWidth hwnd 200 3 GetWndParent hwnd Returns the handle to the window s parent window Returns hNil if there is no parent GetWndRect hwnd Returns a Rect record which contains the screen rectangle coordinates of the given window The rectangle includes the window frame and non client areas See also Rect Record on page 308 GetWndSel hwnd Returns the selection state of the window specified by hwnd The selection state is returned in a Selection record See also Selection Record on page 309 GetWndSellchFirst hwnd Returns the index of the first character in the selection in the window hwnd Source Insight User Manual 325 Macro Language Guide Chapter 6 GetWndSellchLim hwnd Returns the index of one past the last character in the selection in the window hwnd GetWndSelLnFirst hwnd Returns the first line number of the selection in the window hwnd GetWndSelLnLast hwnd Returns the last line number of the selection in the window hwnd GetWndVertScroll hwnd Returns th
297. ight 122 Activate Menu Commands 122 Activate Global Symbol List ecce eee e eene eese enata tease natas setas eoi Saso oea 122 Activate Relation WindOW eee ee ee eee eee eee eee eere eese ee eee eene e eene esee ee eene seen ee 122 Activate Search Results useeeieecees suus eoa raa a aa ea stes a a epi See aon rre serons e Pena soise eere Iea a eae oa 123 Activate Symbol WindOw cese eee esee eee ee eese enean tosto setas ease tas SS re Sia 123 Add and Remove Project Files 123 Add File Add File List 127 Advanced OPTiON 127 BAGCKTODsisestassasseassansdesvansenscensonssanssnscencstavancevacenscbasadsssaseassaasdessanssascenssucesacstacenscoss 127 BACKSD ACC ssesecsssssecsnsseansosiveseestaasssssonasescasosaciscnsensssonasescstonassscacsnassosesedecsenasecsasenees 127 BeGinNning Of d BTo T MUR 127 Beginning of Selection Blank Line Down Blank Line Up 128 Block Down 128 Block Up 128 BOOKIMGIK IR ETERNI 128 BOLLOM OF File cU CR 129 Bottom of Window 129 Browse Files 129 Browse Project Symbols 129 Browse Global Symbols Dialog box 130 Browse Local File Symbols 132 Cascade WINOWS RR R 134 CHECKPOINExc cctessensescstncescncanccdbevescisetasessoanssobenndscsinsdeseionboodssntensscboedmscd canssesesascacse 13
298. ight supports Windows 2000 XP features such as semi transparent windows for floating tool windows and Terminal Server sessions Outstanding Windows User Interface Source Insight is a full 32 Bit implementation and supports Multiple Instances Long and UNC File Name Right Click Shortcut Menus and Toolbars Source Insight uses right mouse button shortcut menus in many of its windows to provide easy access to commands and object properties Many useful windows can be either floating or docked to the main application window for flexibility Full Featured Editor Of course Source Insight offers great editing features such as multi level Undo amp Redo per file smart indenting syntax coloring parentheses and brace matching renumbering keystroke and command recording and special selec tion modes for selecting blocks functions paragraphs and whole words The mouse is fully supported Multiple windows can be open on the same file Workspaces are used to restore files and windows from previous sessions Drag and Drop Editing Source Insight supports drag and drop editing of text between source files and between clips in the Clip Window Whole symbols can be dragged and Source Insight User Manual 13 Introduction Chapter 1 dropped from the Symbol Window which makes rearranging functions and things very easy You can also drop files on Source Insight s Project Window to add a file to a project or onto the Clip Window to l
299. ile inside this event handler 350 Source Insight User Manual curren Appendix Upgrading From Older Versions This appendix is intended for those who are upgrading from earlier version of Source Insight including versions 2 0 2 1 3 0 and 3 1 Upgrading from Version 3 1 or Version 3 0 If you are upgrading from version 3 0 or version 3 1 this section applies to you Please read this section if you are not yet familiar with Source Insight version 3 5 Version 3 5 contains some important changes Source Insight User Manual 351 Appendix Upgrading From Older Versions Chapter 8 Per user data are stored in My Docu ments Source Insight Per User Data Folder The per user data location has changed with version 3 5 Per user data are now stored inside the Source Insight subfolder of the My Documents folder Within the Source Insight folder there are separate folders Projects Folder The default location for project data files By default each project you create will be contained in a separate subfolder of the Projects folder e Settings Folder Contains your configuration settings files Your old configuration file will be copied here e Backup Folder Contains the backup source files created when you save a file e Projects NetFramework Folder If installed this contains the NetFrame work project This project contains symbols for the Net Framework class library used by Source Insight e Projects Base Fol
300. ilerplate have many clips A clip is like any other file You can edit it the same as any text other file The difference is that clips are automatically saved between sessions and clips can be pasted easily with the Paste From Clip command Clips are useful for rearranging code especially between many files Clips are also useful for boilerplate text that you often want to insert You can toggle the Clip Window on and off by running the Clip Window com mand or by running the Activate Clip Window command which makes it visi ble and then sets the focus on the Clip Window text box Creating a New Clip To create a new clip run the New Clip command located on the File menu and on the Clip Window toolbar A new source file window will open You can type and edit this file like any other When you close it the clip will be retained in the Clip Window until you delete it To create a new clip You can also create a clip anytime by using the Copy to Clip command or by dickand drag text dragging and dropping text onto the Clip window You can also drag a file from onto the Clip Explorer onto the Clip Window to open a file as a clip Window 42 Source Insight User Manual Chapter 3 Search Results Window Clip Storage Clips are automatically saved to the Clips subdirectory of your Source Insight program directory Any text file that you place in that Clips subdirectory will be automatically loaded when Source Insight starts up
301. ill be ignored when the file is parsed for symbol definitions Include delimiters in style The Begin and End delimiters are also formatted with the selected style If this is unchecked then the delimiters are formatted in the Delimiter style The columns group allows you to control if the range element should be sensi tive to where on the line it occurs Only valid in the following columns If enabled then the range is only recog nized if its Begin delimiter occurs in the range starting at the First column and up to and including the Last column If this check box is unchecked then the column is ignored 200 Source Insight User Manual Chapter 5 Language Properties Custom Parsing The Custom Parsing page is where you can type a set of regular expressions to perform simple parsing operations on the language source files MyLanguage Properties x Info Options Comments and Ranges Custom Parsing JV Use regular expressions for parsing Expressions Pattem E Function proc M A Za z A Za z0 3 Delete A Za 20 9 Edit Delete All i Use regular expressions for parsing This enables the custom parsing expres sions Uncheck this to disable the use of custom parsing Expressions This lists each parsing expression and the type of symbol it yields When Source Insight parses a file all the expressions are applied to the whole file Add Click this button to
302. impor tant most of the time and it is not used to match the file with what you type You can type just the leaf name ofa file without knowing what directory it is in Most files in your project can be open with just a few keystrokes Project Window Views The Project Window has five different views e File List View lists all files in the project e File Directory View lists files by directory e File Type View lists files by document type e Symbol List View lists all symbols in the project e Symbol Class View lists symbols by class and type You can switch between these views by clicking the associated toolbar button at the bottom of the Project Window File List View File List View shows all files in the current project in a flattened list You can also type wildcards and change working directories directly by typing into the text box Sinew Project gt lolx zl File Name decreasing metrics Size Modified Decision Count lt Ctw c 41042 3 20 99 141 Insert c 36951 3 23 99 141 m Clip c 37776 3 12 99 136 Fsel c toolbox 41768 3 8 99 133 Token c 39791 1 18 99 133 Cmdedit c 27197 2 23 99 130 Graph c toolbox 28191 2 21 99 125 Tw c 20818 2 26 99 112 TreeMap c toolbox 32940 10 16 98 111 Sricont c 25223 2 26 99 110 Graphfmt c toolbox 46160 2 26 99 109 Swscroll c 34501 10 27 98 108 Figure 3 7 Project Window File List view Using syllable matching you can type part of a file name to l
303. in the Project Settings dialog box Source Insight User Manual 105 Source Insight Concepts Chapter 4 Project Settings are saved in the project not the configura tion file Preferences The Preferences command allows you to set a variety of user options such as file handling display options and language support Document Options The Document Options command allows you to define and change document types Document types are file types that let you govern Source Insight s behavior depending on the name or extension of each file Key Assignments The Key Assignments command allows you to remap the keyboard in Source Insight Each command in Source Insight is listed in this dialog box and each command can be given a keystroke or mouse button short cut Menu Assignments The Menu Assignments command allows you to customize the Source Insight menu bar Each command in Source Insight is listed in this dialog box and each command can be put on any menu Loading and Saving Configurations You can save a configuration by using the Save Configuration command You can load a new set of configuration options by using the Load Configuration command When you load a configuration it replaces the current configura tion stored on disk as well You can also save individual parts such as just the key assignments with the Save Configuration command Project Settings The Project Settings command allows you to set special options for
304. indMember j OR f amp ddSel changes pfto3fAddSe _fmts fAdaSelCur j or handling nesting delimiters src pftooste stcParen Line2171 Col27 FormatLine INS Figure 1 4 Syntax Formatting makes your code come to life This example demonstrates Source Insight s unique comment heading styles scaled nested parentheses and a variety of symbol reference styles The yellow marks in the left margin indicate lines that have been edited Syntax Formatting adds valuable information while you read your code For example references to local variables can look different from references to glo bal variables Or references to functions can look different from references to Source Insight User Manual Chapter 1 Feature Highlights C function like macros With Syntax Formatting it becomes instantly obvious what an identifier refers to or if it is misspelled Style Properties x I PRET PEACE EDO n I n AE D ASP IEE PE HE Comment Single Line Declare Function ota E cT Comment To Do Vv v v Vv lv d v SII Figure 1 5 The Style Properties dialog box allows users to edit many formatting options The Preferences dialog box allows users to control what language elements should have styles applied to them Context Sensitive Smart Rename Source Insight s indexes allow you to effortlessly rename variables functions and other identifiers in one simple step Source Insight s context sensitiv
305. ined by myclass SymbolParent symbol Returns a Symbol record of the parent of the given symbol The parent ofa symbol is the symbol that contains it symbol contains a Symbol record See also Symbol Record on page 309 SymbolRootContainer symbol Returns the root or left most component of the symbol s name symbol contains a Symbol record See also Symbol Record on page 309 Every symbol name is divided into path components which are separated by dot characters For example a symbol name might be myclass member1 In this example member1 is contained by myclass SymbolStructureType symbol Returns a Symbol record of the structural type of the given symbol The struc tural type is the struct or class type of the symbol which may be indirectly ref erenced through typedefs symbol contains a Symbol record See also Symbol Record on page 309 Searching Functions These functions search for references to words and patterns GetSourceLink hbufSource InSource Returns the destination of a source link in a Link record The source buffer is hbufSource and the source line number is InSource If the given line does not contain a source link then an empty string is returned See also Link Record on page 307 336 Source Insight User Manual Chapter 6 Searching Functions The destination link points to a location in some file at some line number This source link informati
306. ing a file buffer when editing a file however through out this documentation when references are made to an open file it actually means a file buffer Source Insight maintains a close connection between an open file and its original base file Therefore you can think of the Open com mand as a command that opens the original file so that you can edit it rather than a command that copies the original file into an abstract buffer that exists independently of any files You can think of the Save command as synchroniz ing the original version with the edited version Source Insight is used to edit ASCII text files Source Insight was not designed to edit non ASCII files There is nothing to stop Source Insight from opening such a file however In the event that a file you open contains non ASCII char acters Source Insight will not allow you to save the file without first asking if you are sure you want to You usually do not want to do so since Source Insight treats CR LF sequences as end of line markers and will always make sure a saved file contains a CR LF sequence at the end 98 Source Insight User Manual Chapter 4 A file s time stamp and size are used as its signature Recovering From Crashes You can also open virtually any type of file by dragging a file and dropping it onto the Source Insight application window This includes project files PR configuration files CF3 workspace files WK3 and clip files
307. ing constants Select this to have the Context Window look up sym bols when the cursor is inside of quoted string constants Inside all file types Select this to have the Context Window look up symbols when the cursor is inside any type of file not just source code files The Copy command copies the contents of the current selection to the clip board Once in the clipboard it can be pasted to other locations using the Paste command This command is only allowed if the current selection is extended 142 Source Insight User Manual Chapter 5 Copy Line Copy Line The Copy Line command extends the current selection to include whole lines and copies that selection to the clipboard Each use of Copy Line extends the selection down one more line Copy Line Right The Copy Line Right command copies the text from the insertion point to the end of the current line into the clipboard Copy List This command appears on the right click menu when you click on a list It cop ies the contents of the list to the Clipboard This lets you make a copy of any list or paste any list into a file and print it Copy List Items x Copy all items Copy selected item s Copy Symbol This command appears on the Symbol Window right click menu The Copy Symbol command copies the selected symbol along with its defini tion body to the Clipboard For example if you click on a function name and select Copy Symbol then the whole function i
308. ing that 23 occurrences where found The Search Results window is actually just another file buffer that you can edit You may freely delete lines from the window to trim down the results 44 Source Insight User Manual cw SOUrce Insight Concepts Projects A project is a collec tion of source files This chapter is a guide to Source Insight s concepts and features You will get more out of Source Insight if you take a little time to scan this chapter As you read this chapter you will become familiar with Source Insight s fea tures Later as you explore Source Insights commands you can refer to the Command Reference chapter for information on specific commands Source Insight is built around projects A project is a collection of source files Source Insight records what files are in the project by keeping a simple file data base for the project As you create new files they can be added to your project when you save them If new files appear in your source directory or subdirectories they can also be added automatically to your project by running the Synchronize Files com mand or by letting Source Insight synchronize automatically in the back ground Source Insight User Manual 45 Source Insight Concepts Chapter 4 Projects contain a symbol database The current project is the single project that is open in an instance of Source Insight When a project is open some of Source Insight s operations cha
309. inition The Range Definition dialog box appears when you add a new range element or edit a range element in the Language Properties Comments and Ranges dia log box It controls all the properties of a range A range definition specifies how comments and other multi line range elements are parsed A quoted string is an example of a non comment multi line range element Range Definition x Type of range Ex rene oem Syntax Formatting Style Comment Single Line X Help Range begins with Allow nesting Range ends with I Skip symbol parsing zem IV Include delimiters in style Escape sequence Columns T Only valid in the following columns First column Last column 77 Type of range Select the type of range element from this list There are two types of range elements e Line The range starts with a delimiter and extends to the end of the line It cannot span more than a single line e Multiline The range starts with a delimiter and ends with another delimiter The range can span more than single line but it can also be contained within a single line The starting and ending delimiter can be the same such as a quote The list also contains presets for single and double quoted string ranges and some comment styles When you select one of the presets the parameters for the preset are loaded into the other text boxes in the dialog box Syntax Formatting Style This specifies the syntax formatting
310. ioioinin zi ap ge amp gs sid Figure 3 16 Two views of the same relation data Outline view and Graph view aaora Relationship Types The Relation The relationships fall into three general categories listed from computationally Window can show the fastest to slowest different relation ships e Contains show the contents of the current symbol For example the members of a struct e Calls show what other symbols are referred to by the current symbol For example functions that are called by the current function e References show what other symbols refer to the current symbol For example functions that call the current function Relation Window Performance The Relation Window requires some processing Some relationships are slower to compute For very large projects the References relationship will be the slowest to compute 40 Source Insight User Manual Chapter 3 The Relation Window uses rules to decide what information it shows You can use more than one Relation Window to show different relations at the same time Relation Window Relationship Rules The relationship shown depends on the type of symbol You can specify what relationship is shown for different symbol types in the Relation Window Prop erties dialog box For example you could set the relationship viewed for func tions to Calls and the relationship viewed for classes to Inheritance
311. ion file will be changed automatically Tip It is also a good idea to make a backup copy if you update your Source Insight software Often newer builds of Source Insight will be compatible with older configuration files but not the other way around If you should wish to revert to an older build of the software it is best to use an older configuration file Loading a Configuration Use the Load Configuration command and select a new configuration file to be loaded This command allows loading either the entire configuration contents or only a specified subset of the configuration such as just the menu contents When you open a project that has its own configuration file then the project s configuration is loaded also Saving a Configuration You can use the Save Configuration command to save the contents of the cur rent configuration to any other configuration file By saving configuration files you can create several customized versions of Source Insight with each one having different menus keystroke assignments screen colors and more The Save Configuration command also allows you to save a specified subset of the current configuration Source Insight automatically saves any option changes you make so you nor mally would not need to use the Save Configuration command 108 Source Insight User Manual Chapter 4 Saving and Restoring Workspaces Saving and Restoring Workspaces A workspace contains session
312. ions There are two condition variable sets One is project specific and is stored with your project The second set is global and applies to all projects If a condition appears in both lists the project specific value is used Edit Condition Dialog box Conditional Parsing xj Edit Condition Set Project Specific Edit Condition Set Selects which condition set you want to affect This is either the project specific or the global list Any changes you make to the condition s value are put into the list you select here Condition The name of the condition variable Value The value of the condition Typical values are 0 zero to indicate False or 1 to indicate True However you can give the variable any value If you leave the value empty then Source Insight will ignore conditional preprocessor directives that refer to this variable Set False Click this to set the Value field to 0 zero Set True Click this to set the Value field to 1 168 Source Insight User Manual Chapter 5 Warning Enable Event Handlers Ignore Click this to empty the Value field When the Value field is empty Source Insight assumes you don t want to specify the value of the condition variable If you don t specify a value then preprocessor statements like if are ignored if they refer to this variable This is the default case for any conditional variables encountered Edit List Click this to go to the Condition
313. ions inside Source Insight e Alter the way that Source Insight works e Perform post processing of files before saving them e Perform pre processing of new files 346 Source Insight User Manual Chapter 7 Adding Event Handlers to Source Insight Adding Event Handlers to Source Insight Add event handler files to your project Be sure to enable event handlers in Preferences Event handlers are stored in macro source files That is they have the em extension You can mix event and macro functions in the same file Once you write an event handler you should add it to the current project You can add it to the Base project if you want the events to be handled regardless of the project If Source Insight cannot find a given event handler it is ignored Source Insight searches in your project the project symbol path and the Base project Its important to remember that you must add the em file to a project or Source Insight will not invoke the event handlers in that file This is to prevent event handlers from accidentally running just by opening a em file with an event function in it Enabling Event Handlers You must enable event handlers before using them For security reasons they are disabled by default To enable event handlers select Options Preferences and click the General tab Then check the box that says Enable event han dlers Once you enable event handlers that option is saved so you dont have to
314. iple ranges Example 1 a zA Z matches any alphabetic character Example 2 a zA Z0 9 matches any non alphanumeric character Regular Expression Groups and Parts of a regular expression can be isolated by enclosing them with and thereby forming a group Groups are useful for extracting part of a match to be used in a replacement pattern Each group in a pattern is assigned a number starting with 1 from left to right Example abc xyz matches abcxyz xyz is considered group 1 This is not all that useful unless we are using the Replace command The replace string can contain group characters in the form of lt number gt Each time a group character is encountered in the replacement pattern it means substitute the group value from the matched pattern Example 1 replace abc V N xyz with 2 1 This replaces the matched string abcxyz with the contents of group 2 xyz followed by the contents of group 1 abc So abcxyz is replaced with xyzabc This is still not too amazing See the next example Example 2 replace w N N ing with 1 2ed This changes words ending in ing with the same word ending with ed Your English teacher would not be too happy Overriding Regular Expression Characters V backslash A backslash character preceding a meta character overrides its special mean ing The backslash is ignored from the string Example a b matches a b literally The character does n
315. irectory The current directory path is displayed above the file list Source Insight shows only files for known document types in the current direc tory The document types are specified with the Document Options command Show Dirs Click this button to toggle the file list contents between showing file names and showing only subdirectory names When the subdirectories are shown this button changes to Show Files Project Wide This check box controls whether the File list shows all the files in the project or just the files in the current working directory Include Subdirectories If this check box is checked then any selected directo ries are recursively searched This option and the Project Wide option are mutually exclusive To recursively search a set of directories 1 Uncheck the Project Wide check box 2 Check the Include Subdirectories check box 3 Select one or more directories in the file list You can also type a file wildcard specification in the File Name text box to limit the search to particular file extensions or names Case Sensitive If checked Source Insight will only find matches if the case matches exactly Use Regular Expressions If checked the Find pattern is assumed a regular expression See also Regular Expressions on page 85 Find Non Matching If checked Source Insight will find all lines where the pat tern did not match Whole Words Only If checked then Source Insight only finds match
316. is works like the Drag Line Down command only it moves the lines further Drag Line Up Moves selected text up by oneline This is useful for dragging a whole line or lines up above something else in a file Drag Line Up More Moves selected text up by severallines This works like the Drag Line Up com mand only it moves the lines further Duplicate The Duplicate command creates a duplicate of whatever is selected Duplicate Symbol On the Symbol Window right click menu The Duplicate Symbol command creates a duplicate of the selected symbol Edit Condition Use this command to edit the value ofa selected parsing condition variable This is used for languages that support conditional compilation such as C C and Window Resource files Conditional code is placed between direc tives such as ifdef Source Insight User Manual 167 Command Reference Chapter 5 Source Insight can parse those sections of code conditionally depending on the value of condition variables that you specify The Edit Condition command lets you edit the value of a condition variable or edit the list of condition variables To use this command right click on an identifier that is a condition variable in your code Then select Edit Condition You will be able to specify that vari able s value For example place the cursor inside of MACOBJECTS and select Edit Condi tion ifdef MACOBJECTS int jklm endif Project vs Global Condit
317. isk and erases its change history Checkpoint All Saves all open files to disk and erases their change history Clean Build Custom tool command Builds the whole project from scratch Clear Highlights Removes all word highlighting in all source windows Highlighting is applied by using the Highlight Word command Color Options Specifies colors of user interface items Compile File Custom tool command Compiles the current file Drag Line Down Moves selected text down by one line Drag Line Down More Moves selected text down by several lines Drag Line Up Moves selected text up by one line Drag Line Up More Moves selected text up by several lines Edit Condition Edits the value of the selected parsing condition Expand Special Used inside tree lists expands the selected item a specified number of tree levels General Options Specifies general preferences Go To Next Change and Go To Previous Change Moves the cursor to the next or previous block of lines were edited I e it moves to the next or last set of change marks Highlight Word Toggles highlighting of the word under the cursor in all source windows This is like using a highlighter pen on paper HTML Help Looks up the currently selected word in the HTML Help file Incremental Search Searches incrementally while you type a pattern string Incremental Search Backward Searches backward incrementally while y
318. ivate Window Bl I AddFloater E ChangePosition E CountVisibleDw Insert w Args E DefaultDwcr E DeleteCell E DeleteCelllnRank Insert Name E DelExact Window E DelAloater List E DelWindow E Destroy Window E DimAllRankCells Symbol Types dock Dock Close DockWin amp Dock Private E DrawCellHeader Help E DrawSplits E DrawWindowHeader x FLAG Winframe AddCell HWND hwndClient PDWCR pdwer 24 lines 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 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 sat isfy the search pattern Below the symbol list the currently selected symbol s type and file of origin are displayed The types of symbols shown in the list are controlled by the settings accessed with the Symbol Types button As you type Source Insight will select the symbol in the Symbol List that starts with what you are typing 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 You can specify a regular expression style search pattern to search for symbols by typing a
319. ke all your changes to the condi tion list first and then re parse your whole project Until your project is re parsed the symbol information stored in Source Insight s symbol database will not reflect the changes you made Preprocessor Token Macros Source Insight contains its own preprocessor which is used when parsing files The preprocessor macros are called Token Macros They are token substitu tions that occur as Source Insight parses a file They allow Source Insight to handle any special language keywords not known to Source Insight s parsers and to handle special C C preprocessor substitutions that would otherwise confuse it Source Insight does not expand C C preprocessor macros when it parses your files Because of this certain preprocessor macros and constants can fool Source Insight Therefore token macros are used to let Source Insight selec tively expand some preprocessor substitutions One case in point is the set of standard COM or ActiveX macros that are used to declare symbols For example the STDMETHOD methodname macro is used to declare a COM method function Source Insight ships with a default C C token macro file c tom that has entries for this macro and many others 62 Source Insight User Manual Chapter 4 Token macro files have a tom exten sion Save a token macro file to get Source Insight to recognize the macros C C Language Features Token Macro Files The token
320. l and use the shortcut menu to run this command This only works if the object under the cursor is a function name Refresh Relation Window command This command causes the Relation Window to update to reflect the currently selected symbol For example if the Relation Window is setup to show func tion references and you have the cursor on a function name then this com mand will make the Relation Window show all the references to the function This command is useful is you normally keeep the Relation Window locked to prevent automatic updates See also Relation Window on page 39 Browse Project Symbols command The Browse Project Symbols command opens a dialog box containing a list of all symbols in the project You can select a symbol from the list or you can type in a symbol name When the dialog box first appears the word under the cur sor is automatically loaded into the Symbol text box 72 Source Insight User Manual Chapter 4 The Project Window also lists all the symbols in your project and it is modeless You can view call trees and refer ences trees with the Relation Window The Context Window shows the definition of the selected symbol Analysis Features When you start typing into the Browse dialog boxes the list is automatically filtered down to match what you ve typed This makes it easy to get to a given symbol usually by typing only a few characters Project Window Symbol List The Pr
321. l functions and Symbol records are used as input to several functions The Symbol record has the following fields Field Symbol Description The full symbol name A symbol name is actually a path Every symbol name is divided into path components which are separated by dot characters For example a symbol name might be myclass member1 In this exam ple member1 is contained by myclass Type The symbol type e g Function Class etc Project The full path of the project where the symbol was found File The full path of the file where the symbol was found InFirst The first line number of the symbol declaration Source Insight User Manual 309 Macro Language Guide Chapter 6 Field Description InLim The limit line number of the symbol declaration InName The line number where the symbol s name appears in the declaration ichName The character index of the symbol s name in the declara tion at the line InName Instance The instance number path of the symbol within File For example the first occurrence of a symbol is instance 0 the second is instance 1 and so on SYSTIME Record The SYSTIME record describes the system time It is returned by the GetSys Time function Field Description time the time of day in string format date the day of week day month and year as a string Year current year
322. l symbols in the database This will cause local variables declared inside function bodies to be stored in the symbol database This will increase the database size but syntax formatting for those variables will appear right away when you open the files Quick browsing for member names If enabled you only need to type the struc ture and class member names in order to perform partial matches on their names However the symbol index size and memory usage can increase by a factor of two or more This option is recommended if you are using an object oriented language primarily so that you can find member functions and vari ables without having to type in the class name too Quick browsing for symbol syllables If enabled you only need to type one or two syllables of symbol names in order to perform partial matching on their names However the symbol index size and memory usage can increase by a factor of four or more By indexing syllables you can use syllable matching to quickly find symbols even if you don t know what letters the symbol names begin with This option is not recommended for external common projects that you intend to only refer to via the project symbol path In that case syllable indexing offers no benefit and just uses extra space This option is not recommended if your project is very large and you have a small amount of system RAM and or swap space on your disk Index Performance Syllable matching is such a usef
323. le The default extension has changed from CF to CF3 to make it easier to use v 2 x and v 3 5 together After you install v 3 5 you can use the Options gt Load Configuration com mand to find your old CF file normally it s called Glo bal CF and it is in the version 2 x program directory Display options stored in a v 2 x configuration file are not converted but other customizations like key assignments and menu assignments are converted Note that v 3 5 now saves the configuration changes auto matically whereas v 2 x used to prompt you when you exited Workspace Files WK Version 3 5 cannot read version 2 x workspace files Pre vious 2 x sessions will not be restored when you open them in v 3 5 Recovery Files RCV Version 3 5 cannot read version 2 x recovery files If you had a version 2 x session that crashed and you want to recover it you must use version 2 x to perform the recov ery first Source Insight User Manual 361 Appendix Upgrading From Older Versions Chapter 8 Version 2 x File How Version 3 5 Handles It Project List File The project list file name has changed to Projects DB3 to Projects DB avoid conflicts with version 2 x sihook program com The sihook exe program has changed and has been ponent renamed to sihook3 exe to avoid conflicts 362 Source Insight User Manual cw License Agreement SOURCE DYNAMICS SOURCE INSIGHT VERSION 3 x END USER LICENSE AGREEMENT
324. le Name E E Metacs H 0 Newinc 3 Acpp CQ Program Files E Ahpp Add All Recycler G Abc c c NENNEN 0000 H 0 Beta ECCE fekis Bmp 3 Beta c Bmpoldtb G Betah pee gg Bmpsm1 B Betaregemail bt am zs amp C3 Cd C Bmp E O CD er Yave Gres Eje Senh Project Files 542 c si toolbox Util h c si toolbox UtillL c c si toolbox Win cpp c si toolbox Win App c si toolbox Win31h c si toolbox Xml cpp c si toolbox Xmidoc cpp y cAsi toolbox Xmidoc hpp Remove Special c si toolbox XmlDocBase hpp c si toolbox XmlFile cpp Add from list c si toolbox XmlFile hpp c si Tosi bat c si To SiWZip bat Help c si Tozio bat E File Name Type the name ofthe file you want to add or remove in this text box The lists will be matched automatically with what you type You can type a wildcard and press Enter to filter the file list to show only those files that match the wildcard You can also type a full directory path or a drive letter followed by a colon to switch the current directory Directory List Contains a directory tree of the current drive If you select a directory name in this list box the File Name list will show what is in that direc tory The current working directory and wildcard filter if any is displayed above the list box File Name List Contains a list of all files in the currently selected directory If you selecta file from this list box the file name is
325. le is checked then the search continues from the current selection point either forward or backwards through the file Search Backward The Search Backward command searches backward in the current file for the pattern previously searched for The search pattern is initially added using the Search command dialog box The search begins at the current insertion point Search Backward for Selection This command searches for the previous occurrence of the first word in the current selection To use this command put the insertion point within the word you want to search for and invoke this command Source Insight will find the previous occurrence of that word Search Files The Search Files command searches through multiple files A new Search Results output window is created Each time Source Insight finds a matching line in a file it appends an entry to the Search Results Each line in the Search Source Insight User Manual 255 Command Reference Chapter 5 Results file can have source links that link the line with the location of the matching text in another file x Find File Name t pd s priog l Select All IV Project Wide csi Include Subdirectories Show Dirs Case Sensitive V Use Regular Expressions Close Find Non Matching J Whole Words Only Help Skip Inactive Code Skip Comments Search Only Comments M Search Results IV List File Names IV List Line Numbers
326. le printed at the bottom of the page You can customize headers and footers for printed pages with the Page Setup command You do this by using the following codes in the Header and Footer text boxes Table 5 4 Header and Footer Codes Code Result amp L Left align characters that follow This is the default amp C Center characters that follow amp R Right align characters that follow amp Move to the next line amp B Print the characters that follow in Bold amp I Print the characters that follow in Italic amp U Print the characters that follow in Underline style amp D Print the current Date amp T Print the current Time amp F Print the File name amp P Print the Page number amp N Print the total Number N of pages in the document For exam ple in a file 12 pages in length you would type Page amp P of amp N to have Page 1 of 12 Page 2 of 12 Page 3 of 12 etc printed on the pages amp amp Print a single ampersand amp as a literal character rather than as an instruction Source Insight User Manual 217 Command Reference Chapter 5 For example to print Confidential at the left margin center the page number and print current date at the right margin type amp LConfidential amp C amp P amp R amp D Page Up The Page Up command scrolls the active window up by one window full with one line of continuity Paren Left The Paren Left command moves the
327. le window GetBufName hbuf Returns the name of the file associated with a file buffer Hbuf is the file buffer handle GetBufProps hbuf Returns a Bufprop record which contains properties for the given buffer See also Bufprop Record on page 306 GetBufSelText hbuf Returns the selected characters in the file buffer hbuf as a string A maximum of one line of text is returned This is useful for getting the text of a word selec tion A macro error is generated if the given file buffer is not already displayed in a source file window GetCurrentBuf Returns a handle to the current buffer The current buffer is the file buffer that appears in the front most source file window Returns hNil if there is no cur rent buffer i e no open source file windows InsBufLine hbuf In s Inserts a new line of text s for line number In in the file buffer hbuf Source Insight User Manual 317 Macro Language Guide Chapter 6 IsBufDirty hbuf Returns True if the buffer is dirty A dirty buffer is one that has been edited since it was opened or saved A dirty buffer contains changes that have not been saved IsBufRW hbuf Return True if the given buffer is read write able This function returns False if the buffer is read only MakeBufClip hbuf fClip If fClip is True this turns the file buffer hbuf into a Clip buffer Following this the buffer will appear as a regular clip in the Clip Window If fClip is Fa
328. le with this relationship Document Type Language Type File Name word in source Figure 5 2 The style used for a word in source text is determined by the keyword list of the language of the document type of the file in question By having keywords assigned to formatting styles you are able to change the syntax formatting quickly by simply changing the style with the Style Properties command Then all language keywords associated with that style reflect the new style formatting Language Keywords Dialog box C Language Keywords X Select a keyword then select a display style for the keyword Keyword The keyword list for the language When you select a keyword from the list the keyword associated style is selected in the Style list Style The list of all syntax formatting styles When you select a style from this list you are changing the style associated with the keyword selected in the key word list You can also double click on a style name to edit the style Source Insight User Manual 191 Command Reference Chapter 5 Import Options OK Click OK to record your changes Cancel Aborts the command and ignores your changes Add Word Click this button to add a new word to the keyword list You can type any single word that does not include spaces Source Insight will add the word to the keyword list After adding the word make sure you select the style you want it to ha
329. les Source Insight quickly and un intrusively updates its information about your files even while you edit code Furthermore the sym bol features are built into each Source Insight project automatically You don t need to build any extra tag files Context Sensitive Dynamic Type Resolution Source Insight decodes the types of variables including class inheritance dynamically while you edit Source Insight s knowledge of classes gives you accurate information as soon as you need it Symbol Windows For Each File Symbol Windows appear on the side of each source window and are dynami cally updated to allow easy navigation within each file and to provide a quick overview of the file See also Symbol Windows on page 27 El Sinew Project Source Insight Beta Sw c Exe Edit Search Project Options View Window Help Work loenn girta oc jannu ise cO ok lee You can type into this field to quickly select items in the list Symbol Window lists all the symbols declared in the file Each symbol has an icon to identify its type You can click the icon to drag and drop whole symbols Source file window Symbol window toolbar au f2 Ef Sw c 1 m 2 Handle MEDITE in the SMW edit box UnAddCon 4 if hwndFrom hwndEdit DypLineBaseFont ae ifdef DEBUG switch nc 4 PewlFromv 1 D CbSwhHists case EN SETFOCUS TGVS tgvs TgvsOfTw htw PSW psw c Psve hsw B ToF
330. les that belong to known document types Therefore by adding a new document type you are expanding Source Insight s vocabulary of file types Editing the Document Options The easiest way to edit a file s document options or to see what document type it belongs to is to right click on the file window and select Document Options from the shortcut menu See also Document Options on page 161 Typing Symbol Names with Syllable Indexing Syllable matching finds partial matches on parts of symbol and file names Syllable indexing and matching is a feature that helps you find symbols even if you are not sure what the symbol s name is For APIs that maintain consistent naming conventions you can use syllable matching to find all symbols relevant to a particular topic By typing a meaningful partial name you will be able to narrow your search to related items For example by just typing Win you can see all Win related functions Syllable matching also works in most type in boxes that are associated with lists not just symbol lists 68 Source Insight User Manual Chapter 4 The symbol data base needs to be indexed to find syllables in symbol names A syllable is a series of two or more char acters that start with a capital letter Typing Symbol Names with Syllable Indexing Source Insight indexes not only the names of each symbol in the database but it can also index syllables within each
331. les work see Syntax Formatting and Styles on page 74 Formatting Properties Each style has a number of formatting properties Because styles exist in a hier archy each formatting property is combined with the parent style to yield a final result For example if bold ON then bold formatting is added If bold OFF then bold formatted is subtracted from the parent style properties 270 Source Insight User Manual Chapter 5 Style Properties Many formatting controls in this dialog box show one of these values e On the property is added to the parent style formatting e Off the property is deleted from the parent style formatting e A Number the value replaces the parent style property e equal the property has no effect and it inherits the exact same value as in the parent style Style Properties Dialog Box Style Properties x Style Name Parent Style Declare Function are CSS Selectc 4 Declaration X Done Declare Custom Tag Declare Edit Macro Font lare Enum Font Name Fx Size B m are Enum Const M zl Scale 50 Underline are IDL Library Declare IDL Module Bold lt AllCaps f Add Style Declare Interface Italic F zl Strike Thru F sl E Declare Local Declare Macro Declare Member Declare Method Declare Method Inlin f Colors Spaing Load Declare Method Prot Foreground Ej Above Line E D
332. lick this button to delete the command Run Click this button to define and execute the command Cancel Click this button to cancel the dialog box Any definitions made in the dialog box will be retained Menu Click this button to define the current command and jump to the Menu Assignments dialog Keys Click this button to define the current command and jump to the Key Assignments dialog Source Insight User Manual 147 Command Reference Chapter 5 The Run Field Format The Run text box contains the command line to execute when the custom com mand is invoked The Run text box can contain more than one command Each command should be separated by a semi colon For example cat make log echotime This string causes cat make log to execute followed by echotime Running the Command Shell If you want to run a shell command such as type or dir or you want to run a batch file then you have to run cmd exe first For example cmd c mybat bat or cmd c type foo txt Note Ifyou are using Windows 9x Me you should use command com instead of cmd exe If the Run string contains more than one command separated by semi colons you don t need to run cmd exe because Source Insight creates a batch file from the run string commands and runs command com automatically in that case For example cat readme txt dir This works fine because it is already running in a batch file inside a shell You may find
333. ll need to run Setup exe found in the root folder of the CD ROM Source Insight is normally distributed on CD ROM If you require it on a dif ferent media format please contact Source Dynamics at support sourcein sight com Choosing a Drive for the Installation The setup program will ask you for the name of a directory to install Source Insight in The setup program will propose C Program Files VSource Insight by default Note If you want to continue to use version 2 x on your machine you should install version 3 5 into a different directory than version 2 x Source Insight requires approximately 4 MB of hard disk space for a complete installation An additional 6 MB is needed for NET Framework symbols Note Do not install Source Insight on a remote network drive Source Insight s setup program will modify your registry on your own machine An installa tion on a network drive will not work correctly for anyone else 16 Source Insight User Manual Chapter 2 You can keep older versions of Source Insight installed For permanent use you will need to purchase a valid serial number Common Projects are external projects that contain commonly used declarations Installing Source Insight Using Version 3 and Version 2 Together You can use both version 3 5 and version 2 x together on the same machine They each use separate registry settings and should not conflict However you should follow thes
334. ll replace text using the case exactly as it appears in the New text box This option is most useful when Case Sensitive is off This feature lets you replace all occurrences of a word regardless of case and still maintain the original case For example let s say you want to replace all abc and ABC with xyz and XYZ respectively Add abc in the Old text box add xyz in the New text box Disable Case Sensitive and enable Preserve Old Case Confirm Replacements If checked Source Insight will confirm each replace ment by prompting you The Search group of options specifies the scope of the search Selection Searches only the currently selected text This check box is automat ically checked if the current selection is extended when the Replace command is invoked Whole File Searches the whole file from the first line to the last This check box is automatically checked if the current selection is an insertion point when the Replace command is invoked Nothing checked in this group means to start searching at the current selection and continue to the end of the file 244 Source Insight User Manual Chapter 5 Replace Files Replace Files The Replace Files command searches for a specified pattern in multiple files and replaces each occurrence with a new pattern Replace Files i xj Od iMac z New finterMac Select All File Name c NSMKEYCLAS Options Show Dirs IV Projec
335. lly modified files silently without any prompting unless you have also edited the file in Source Insight If you have already edited a file the reload operation is not per formed Assume Z ASCII 26 is End Of File If enabled then Source Insight will stop loading a file when it sees the EOF ASCII 26 character When it saves the file an EOF character will be appended to the end If disabled then Source Insight will continue to read past the EOF character Customize the Open Command This lets you pick the action performed by the Open command The Open command is normally assigned to Ctrl O and it has a toolbar button Open Command Options Ed The Open Command Activates Project File List view in Project Window Project Directory view in Project Window Cancel C Load File command dialog box C Standard Open dialog box Make backup files when saving If checked then Source Insight will move the previous version of a file on disk to the backup directory whenever it saves the file The backup directory is stored in a subdirectory named Backup in the Source Insight program directory If not checked then Source Insight will save files without preserving the previ ous version on disk Save All command will query on each file If checked Source Insight will ask you if you want to save each modified file when running the Save As command You will have an opportunity to save it not sav
336. loca tion for both folder locations To edit the project source directory location use the Project Settings com mand 352 Source Insight User Manual Chapter 8 Upgrading from Version 2 Custom Command Directory Expansion In custom commands the following meta characters expand for these directo ries e j the project source directory e J the project data directory Net Framework Support The Net Framework class library symbols are stored in the NetFramework project that Source Insight creates Source Insight stores the project in the Net Framework folder inside the user s Projects folder Source Insight also installs a set of source files that declare symbols for the Net Framework class libraries Those sources are stored in the NetFramework folder inside the Source Insight program folder There is one copy per machine These source files are machine generated files that have a C syntax How ever they are not strictly C compatible Their contents are subject to change with new versions of Source Insight To force Source Insight to create the NetFramework project use the Setup Com mon Projects command or use the Preferences Symbol Lookups dialog box and click the Create Common Projects button Upgrading from Version 2 If you are upgrading from version 2 0 or version 2 1 this section applies to you Installing Version 3 If you currently have version 2 x installed on your machine you should in
337. lse this turns the buffer into a regular non clip file buffer Clip buffers are automatically saved to the Clips subdirectory of the Source Insight program directory when Source Insight exits NewBuf name Creates a new empty file buffer and returns a handle to the file buffer an hbuf The name of the new buffer is specified by the name parameter NewBuf returns hNil if the buffer could not be created due to errors OpenBuf filename Opens a file named filename into a file buffer and returns a handle to the file buffer OpenBuf returns hNil if the file could not be opened OpenMiscFile filename Opens a file named filename The action taken depends on the type of files opened For example opening a file with a CF3 extension will load a new con figuration file Opening a project file PR extension will open that project OpenMiscFile returns TRUE if it was successful or FALSE if not PasteBufLine hbuf In Pastes the clipboad contents just before the line In in the file buffer hbuf PrintBuf hbuf fUseDialogBox Prints the given file buffer on the printer If fUseDialogBox is True then the Print dialog box appears first Otherwise the file prints with no user interac tion on the default printer PutBufLine hbuf In s Replaces the line oftext for line number In in the file buffer hbuf with the string in s 318 Source Insight User Manual Chapter 6 File Buffer Functions RenameBuf hbuf szNewName
338. lts ren SearchResults Remove Dir Show Dirs Close Help ai IV Project Wide IV Subdirs Also Browse File Name Contains the name of the file to be removed from the project You can also add a wildcard and press Enter to expand the wildcard into the file list File List Contains a list of all project files in the current working directory If you select a file from this list box the file name is loaded into the File Name text box Source Insight User Manual 239 Command Reference Chapter 5 Remove Click this button to remove the selected file from the project If the File Name text box contains wildcard characters the wildcards will be expanded and displayed in the File list box and the dialog box will not be closed Select All Click this button to select all the files contained in the file list Remove Dir Click this button to remove the selected directory contents from the project Show Dirs Click this button to toggle the list contents between showing file names and showing subdirectory names When the subdirectories are shown this button changes to Show Files Browse Click this button to bring up the standard Open dialog box which allows you to browse around your disks Add Click this to go to the Add Files dialog box Remove Project The Remove Project command allows you to remove an existing project When a project is removed all project data files created by Source
339. ly to the end of the line It does one of the following If the cursor is in the middle of a line move it to just after the last non white space character on the line If the cursor is after the last non white space character move it to the actual end of the line If the cursor is already at the end of the line move to the end of the file Smart Beginning of Line Moves the cursor generally to the beginning of the current line It does one of the following e Ifthe cursor is in the middle of a line move it to just before the first non white space character on the line e Ifthe cursor is before the first non white space character on the line move it to the actual start of the line e Ifthe cursor is already at the start of the line move to the start of the file Smart Rename Smart Rename will rename a symbol If the Smart Reference Matching option is enabled then Smart Rename will rename the symbol only in the correct scope contexts It can rename a symbol across all project files It can be used to rename function local variables class or struct member and functions 266 Source Insight User Manual Chapter 5 Smart Rename Smart Rename is Smart Rename is a specialized form of a global search amp replace Source Insight context sensitive uses its symbol database index to make it very fast xi Old Name o E New Name Caneel Help Output Search Results v Confirm Each Replacement Confirm
340. mLocation hbuf isym Returns the Symbol record of the symbol indexed by isym in the buffer hbuf Each parsed file buffer maintains an index of symbols defined in it The index is sorted by symbol name Symbol index values start at zero and go up to the count returned by GetBufSymCount minus one This function maps a symbol index isym into a symbol Symbol record See also Symbol Record on page 309 GetBufSymName hbuf isym Returns the name of the symbol indexed by isym in the buffer hbuf Each parsed file buffer maintains an index of symbols defined in it The index is sorted by symbol name Symbol index values start at zero and go up to the count returned by GetBufSymCount minus one This function maps a symbol index isym into a symbol name Source Insight User Manual 331 Macro Language Guide Chapter 6 This example iterates through all file buffer symbols isymMax GetBufSymCount hbuf isym 0 while isym lt isymMax symname GetBufSymName hbuf isym isym isym 1 GetCurSymbol Returns the name of the symbol where the current selection is The current selection is the selection or cursor position in the active window Get CurSymbol returns an empty string if no symbol is found GetSymbolLine symbol_name Returns the line number of the symbol named symbol_name If multiple sym bols are defined with the same name then the user will be able to select the appropriate one GetSymbolLocation
341. macros are listed in a file with a tom extension The global token macro file resides in the Source Insight program directory The project specific token macro file if any is stored in project s data directory The project token macro file is combined with the global file with the project macros taking pre cedence Token Macro Syntax A token macro file consists of token macros one per line The format of a token macro is macroname lt no text here means macro is a no op gt macronamesubstituted text here macroname parameter list substituted text with parameter names macroname parameter text parameter concatenates text comments begin with a semicolon Some examples of token macros MyStructure sname struct sname NoOperation BuildName namel name2 namel name2 Each built in language parser has a corresponding token macro file The name of the token macro file for each language is summarized below Table 4 2 Token Macro Files for Different Languages Language File Name C and C C tom a default copy ships with Source Insight HTML Html tom Java Java tom Resource Files Rc tom x86 Assembly Language X86 tom Perl Perl tom Editing Token Macros If you want to change the token macros simply open the token macro file make your changes and save the file Source Insight will recognize that the token macros have changed for the appropriate language Open files are auto matically re parsed
342. mand The places where the identifier is referenced will be touched and your make program or development system will recom pile those files the next time you build your program Keyword Expressions A keyword expression search is similar to an Internet search engine query Source Insight searches the project for occurrences of a set of keywords that appear within a specified number of lines The Lines of Context text box indi cates the maximum distance the keyword terms can be from each other to qual ify as a match For example if you typed cat food then Source Insight will search for occur rences of cat and food within X lines of each other There is an implicit logical AND operator between keywords That is if you type more than one keyword the both keywords must be present to qualify as a match You can include other Boolean operations as well The following table lists the operators available Table 5 3 Keyword Search Operators Operator Example Action AND or cat and dog Both terms must be present OR cat or dog Either term must be present NOT cat The term must not be present orc or Betty Case sensitive match regexp 2 TNT Term is a regular expression You can also group expressions using parentheses For example cat or kitty and food file or buffer and save or write and error Keyword Variations If you enabled the Find word variations option then Source In
343. many of the same symbol names Looking up a particular symbol in the current project will also show matches in the other projects on the symbol path If disabled then Source Insight will only search the symbol path if a symbol was not already found in either an open file or the current project Use Net Framework symbols with C If enabled then Source Insight accesses the Net Framework symbol information for symbol auto completion in C files This utilizes the special project named NetFramework If not enabled then the NetFramework project is not used Note You do not need to add the NetFramework project to the Project Symbol Path Source Insight automatically searches the NetFramework project when appropriate Project symbol path The project symbol path is a delimited list of projects that Source Insight will search through when looking up a symbol The project symbol path enables you to create smaller self contained projects but still have the ability to locate symbols in other projects Each item in this list should be a full path name of a project Project paths should be separated by a semi colon Remember to include the name of the project file in addition to the directory it is in Example c include include c windev include include The project symbol path is only used for locating the definitions of symbols external to the current project It is not used for finding references to symbols or for searching across mul
344. mbol index options enabled see Project Set tings on page 225 will use about 5 or 6 times as many index entries as there are symbol definitions Therefore for example if your project has about 100 000 symbol definitions then it will have about 500 000 index entries That will take about 16 x 500 000 8 000 000 bytes to hold the index Virtual Memory Capacity Source Insight uses memory in proportion to the size of your project If your projects are large Source Insight will require more memory The Win32 programming interface allows programs like Source Insight to use much more memory than is physically installed as RAM in your machine This feature is call virtual memory because the operating system uses the hard disk to emulate RAM through a process called paging Source Insight uses memory and hence virtual memory in two ways First is that Source Insight allocates heap and virtual memory which may come from the system paging file This is the smaller type of allocation used Even so you will need to make sure your system paging file is large enough to hold approxi mately 2 5 megabytes for every 100 000 symbols declared in your largest project Source Insight User Manual 111 Source Insight Concepts Chapter 4 Large project data base files are mapped into memory causing reported memory usage to appear high Windows 2000 XP is the recom mended operating system for Source Insight Be careful with the
345. n Insert Click to insert the selected command onto the selected menu The com mand is inserted just before the selected menu item You must select a com mand a menu and a menu item before clicking Insert Delete Click to delete the selected menu item You must select a menu item in Menu Contents before clicking Delete Up Moves the selected menu item up towards the top of the menu Down Moves the selected menu item down towards the bottom of the menu Run Click to record your menu assignment changes in the current configura tion and run the selected command Reset Click to reset the menus assignments to their default factory settings Source Insight will ask you if you are sure you want to do this Keys Click to record the new menu assignments in the current configuration and then switch to the Key Assignments command See also Key Assign ments on page 187 The New command creates a new unsaved file buffer The file is not created on disk until you save it using the Save or Save As commands The New command will prompt you for a file name By default the new file is given a name of the form New0001 ext The next time you use the New com mand the new file name will be New0002 ext and so on The extension used 212 Source Insight User Manual Chapter 5 New Clip will be the same as the current file The name and extension you type will determine what document options will be in effect for that file Wh
346. n Moving Through a File There are many commands to move you around in a file It s important to know that there are two types of movement selecting and scrolling Selecting is moving the current selection usually an insertion point around in the file Scrolling is when the file window is scrolled to reveal new parts of the file You can scroll a window up down left and right Scrolling does not always affect the location of the selection Selection commands can cause scrolling to occur if the place you are selecting is not visible in the window For example if the cursor is on the bottom line of a window and use the Cursor Down command the window is scrolled to reveal the line below 92 Source Insight User Manual Chapter 4 Scrolling and Selecting Text Scrolling Commands The scrolling commands scroll the active window They do not affect the cur rent selection They only affect the window Table 4 6 Scrolling Commands Command Key Description Scroll Line Up Alt Up Scrolls up by one line Scroll Line Down Alt Down Scrolls down by one line Page Up PgUp Scrolls up by a window full Page Down PgDn Scrolls down by a window full Scroll Half Page Up Ctrl PgUp Scrolls up by half a win dow Scroll Half Page Down Ctrl PgDn Scrolls down by half a win dow Scroll Left Alt Left Scrolls left by aprox 1 tab stop Scroll Right Alt Right Scrolls right by aprox 1 tab stop Selection Command
347. n any file on the network directly However keep in mind that you may be lock ing other people out of the file by having it open or otherwise causing conten tion over the file In addition you wont get the benefit of Source Insight s project features unless the remote file is added to your project One way to have a project that refers directly to files on the server is to create a project locally on your workstation and add the files from the remote server to your project using the Add and Remove Project Files command This way the Source Insight symbol database files are stored locally on your machine but the source files are still just on the server See also Add and Remove Project Files on page 123 Using the Project Settings command you should specify the remote source code directory on the server as the project source directory That way files will be displayed relative to the main source directory not relative to your local project data file directory See also Project Settings on page 225 52 Source Insight User Manual Chapter 4 There are standard custom commands for source control Working in a Team Environment Using Source Control In a typical networking environment each developer has his or her own local source files on their workstation machine When a developer wants to make a change to a file they first check it out using source control software After the file is checked out they edit a loc
348. n Source Insight If the file is already open then Source Insight will ask if you want to replace the file with the new text or append the new text to the file Save Workspace The Save Workspace command saves the current workspace to a workspace file that you specify The current workspace is automatically saved for you when you exit Source Insight and reloaded the next time you run Source Insight Working With Multiple Workspaces If you find that you work with sets of files rather than individual files you can save each set of files to a different workspace file When you want to change to another set of files use the Open command and specify the name of the work space file you want to open When the workspace file is opened it replaces the current workspace In other words all files are closed and the files in the new workspace are opened Scroll Half Page Down The Scroll Half Page Down command scrolls the active window down by half a window in distance Scroll Half Page Up The Scroll Half Page Up command scrolls the active window up by half a win dow in distance 252 Source Insight User Manual Chapter 5 Scroll Left Scroll Left The Scroll Left command scrolls the active window to the left by one tab size Scroll Line Down The Scroll Line Down command scrolls the current window down in the file by one line Scroll Line Up The Scroll Line Up command scrolls the current window up in the file by one line
349. n be useful for expanding a simple file name into its full path For example loc GetSymbolLocation simple c fullfilename loc file fullfilename could be something like d proj simple c GetSymbolLocationEx symbol_name output_buffer fMatchCase LocateFiles fLocateSymbols Finds all the declarations for the symbol specified in symbol name Each dec laration location is appended as a line to the given buffer output buffer as a Symbol record If fMatchCase then the symbol name case must match exactly If fLocateFiles then file names in the project or on the project symbol path are located File extensions don t have to be specified If fLocateSymbols then symbol definitions are located Both fLocateFiles and fLocateSymbols may be set to True See also Symbol Record on page 309 Since record variables can be expressed as a string a Symbol record can be writ ten as a line of text in a buffer To read a Symbol record from the output buffer use the GetBufLine function to return the entire line text in this case a Symbol record See GetSymbolLocation for a description of the Symbol record GetSymbolLocationEx returns the number of matching declarations or zero if none were found Unlike the GetSymbolLocation function this function will find multiple decla rations that match on symbol name You can use this function to enumerate through each location by scanning each line of the output buffer Source Insight U
350. n each command 22 Source Insight User Manual Chapter 3 Toolbars Standard Toolbar The Standard toolbar contains the basic file operations Save Save As Print Ognuna New Open Save All Edit Toolbar The Edit toolbar contains the basic editing operations like cut copy and paste Undo Redo Xo se A AAN Cut Copy Paste Search Toolbar The Search toolbar contains searching commands Search Search Backward Forward N da on g r Search Search Replace Files Navigation Toolbar The Navigation toolbar contains commands for moving around in and in between files Go Back Go Forward eg e 9m Go To Go To Previous Link Next Link Bookmark Go To Line Source Insight User Manual 23 Window Tour Chapter 3 Symbols Toolbar The Symbols toolbar contains commands for accessing symbolic information Lookup Symbol Info References al Howe Jump To Browse Project Definition Symbols Window Toolbar The Window toolbar contains commands for arranging windows Tile One Cascade Window Windows Bag Tile Tile Two Horizontal Windows Help Toolbar The Help toolbar contains commands for accessing on line help Laky HTML Help Mode Help View Toolbar The View toolbar contains commands for showing and hiding the auxiliary windows like the Context Window and Project Window View View Context Clips Window Window DE elas ae View View Activa
351. n it The group describes what part of the matching pattern is assumed the symbol tag The symbol parsed by using this pattern is given the type indicated by the Custom Tag Type If the Custom Tag Type is set to No Custom Parser then this text box is ignored Using a custom pattern that allows you to parse some symbols out of files for which Source Insight has no built in knowledge For example the following string parses sections out of INI files like WIN INI NIV LN N You can define a new document type named INI File that uses this custom parsing pattern Now when you open a file like WIN INI you can jump to any of the section names or see them all in the symbol window This group controls the appearance of the status bar at the bottom of the pro gram window 164 Source Insight User Manual Chapter 5 Editing Options Group Document Options Line Col Symbol The status bar shows the line number the column number and the name of the symbol that the insertion point is in Line Col Char Byte The status bar shows the line number the column position on the line the character position on the line and the byte position in the file This group of items controls how the document type is edited All files of the selected document type will have the following editing options in effect Word Wrap If checked then Source Insight will automatically wrap words onto the next line when the insertion point moves pa
352. n keep handy for drop ping into their source files when needed Clips are automatically saved and maintained across sessions Clips also remember what function or symbol they came from See also Clip Window on page 42 Two Stage Line Revision Marks and Selective Line Restoration Source Insight displays line revision marks in the margin next to lines that have been changed or where lines have been deleted This makes it easy to see where you have made changes in your files Not only can you see where you made changes but also you can restore them to their original text with the Restore Line command The Restore Line command is undoable This gives you powerful out of order undo capabilities 10 Source Insight User Manual Chapter 1 Feature Highlights The undo and change history for each file is preserved after you save the file The line revision marks also change color when a file is saved After saving a file you can still see what lines were edited and restore them or perform undo operations Extensible Document Types and Languages You can teach Source Insight about new file types by defining Document Types This allows different editing display and language parsing options for different types of files See also Document Types on page 66 Source Insight User Manual 11 Introduction Chapter 1 You can also add your own custom languages to Source Insight A custom lan guage specifies syntax rules synt
353. n windows scroll one whole line at a time You might want to turn this off if you do not have an accelerated video card and scrolling operations are slow with your video card Show line revision marks in left margin If checked then Source Insight displays a highlight in the left margin selection bar area next to each line that has been edited or where lines have been deleted since the file was saved or opened This makes it easy to see what lines you have edited The Go To Next Change and Go To Previous Change commands ALT Keypad and ALT Keypad will jump forward and backward through the changes in the current file Show bookmarks in left margin If checked then Source Insight displays a bookmark icon in the left margin selection bar area next to each line that has a mark added with the Bookmarks command Show exact case of file names If checked then Source Insight displays file names using the exact upper and lower case of the name as it appears in the file 156 Source Insight User Manual Chapter 5 Display Options system If not checked then Source Insight will format the file name to look a little nicer by converting it to lower case and capitalizing the first letter Source Insight does not alter the file name if it already contains a mixture of upper and lower case letters This option only affects how Source Insight displays file names The file names are stored internally and in the database exactly as the file system
354. nal number as determined by Source Insight Decimal Use base 10 Hex Use base 16 Octal Use base 8 Numbers Specifies what action is to be performed on numbers found in the file You can add values into the Start at and Offset text boxes in base 10 8 or 16 Auto Replace numbers in ascending order beginning with the value of the first number found Start at Replace numbers in ascending order beginning with this value Offset Replace numbers with the same number plus this value 242 Source Insight User Manual Chapter 5 Repeat Typing Radix Source Insight determines the radix of a number as follows Determination e Ifthe number begins with Ox then it is assumed hexadecimal Ifthe number begins with zero and a digit it is assumed octal e Otherwise the number is assumed decimal Repeat Typing The Repeat Typing command repeats the last characters you typed For exam ple if you select somewhere and type abc then run Repeat Typing another abc will be inserted automatically Replace The Replace command searches for a specified pattern and replaces each occur rence with a new pattern Only the current file is searched The search can be done over the whole file or just the current selection Replace 0x New finterMac 5 i ance Options Search Case Sensitive Selection Files IV Use Regular Expressions lV Whole File Wrap Around Help One Occurrence Line IV Confirm Replaceme
355. nction Up The Function Up command moves the insertion point to the previous function or method defined in the current file General Options This command activates the General page of the Preferences dialog box It allows you to change miscellaneous Source Insight options These options are part of the current configuration Source Insight User Manual 175 Command Reference Chapter 5 General Options Dialog box Preferenees ij x Syntax Formatting Syntax Decorations Searching Remote Folders General Typing Files Languages Symbol Lookups Display Colors Processing IV Sleep when Source Insight is in background Source Tips None Short Verbose Recovery Update recovery file every 5 seconds Project File Synchronization IV Synchronize on startup and project open Add new files automatically IV Remove missing files from project JV Suppress waming messages JV Background synchronization every 60 minutes Misc JV Use stricter confirmation dialog IV Allow Drag and Drop editing Keep dialogs on the same monitor as the main window Enable event handlers Sleep when Source Insight is in background If checked Source Insight will not perform any background processing when the Source Insight application is minimized or not in front such as when a custom command is in front If not checked then background processing will occur normally However Source Insight lowers its priority to bel
356. nctions 338 Project List 49 Project Report 228 project root directory 47 Project Settings 225 Project Source Directory 47 48 Project Symbol Classes 223 Project Symbol List 223 Project vs Global Conditions 168 Project Window 30 document type view 221 file browser view 222 file list view 222 symbol class view 223 symbol list view 223 Project Window command 229 Project Window Properties 224 Project Window Symbol List 73 Project Window Views 31 Projects 45 Base 118 creating 47 folder 118 index performance 227 new 213 opening 50 removing a project 51 removing files from 50 report 74 setting index options 70 settings 225 370 Source Insight User Manual Index synchronizing files 55 the current project 46 where to store data file 213 Projects Folder 175 Prompting for Each File Separately 250 Prototype jump to 187 PutBufLine function 318 PutEnv function 320 Range Definition 199 Rebuild Project 229 Record New Default Properties 230 Record Variable Storage 299 Record Variables 299 Recovering From Crashes 99 Recovery procedure 100 warnings 100 Rect Record 308 Redo 230 Redo All 230 Redraw Screen 231 Reference Styles 78 Reform Paragraph 231 Refresh Relation Window 231 Refresh Relation Window command 72 Regular Expressions 85 characters overriding 87 groups 87 summary 88 Relation Graph Properties 232 Relation Window 39 233 call graph filter 236 call graph symbol type filter 237 call trees
357. ndows Menu File then Line Keys C Line then File Pattern Command Displays the name of the currently selected command This pull down list contains a list of all the custom commands defined Source Insight User Manual 145 Command Reference Chapter 5 Output Group Control Group Run This is the command line to be executed when the custom command is invoked The Run text box can contain special meta characters See also The Run Field Format on page 148 Dir The working directory used when executing the script specified in the Run text box Source Insight sets the current working directory to this location before running the command If left blank then Source Insight sets the current working directory to the project source directory This group of options control what happens to the output of the command Iconic Window If checked the spawned program will be put into a minimized window If not checked then the program will launch normally Capture Output If checked the standard output of the command will be cap tured and will appear in a new command output window when the command completes The command output window s title will be the name of the custom command If not checked the standard output will not be captured Paste Output If checked the standard output of the command is pasted to the current selection This group of options specifies what Source Insight does before and
358. ne command moves the insertion point to the beginning of the current line Source Insight User Manual 127 Command Reference Chapter 5 Beginning of Selection The Beginning of Selection command moves the insertion point to the begin ning of the current selection if it is extended If the selection is already an inser tion point then nothing happens Blank Line Down The Blank Line Down command moves the insertion point to the beginning of the next blank line Blank Line Up The Blank Line Up command moves the insertion point to the beginning of the previous blank line Block Down The Block Down command moves the insertion point to the next brace This corresponds to the end of the current code block in languages like C C and Java Block Up The Block Up command moves the insertion point to the previous brace This corresponds to the beginning ofthe current code block in languages like C C and Java Bookmark The Bookmark command can be used to add and remove bookmarks as well as to move to the location of an existing mark Bookmarks are part of the current workspace Bookmarks 9x Name Do 0 0 0 0 O GoTo Marks LbProcMark in Cmdmark c Line 383 Lz gb EnableMarkButtons in Cmdmark c Line 407 Sc MRK in Mrk h Line 45 Remove Close zl Help 128 Source Insight User Manual Chapter 5 Bottom of File Name Type the name of the bookmark here Source Insight checks to
359. nge or are enhanced For example the Project Window lists all files in a project regard less of directory A Project Data Files Configuration ir Source Files source file list preferences open files symbol database customizations window positions Figure 4 1 The components of a Source Insight project A project automatically contains a symbol database which is maintained by Source Insight Except for adding source files to your project you do not have to generate any other tag files Source Insight does that automatically Each project has its own session workspace The workspace contains session information such as the list of files that are open and window positions Each project can have its own configuration settings or it can use the single global configuration The configuration contains your customizations which includes many of the options set via the Options menu Throughout this documentation all discussions assume that you have a project open unless otherwise stated Whenever there is a difference in the way a com mand works with and without a project open it will be noted The Current Project The project that is open if any is referred to as the current project You may only have one project open at a time however you can have different instances of Source Insight running each of which can have a different project open Sometimes Source
360. ns Each project has an index of symbols sorted by symbol name GetProjSym Name maps an index to a symbol name Symbol index values start at zero and go up to the count returned by GetProjSymCount minus one This example interates through all project symbols isymMax GetProjSymCount hprj isym 0 while isym lt isymMax symname GetProjSymName hprj isym isym isym 1 NewProj proj_name Creates a new project and returns a project handle hprj or returns hNil if errors OpenProj proj name Opens the project named proj name and returns a project handle hprj or hNil if errors RemoveFileFromProj hprj filename Removes the given filename from the project hprj The file on disk is not altered or deleted SyncProj hprj Synchronizes the project hprj All files in the project are checked for external changes and Source Insights symbol database is updated incrementally for files that have changed SyncProjEx hprj fAddNewFiles fForceAll fSupressWarnings Synchronizes the project hprj All files in the project are checked for external changes and Source Insights symbol database is updated incrementally for files that have changed New files are automatically added to the project if fAddNewFiles is True Only file names that match document types defined in the Document Options com mand are added If fForceAll then each file in the project is re synchronized regardless of its time stamp
361. nsight provides many short cuts for selecting meaningful objects within your source code Source Insight has a selection bar area in the left margin of each source file window Many shortcuts involve clicking in the selection bar Selecting Whole Words To select by whole Simply double click on a word to select the whole word You can drag out a words double click selection in this mode to select whole words on them Selecting Whole Functions or Symbols To select a whole To select a whole function struct or other type of symbol simply double click function double in the selection bar area of a source file window If you hold the mouse button click in the left down and drag Source Insight will select whole functions or symbols as you margin next to it drag You can also use the Select Symbol command to select the symbol that encloses the current text selection The Symbol Window on the left of the source file window also can be used to select whole symbols Double clicking on any entry in the list will select the symbol 96 Source Insight User Manual Chapter 4 File Buffer Basics Selecting Matching Parentheses and Blocks To select to the To select to the matching brace or parentheses double click on any parenthe matching paren ses square brace curly brace or double quote mark Source Insight selects up theses brace or to its match The Select Match command Alt equal also selects up to the quote just
362. ntrol system will respect a read write file as checked out Thus you can edit and save files before you check them out Preserve Undo and revision marks after saving If enabled then you will be able to perform Undo and see revision marks even after you save a file Allow editing Read Only file buffers This option lets you to edit a file buffer even if it is marked read only You will not be able to save back to the file unless you change its permissions to read write outside of Source Insight or you explicitly overwrite the read only file by clicking the Overwrite button during saves Depending on your source control system you may be able to check out your version of the file and then return to Source Insight and save the file Note that when you edit a file buffer inside Source Insight you are not changing the file on disk until you use the Save command or you cause Source Insight to save the file some other way such as task switching out of Source Insight to another program when you have the Save all files when Source Insight is deacti vated option enabled Remove extra white space when saving This option will cause any trailing space or tab characters to be stripped off each line when a file gets saved Confirm all file deletions Source Insight will confirm before deleting any source files Source Insight does not delete source files when you remove them from a project or when you delete a project It only deletes t
363. nts Whole Words Only IV Preserve Old Case Old Add the old pattern you want to replace in this text box The pattern can be a regular expression New Add the new pattern that should replace the old one in this text box Replace Click this to begin the replacing operation Files Click this button to transfer to the Replace Files command where you can perform replacements in multiple files Options Group Case Sensitive If checked Source Insight will only find matches if the case 7 matches exactly Use Regular Expressions If checked the Old and New patterns are assumed to be regular expressions Source Insight User Manual 243 Command Reference Chapter 5 Search Group Wrap Around If checked the search continues at the beginning of the file when it reaches the end of the file The search will wrap around only once If not checked the search stops when it reaches the end of the file One Occurrence Line If checked only the first occurrence of the Old pattern on each line is replaced If not checked then all occurrences of the Old pattern on each line are replaced Whole Words Only If checked then Source Insight only finds matches that are whole words If not checked then Source Insight will also find matches that are embedded in words Preserve Old Case If checked then Source Insight will replace text but retain the upper and lower case of the original text If not checked then Source Insight wi
364. ny time by destroying the original and all copies of the SOFTWARE in whatever form You may permanently transfer all of your rights under this EULA provided you transfer all copies of the SOFTWARE including copies of all prior versions if the SOFTWARE is an upgrade and retain none and the recipient agrees to the terms of this EULA 3 RESTRICTIONS You may not reverse engineer de compile or disassemble the SOFTWARE except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation You may not rent lease or lend the SOFTWARE You may permanently transfer all of your rights under this EULA provided the recipient agrees to the terms of this EULA You may not publish or publicly distribute any serial numbers access codes unlock codes passwords or other end user specific registration information that would allow a third party to activate the SOFTWARE without a valid license Source Insight User Manual 363 License Agreement Chapter 9 4 SUPPORT SERVICES Source Dynamics may provide you with support services related to the SOFTWARE Use of Support Services is governed by the Source Dynamics polices and programs described in the user man ual in online documentation and or other Source Dynamics provided materials as they may be modified from time to time Any supplemental SOFTWARE code provided to you as part of the Support Services shall be considered part of the SOFTWARE and subject to
365. o The Base Project on page 57 is the final place Source Insight looks to find symbols it is implic itly at the end of the project symbol path 56 Source Insight User Manual Chapter 4 The project symbol path is searched to find a symbol s defi nition The Base project is searched as a last resort Understanding Symbols and Projects The project symbol path is only used to locate symbol definitions It is not used to locate symbol references or used by Search Files or Smart Rename Those operations only work on the files in the current project Searching the Project Symbol Path Source Insight searches all open files and the symbol database for the current project If the symbol is not found then every project in the project symbol path is searched If the symbol is still not found then the Base project is searched If more than one symbol is found with the specified name then Source Insight will ask you to pick from a list of the matching symbols their locations and types You can enable the Always search symbol path option in the Preferences Sym bol Lookups dialog box When this option is on all projects in the symbol path are searched every time Source Insight looks up a symbol even if the symbol was already found in an open file or the current project You may want to turn this option on if you want to see if there are redundant or at least like named symbols in your project and any others on the proj
366. o created for each line appended to the search results Source links allow you to jump between the line in the search results and the line in the file where the match was found Source Links are adjusted automatically while you edit so they maintain their linkage If not checked then only text is appended to the search results You may want to turn off this option if you think you will find thousands of matches since source links take up memory Normalize File Names If checked then the file names listed in the search results will be normalized If not checked then the file names listed will be full paths See also Normalized File Names on page 48 To Search a Set of Files If you add file name wildcards into the File Name text box and click the Search button the wildcard list will be expanded and all the files in the file list will be selected automatically If the Project Wide check box is on then the wildcards will be expanded over all files in the project So for example if you wanted to search all h files in your project you would add h into the File Name text box press Enter to click the Search button and click the Search button again to search all the files in the file list If the Project Wide option is on Source Insight will fill the file list with all h files in the project regardless of what directory they are in See also Replace Files on page 245 Search Forward The Search Forward command searche
367. o your project if the files are in the project source directory or a descendent of this directory See also Synchronize Files on page 277 and Project Settings on page 225 New Window The New Window command opens a new window on the screen The file appearing in the current window will appear in the new window as well Next File The Next File command runs the Close command and then runs the Open command You will have an opportunity to save the current file if you ve modi fied it unless you have the Save Quietly option turned on in the Preferences General dialog Next Relation Window View Open Cycles through the view modes of the Relation Window This includes the out line view and graphical views The Open command activates the Project Window and sets the focus on the text box of the Project Window If the Project Window was not visible it is made visible and then hidden after you select a file to open You can customize what the Open command does in the Preferences Files dia log box Instead of activating the Project Window you could have it bring up other dialog boxes or windows instead If you do not have a project open then this command will bring up the system Open dialog box which is a standard system dialog box You can also open a file by dragging a file and dropping it onto the Source Insight application window 214 Source Insight User Manual Chapter 5 Open Project Open Project
368. oad a new clip Real World Tested Source Insight is an industrial strength editor that is used by thousands of pro grammers at major public software companies today Source Insight has been used on complex commercial projects containing many thousands of files many millions of lines of code and hundreds of thousands of declared symbols Speed and Convenience The philosophy of Source Insight is to increase programming team productivity by clarifying source code presenting information in a useful way and allowing programmers to modify software in large complex projects By quickly provid ing you with complete project wide program information and giving you a rich program editing environment Source Insight will enable you to work quickly and smartly System Requirements Operating Systems e Windows XP 2000 e Windows NT 4 0 SP3 e Windows 98 Me e Windows 95 with Internet Explorer 4 0 Machine Pentium or faster Pentium II or better recommended Memory 64 MB 128 MB or more recommended Disk Storage 4 MB min install 12 MB full install Technical Support To get technical support or sales information for Source Insight please contact Source Dynamics at the following links Web www sourceinsight com E mail for technical support support sourceinsight com E mail for sales information sales sourceinsight com Phone 1 425 557 3630 14 Source Insight User Manual cwm Setup and Quick Start This chapter describes
369. ocate a file without bothering with the directory name Source Insight User Manual 31 Window Tour To filter the list with a wildcard type the wildcard and press Enter File Directory View shows the directory structure of your disk Symbol List View Chapter 3 If you type a wildcard specification and press Enter then the file list will be fil tered down to match that specification For example if you type c and press Enter you will see all c files in your project regardless of directory To remove the wildcard press asterisk and press Enter Browsing Non Project Files If you want to browse your disk and see files that are not necessarily part of your project type dot and press Enter The current working directory con tents will fill the list To return to the project only view of the files type two asterisks and press Enter Alternatively you can switch to the File Direc tory View of the Project Window File Directory View File Directory View shows directories and files This allows you to perform some basic directory and file maintenance and to open non project files easily Sinew Project c insiaht3 Directory File Name EQ c m Q Acrobat3 O Autoexp err 4506 2 5 98 H 0 America Online 4 0 G Base PFI 44 3 20 9 iC Bin Base PO 672 3 20 9 H A DocToHelp OQ Base pr 66048 3 26 9 H A HTML Help Workshop O Base PRI 66048 3 20 9 H A Insight O Base
370. ocuments folder on a network drive That is because the Net Framework symbols are stored in My Documents Source Insight Projects NetFramework See also Location of the My Documents Folder on page 113 Speeding Up Searching Files There are several ways to search across multiple files in Source Insight The commands Search Files Lookup References and Search Project all perform multi file searches The fastest type of search in Source Insight is the Lookup References search When you search this way Source Insight looks for references to a single whole word item When you search for a single whole word Source Insight uses a special index file to make the search fast It s a good idea to get into the habit of using Lookup References instead of Search Files when you can Speeding Up Lookup References The Lookup References command has a few options that affect its speed The Smart Reference Matching option means that the search is context sensi tive the search results will only contain matches for references to the exact symbol you specify using the surrounding context This option slows the pro cess down because each same string occurrence has to be qualified with a sym bol lookup which requires some parsing on the fly If you turn this off it will work like version 2 x of Source Insight The Skip Comments and Search Only Comments options also slow the search down a little but not as much as the smart referenc
371. ode command again For example to get help on the File gt Open command type Ctrl F1 to turn on the help mode A message will appear in the status bar to indicate that help mode is active Now go to the File menu and select the Open command A help window will open and display help on the Open command You can also press F1 while a dialog box is up and Source Insight will display help on the current command Highlight Word Toggles word highlighting for the word under the cursor in all source windows This is like using a highlighter pen on paper If you select a word and use the Highlight Word command then anywhere that word appears in your source it will appear highlighted By default the highlight appears like bold black text with a bright yellow back ground However you can set the highlight effect yourself by editing the High light style The Style Properties command is used to edit styles Incremental Search The Increment Search and Incremental Search Backward commands invoke the incremental search mode By default F12 is the Incremental Search command and Shift F12 is Incremental Search Backwards Once in incremental search mode Source Insight will start finding matches as you type characters starting at the current cursor position As you type more characters the search will become more specific The characters you type will appear at the bottom in the status bar You can exit the incremental search mode with any
372. of FCB in File h toolbox I 5 x fcb mal D FCB fcMac E FcbCycleMapView E FebMonitorFileMapping FCB fFileMapOK FCB tickMapChange ga E 55 0 5 Al 0 CB ES Source Insight User Manual 223 Command Reference Chapter 5 Project Window Properties Appearance Options Directory View Options Edits the properties of the Project Window x M Current Display C File List C Directories Cancel m C Document Types C Symbol Types Em Symbol List Text __TextColor _ M Appearance Options File Ditectory Symbol Type Filter Back Color Jv File Size IV File Date Help Code Metrics EEA v Automatically arrange when resizing Directory View Options F Stac Jv Show file details in directory display k lists vertically Current Display Select the view mode of the Project Window Another way to select the view mode is to type Ctrl Tab into the Project Window You can also use the toolbar buttons to select the view mode The appearance options control the visual content of the Project Window File Size File Date For view modes that show files enable these to show the size and or date of each file in separate columns Code Metrics Show the selected code metrics column The drop down list to the right selects which code metric value to display in the column Symbol Type Filter Click this button to choose th
373. oject if any and opens the project given in projectname Unlike the p option the next time you run Source Insight the old current project is opened This is useful if you want to put a Source Insight command in a batch file but don t want the current project to be changed Source Insight User Manual 103 Source Insight Concepts Chapter 4 Example insight3 pt mail Finding a Symbol f symbol name This option locates the symbol given in symbol name opens that file and posi tions the insertion point on the symbol If the symbol can t be found Source Insight will give an error message This is unlike specifying a symbolin place of a file name because this explicitly tells Source Insight that you are looking for a parsed symbol not a file Example insight3 f DoIdle Synchronizing Project Files u This option updates all project files right away when Source Insight starts It is exactly like using the Synchronize Files command on the Project menu Example insight3 u Synchronizing Files in Batch Mode ub This option is like u except that Source Insight quits after the files are updated This allows you to put a command in a batch file to synchronize Source Insight projects Example insight3 ub Suppressing the Splash Screen S This option turns off the Source Insight splash screen that normally appears when starting up User Level Commands A command is a user level operation that Source Insig
374. oject symbol path Later if you want to change that path run the Preferences Sym bol Lookups command Options menu to edit it You can always create projects later and add them to the path See also Setup Common Projects on page 263 Creating a Project Source Insight is built around projects A project is a collection of source files When you create a project you need to add files to it Source Insight records what files are in the project by keeping a simple file database for the project 18 Source Insight User Manual Chapter 2 Installing Source Insight The Add and Remove Project Files dialog box lets you add individual files or whole directory trees to your project For more information See also Add and Remove Project Files on page 123 Proiect ries 9 xf Eile Name Mic c Wstuxvc98 eo B S1 t t 52 t t Include xl B Symi tst xl Remove Tree Show only M known document types Project Files 424 cNsiN sm h cNsiNAutotext em c si Beta c c si Beta h e si Bugs txt Remove All c NsAC tom e si Cahook c e si Car c Remove Special Remove Fle ul Add from list a0 zT 9 9 E Qoo ro Ix ao v Figure 2 1 The Add and Remove Project Files dialog box lets you add source files to your project As you create new files they can be added to your project when you save them
375. oject Window displays a list of all project symbols Like the Browse Project Symbols dialog box you can type into the text box to perform prefix and syllable name matching However the Project Window is a modeless win dow Therefore as you select symbols in the Project Window the Context Win dow and Relation Window will update and provide information about the selected symbol See also Project Window on page 30 The Project Window also has a class view The class view is a hierarchical view where symbols are listed by category For example all global variables are grouped together all structs are grouped together and so on For structured types such as classes structs and unions the Project Window lets you expand them to show their members Call Trees and Reference Trees The Relation Window is another Source Insight innovation that shows the rela tionship between the currently selected symbol and other things It works like the Context Window by tracking what you are doing and showing relationship information automatically See also Relation Window on page 39 The Relation Window can show function call trees class hierarchies structure members reference trees and more Context Window The Context Window is a Source Insight innovation introduced in version 2 0 It provides symbolic information automatically It tracks what you are selecting and typing and shows you relevant symbol declarations automatically while
376. oject oriented program editor and code browser with built in analysis for C C C and Java programs Source Insight parses your source code and maintains its own database of symbolic information dynami cally while you work and presents useful contextual information to you auto matically Not only is Source Insight a great program editor but it also can display refer ence trees class inheritance diagrams and call trees Source Insight features the quickest navigation of source code and source information of any program ming editor Source Insight features quick and innovative access to source code and source information Unlike many other editor products Source Insight parses your source code and gives you useful information and analysis right away while you edit El Sinew Project Source Insight Beta Dlex cpp nf x E File Edit Search Project Options View Window Help Work EFCCA oc jaeae ae oo o eme t a ams Dlex cpp PDLEX Dlex Create oc ndoc PLANG plang E A fidos plang iene POLEX pdlexNew new Dlex DlexUnprotect P DlexFDeadParseLn if pdlexNew pNil E DiexFDeadFmtLn return pNil E DiexLnactFromLn DiexRevLangSync allocate a new Spans E DiexSetRevLangSync if pdlexNewsospans Spans Create hdoc plang cbof Lexspan puil pae C TEN delete pdlexNew il FSizeToDoc berina PAN ae E LniFromLn ent RlexFromLi
377. oll 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 gt 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 Assigning Keys and Mouse Clicks The procedures for assigning keys and mouse clicks are described below To Assign Keystrokes You can add any combination of Alt Ctrl and Shift key modifiers with any other key including mouse buttons To assign a new keystroke combination to a command 1 Select the command in the Command list 2 Clickthe Assign New Key button 3 Type the keystroke s that you want to assign Pressing Esc cancels the assign procedure If the keystroke you typed is already assigned to a differ ent command Source Insight will ask you if you want to re assign it Source Insight User Manual 189 Command Reference Chapter 5 To Assign Mouse Clicks To assign a mouse click to a command 1 Select the command in the Command list 2 Clickthe Assign New Key button 3 Clickthe mouse button that you want to assign If you want a modifier key such as Alt Shift or Ctrl to be included press the modifier key before clicking the mouse button You can even use the Left mouse button to modify the right b
378. on statement condition is true 302 Source Insight User Manual Chapter 6 Conditions and Loops if else and while In the above example if condition is true then statement is executed You can use brackets to group more than one statement For example if condition Statementl Statement2 An else clause can be added to the if statement if condition statement1l condition is true else statement2 condition is false The while statement The while statement loops while a condition is true The while statement has the following syntax while condition statement keeps executing statement until condition is false In the above example the statement in the while block is executed as long as the condition is true The condition is tested at the top of the loop each time You can use brackets to group more than one statement For example while condition Statementl Statement2 Break and Continue The break statement is used to exit out of a while loop If more then one while loop is nested the break statement breaks out of the innermost loop while condition if should exit break exit the while loop Source Insight User Manual 303 Macro Language Guide Chapter 6 The continue statement continues again at the top of the loop just before con dition expression is evaluated while condition if skip rest loop continue continue at the top of the while loo
379. on links two arbitrary locations For example the Search Results buffer contains source links for each line that matches the search pat tern LoadSearchPattern pattern fMatchCase fRegExp fWholeWordsOnly Loads the search pattern used for the Search Search Forward and Search Back ward commands The search pattern string is given in pattern If fMatchCase then the search is case sensitive If fRegExpr then the pattern contains a regular expression Otherwise the pat tern is a simple string If fWholeWordsOnly then only whole words will cause a match ReplacelnBuf hbuf oldPattern newPattern InStart InLim f MatchCase fRegExp fWholeWordsOnly fConfirm Performs a search and replace operation in the given buffer The search pattern string is given in oldPattern The replacement pattern string is given in newPattern The line range is specified by InSart to InLim The replacements only take place on lines InStart up to InLim 1 If fMatchCase then the search is case sensitive If fRegExpr then the pattern contains a regular expression Otherwise the pat tern is a simple string If fWholeWordsOnly then only whole words will cause a match If fConfirm then the user will be prompted before each replacement SearchForRefs hbuf word fTouchFiles Searches for references to the word string in word throughout the whole project Each line that contains word is appended to the buffer hbuf If fTouch Files is TRU
380. on only applies if you have selected a proportion ally spaced font Fixed pitch fonts such as Courier New are not affected If enabled Source Insight will attempt to use a fixed width for spaces and tabs so that tabs line up the same way they do with a fixed pitch font Programs generally look better with this turned on if you are using a proportional font If you are tired of using Courier New or some other boring fixed pitch font to view your code try this If disabled then Source Insight uses the natural widths of characters as reported by the font This option is helpful if you have to work with other tools or people that use tools that display source code with fixed pitch fonts You will be able to use a proportional font and still keep a valid representation of the fixed pitch font indentation You can control how Source Insight computes the fixed width of spaces by clicking the Spacing button in the Preferences Display dialog box For more information see Character Spacing Options on page 158 Source Insight User Manual 163 Command Reference Chapter 5 Parsing Group Status Bar Options Screen Fonts Click this button to select a font to use for displaying the file on the screen The name of the currently selected font is displayed to the right of the button Printer Fonts Click this button to select a font to use for printing the file The name of the currently selected font is displayed to the right of th
381. onnssccuasoves D GM e eser HD CharFromaAscii ascii code cene ee ee eee eene nnne eee tn naa e e eet en eese eee eene see eee 311 islower ch e eere 311 IsNumber s se 311 isupper ch strlen s E strmid s ichFirst ich Lim eee e eene eee eee eere rennen e ee enn aae e ee ttnn nee e eee tns esee eee eaan 311 Source Insight User Manual xi Contents SULFUPAG SCCM EIEE NIET T PEREO E E E R tolower s tOUPPEr S eo User Input and Output Functions eee e eere ee eee eene eere eee en aset en seen seen aae no Ask prompt string eese eene eere enne AssignKeyToCmd key value cmd name je pe CharFromKey key code cere eee eese esee ee eese eea etas tasas etas ta setae ta stessa senses CmdFromKey key value eec e eene eee eene tenent n tensa etas ea senses etas es etas eneen EndMsg FuncFromKey key code eere cesse ence esee e een eene ense enses eene ens essen seas tns ena GetGHAM ied eee ese su eo gae eei eo us koon a aee aa ere e oa een Ux Yo TNE aep Ene S NUN Ee EEN egeo eae CR SUR ELO e NEA UNRU GetKey eere GetSysTime fLocalTime IsAltKeyDown key code IsCtriKeyDown key code ener esee encre eene eene enean etae tn sese ta senses sens tnae IsFun
382. or is on the line then the n will appear so that you can edit it 1 PASS 1 Build Format Token list fli rgfto PASS 1 Build Format Token list fli rgfto Comment Right Style Comments that appear to the right of code are given the Comment Right style For example this comment is formatted with the Comment Line style a 0 this is formatted with the Comment Right style Single and Multi Line Comment Styles Multi Line comments are displayed in the Comment Multi Line style These include any comments using the and delimiters in C C and Java Single line comments are displayed in the Comment Line style These include comments that use the delimiters in C C and Java Comment Styles and Custom Languages When you define a custom language using the Preferences Languages dialog box you can specify comment or text range types and associate them with a style For example you could create a comment range that starts with and ends with and the text is formatted with the Comment Multi Line style You can actually define any delimited range of text and associate it with any style including a non comment style For more information see Program ming Languages on page 58 and Special Language Options on page 195 80 Source Insight User Manual Chapter 4 Syntax Decorations add extra informa tion to your code display You can display operators with special symbols Syntax Formattin
383. ot mean match 0 or more occurrences Source Insight User Manual 87 Source Insight Concepts Regular Expression Summary Chapter 4 The following special characters are interpreted in regular expressions Table 4 3 Regular Expression Characters Character Matches at the beginning only beginning of line any single character abc any single character that belongs to the set abc abc any single character that does not belong to the set abc zero or more occurrences of the pre ceding character one or more occurrences of the pre ceding character NC a tab character NS a space character w white space a tab or a space charac ter the end of the line Sets such as abc may be in the following formats Set type Table 4 4 Regular Expression Sets Meaning character list eg abcde Matches any character within the set The set can be any number of char acters long x y eg a z Matches on any character within the range of x through y inclusively The ASCII value of x must be less than that of y combination eg WXYa z0 9 Character lists and ranges may be combined 88 Source Insight User Manual Chapter 4 Bookmarks Bookmarks Bookmarks mark a particular location in a file The Bookmark command allows you to set jump to and remove marks from the mark list Each mark has a name an
384. otations appear Show arrows at goto statements This causes either an up or down arrow sym bol to appear in goto statements next to the label name The arrow indicates whether the indicated label is above or below the goto statement line krel krelCalls goto TL Set Annotate closing braces with end comments This causes end comment anno tations to appear after closing curly braces The end comment contains a show description of the start of the block For example end switch pch end if stcNewWord stcString gt end if FWhiteCh pch fWhiteCh Annotate closing braces only for long blocks This suppresses the auto anno tated end comments for blocks less than 20 lines tall Source Insight User Manual 279 Command Reference Chapter 5 Syntax Formatting This command specifies syntax formatting options for displaying source files It activates the Syntax Formatting page of the Preferences dialog box Source Insight uses information gathered from its language parsers to format source code Identifiers can be displayed in different fonts or font sizes along with a variety of effects such as bold and italics Formatting is applied using styles A style is a set of formatting properties For example a style may specify bold italic You can edit each style s format ting properties with the Style Properties command Preferences x General Typing Files Languages Symbol Looku
385. ou type a pattern string 358 Source Insight User Manual Chapter 8 New Commands Table 8 1 New Commands Added Since Version 2 x Command Summary Insert ASCII Inserts a character by ASCII value Jump To Base Type Jumps to the base structure type of the selected symbol Jump To Caller Jumps to the function that calls the selected function Jump To Prototype Jumps to the function prototype of the selected function Keyword List Edits the keyword list used for syntax formatting the current language Language Properties Edits custom language properties Line Numbers Toggles the display of line numbers Lock Relation Window Toggles Relation Window locking Its contents do not change when locked Lowercase Converts the selected text to lowercase New Relation Window Creates a new Relation Window You can have as many Relation Win dows as you like Each window has its own set of options Next Relation Window View Cycles through the view modes of the Relation Window Preferences Lets you specify user options This one property sheet dialog box con tains several tabs for various options such as Display Files and Syntax Formatting Project Document Types Displays project files by document type in the Project Window Project File Browser Displays the File Browser in the Project Window Project File List Displays all project files in the Project Window
386. ould keep this interval short Project File Synchronize on start up If checked and background synchronization is turned Synchronization on then Source Insight will check file time stamps right away every time you start Source Insight or open a new project When files are found to be out of date with respect to the project Source Insight marks the files for re synchro nizing Later the files will be rescanned and synchronized in the background Add new files automatically If enabled then before synchronizing all the files Source Insight will add new files in the project s source directory and in all sub directories recursively However only directories that already have project files in them are scanned Directories that are not descendants of the project source directory are not scanned This feature allows you to simply add new files to your project directories on disk such as with a source control system and then have Source Insight add those new files to your Source Insight project automat ically Background project synchronization every NNN minutes If enabled then Source Insight will perform the actions of the Synchronize File command in the background while you edit You typically will not have to run the Synchronize Files command at all if this option is enabled Source Insight User Manual 177 Command Reference Chapter 5 NNN specifies how often the project files should be examined to determine if files need re syn
387. oup controls when the automatic tracking is activated Group Inside of comments Select this to have the Relation Window look up symbols when the cursor is inside of comments Inside of string constants Select this to have the Relation Window look up symbols when the cursor is inside of quoted string constants Inside all file types Select this to have the Relation Window look up symbols when the cursor is inside any type of file not just source code files Reload File Reloads the current file from disk losing all changes since saving This has the same effect as closing the file without saving and then opening the file again The change history and undo history are also lost 238 Source Insight User Manual Chapter 5 Reload Modified Files Reload Modified Files This command will check the time stamps on each open file and reload those that have been changed outside of the editor This only applies to files that were opened with the Sharing option turned on in the Preferences Files dialog box You can have this work performed automatically in the background by selecting an option in the Preferences Files dialog box Remove File The Remove File command removes one or more source files from the current project Note that the actual files are not deleted from the disk but only removed from the project Remove from Project csi Sinew xj File Name a csi Select All laptop SearchResu
388. ource Insight User Manual Chapter 1 Feature Highlights Crash Recovery Offers Full Time Protection Source Insight saves your editing changes transparently and frequently to a recovery file In the event of a computer crash Source Insight can recover all the changes made to files even if you didn t save them This is not an auto save feature which interrupts you so that files can be saved Only the changes you have made are stored in the recovery file and only when you are idle You can specify how often the recovery file should be saved Persistent Workspaces You can group sets of files and other session information into Workspaces You can save all session state into workspace files and restore sessions from other workspace files easily Source Insight saves the current workspace automati cally when you exit The workspace is restored when you run Source Insight again or when you open other projects You can exit Source Insight close a project or even crash your machine but everything will be just as you left it when you start it up again Customizable Menus and Keyboard Not only is the keyboard configurable but also the mouse buttons and the menus are fully configurable All your configuration settings can be stored and restored from configuration files very easily while running Source Insight There is no need to write custom macros or to use a separate setup program Windows 2000 XP and Window 9x Me Support Source Ins
389. ource Insight macro language does not support array variables However file buffers can be used as dynamic arrays Each line in a buffer can represent an array element Furthermore record variables can be stored in each line to give you record arrays Buffer functions are described in a following section Some useful functions are NewBuf and CloseBuf for creating and destroying buffers and the buffer line functions GetBufLine PutBufLine InsBufLine AppendBufLine DelBu fLine and GetBufLineCount You can also call NewWnd to put the array buffer in a window so you can see the array contents 300 Source Insight User Manual Chapter 6 Special Constants This example creates a buffer array of records hbuf NewBuf rec name Joe Smith age 34 experience guru AppendBufLine hbuf rec rec name Mary X age 31 experience intern AppendBufLine hbuf rec hbuf now has 2 records in it rec GetBufLine hbuf 0 retrieve Oth element CloseBuf hbuf Special Constants Some constant values are always defined while a macro is running As with all other identifiers the constant names are not case sensitive Table 6 2 Runtime Constants Constant Value True T False 0 Nil _ the empty string hNil 0 an invalid handle value invalid an invalid index value Operators Most binary operators are the same as in C Operator precedence is the sam
390. out syntax formatting Searching and Replacing Text The Syntax Formatting Command The Preferences Syntax Formatting command lets you control how much dis play formatting is applied You can speed up the display by disabling some options here For more information see Syntax Formatting on page 280 The Syntax Decorations Command This Preferences Syntax Decorations command lets you control what syntax decorations are performed Turning Off Syntax Formatting The Syntax Formatting features of Source Insight are powerful but sometimes you need to see how text will line up in another editor or in a simple display mode when only a single font is used Switching Off Syntax Formatting Temporarily If you want to temporarily see your files without syntax formatting use the View gt Draft View command Draft mode is useful for quickly switching your display to a basic monospaced font display This is particularly useful if you are using spaces instead of tab characters to line columns up When draft mode is active it overrides the settings of the Preferences Syntax Formatting and Syn tax Decorations dialog boxes Don t Want Fonts to Change If you want to just see only color formatting but no font changes or font embellishments such as bold and italic then use the Options gt Preferences Syntax Formatting dialog box and check the Use only color formatting box Want All Characters to Have the Same Width If you wan
391. ovia 254 Sedrch BACKWAOIG PRSETER 255 Search Backward for Selection ecce ee eee eee eee ee eee eee ee eee e e eene e eene ee eene e eeaao 255 Search iles quide de etes eei iens esee se epe ee e eun s esa essiens esee eue pae ea edere saepe eieaeoeaii 255 Search Forward 258 Search Forward for Selection 4259 Search List ee eese e eee eee eene 259 Search Projet RIT ARTE REUS 259 Searching OPtiOns r rccecccscceccsccccccsccscccecsceccsccsecssccseccssccsccseccscsssccscssecsscssecsscssocesess 260 Select All ciccccidectedessatecesscasuessccsdesscsscosiceccedecsstecscestsaccasesesenssocsascecdasocsoagusosvecsenocsssas 260 Select BlOCK Cie 261 Select Char Left 261 Select Char Right 261 Select Function or Symbol 261 Select LINC recesesscocecoctcsessccastecsccesvoccoesenssdescecesdascessnenssensbesecsdcesedusecseatestsossesdseeesesosce 261 Select Eine DOWN sscsssccasavcescctecdscccsuvecsescsonstecsecevesavecesascseusdesoseccceiascccbesossestsebesseses 261 Select LiNE Up p 261 SelectiMateli ciciiistocteaasstavsclunechvcsecssasvccessecescscsesustsasscivetestoccccbeoneseascdsescbenecseeeseses 261 Select Next Window Select SCNTCNCE sacscscsccasnnccscstscessvocsseectcs sosctechaccpecstbecessccssestecodencocdeocesecsesscdescdeseeses Source Insight User Manual ix Contents Ead OTTA 262 Sel
392. ow displays the contents of your project and it has several modes In the File List mode it lists all files in the current project You can quickly open any file in the project from the Project Window or drag files from the Windows Explorer onto the Project Window to add files to the project See also Project Window on page 30 The Project Window also has modes to display symbols by category files by cat egory and all project symbols in a flat list You can use partial matching on names or parts of names to quickly locate items Source Insight can handle projects with millions of lines of code and hundreds of thousands of declared symbols Integrates with External Compilers and Tools Source Insight integrates with external tools such as compilers make pro grams filters and source control programs by using Custom Commands Projects can be compiled from inside Source Insight and compiler errors are tracked automatically while you edit External tools can be launched concur rently in a shell command window from within Source Insight Program out put can be redirected to a file buffer or can be parsed for errors messages You can add your own Custom Commands which spawn external tools See also Custom Commands on page 105 Clip Window for Storing Multiple Clipboards and Boiler Plate Code You can easily rearrange code and insert boilerplate text by using the Clip Win dow The Clip Window contains clips of text that you ca
393. ow normal when the program in the background 176 Source Insight User Manual Chapter 5 General Options Background Tasks Source Insight performs a number of tasks in the background including the following e t parses files and updates the Symbol Window contents for all open source windows e It checks for finished Custom Commands e If Background Synchronization is enabled then it synchronizes all the files in the project possibly adding new ones in the process e It synchronizes the Context Window with the current text selection e It synchronizes the Relation Windows with the current text selection e Tt checks for and reloads open files that are modified outside of Source Insight by other programs Usually there is nothing to do in which case Source Insight sleeps and uses little or no processor cycles Source Tips Sets the level of information provided by pop up source tip win dows Source tip windows appear when you hover the mouse cursor over a symbol identifier for a few seconds Crash Recovery Recovery Update recovery file every NNN seconds Specifies how often Source Options Insight will update the crash recovery file The default value is 15 seconds The recovery file is only updated when there have been edits since the last time it was updated The recovery update is very fast and you probably will not even notice anything being saved You will never be interrupted to save the recovery file You sh
394. ower in general In addition locating the project data folder on a network drive can also result is poor performance Location of the My Documents Folder In Windows the My Documents folder is a virtual folder that can exist either locally or on a remote network drive Since Source Insight stores per user data inside that folder some operations can become slow if you locate this folder on a remote drive In particular if you are editing C code the Net Framework symbol completion can become slow because the Net Framework symbols are stored in My Documents Source Insight Projects NetFramework If possible locate your My Documents folder on your local drive If you can not do that then you can set a registry entry to force Source Insight to use a local drive for the per user data folder In regedit find the key HKEY_CURRENT_USER Software Source Dynamics Source Insight 3 0 Paths Add a new string value named UserDataDir Set the string value to the full path of the folder you want to user for per user data Speeding Up Program Features This section contains recommendations for speeding up different aspects of Source Insight Speeding Up Syntax Formatting Source Insight has many interesting and useful display features for formatting source code Some of those features require a significant amount of processing The display code has been sped up considerably to be able to provide more fea ture
395. p Conditional Evaluation Source Insight evaluates the whole conditional expression each time This is an important difference from the way that C conditional expressions are evaluated In C the expression may be partially evaluated Consider the following condi tional expression if hbuf hNil amp amp GetBufLineCount hbuf gt x This conditional expression would lead to an error in Source Insight if hbuf is equal to hNil In C the evaluation would be terminated after determining that hbuf hNil In Source Insight the whole expression is evaluated In this case causing an error since hNil would be passed as the buffer handle to GetBufLi neCount In Source Insight this statement would have to written like this if hbuf hNil if GetBufLineCount hbuf x Naming Conventions Variables and function parameters described in this macro guide are named using the following conventions Table 6 5 Identifier Naming Conventions Name Meaning s and sz a string ch single character string If more than one character is in a string only the first character is used ich zero based index to a character in a string or character in aline ichFirst first index in a range of characters ichLast last index in a range of characters inclusively ichLim limit index one past the last index in a range cch count of characters 304 Source Insight User Manual Chapter 6 Standard Record Structures
396. p 252 Scroll Left 253 Scroll Line Down 253 Scroll Line Up 253 Scroll Right 253 Scrolling and Selecting Text 92 Scrolling Commands 93 ScrollWndHoriz function 327 ScrollWndToLine function 327 ScrollWndVert function 327 SDK Help 253 Search 254 Search Backward 255 Search Backward for Selection 255 Search Files 255 Search Forward 258 Search Forward for Selection 259 Search List 259 Source Insight User Manual 371 Search Project 259 Search Results Window 43 Search Toolbar 23 SearchForRefs function 337 SearchInBuf function 338 Searching for keywords 85 for references 208 for symbol references 84 incremental mode 182 keyword style searches 210 load search string command 207 matching 0 1 or more occurrences 86 matching a tab or space 86 matching any in a set of characters 86 matching the beginning or end of a line 86 multiple files 85 source links 90 the current file 84 Searching and Replacing Text 83 Searching Functions 336 Searching Options 260 Searching the Project Symbol Path for a symbol 57 Searching wildcards 85 Select All 260 Select Block 261 Select Char Left 261 Select Char Right 261 Select Function or Symbol 261 Select Line 261 Select Line Down 261 Select Line Up 261 Select Match 261 Select Next Window 261 Select Sentence 262 Select Symbol 262 Select To 262 Select To End Of File 262 Select To Top Of File 262 Select Word 262 Select Word Left 262 Select Word Right 263 Selecting a paragraph of t
397. point numbers are not supported Indexing Into Strings You can index into variables as though they are character arrays Indices are zero based For example S abc x s 0 x now contains the string a Indexing into a variable yields a new string containing a single character 298 Source Insight User Manual Chapter 6 Record variables are like structs Record variables are just long strings Variables The string that is returned by indexing one past the last character is an empty string This is similar to zero terminated strings in C only the zero character is an empty string s abc length strlen s ch s length ch now contains the empty string if deh eot msg End of string Record Variables While C data structures are not supported aggregate record variables are A record variable is actually a delimited list of name value pairs Record vari ables are used in the same way that a struct would be used in C Record variables are returned by some internal macro functions because it is a convenient way to return multiple values Record fields are referred to with the dot operator using a lt record var gt lt fieldname gt format For example this reads the name of a symbol s file location from a symbol lookup record variable Filename slr file get file field of slr LineNumber slr lnFirst get lnFirst field of slr You assign values to
398. ppear at the left side of each source file window that has a are usually attached language specified The Symbol Window lists all the symbols defined in the tothe side ofeach file For example all functions structs classes methods macros constants source file window and more are listed in the Symbol Window There is a small icon to the left of each item in the Symbol Window list which describes the type of the symbol Source Insight scans your file in the background and dynamically updates the Symbol Window If you type in a new declaration the symbol will appear right away in the Symbol Window Symbol Windows appear on the side of each source window to allow easy navi gation within each file and to provide a quick overview of the file You can also drag symbols from one Symbol Window to another Source Insight User Manual 27 Window Tour Chapter 3 The Symbol Window also displays ifdef endif nesting levels and symbol type icons for quick identification and programmer orientation Source Insight Beta Sw c File Name if file Edit Search Project Options View Window Help Work oeann Xm OS AMA Ber S You can type into this pus am 2 Handle FITRTTE in the field to quickly select p B items in the list LnAddCon al if hwndFrom hwndEdit I DypLineBaseFont E amp ifdef DEBUG switch nc PewlFromwv Symbol Window lists E CoSwHsts ai case EN SETFOCUS all the symbols
399. programs or to the supplemental documentation in this manual In no event shall Source Dynamics Inc be liable for incidental or consequential damages in connection with or arising out of the furnishing performance or use of the program or documenta tion This disclaimer includes but is not limited to any loss of service loss of business or anticipatory profits or consequential damages resulting from the use or operation of the enclosed software Source Insight is a trademark of Source Dynamics Inc Other product names are trademarks of their respective manufacturers Source Dynamics Inc 22525 SE 64th Place Suite 260 Issaquah WA 98027 USA Phone 425 557 3630 Fax 425 557 3631 Web www sourceinsight com Technical Support support sourceinsight com Sales sales sourceinsight com curr Introduction Thank you for purchasing Source Insight Source Insight has been continu ously improved for over ten years We believe that Source Insight will improve your productivity and increase your enjoyment of programming This chapter introduces you to some of Source Insight s capabilities Source Insight User Manual 1 Introduction Chapter 1 The Big Picture The Problem You have a multitude of source files spread out all over the place You have to deal with functions that somebody else wrote You have to figure out how some piece of code works and see all of its clients You didn t write the code or you wrote it in a
400. prop record contains file buffer properties It is returned by GetBufProps The Bufprop record has the following fields Field Description Name The buffer name i e file name fNew True if buffer is a new unsaved buffer fDirty True if the buffer has been edited since it was saved or opened fReadOnly True if the buffer is read only fClip True if the buffer is a clip that appears in the Clip Win dow fMacro True if the buffer is a macro file fRunningMacro True if the buffer is a currently running macro file fCaptureResults True if the buffer contains captured custom command output fSearchResults True if the buffer contains search results fProtected True if the buffer protected and reserved for internal use InCount The line count of the buffer Language The programming language of the buffer The language is determined by the files document type DocumentType The document type of the buffer DIM Record The DIM record describes horizontal and vertical pixel dimensions Field Description Cxp Count of X pixels horizontal size Cyp Count of Y pixels vertical size 306 Source Insight User Manual Chapter 6 Standard Record Structures Link Record A Link record describes a location in a file which is pointed to by a source link The Link record has the following fields Field Description File The file name In The line number this is only valid for as long as
401. providing a list of possible identifiers to insert The symbols that appear in the comple tion window depend on the context such as the cursor position or the type of variable being referred to Source Insight User Manual 285 Command Reference Chapter 5 Browsing in Lists Undo Use automatic symbol completion window Enables the auto completion win dow If this option is disabled then you can still use auto completion by invok ing it manually with the Complete Symbol command Use detailed completion window The auto completion window shows details about functions such as their parameter lists Insert parameters for functions The parameter list for a function is inserted along with the name of the function This only happens if there isn t a paren thesized list of parameters already to the right of the insertion point Use completion window inside comments Enables the auto completion feature while you are typing into a comment If this option is disabled then you can still use auto completion by invoking it manually with the Complete Symbol command Use case sensitive matching The auto completion window will list only symbol names that match the case as you have typed it If this option is disabled then all symbols that match your input regardless of case are listed However Source Insight will attempt to select the item that matches the case you typed Tab key selects item If checked then pressing the Tab key while th
402. ps Display Colors Syntax Formatting Syntax Decorations Searching Remote Basics IV Use Syntax Formatting Use only color formatting Use no color formatting monochrome Doc Types Apply Styles for Language Elements IV Symbol declarations v Function local symbol declarations v References to function local symbols IV References to non function local symbols v References to members IV Special comment styles IV Inactive conditional code blocks Symbol Reference Lookups v Search in the Project Symbol Path slower IV Qualify references to members slower IV Qualify references to functions slower OK Cancel Help Styles Click to edit the style properties Doc Types Click to edit the document types Basic Options Basic option are 280 Source Insight User Manual Chapter 5 Syntax Formatting Use Syntax Formatting Enable this to have Source Insight display source code with syntax formatting If disabled then source code will display with no color ing or font changes Use only color formatting All non color formatting properties such as font size changes or bold and italics will be suppressed Display tokens will only con tain color changes This is similar to how earlier versions of Source Insight dis played text Use no color formatting monochrome If enabled then Source Insight will suppress all color changes Text will be displayed in black and white and gr
403. put of custom commands can be captured into a file for editing or can be pasted into the current selection The Options gt Custom Command dialog box allows you to define and run cus tom commands Once defined a custom command is like any other command It can be assigned to a menu or a keystroke can be assigned to it Custom com mands are part of the current configuration Custom commands are useful for launching a compilation By having a custom command that runs the compiler or make program you can capture the com piler error messages and have the errors parsed and have source links pointing to the erroneous source code automatically You can also implement a variety of text filters using custom commands For example you could define a Sort custom command that runs a sort filter and pastes the output back over the current selection See also Custom Commands on page 145 Key Assignments on page 187 and Menu Assignments on page 211 Customizing Source Insight Your customiza tions are stored ina configuration file Source Insight lets you customize many things The whole set of options is called a configuration and configuration files can be saved and loaded Usually all your customizations are saved in a file called global cf3 stored in the Source Insight program directory or user data directory This is a global con figuration file You can have a project use its own configuration file with options
404. r not a digit Source Insight User Manual 291 Macro Language Guide Chapter 6 All macro functions are global in scope User level commands are macro functions with no parameters Macro Functions A macro function is declared in a format that looks like a C function White space is ignored Function and variable names are not case sensitive Macros have the form macro my macro comments statements comments Macro functions can have parameters and can call other macros You can return a value from a macro by using return n where n is the return value For example macro add2 n return n 2 Macro Scopes and References All macros exist at the same global scope and all macros declared in any open file stored in a project or in a project on the project symbol path are in scope That is you can have forward references to macros You do not have to declare them before calling them Source Insight uses its symbol lookup engine to resolve references to macro names when macros are executed and when the user invokes a macro com mand Therefore symbol lookup rules apply to macro name binding See Symbols and Projects in the Projects chapter for more information on sym bol lookups You can also use the various symbol lookup techniques to locate macro func tions while you edit See Finding Symbols in your Project in the Projects chapter For example you can
405. r Basics The Open The File Open command opens a file on disk and loads it into a file buffer A command sucksa file buffer is the temporary image of the file that you can edit You can edit the fileintoa working file buffer without affecting the original file until you save it using the Save buffer command Source Insight User Manual 97 Source Insight Concepts Chapter 4 The Save command overwrites the orig inal file The original file is untouched until you save the file Source Insight is used to edit text files only The File gt Save command writes the file buffer contents back over the original file This is the only time the original file is changed Temp File amp Memory Edits A Source Insight Save File on Disk Figure 4 16 Open and Save operations When you close the file the file buffer contents are simply thrown away The original file on disk is not changed unless you use the Save command first All changes are recorded in the temporary file buffer until the file is saved When the file is saved a new file is created and written and the original file is either deleted or optionally moved to the backup directory Once the new file is completely and safely written to disk the file is renamed back to the original file name By not altering the original file until it is saved Source Insight pro vides a safe mechanism for modifying files It is helpful to think of us
406. r Source Insight and 128 megabytes or more is recommended for sustained use with large projects having over 200 000 symbols Operating Systems For the best performance with respect to virtual memory it is recommended that Source Insight run on Windows XP or Windows 2000 or newer These operating systems utilize memory more intelligently than do Windows 9 x Me Custom Parsing Expressions Source Insight allows you to augment a language with your own custom parsing regular expressions You can edit these expressions by right clicking on a source file and selecting Language Properties If you have too many expressions or you are using a regular expression that is inherently slow to match you may notice that it takes a moment or two to parse your files A regular expression can be slow to match if it starts with a pattern that is easily matched but ends with a pattern that often does not match For example a z a z This expression will be slow to match because the pattern starts with a z which means match any zero or more alphabetic characters Most characters in a file will potentially match 112 Source Insight User Manual Chapter 4 Formatting options affect display speed Performance Tuning Location of Files on a Network While it is possible to add source files to your project from a remote network drive that can cause Source Insight to slow down because access to network drives is sl
407. r exam ple Alt release F activates the File menu Source Insight does not force you to follow the Windows standard where Alt lt menu letter is hard wired to activating that menu That s because Alt is too good a key to waste on only the menus Instead Source Insight allows you to combine Alt with any character and assign it to any command by using the Key Assignments command If you want to make Alt F activate the File menu for example you can just make that key assignment If you want to make F1 activate the File menu you can do that too Activate Global Symbol List This command makes the Context Window visible showing all project symbols in a list and puts the cursor in the text box at the top Once activated you can type into the text box and the global symbol list will be filtered based on what you type Pressing Enter or Esc will re activate your source file window again Activate Relation Window Opens and selects the Relation Window The input focus is moved to the Rela tion Window 122 Source Insight User Manual Chapter 5 Activate Search Results Activate Search Results This command simply activates the Search Results window and brings it to the front if it is open This provides a quick way to return to the Search Results Activate Symbol Window This command makes the Symbol Window visible and puts the cursor in the text box at the top Once activated you can type into the text box and the sym bol
408. r global configuration file which will end up containing all your customizations Once you use the Load Config uration command or make a change to the customization settings inside Source Insight the configuration file will be changed automatically It is also a good idea to make a backup copy if you update your Source Insight software Often newer builds of Source Insight will be compatible with older configuration files but not the other way around If you should wish to revert to an older build of the software it is best to use an older configuration file Global Configuration Normally Source Insight maintains a configuration file called Global cf3 stored in the Source Insight program directory You don t need to load or save this file yourself That is done automatically It is saved whenever you make any change to a configuration setting and loaded when you open a project Partial Configurations You can save a partial configuration file using the Save Configuration com mand For instance you may only save the key bindings When you load a configuration file that contains a partial configuration only the parts that exist 204 Source Insight User Manual Chapter 5 Load Configuration in the file are loaded The rest is unchanged By loading and saving partial con figurations you can mix and match some of the configuration parts Load Configuration 0x All Configuration Settings Individual Settings
409. r shortcut menu You control what relationships are shown from this command and how the window displayed See also Relation Window Properties on page 233 You can also customize the appearance of the Graph View of the Relation Win dow by using the Relation Graph Properties command See also Relation Graph Properties on page 232 Source Insight User Manual 41 Window Tour Chapter 3 Clip Window The Clip Window is a floating and dockable window that displays clips You can drag and drop text onto the Clip Window and drag text from the Clip Win dow onto your files i inaWi n x Type into this field to Clips 1 gt Text from CFrameWnd NotifyFloatingWindows 1 x select a clip This list is filtered as you type fg szName szProj j if TmcDoDig NewProj amp arg tmcOK Other clip information will szDstFile appear at the top telling b you where the clip came DocFEndCrLf from Clipboard hWnd GetWindow Dm i pragma optimize g on This is a list of all open fFe if vprebarMain Rbar_Create vhwndFrame ratbtmplApp amp b c clips Each item shows the first line of text in the clip a OB El X Ba fi Figure 3 17 The Clip Window What Is A Clip Clips are usefulfor Clips are clipboard like documents In fact the Clipboard is considered a clip rearranging code in Source Insight Instead of having only one clipboard Source Insight lets you and for bo
410. r text or keywords across all project files This command works the same as the Lookup References command The only difference is that each dia log box has its own persistent state See also Lookup References on page 208 Source Insight User Manual 259 Command Reference Chapter 5 Searching Options Search Results Specifies options for the Search commands x General Typing Files Languages Symbol Lookups Display Colors Syntax Formatting Syntax Decorations Searching Remote Search Results C fs C Always replace old Search Results Always append to old Search Results Automatically jump to first result Options Automatically load selection into Find pattem v Reselect original lines after Replace operation These options control how text is added to the Search Results window Ask before replacing old Search Results You are always prompted as to whether you want to replace or append to the existing Search Results or to create a new Search Results file Always replace old Search Results Any existing Search Results are thrown out and replaced with the new results Always append to old Search Results The new search results are appended to the end of the current Search Results file as a new results set Automatically jump to first result When the searching is complete Source Insight jumps to the first matching result If disabled then the first matching result in the Search Resul
411. ra tion file only the style properties are altered Reset Click this button to reset all the styles to the factory defaults This loses all your changes since installing Source Insight Font Name Indicates the font currently selected Size Selects the font size specifically as a point size You may find the relative Scale property more useful since it is relative and works well regardless of changes to the parent styles Scale Specifies the font size scaling as a percentage of the parent style s font size For example if the scale is 50 then it will be half the size of whatever the par ent style font size is Bold Selects the bold property of the style if any Italic Selects the italic property of the style if any Underline Selects the underline property of the style if any All Caps Selects the All Caps capitalization property of the style Strike Thru Selects the Strike Thru property of the current style Foreground Selects the foreground color of the current style Background Selects the background color of the current style Shadow Selects the color of the drop shadow of the current style Inverse Selects the Inverse property of the current style Inverse means that the foreground and background colors are reversed Above Line This selects the percentage of vertical spacing to add above the line Below Line This selects the percentage of vertical spacing to add below the line Expanded This selects the perc
412. racter in front of the syllable you type Using Syllable Matching Many of the text boxes where you can type a symbol or file name allow you to type a series of syllables The list box associated with the text box will be fil tered down based on what you type When you type begin with the starting two or more characters ofa syllable and follow that with another syllable For example CreWin You can separate syl for filtering lables with a space also For example Cre Win For the most part you can type the syllables in any order The syllable filtering is not case sensitive However once the filtered list is dis played Source Insight will try to select the item in the list that most closely matches what you typed including the case 70 Source Insight User Manual Chapter 4 Matching names are sorted by how well they match Analysis Features For example the following specifications are equivalent CreWin Cre Win cre win WinCre Win Cre win cre win_cre Win cre Source Insight will filter the list contents down and sort the results with best matches near the top Symbols that match exactly what you typed starting with the first character of the symbol are displayed near the top of the list For example if you have two symbols TopBottom and TopAndBottom and you type TopBot then the TopBottom symbol will appear first even though both symbol names match the specification Using Syllable Shortc
413. rce Insight User Manual Chapter 6 Symbol List Functions BookmarksCount This function returns the number of bookmarks in the bookmark list Use BookmarkslItem to access the bookmark at a particular index in the list BookmarksDelete name Deletes the bookname named name Bookmarksltem index This function returns the bookmark at the given index The size of the book mark list is returned by BookmarksCount Index values start at zero and con tinue up to one less than the value returned by BookmarksCount This example enumerates all the bookmarks cmark BookmarksCount imark 0 while imark lt cmark bookmark BookmarksItem imark do something with bookmark imark imark 1 See also Bookmark Record on page 305 BookmarksLookupLine filename In Searches for the bookmark at the given position The file is in filename and the line number is In Returns a Bookmark record or nil if the bookmark is not found See also Bookmark Record on page 305 BookmarksLookupName name Searches for the bookmark named name Returns a Bookmark record or nil if the bookmark is not found See also Bookmark Record on page 305 Symbol List Functions A symbol list is a zero based indexed collection of Symbol records See also Symbol Record on page 309 Some of the symbol access functions return symbol list handles Symbol lists are allocated resources that should be freed using SymListFree
414. rch Results window the source links are deleted Creating Source Links You can use the Parse Source Links command to create source links in the cur rent file The Parse Source Links command requires that you specify a search pattern to be used to parse file names and line numbers from a file Each time a pattern matches a new source link is inserted into the current file The Parse Source Links command is useful if you have a log file that contains compiler output and error messages You just open the log file and run the Parse Source Links command A link will be setup for each line in the log file containing an error message Source Links from Custom Command Output You can create source links from the output of a custom command When defining the command the Parse Source Links option should be on You must specify a search pattern to be used to parse file names and line numbers When the command terminates Source Insight automatically invokes the Go To First Link command This is the recommended way to invoke the C compiler from Source Insight This allows you to run the compiler and if there any errors Source Insight will position you to each erroneous C source line Navigating with Source Links Source Insight provides the following commands for moving between link loca tions Table 4 5 Source Link Commands Command Key Description Jump To Link Alt Up Arrow Moves to the other end of the source link at the cu
415. relations will speed the Relation Window up Source Insight User Manual 115 Source Insight Concepts Chapter 4 Locking and refreshing manu ally usually works well Lookup References is the fastest type of searching Context sensitive options can slow down Lookup Refer ences It also works well by leaving the Relation Window locked To lock the Relation Window click on the lock button in the Relation Window toolbar You can refresh the Relation Window at any time by using the Refresh Relation Window command or by clicking on the Refresh button in the Relation Window tool bar Speeding Up Auto Completion As you type an identifier the auto completion window pops up to propose matching identifier names Every time you type a character Source Insight considers the symbol data for that file to be stale To give you the most accu rate auto completion results Source Insight would need to reparse your file after each character you type There is an option that controls this in the Pref erences Symbol Lookups dialog box The Parse locally before lookup option causes Source Insight to reparse before the auto completion window appears On a fast machine or in a small file the speed will be acceptable However turning this option off will result in a faster response Speeding Up Net Framework Auto Completion If you are editing C code the Net Framework symbol completion can become slow if you locate the My D
416. rent project This will be the most natural way to add a file if you are writing new code and are creat ing new source files a lot If you already have existing source files and you want to add them to the cur rent project use the Add and Remove Project Files command This command allows you to add any existing files including whole directory trees from any where on your disk to the current project See Add and Remove Project Files on page 123 and Add File List on page 127 Source Insight User Manual 49 Source Insight Concepts Chapter 4 To open a project use the Open Project command Adding a file to a project has the following effects e The file name is stored in the file name database for the project When ever 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 e 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 on page 66 e The files 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 e The way the name of the file is displayed is changed The file name be
417. replace all the current custom com mands with the custom commands in the configuration file Source Insight User Manual 205 Command Reference Chapter 5 Custom Commands Merge Check this to merge the custom commands in the configuration file with the existing custom commands Merging means that the ones in the file being loaded replace custom commands with the same name and custom commands that only exist in the file are added to the current list of custom commands already loaded Any other existing custom commands are preserved Load Displays a File Open dialog box You can select the configuration file you want to load with this dialog box Load File The Load File command opens a file to edit It opens a dialog box containing a list of all files in the project regardless of directory You can also open files by using the Open command or by dragging files from Windows Explorer and dropping them on the Source Insight window CT 6 hl File Name File Name Type part of the name of the file you want to open You may also type a series of wildcard specifications and click the Open button and Source Insight will replace the File list contents with the results of wildcard expansion The wildcards are expanded in the current directory As you type in this text box partial matching occurs in the file list 206 Source Insight User Manual Chapter 5 Load Search String File list If the Project Wide option i
418. reports them Show read only file names with mark If checked then Source Insight displays read only file names in window titles with an exclamation point at the beginning of the file name This only affects how the file name is displayed in window titles Show current project name in application background If checked then the name of the current project is drawn in the multiple document background area of the Source Insight application window Tile source and destination windows for Source Link commands If checked then Source Insight tiles two windows to show the source and destination source links whenever you use one of the source link commands such as Go To First Link or Go To Next Link The source link commands are also used when you run a custom command that parses output for source links such as a com pile command If not checked then Source Insight will not alter the window arrangement when you used the source link commands but it will active the window containing the target of the source link Source Insight does not perform tiling if the current window is maximized Use background textures Enables the use of a gray texture in the background of user interface elements such as toolbars and dialog boxes Use flat style toolbars Uses the newer flat style toolbar buttons such as those in newer Windows programs If not checked then toolbar buttons will have a raised button look Enable Theming For Windows XP
419. ression determines the style that will be used to display the symbol s declaration and references Each symbol type X has a corresponding Ref to X and Declare X style When a symbol definition is parsed the corresponding Declare style is used when displaying the symbol name For example if the symbol definition is a Function then the function name will be displayed in the Declare Func tion style See also Style Properties on page 270 Line Numbers This command toggles the display of line numbers The line numbers appear at the left of each line They are displayed in the Line Number style You can edit the style using the Style Properties command Link All Windows The Link All Windows command toggles the Link All Windows mode When the Link All Windows mode is on then scrolling any window will scroll all the 202 Source Insight User Manual Chapter 5 Link Window other windows The Link All Windows mode overrides the normal window links that are setup by the Link Window command Link Window The Link Window command links the current window to another window so that they scroll together This command lets you specify what window is linked Once you link the current window to another window scrolling the current window will scroll the linked window If the Two Way check box is on then the windows are linked together so that scrolling either of them will scroll the other However if the
420. revious Change 181 Go To Next Link 181 Go To Previous Link 181 Help ssssccssscssccssscseees 187 HelD MOC isscoscscsossossievscsesscossenssendssonssecsscssccsesssenssssnesecsasensesensdensssonsssasessscesesesenses 182 HIGRIIGHE WOM RENE MET M TRU 182 Incremental Search Incremental Search Mode Incremental Search Backward Horizontal Scroll Bar HTML Help a indent l efle ausis teo eet a eia sies sace a e a eoa ea eo ees eese i sedes e cei va sc vPeea iso coe de re Pede Neg INGONTRIGNE mE RR Insert ASG b T M Insert Filez4 dee de eoea nettes etascses esae nanesene aodai o isoissa osode ao suae re ioiii Insert Line ee Insert Line Before Next Insert New Line YOUN ETa eU BUD JUMP TO CONCN smt eo rokos nita JUMP TO DEFINITION scsssssvassevssseissceassodsseacseseadesssecenssedsseacstecedsonssconssedeseoisescesconssseesse Jump To Link Jump To Prototype Key Assignments T I CO Ve e UT vM M Ne efe WTe o 80 o o s VIR LANGUAGE uo X EineN tmbDels Gvacscos even aov educit ent aco aane age ie eet eie soa eot paue eee t ee dos ceca Lac ho su wd sed es in eee gae d COUR Link All Windows e DIBICWIBOOW lt cscdhescstsccasacsescsesesssuccsseecessasosccsesasevecst
421. rite timestamp on all the files currently shown in the Relation Window This is useful if you want to cause re compilation of all the files containing the symbols shown in the Relation Window This is especially handy if the Relation Window is showing references Source Insight User Manual 283 Command Reference Chapter 5 Typing Options This command specifies typing and editing options It activates the Typing page of the Preferences dialog box I i x Colors Syntax Formatting Syntax Decorations Searching Remote General Typing Files Lanquages Symbol Lookups Display Source Editing IV Highlight matching parentheses while typing Keep cursor in window when paging up and down v Use block cursor shape v Use Smart Tab for field selections Typing tab indents line regardless of selection Typing tab replaces current selection Indent commands affect preprocessor statements Use Smart Paste JV Always select pasted text after pasting whole lines After pasting select Jat end of pasted text gt Auto Completion JV Use automatic symbol completion window IV Use detailed completion window IV Insert parameters for functions Use completion window inside comments Use case sensitive matching v Tab key selects item Browsing in Lists v Match syllables while typing slower v Match members while typing Cancel Help Highlight matching parentheses while typing Source Insig
422. rl 9 Move to previous enclosing parentheses Paren Right Ctrl 0 Move to next enclosing paren theses Blank Line Up Move to previous blank line Blank Line Up Move to previous blank line Block Up Ctrl Shift Move to previous block level Block Down Ctrl Shift Move to next block level Go To Line F5 Move to a specified line num Ctrl G ber Search Ctrl F Search for occurrence of a pat tern Search Forward F4 Search for next occurrence Search Backward F3 Search for previous occur rence Search Forward for Shfit F4 Searches for next occurrence of Selection the word under the cursor Selection History Ctrl Shift M Displays a list of your past selections Source Insight User Manual Chapter 4 Extending the Selection Scrolling and Selecting Text These commands will create an extended selection or extend an existing selec tion The keystrokes listed are the defaults Table 4 8 Selection Commands Command Key Description Select All Hold down Ctrl and Select the whole file click the mouse in the selection bar at the left Select Block Ctrl Selects the next small est enclosing set of braces or parentheses Select Function Or Double click in selec Select the whole Symbol tion bar at the left of enclosing symbol defi edge of the window nition Select Char Left Shift Left Extends selection to the left by one charac ter Select Char Right Shift Right
423. rns the number of files added to the project hprj GetProjFileName hprj ifile Returns the name of the project file associated with index ifile in the project hprj Each project has an index of project files sorted by file name GetProjFileName maps an index to a file name File index values start at zero and go up to the count returned by GetProjFileCount This example interates through all project files ifileMax GetProjFileCount hprj ifile 0 while ifile ifileMax filename GetProjFileName hprj ifile ifile rfile fd GetProjName hprj Returns the name of the project hprj The name contains the full path of the project file GetProjSymCount hprj Returns the number of symbols in the project hprj GetProjSymLocation hprj isym Returns symbol location information in a Symbol record for the symbol associ ated with index isym in the project hprj See also Symbol Record on page 309 Each project has an index of symbols sorted by symbol name GetProjSymLo cation maps an index to a symbol Symbol record Symbol index values start at zero and go up to the count returned by GetProjSymCount You can call JumpToLocation to move to the Symbol record returned by Get ProjSymLocation See GetSymbolLocation for more information on Symbol records GetProjsymName hprj isym Returns the name of the symbol associated with index isym in the project hprj 340 Source Insight User Manual Chapter 6 Project Functio
424. roject Open ee eee eene ern nennen nein senta ennt ta toan sensn sn ens 57 The Base PIOjeCt M 57 Programming Languages cccccccssccrscesssccsccrsssccsccecsscssccssssccsoees 58 BUIIt IIN LANGUAGES RR 58 CUSTOM LANGUAGES 58 Net Framework Support esee esee neon neenon aerae en seen etae en sense aa sesta s opos osvo oosporo Ess 59 ii Source Insight User Manual Contents USING P Using HTML and ASP Compound LANGUAGES ceecesescecssssceccssccsccssccsccseccsccsescseccocee Java Language Editing srersecccccscccscrssccsccseccsccseccscessccecsseccscssccssccsecssccsecssccsssssecseces C C Language Features Working with Inactive Code ifdef Support Conditional PALSING BRE voies Preprocessor Token MACYOS eee eee eee eee enean eee ao sean e ane ean eee en eene eene eaae eaae eaa Parsing Considerations cease eese esee aee ee sensns eae en sense an etae ta sense enses senses stas en Coding Tips for Good Parsing Results e eese eese esses sees eese en senten stata sena eta sen Document Types eere eere rennen Document Specific Options Associating Files with Document Types eee ee esee neenon sensa een aenea seen etas ea sense Associating Special File Names 4 esee
425. roject Window Clip window IV Context Window Reset Spacing Options Page number in status bar Cascade new windows Maximize new windows IV Horizontal scroll bars for each new window IV Vertical scroll bars for each new window v Smooth scrolling windows IV Show line revision marks in left margin IV Show book marks in left margin v Show exact case of file names IV Show read only file names with mark v Tile source and destination windows for Source Link commands J Show current project name in application background Use background textures IV Lise flat style toolbars v Enable Theming v Enable Animations Sort Window menu by usage Sort window menu by title 4 OK Cancel Help Display Elements The Display Elements group is used to turn on and off ele ments of the user interface Status Bar Turns on and off the status bar at the bottom of the Source Insight application window Tool Bar Turns on and off the main toolbar at the top of the Source Insight application window Clip Window Turns on and off the Clip Window Project Window Turns on and off the Project Window Source Insight User Manual 155 Command Reference Chapter 5 Options Group Context Window Turns on and off the Context Window Relation Window s Turns on and off all Relation Windows Reset Resets the positions of all the auxiliary windows so that they are moved onto the main monitor and are not transparent
426. ron SwzList DelFromSwList h DelFromSwzList if psw tgvsSave tgsort tgsortNXil E FResizeOnw GetSwRc psw tgvsSave tgvs if tavs tgsort tgsortName SetSmwTgsort hsmw tgsortName break eintsgSw PaintScroliCamer 0 FSwHasGrowBox quA case EN CHANGE GetScroliComerRc psmwrevEat edit fed has changed PES FFilter8mw hsmw we 4 a HdcSwLock gt UnlockHdcSw return EAS AS a ms REI Line 2297 Col16 DoSwCommend Figure 1 2 A Symbol Window appears at the left side of each source file window You can click on any symbol in the Symbol Window and quickly jump there You can also drag and drop symbols in to rearrange your code The Symbol Window can be sorted by name line number and type You can activate the Symbol Window and type the first few letters of a symbol s name in order to quickly move to it The Symbol Window also displays ifdef endif nesting lev els and symbol type icons for quick identification and orientation Source Insight User Manual Chapter 1 Feature Highlights Automatic Display of Declarations in the Context Window Source Insight 2 0 introduced an innovative feature called the Context Window The Context Window automatically displays symbol definitions based on what identifier your cursor is in or on what you are typing See also Context Win dow on page 34 The Context Window updates in the background and tracks wh
427. rrent line Go To First Link Shift F8 Selects the first link line in the link source file and selects the associated link line in the link target file and ensures both files are visible on the screen in windows Source Insight User Manual 91 Source Insight Concepts Chapter 4 Table 4 5 Source Link Commands Command Key Description Go To Next Link Shift F9 Same as above except with the next link in the link source file Go To Previous Link Jumps to the next link in the source file Scrolling and Selecting Text A selection is a range of zero or more characters highlighted in a source file window Selected text is highlighted displayed in the Selection style usually reverse video Each source file window has its own single selection Switching between win dows leaves the selections in each window intact Selections can be made with the keyboard and the mouse Commands used for selecting text are listed below To select text with the mouse simply point at the text and drag across it Double clicking the left mouse button selects a whole word Scrolling the window will only change the selection if the Keep cursor in win dow when paging up and down option is turned on in the Preferences General dialog box Otherwise only cursor movement keys pointing with the mouse or editing your file will change the selection The selection in the current window and current file is referred to as the current selectio
428. s Auto Annotations JV Show arrows at goto statements JV Annotate closing braces with end comments Annotate closing braces only for long blocks OK Cancel Help 278 Source Insight User Manual Chapter 5 Display Substitutions Auto Annotations Syntax Decorations This group of options controls which operators are substituted with special symbols User special operator symbol substitutions This enables or disables the whole group of operator substitutions that appear below Pointer field reference uses right arrow This replaces the gt pointer operator with an actual arrow like this gt Not Equal This replaces the not equal operator with Equal This replaces the equal operator with Less Than or Equal This replaces the lt operator with lt Greater Than or Equal This replaces the gt operator with 2 Assignment uses left arrow This replaces the assignment operator with Division This replaces the division operator with Logical AND This replaces the amp amp logical And with A Logical OR This replaces the logical Or with v Scale nested parentheses Nested parentheses are shown so that outer levels are larger than inner levels This makes it easier to visually identify matching parentheses i 728 UINT IMin UINTJLim gt gt 1 Source Insight can automatically add certain annotations to your source code display The following options control which ann
429. s The selection commands change the current selection Usually if the resulting selection is not visible in the window the window is scrolled to show it These commands change the selection to an insertion point and move it to a new location in the file Table 4 7 Cursor Movement Commands Command Key Description Cursor Down Down Arrow Move down by one line Cursor Up Up Arrow Move up by one line Cursor Left Left Arrow Move left by one character Cursor Right Right Arrow Move right by one character Beginning of Line Home Move to beginning of line End of Line End Move to end of line Top of File Ctrl Home Move to top of file Bottom of File Ctrl End Move to end of file Beginning of Selection Ctrl Alt Move to start of an extended selection End of Selection Ctrl Alt Move to end of an extended selection Source Insight User Manual 93 Source Insight Concepts Chapter 4 Table 4 7 Cursor Movement Commands Command Key Description Top of Window Move to top of window Bottom of Window Move to bottom of window Word Left Ctrl Left Move left by one word Word Right Ctrl Right Move right by one word Function Down Keypad Move to next function defini tion Function Up Keypad Move to previous function def inition Blank Line Down Move to next blank line Blank Line Up Move to previous blank line Paren Left Ct
430. s tion mark Browse Global Symbols Dialog box 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 Other wise 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 fol lows 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 defini tion 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 curren
431. s Group Relation Window Properties Dialog Box Expand duplicate branches Enable this to expand duplicate child branches even if they have already been expanded earlier If this is disabled then dupli cate children are inserted in a collapsed state This group specifies the relationship expanding rules the Relation Window uses when it tracks symbols of different types View Relationship The relationship shown depends on the type of symbol You can specify what relationship is shown for different symbol types For example you could set the relationship viewed for functions to Calls and the relation ship viewed for classes to Inheritance Thus when you select a function the Relation Window shows a call tree and when you select a class name the Rela tion Window shows the class inheritance hierarchy See also Relationship Rules on page 235 Group multiple references into one item When the Relation Window is show ing a references type of relationship you can enable this to suppress duplicate references from inside the same object For example if function B is called three times from inside of function A only the first reference from function A will be listed If you disable this option then all three references will be listed as three separate nodes Disabling this will provide more reference information In the graph views the multiple references are displayed nicely inside of a single graph node making it easy to see how the
432. s copies to the Clipboard Source Insight User Manual 143 Command Reference Chapter 5 Copy To Clip The Copy To Clip command copies the contents of the current selection to a clip buffer that you name The Clip Window is activated when you use this command so that you can specify the destination clip name Copy To 15 aj 0 x A dxpStdDocked min DxOfRc amp vsci rcScreen 4 B SetLwTitle vhelw Paste From Clipboard hlw HlwFromHwnd hwnd Idw for int idw 0 idw lt prank cdw idw Irank for int irank 0 irank lt crank irank InvalidateRect hwnd NULL fFalse n DO B EX Ba ce After either selecting a clip item in the list or typing a clip name press the Enter key to complete the copy operation Create Key List The Create Key List command generates a new file named Keylist txt contain ing a list of all commands and the keystrokes assigned to each command The Keylist txt file is just a regular unsaved file You can edit the file normally This is useful for creating your own keyboard quick reference guide Create Command List This generates a new file named Command List which contains a list of all commands and their descriptions The output file is just a regular unsaved file You can edit the file normally This is useful for creating your own command quick reference guide Cursor Down The Cursor Down command moves the insertion point down by one line Cursor Left
433. s dragged out Always paste at the start of a line Preserve clips between sessions If checked then clips are automatically saved to the Clips directory in the Source Insight program directory and will be reloaded the next time you run Source Insight If not checked then clips are thrown away when Source Insight exits Prompt for new clip name when text is dropped If checked then Source Insight prompts you for the name of a clip whenever you drop text on the Clip Win dow If not checked then Source Insight will generate a simple name for the clip automatically Delete clip after clip is dragged out If checked then when you drag a clip out of the Clip Window the clip will be deleted from the Clip Window If not checked then the clip will be retained Always paste at the start of the line If checked then the clip will be pasted at the beginning of the current line instead of exactly where the cursor is This does not apply when you drag a clip out of the window to a particular spot Font Text Color Back Color Lets you pick the display options for the Clip Win dow Source Insight User Manual 135 Command Reference Chapter 5 Close The Close command closes the current file If the file has been edited but not saved then Source Insight will ask you if you want to save the changes before closing the file by using a dialog box with the following buttons Source Insight xj YD Save changes to Util c toolbox
434. s forward in the current file for the pat tern previously searched for The search pattern is initially added using the Search command or the Search Forward for Selection command The search begins at the current insertion point 258 Source Insight User Manual Chapter 5 Search Forward for Selection Search Forward for Selection This command searches for the next occurrence of the first word in the current selection To use this command put the insertion point within the word you want to search for and invoke this command Source Insight will find the next occurrence of that word Search List The Search List command appears on most right click menus when you click on a list This allows you to search the list for a string or regular expression Tip Once the input focus is on a list you can press F4 to search for the next occurrence Search List x String to find in the list Gk eG Start at Beginning Cancel MatchCase J Regular Expressions String to find in the list Add the string pattern to search for Start at beginning If checked then the search starts at the first item in the list If not checked then the search starts just after the selected item in the list Match Case Turn this on to perform a case sensitive search Use Regular Expressions Turn this on to interpret the search string as a regular expression See also Regular Expressions on page 85 Search Project Searches fo
435. s list Lists all the keystrokes assigned to the selected command Select a keystroke here before clicking the Delete button when deleting it OK Click this to record the new key assignments in the current configuration Cancel Click this to cancel the command The current configuration will not be affected by any changes in the dialog box so far Assign New Key Click to add a new keystroke or mouse click to the com mand selected in the Command list A window will pop up prompting you to type a key combination Delete Assignment Click to remove the assignment of the keystroke selected in the Keystrokes list from the command selected in the Command List Run Click to run the selected command This also records any changes you have made Reset Click to reset the key assignments to their default factory settings Source Insight will ask you if you are sure you want to do this 188 Source Insight User Manual Chapter 5 Key Assignments List Click to create a key assignments list file This also records any changes you have made The list file is just a text file that contains a list of commands and their key assignments Menu Click Menu to record the new key assignments in the current configura tion and then run the Menu Assignments command See also Menu Assign ments on page 211 Numeric Keypad Keys The numeric keypad keys are bound to these commands by default Key Command Scroll Half Page Up Scr
436. s on then this list displays all files in the current project regardless of directory If the Project Wide option is off then this list displays all the files in the current working directory The current directory path is displayed above the list box The files shown in the current directory are expanded from the wildcard strings specified in the Document Options dialog box for all document types Open Click this to open the file selected in the file list If nothing is currently selected in the file list then Source Insight opens the file named in the File Name text box If the File Name text box contains one or more wildcard speci fications then Source Insight will replace the file list with the results of the expansion If the Project Wide option is on the wildcards are expanded over the whole list of files in the current project otherwise the wildcards are expanded in the current directory Ifthe file specified does not exist Source Insight will allow you to create a new file with that name Select All Click this to select all the files listed in the file list Show Dirs Click this button to toggle the list box contents between showing file names and showing subdirectory names Project Wide If checked the file list will show all the files that have been added to the current project regardless of directory If not checked the file list will show files in the current directory only This option is always disabled if no project is
437. s with acceptable performance However if you notice that version 3 5 s display speed is a bit slower than version 2 1 keep in mind that a lot more infor mation is being displayed It is possible to reduce the display functionality to that of version 2 1 and speed it up Source Insight User Manual 113 Source Insight Concepts Chapter 4 Formatting refer ences is slower than declarations You can trade off display richness for speed Syllable matching in large projects can be slow The Preferences Syntax Formatting dialog box lets you specify how detailed you want the display Each option has a performance cost The significant options are listed here starting with the least costly to the slowest and most costly 1 Apply styles for references to members Apply styles for symbol declarations Apply styles for local symbol declarations Apply styles for references to function local symbols 2 3 4 5 Apply styles for non function local symbols 6 Find references using the Project Symbol Path 7 Qualify member references In general identifying references is slower than declarations Identifying references to symbols can be slower if the project is very large because each ref erence has to be resolved with a symbol lookup The symbol lookup engine has been heavily optimized to allow formatting ref erences to symbols at display speed A lot of information is cached in the pro cess
438. ser Manual 333 Macro Language Guide Chapter 6 This example looks up a symbol and enumerates through each declaration found symbol Ask What symbol do you want to locate hbuf NewBuf output count GetSymbolLocationEx symbol hbuf 1 1 1 in 0 while ln lt count loc GetBufLine hbuf ln msg loc file at line loc lnFirst in 21in 1 CloseBuf hbuf Locating File Names GetSymbolLocationEx can also look up file names By giving a simple file name as the symbol_name parameter GetSymbolLocationEx can look up the file in the project or on the project symbol path and return the fully qualified path to the file in the location file field See GetSymbolLocation for an exam ple If fLocateFiles is TRUE and a symbol name is given without an extension GetSymbolLocationEx will locate files that have this base name regardless of extension For example if you specify dlg in symbol name GetSymbolLoca tionEx may return matches on dlg c a file and dlg h another file Fur thermore if fLocateSymbols is also TRUE then DLG a data type may also be returned GetSymbolFromCursor hbuf In ich Returns the Symbol record of the symbol name that appears at the given cursor position hbuf is the buffer handle In is the line number ich is the zero based character index on the line This works in a similar way to the Jump To Definition command except it returns the Symbol record instead of
439. sesensscacstvsecessscnsseassecesdvsssunssiasesssevesseonssiaseicoeeess Wildcard Matching rceccrecssccsscssccecccecceccsscceccsccsecssccssccsccssccsscssccsscssccsscsscsscssessoess Matching the Beginning or End of a Line sesseseesessosessosoosocsosoososoosoesosossoesosossocsosose 86 Matching a Tab or Space eee eee sees eese e eee en seen sensns tastes tissi sesta sense essen E esise 86 Matching 0 1 or More Occurrences Matching Any in a Set of Characters 86 Regular Expression Groups eee 87 Overriding Regular Expression Characters e essessesesseseesosoosocsocoosocsocoesocoesoesosoosoesososee 87 Regular Expression Summary esee esee een seen sense en sense ea sense an sens eaae tastes senses sta soa 88 Bookmarks swescccsssvsssedacedssesssevsssessonsseusees 89 Navigation with the Selection History 89 Go Back and Go Forward commandis sees eese essen sense nn senses sensa sense ta sta soo 89 Navigation Using Source Links eee e cerne eene eene eene rone tn nenne ease sensa 90 Searching and Source Links esses sees eese eee eene eene enne en sense tn sense an eese aa sense evo sooroo 90 Creating Source Links eese eene ee seen enue 91 Source Links from Custom Command Output 91 Navigating with Source Links 91 Scrolling and Selecting Text ee e
440. sight will also find different ending forms of the keywords you specified For example if you 210 Source Insight User Manual Chapter 5 Make Column Selection specified the keyword open Source Insight will also find opens opened and opening This has the same effect as typing this expression open or opens or opening Word variations are applied to each keyword term For example if you speci fied save write Which implies save and write must be present With word variations enabled this search would be equivalent to save or saves or saving and write or writes or writing Keyword Search Results When you perform a keyword search the Search Results will list blocks of lines that include the keywords together This gives you a little bit of context around the matches Make Column Selection The Make Column Selection is used with the mouse Alt Left Click and drag creates a rectangular selection The column selection can be Cut Copied or Pasted Menu Assignments The Menu Assignments command allows you to assign or reassign commands to the menus The menu assignments are part of the current configuration lx Menu Assignments Command Menu cld Fie Menu Contents E ZA nr Cancel File Close All Project Close Project Windows Close Window Macro CloseOldWindows New Open Load File Browse Files New Clip Recent Files Men
441. so you may notice that the first time you open a file and start scrolling around in it it may slow down sometimes Subsequent viewing of the file will speed up Some people want the fastest possible display However you may be willing to sacrifice a little of that speed in turn for more useful information that increases productivity Speeding Up Typing in Browse Dialog Boxes Typing and filtering symbol lists can become slow if you have a large project and you have the Project Settings Quick browsing for symbol syllables turned on Source Insight is trying to perform syllable matching on a large syllable index You can address this two different ways Either you can turn off syllable index ing in the Project Settings dialog box or you can change the behavior of the list filtering with the Preferences Typing dialog box The Project Settings options control what is stored and indexed in the symbol database The Preferences Typing options control how the information is used in the lists You do need the syllable information in the database to use the symbol syllable matching features of the lists But not for file name lists If memory permits leave Project Settings Quick browsing for symbol syllables enabled and turn off Preferences Typing Match syllables while typing Even with syllable matching while typing disabled you can still use it by prefixing what you type with a space That is prefixing what you type with a space tog
442. source files This simply scans all the files in the project and re parses them to update the symbol database This is the slowest method How ever if you cancel the operation the symbol database will be left intact although it may be slightly out of date If you cancel you can continue to edit Source Insight User Manual 229 Command Reference Chapter 5 normally and the re parsing will continue in the background The symbol database will be at least as current as it was when you began the rebuild process Fix database file corruption if any This option scans the databases and ensures that the databases are in a legal self consistent state However some files or symbols may be missing from the databases after the rebuild is complete if you recently added or removed files from your project This is the fast method You should use this command if you suspect that your project is corrupted Nor mally Source Insight can detect if a project was not closed properly when it tries to open the project If Source Insight detects that the project is corrupt it will ask you if you want to rebuild the project Source Insight will not know ingly allow you to open a corrupted project Re Create the whole project from scratch recommended This is the most thorough method of rebuilding the project and it is the recommended method This deletes all symbolic information about the project and rescans all the source files to regenerate the symbol dat
443. splits the screen into two windows the first window will contain the current file The other window will contain the previ ous current file i e the last file you were viewing This command is only allowed if two or more windows are open Tile Vertical The Tile Vertical command arranges all windows so they are not overlapping The tiling algorithm will attempt to make windows taller than they are wide This is useful for viewing 2 or more files side by side Toggle Extend Mode The Toggle Extend Mode command toggles extend mode on and off If extend mode is on then movement commands such as Cursor Up Cursor Down Top of Window and Go To Line to name a few will cause the current selection to be extended to the new location If extend mode is off then the movement commands simply put an insertion point at their destination Toggle Insert Mode The Toggle Insert Mode toggles between insertion and overstrike mode In insertion mode characters typed will be inserted before the insertion point In overstrike mode characters typed will replace characters at the insertion point Top of File The Top of File command moves the insertion point to the first line in the cur rent file Top of Window The Top of Window command moves the insertion point to the first line in the active window Touch All Files in Relation This command is available from the right click menu of the Relation Window It touches i e updates the last w
444. st Manages the list of source windows 360 Source Insight User Manual Chapter 8 New Commands File Format Compatibility with Older Versions Version 3 5 is able to open version 2 x project files and some other files how ever not all information is copied and some indexing has to be recreated Version 2 x File How Version 3 5 Handles It Project Files PR Version 3 5 opens the project and converts it into version 3 5 format This requires re indexing the symbol database and may take a little while When it is finished you can start looking up symbols However it still requires re parsing the whole project later either in the background or using the Project Synchronize Files command The nice thing about this conversion is that you don t have to re add your source files from scratch Version 2 1 can open a version 3 5 format project but it will down convert it again to 2 1 format which again requires re indexing the symbol database If you plan to switch between v 2 x and v 3 5 a lot it will probably be easier to maintain two separate projects one in each format Note that v 3 5 projects have a few more files associated with them and some extensions have changed Each project is now made up of the following file extensions PR PS PO PFI PRI IMB IMD IAB JAD Configuration Files CF Version 3 5 can open version 2 x configuration files how ever the file format is not downward compatib
445. st the margin width This only applies while you are typing new text If not checked then Source Insight will not do any automatic wrapping of text Allow auto complete If checked then symbolic auto completion is allowed for the document type if auto completion is enabled globally in the Options gt Pref erences Typing dialog box Tab Width The width of a tab character in character spaces Margin Width The width of text in characters spaces before automatic word wrapping will occur Expand tabs If checked then Source Insight will expand a tab character to the equivalent number of spaces when you type a tab The text will look the same as if a tab was typed but spaces will be used to fill If not checked then Source Insight will simply insert a tab character into the file when you type a tab Enter key inserts new line If checked then pressing the Return or Enter key while typing will insert a new line If not checked then pressing Return or Enter will move the insertion point to the beginning of the next line Show line numbers Displays line numbers in the left margin Show right margin Displays a light vertical line at the right margin If you are using proportional fonts then the right margin position is only approximate Visible Tabs If checked then Source Insight will display a special symbol where ever a tab characters is instead of just displaying white space Symbol Window If checked then files with this document type will
446. stall version 3 5 into a different directory than version 2 x Opening Older Projects Source Insight 3 5 can read the old project files created by version 2 x however it will need to convert them to version 3 5 format If you plan to keep Source Insight version 2 x around it may be better to recreate your projects for version 3 5 Finding Your Old Projects If you install version 3 5 into a different program directory than version 2 x version 3 5 will not have a record of your old projects You can still open them To open a version 2 x project use the Project Open Project command In the dialog box click the Browse button and navigate your way to the old project s Source Insight User Manual 353 Appendix Upgrading From Older Versions Chapter 8 PR file Select the old PR file click OK and then click Open Source Insight will begin converting the project to version 3 5 format Loading Old Customizations Configuration files are used to store your customizations The file format of configuration files has changed for version 3 5 but Source Insight can still read the 2 x format files In addition the file extension has been changed from CF to CF3 To load your old configuration file use the Options gt Load Configuration com mand Click the Load button and navigate to the directory where Source Insight version 2 x is installed You should see files with CF extensions The main global configuration file is named
447. style to apply to the range Normally you would select a comment style However you are free to select any style If the range element describes a quoted string you would Source Insight User Manual 199 Command Reference Chapter 5 Columns Group probably want to select the String style See also Style Properties on page 270 Note The style is applied to the whole range The style overrides any other auto matically applied style such as Reference To styles Range begins ends with These two text boxes specify the delimiter tokens that start and end the range The tokens can be up to 15 characters long Ifa Line range type is specified then there is only one delimiter text box enabled If you are specifying a Multiline range the beginning and ending delimiters can be the same This would be the case for a quoted string Escape sequence If either the Begin or End delimiter is preceded by this escape sequence then the delimiter is ignored For example you might specify back slash as an escape character in a quoted string so that you can embed quote characters inside the string like this a string with embedded quotes Allow nesting This applies only if a Multiline range is specified If this option is turned on then the range can be nested Ifthe Begin and End delimiters are the same nesting is not allowed because it doesn t make any sense Skip symbol parsing The contents of the range w
448. sym esee eere e eene eene aenean erasa enses esaet s sens ta setas eas ena 330 SYMLIStNEW soseo sa 330 SymListRemove hsyml isym eee ee eere eee eene eene en senten stata sese tn sese tn season 330 Symbol 331 GetBufSymCount hbuf eere crece esee eee esee enean tease ea senses sense setas essen senses 331 GetBufSymLocation hbuf isym ecce eese e ee eene eee eene ene en aea sense ea staat tas tasenoes GetBufSymName hbuf isym c cresce eee ee etes eese een sense ea tense asta setas ta sens tas enaen ter di ey adero io pe GetSymbolLine symbol name GetSymbolLocation symbol name 4 eere eese eene seen eene enses sense tn sens eensno 332 GetSymbolLocationEx symbol name output buffer fMatchCase LocateFiles Lire Sudden p M GetSymbolFromCursor hbuf In ich GetSymbolLocationFromLn hbuf In JumpToLocation symbol record e eese e eee ee eren eene enean etas ese en sens snae JumpToSymbolDef symbol name 4 cese eese eese ee eene ee een sesta sese enses snae SymbolChildren symbol SymbolContainerName symbol SymbolDeclaredType symbol SymbolLeafName symbol 4 eee e esee ee eene eese nete sesenta etas ts senses etas ees eno SymbolParent symbol
449. symbol name In Source Insight a sylla ble in a symbol or file name is considered a series of two or more characters that start with a capital letter For example the symbol name CreateWindow has two syllables Create and Window Source Insight indexes both syllables so that you can browse for the symbol by typing Cre or Win or any combina tion and in any order Each syllable is prefix matched by what you type You can browse symbols this way using the Browse Project Symbols dialog box and in the Project Window symbol and file list This also works in the text box above the symbol window on the left side of each source window In addition all lists in Source Insight that are matched with a text box now have this standard ability as well What is a Symbol Syllable A syllable in a symbol or file name is a series of two or more characters that start with a capital letter It can also be a series of capital letters Here are some examples Symbol Name Syllables CreateWindow Create and Window OpenHTML Open and HTML HTMLOpen HTML and Open FOpenDoc Open and Doc Vip32Test Vip32 and Test Symbol Indexes for Projects Source Insight indexes all the symbols in the symbol database Each symbol may appear in the indexes more than once That is because there are three indexes that Source Insight maintains Full Name Index This indexes the full name of a symbol The full name includes the symbol s
450. symbol reference Inactive Code Style Source Insights C C and Resource File parsers can be made to recognize inactive blocks of code that are disabled at compile time with ifdef directives The Options gt Preferences Language dialog box has Conditions buttons that allows you to edit the list of known conditional constants ifdef NEVER TluParentRefFromSrl hsrl ist amp tlu tlu hdoc hdocNil Wendif NEVER return CmdGotoTlu amp tlu cmdOK Blocks of code that are inactive are given the Inactive Code style For more information see Conditional Parsing on page 61 Comment Styles Source Insight allows you to add some explicit formatting to comments The comment style hierarchy appears below Comment Multi Line Comment Single Line Comment Right Figure 4 13 The comment styles hierarchy Source Insight User Manual 79 Source Insight Concepts Chapter 4 Comment heading styles explicitly format comments Comment Heading Styles Comment heading styles are very useful for breaking up large chunks of code with high level comments Comment Heading styles are specified with a n comment where n is a num ber between 1 and 4 For example 1 This is a Heading 1 comment 2 This is a Heading 2 comment When the comment displays the n at the beginning of the comment is hid den unless the cursor is on that line Ihis is a Heading 1 comment This is a Heading 2 comment If the curs
451. t For example void DoThing int paraml ifdef ABC int param2 else int param2 param3 endif In addition you may not be interested in code that is inactive For these rea sons Source Insight lets you specify condition values Blocks of code that are inactive are displayed in the Inactive Code style For example ifdef NEVER TluParentRefFromSrifhsrl ist amp tlu tlu hdoc hdocNil Wendif NEVER return CmdGotoTlu amp tlu cmdok Figure 4 6 The Inactive Code style is displayed Conditional Parsing Conditional parsing applies only to languages that support conditional compi lation in Source Insight C C and Windows Resource files Source Insight maintains two types of condition variable lists e Configuration file based condition list This list is saved in the current configuration file which contains your customizations Normally there is one global configuration file used for all of your projects e Project Specific condition list This list is saved with each project This allows you to have different condition variables defined for each individ ual project For example you could have RETAIL defined in one project and DEBUG defined in another The two condition lists are combined when Source Insight parses a file The project specific conditions take precedence over the global configuration based conditions Condition Variables Condition variables can
452. t even after importing a list you can still click the Cancel button in the Language Key words dialog box to ignore the changes you made to the keyword list 192 Source Insight User Manual Chapter 5 Language Options Merge current keyword list with imported list Select this if you want to merge the imported list with the currently loaded list Merging means that the imported list will be added to the existing list and imported keywords will replace like named keywords in the current list Language Options This command activates the Languages page of the Preferences dialog box It allows you to edit language specific options such as the language keyword list Source Insight supports two types of languages Built in and Custom You can alter a few options for built in languages For custom languages you can con trol all the parameters for a generic language IDL ODL omen Java Language amp JavaScript Esport amp Makefile Per Language x Resource Fle Properties amp Search Results amp SI Macro Language Token Macros Keywords VHDL _ Language This list contains all the installed languages Custom Languages are marked with a red asterisk in the icon Source Insight User Manual 193 Command Reference Chapter 5 Conditional Parsing You associate a language with a particular document type with the Document Options command See also Document Options on page 161
453. t Style Check box setting if x Clear both boxes if x Select both boxes if x Select Indent Open Brace Un select Indent Close Brace Draft View Use Draft View to The Draft View command on the View menu toggles the draft view mode on quicklyseehowtext and off When draft mode is on almost all syntax formatting is suppressed lines up except for color changes 166 Source Insight User Manual Chapter 5 Drag Line Down You can edit the All text is displayed using the Draft View style which can be edited with the Draft View font in Style Properties dialog box The Draft View style is preset to use a mono Style Properties spaced font Courier New See also Style Properties on page 270 The Syntax Formatting features of Source Insight are powerful but sometimes you need to see how text will line up in another editor or in a simple display mode when only a single font is used Draft mode is useful for quickly switch ing your display to a basic monospaced font display This is particularly useful if you are using spaces instead of tab characters to line columns up When draft mode is active it overrides the settings of the Preferences Syntax Formatting and Syntax Decorations dialog boxes Drag Line Down Moves selected text down by one line This is useful for dragging a whole line or lines down below something else in a file Drag Line Down More Moves selected text down by several lines Th
454. t User Manual 35 Window Tour Chapter 3 The Context Window determines what type of symbol you are clicking or typ ing For example if you click on a variable it will show you the declaration of the variable If the variable is a data structure instance or pointer then the Con text Window will show you the structure or class definition The Context Window also tracks selections in other types of windows such as the Project Window Relation Window and Clip Window Clip Fmts J Text trom FormatBegin in Format c _fmts hdoc hdoc fmts dev dev fmts n InNil signifies initial formatline call fmtsichSeek ichNil fmts ichLineFirst 0 fmtsfrott fmttDrave mts fQuickDyp False Clips 32 Text from FormatBegin in Format c r nmix E sprintf szPrompt Cannot save to read only file s szFile a Clipboard s hdoc hdac Sig SignalT meChangeltmeSFROT mAgain D B XB Figure 3 13 The Context Window background is displaying the contents of the selected clip from the Clip Window To summarize the Context Window tracks the following Table 3 1 Context Window Behavior Your Action Context Window Result Selecting clicking on an identifier Shows symbol definition based on in a source file window context If more than one symbol matches If only one symbol in your project the Context Window will show a matches then the Context Window list of matches will show the declaration of the sym bol
455. t Wide Include Subdirectories Cancel Case Sensitive v Use Regular Expressions Help Dne Occurrence Line J Whole Words Only Skip Inactive Code Skip Comments Search Only Comments IV Preserve Old Case v Confirm Each Replacement Confirm Each File Vv Include Read Only Files keep buffers open Browse Replace Click this button to begin the replace operation Select All Click this to select all the files in the file list Show Dirs Click this button to toggle the file list contents between showing file names and showing only subdirectory names When the subdirectories are shown this button changes to Show Files Old Add the old pattern to be found and replaced in this text box The pattern can be a regular expression New Add the new pattern that should replace the old one in this text box File Name The name of the file to search You may also add a series of wildcard specifications and click the Replace button or press Enter and Source Insight will replace the file list with the results of the wildcard expansion If the Project Wide option is on the wildcards are expanded over the whole list of files in the current project otherwise the wildcards are expanded in the current directory Source Insight User Manual 245 Command Reference Chapter 5 Options Group If the Project Wide option is on Source Insight will search the project symbol for file names added in the Fil
456. t is opened all the session state is restored When a project is closed all open files are closed and the workspace is saved Each project can have its own configuration file This means that each project can have its own set of menus keyboard assignments and screen colors Creating a Project Use the Project gt New Project command to create a new project You must give the project a name and specify where you want Source Insight to store the project data See also New Project on page 213 Project Directories When you create a project you must specify two directories for each project Project Data Directory this is where Source Insight stores its project data files For example the pr file is stored here By default Source Insight creates a project data directory inside the My Docu ments Source Insight Projects folder when you create a new project Project Source Directory this is the main location of your project source files In earlier versions of Source Insight this was called the project root directory Source Insight User Manual 47 Source Insight Concepts Chapter 4 The project source directory is what you consider the home directory of your source files By maintaining these two separate folder locations you can store your Source Insight data separate from your source files Furthermore your Source Insight project data files are kept in your own user data area and other users on the same m
457. t stop at the typedef of MS Jump To Caller Jumps to the caller of the selected function if any For example if you put the cursor on a function name and use Jump To Caller then you will jump to the function that calls it If more then one function calls it you will see a list from which you may pick Jump To Definition The Jump To Definition command takes the symbol from the first word in the current selection and jumps to its definition The Go Back and Go Forward commands are useful for going back and forth between all your jumping spots To use this command 5 Select within the symbol name as it appears in a source file 6 Type Alt to jump to the actual symbol definition Mouse Shortcut In the default configuration you can also use the mouse to easily invoke this command Pointing at a symbol in a file and performing Ctrl Left Click per forms the Select Word command Ctrl Left Double Click then performs the Jump To Definition command To use this command with the mouse point and double click at the symbol name with the left mouse button while holding the Ctrl key down Opening Header Files You can also use the Jump To Definition command when the cursor is in a file name such as in an include statement to open the file Jump To Link Moves to the other end of the source link at the current line See also Go To First Link on page 179 Jump To Prototype Jumps to the declaration of the selected function
458. t to permanently see your files with all characters the same width then right click on your file and select Document Options Click the Screen Fonts button and pick a monospaced font such as Courier New Of course you can pick any font you want to change the default font used for that document type Searching and Replacing Text Source Insight provides a number of searching commands and replacement commands that operate on the current file as well as across multiple files When searching multiple files source links can be used to quickly link matches Searching is an import activity for programmers As such Source Insight devotes a lot technology to help you wade through copious amounts of source code Source Insight User Manual 83 Source Insight Concepts Use Lookup Refer ences to find context sensitive references to symbols Use Smart Rename to perform context sensitive renaming of symbols global or local The Search command searches the current file buffer Chapter 4 Searching for Symbol References To search the current project for references to the currently selected symbol use the Lookup References command Ctrl See also Lookup References on page 208 For example click inside BeginPaint run the Lookup References command and Source Insight will open a Search Results window which lists all the places you used BeginPaint in your project Each matching line listed in the Search Results
459. t to turn on this radio button Show base types for data structure variables Check this to have Source Insight decode variable declarations and try to locate base structure type definitions i e structs unions classes etc For example struct S int x struct S psvar psvar If you select inside of psvar then Source Insight will look at the declaration of psvar see that it is a pointer to struct S and then show you the declaration of struct S Uncheck this option to simply show the declaration of the each variable with out walking up the declaration hierarchy Show line numbers Makes line numbers visible in the Context Window Tracking Options Click this button to view the Symbol Tracking Options dia log box which displays options that guide what the Context Window will pay attention to Font Specifies the font used to display symbol lists and source code in the Context Window If the Context Window is currently showing a list then this specifies the list font Ifthe Context Window is currently showing a source file then this specifies the source code font Text Color Specifies the text color of list items in the Context Window The colors of source code are determined by the Syntax Formatting options in the Preferences dialog box Back Color Specifies the background color of list items in the Context Win dow The colors of source code are determined by the Syntax Formatting options in the
460. t update while you work Improved Project Window with better file and symbol listing features Symbol Syllable Indexing indexes sub strings of symbol names so you can type their partial names quickly without knowing exactly what the symbol name begins with Optimized symbol database for supporting even larger projects more quickly Improved Lookup References command uses smart reference match ing to show only the appropriate references to symbols It can also skip or include comments or inactive blocks of code New Search Project command features keyword searching similar to an Internet search which can find words near each other in your project 356 Source Insight User Manual Chapter 8 What s New in Version 3 Improved Editing and Display Features Editing and display features are greatly improved in version 3 0 Syntax Formatting provides a vastly improved display capability includ ing full rich text formatting with user defined styles Source Insight applies styles automatically based on lexical information Syntax For matting includes Function class and variable declaration styles in addition to others Several rich comment styles Styles for references to different types of symbols such as locals parame ters globals macros functions etc Auto annotations and special Syntax Decorations Auto symbol name completion while you type Incremental search New context sensitive Smart Ren
461. t will know that there were outstanding changes to your files because it will find orphaned recovery files A dialog box will come up and indicate that a previous session with Source Insight did not end normally At that point you have three options e Click the Recover button Source Insight will proceed to recover all files previously opened After recovery your session should look the same as it was the last time the recovery file was synchronized All unsaved edits should still be present or e Click the Continue button Source Insight will continue to start as though no recovery were done You will not be able to recover after con tinuing or e Click the Quit button Source Insight will quit immediately without attempting recovery If you run Source Insight again it will still be able to do the recovery if you want to When a recovery is performed Source Insight will resume as though you were in the middle of an editing session All the previously opened files will still be open and any edits you made will still be there After the recovery you can continue to edit normally or you can quit and save each file that had changes Warnings Source Insight s recovery system is very good however no recovery system can be foolproof There are always windows of vulnerability Ifa recovery is needed it is probably due to unusual circumstances such as a hardware failure a power failure a bug in a program that you spawned from
462. tWndRect hwnd left top right bottom c eere censet seen e eene eaten sena eeasno 327 SetWndSel hwnd selection record eee eee eee eene ee eene aee e ee enae aee e eee 328 ToggleWndMax hwndQ 4 eee e eene nente eee eene etae en sense en sens eta sense ta senses stas seie 328 XposFromlch hwnd In ich esee e eee eene e eere n eene en etant ea sense en sense tne tasenaeo 328 Bookmark FUNCtIONS cccccessssesscssescovccesscssovesssocssiccocscoossssseoscodncccenssesecosssseceses 328 BookmarksAdd name filename In ich ccccccssssssccsscscssssssscsssccssssscessccesessscesee 328 BookmarksCount vcisacssisesssdvvsocsecsedsccssssovenssinsccocssovnvstniconsevonscsscsesesdbeensdecsveseseena BookmarksDelete name Bookmarksltem index 4 eene eene eee eene ne e ee tnn aae e eee tn asse eese en sess ee osote BookmarksLookupLine filename In e eere e eere eere e eee eee eee eo ee ene etna 329 BookmarksLookupName NAME esee eene eene eee eene en stata stata sese ta sens suae 329 Symbol List Functions eee e eene eene eene enero eene etna eene ens ea setas etos seno stasera sea 329 SYMLiStCOUNT 330 GGG P 330 SymListInsert hsyml isym symbolNew eene eene en eene rne en nene natns enano 330 SymListltem hsyml i
463. te Project Relation Search Window Window Results 24 Source Insight User Manual Chapter 3 Toolbars Build Toolbar The Build toolbar contains commands that are used typically to build your project s executable These commands are defined as Custom Commands Clean Run Build Project gm dot Build Compile Project File Source Control Toolbar The Source Control toolbar contains commands that are used to access your source control also known as version control system These commands are defined as Custom Commands Check In Sync To Source Control u N Project fa da 65 gh g Check Out Undo Sync File To Source Check Out Control Project Tip To quickly edit the settings for these commands hold down the Ctrl key while clicking on the toolbar buttons to open the Custom Command dialog box Source Insight User Manual 25 Window Tour Chapter 3 Source File Windows Each file you open will display in a separate source file window Source Insight is a Multiple Document Interface MDI application Each source file window has a symbol window on the left side You can hide this window if you like 205 nae DOOR ov F056 alta REF Source file windows are arranged inside the frame of the application window F attese ros FLookupStagBase osos prisp mm pns mice Multiple document frame area Figure 3 2 Source file windows When you open a source file it
464. te Character 154 Delete Clip 154 366 Source Insight User Manual Index Delete File 154 Delete Line 154 DeleteConditionVariable function 339 DeleteProj function 339 DIM Record 306 Display Options 155 Document Options 161 Document Options Dialog box 161 Document Types 66 161 adding 68 associate with filename 68 Document Specific Options 67 dotted path 54 Draft View 166 Drag Line Down 167 Drag Line Down More 167 Drag Line Up 167 Drag Line Up More 167 DumpMacroState function 342 Duplicate 167 Duplicate Symbol 167 E Edit Condition 167 Edit Condition Dialog box 168 Edit Toolbar 23 Editing the Condition Variables 62 Editing the Document Options 68 Editing Token Macros 63 EmptyProj function 339 End Brace Annotations 82 End of Line 169 End of Selection 169 EndMsg function 313 Entering Your Serial Number 17 Environment and Process Functions 320 Event 346 event AppCommand 348 event AppShutdown 348 event AppStart 348 event DocumentChanged 349 event DocumentClose 349 event DocumentNew 348 event DocumentOpen 348 event DocumentSave 349 event DocumentSaveComplete 349 event DocumentSelectionChanged 349 event handler 169 178 345 adding 347 enabling 169 178 347 uses of 346 event ProjectClose 349 event ProjectOpen 349 event StatusbarUpdate 350 events application 348 document 348 project 349 statusbar 349 Exit 169 Exit and Suspend 169 Expand Special 170 Expand tabs 165 Expanding Variables in a String 29
465. ted for all modified files Understanding Symbols and Projects When typing the full name of a symbol you should use the dot in the symbol name if you want to also specify its container Note Itis possible for a symbol to have an embedded dot character in its name Source Insight will store the symbol name so that the embedded dot is not confused with the dotted path dot character Updating the Symbol Database When a file is added to a project or a file is saved Source Insight determines what symbols are defined in the file and incrementally updates the project symbol database stored on disk File Buffer Save Operation 7 p cu File on Disk Symbol Database Figure 4 5 Save operations update the source file on disk and the symbol database File Names Are Like Symbols Source Insight also treats file names as symbols Thus file names may be spec ified wherever a symbol may be For example you can type a file name with extension in any of the Browse dialog boxes to open a file You can also click on a file name in a include statement and use the Jump To Definition com mand to open the file 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 hap Source Insight User Manual 55 Source
466. text box In effect Source Insight makes two passes through the entire set document type records to determine a files document type 1 First it tries to find an exact match on the file name in all the File Filter lists 2 Ifno exact match is found it tries to find a wildcard match in all the File Filter lists 3 If still no match is found Source Insight assumes the files type is the Default document type This means that you can treat some individual files in a special way For exam ple inc is normally considered an Assembly File type but let s say you have a file called cmd inc that you want to have the C Source File type In the C Source document types File Filter text box you would include cmd inc os hsromd ine If you include a simple as the file filter for a document type then it will become the default catchall type instead of the Default document type The catchall will only apply if the file does not already match any other document type 162 Source Insight User Manual Chapter 5 You can control which document types are added to projects Font Options Group You can use a proportional font and still display indentation correctly Document Options Adding New File Extensions You can add new entries to the file filter of a standard document type to make Source Insight include those files also For example by default Source Insight considers C Source Files to be c
467. th the Save command Many of the file buffer functions use buffer handles hbuf These are handles to open file buffers An hbuf is typically a small integer value An hbuf value of hNil zero indicates an error AppendBufLine hbuf s Appends a new line of text s to the file buffer hbuf ClearBuf hbuf Empties the buffer hbuf so that it contains no lines CloseBuf hbuf Closes a file buffer Hbuf is the buffer handle CopyBufLine hbuf In Copies the line In from the file buffer hbuf to the clipboard DelBufLine hbuf In Deletes the line In from the file buffer hbuf GetBufHandle filename Returns the handle of the open file buffer whose name is filename This func tion searches all open file buffers to find the one that matches the given file 316 Source Insight User Manual Chapter 6 File Buffer Functions name parameter GetBufHandle returns hNil if no buffer can be found with the given file name GetBufLine hbuf In Returns the text of the line In in the given file buffer hbuf GetBufLineCount hbuf Returns the number of lines of text in a file buffer Hbuf is the file buffer han dle GetBufLineLength hbuf In Returns the number of characters on the line In in the given file buffer hbuf GetBufL nCur hbuf Returns the current line number of the user s selection inside of the file buffer hbuf A macro error is generated if the given file buffer is not already displayed in a source fi
468. that the shell you spawned by cmd exe does not have enough environment space If that happens use the e switch with cmd exe For exam ple cmd e 1024 c mybat bat This allocates 1K bytes of environment space to the new sub shell spawned by command com Command Line Substitutions The Run text box can contain meta characters that cause the following items to be substituted in the string Table 5 2 Custom Command Meta Characters Character Expands to Example Sf full path name of the current file c myprojMile c r path name of current file relative _file c to the project source directory leaf name of the current file file c oe oo oe directory path ofthe current file c myproj 148 Source Insight User Manual Chapter 5 Custom Commands Table 5 2 Custom Command Meta Characters Character Expands to Example Sh directory path of current file myproj without the drive letter sb leaf name of current file w o file extension e extension of the current file c c drive letter of the current file c p the current project name c myproj myproj j the source directory of the cur c myproj rent project SI the data directory of the current C Documents and Set project tings Jim Smith My Doc uments Source Insight Projects Base SV the drive letter of the current c project s source directory o leaf name of the project without myproj path 1 t
469. the error messages will be in a command output window Source Insight will automatically setup the source links and run the Go To First Link command The first error message and the erroneous source line will be selected and made vis ible 3 Runthe Go To Next Link command The next error message in the com mand output window is selected and the target of that link is shown as was the first error 4 Continue to use the Go To Next Link command until all the links error messages have been visited If there are no more links then Source Insight beeps and the message No links will appear in the status bar Using Links With Search Output The Search Files command puts its output into a Search Results window Along with each line of text in the Search Results window is a source link In this case the link sources are each line in the Search Results window The link target for each link is the file and line where the search pattern was found To view each place where a pattern was found To perform a search and then visit each place where the pattern was found 1 Run the Search Files command 2 Use the Go To First Link command to see the first match 3 Usethe Go To Next Link command to see successive matches 4 Continue using the Go To Next Link command until the No Links mes sage appears 180 Source Insight User Manual Chapter 5 Go To Line Go To Line The Go To Line command allows you to type a line n
470. the event occured Other Tips It is best to put all event handlers in one file or a small number of files with names like event something em That way you can easily remove those files from the project to effectively turn off the handlers Global variables are useful for adding counters and maintaining state between events Application Events Application events apply to the Source Insight application as a whole event AppStart Called after the Source Insight application loads and initializes The current project and workspace session is already loaded event AppShutdown Called just before the Source Insight application exits event AppCommand sCommand Called just after the given user level command has executed Document Events Document events apply to when file buffers are opened closed saved or modi fied event DocumentNew sFile Called just after the given file buffer is created event DocumentOpen sFile Called just after the file buffer is opened 348 Source Insight User Manual Chapter 7 Project Events event DocumentClose sFile Called just after the file buffer is closed event DocumentSave sFile Called just before the file buffer is saved You can make edits to the file buffer at this point just before it gets saved If you want to do something after the file is saved then you can use the DocumentSaveComplete event event DocumentSaveComplete sFile Called just after the
471. the file is on a different drive If the file is on a different drive or not part of the project source directory tree then the full path is displayed in parentheses If you prefer not to see file names normalized in the Project Window you can turn it off by using the Project Window Properties command and checking the File Directory box to add a separate column to the list for the directory name Here are some examples using the game project discussed above If the file path is The file name is displayed as C Game File c File c C Game Core File c File c Core C Game Core EnemyAI File c File c Core EnemyAT C SomeDir File c File c C SomeDir D OtherDir File c File c D OtherDir The Project List As you create projects Source Insight keeps track of them in the Project List There is only one Project List and it is created the very first time you run Source Insight The name of the file is Projects db3 and it is created in the My Docu ments Source Insight Projects directory The Project List stores the names of all the projects created or opened on your computer including the directory where they were created Adding Files to a Project 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 cur
472. the folder specified e open The function opens the file specified The file can be an execut able file or a document file It can also be a folder e print The function prints the document file specified If filespec is not a document file the function will fail e properties Displays the file or folder s properties e find Launches the Find Files application found on the Start menu empty string to skip this parameter to ShellExecute The filespec parameter can be any valid path Use double quotes around com plex path names with embedded spaces You can also use a meta character such as 96f for the current file It can also be the name of an executable file The optional parameters list is anything to the right of the filespec It specifies the parameters to be passed to the application that ultimately runs The format is determined by the verb that is to be invoked and the application that runs You can use custom command meta characters here as well The working directory text box of the custom command is applied before the ShellExecute is invoked However output cannot be captured or parsed when using ShellExecute ShellExecute Examples Here are some useful examples showing how to use ShellExecute Action Custom Command Run String To browse to a web site ShellExecute open http www someweb site com To explore your Windows ShellExecute explore C Documents and 2000 documents file folder Settings
473. the search results in the Search Results window Files Click this button to open the Search Files dialog box which lets you search across files Case Sensitive Search will only find matches if the case matches exactly Use Regular Expressions The Find pattern is assumed a regular expression See also Regular Expressions on page 85 Wrap Around If checked the search continues at the beginning of the file when it reaches the end of the file The search will wrap around only once If not checked the search stops when it reaches the end of the file Select When Found If checked Source Insight will select any characters that match when a match is found If not checked Source Insight will put the inser tion point before the first character of the matching text Whole Words Only If checked then Source Insight only finds matches that are whole words If not checked then Source Insight will also find matches that are embedded in words This group of options specifies the scope and the direction of the search 254 Source Insight User Manual Chapter 5 Search Backward Forward Searches forward starting at the current selection The search is always forward if Selection or Whole File is checked Backward Searches backwards starting at the current selection Selection Searches only the current selection in the forward direction Whole File Searches the whole file in the forward direction If neither Selection nor Whole Fi
474. the terms and conditions of this EULA 5 TERMINATION Without prejudice to any other rights Source Dynamics may terminate this EULA if you fail to comply with the terms and conditions of this EULA In such event you must destroy all copies of the SOFTWARE 6 COPYRIGHT The SOFTWARE is protected by United States copyright law and international treaty provi sions You acknowledge that no title to the intellectual property in the SOFTWARE is transferred to you You further acknowledge that title and full ownership rights to the SOFTWARE will remain the exclusive property of Source Dynamics and you will not acquire any rights to the SOFTWARE except as expressly set forth in this license You agree that any copies of the SOFTWARE will contain the same proprietary notices which appear on and in the SOFTWARE 7 EXPORT RESTRICTIONS You agree that you will not export or re export the SOFTWARE to any country person entity or end user subject to U S A export restrictions Restricted countries currently include but are not necessarily limited to Cuba Iran Iraq Libya North Korea Sudan and Syria You warrant and represent that neither the U S A Bureau of Export Administration nor any other federal agency has suspended revoked or denied your export privileges 8 LIMITED WARRANTY Source Dynamics Inc warrants that the Software will perform substantially in accordance with the accompanying written materials for a period of 90 days from the date of yo
475. the user s Projects folder Source Insight also installs a set of master source files that declare symbols for the Net Framework class libraries Those sources are stored in the NetFrame work folder inside the Source Insight program folder There is one copy per machine These source files are machine generated files that have a C syn tax However they are not strictly C4 compatible Their contents are subject to change with new versions of Source Insight To force Source Insight to create the NetFramework project use the Setup Com mon Projects command or use the Preferences Symbol Lookups dialog box and click the Create Common Projects button Using HTML Source Insight has special features for handling the HTML Language The HTML Language parser scans files to locate interesting structural tags Those tags show up in the symbol window attached to the left side of each source win dow The only symbol types added to the project symbol database are the TITLE tags For example an HTML file might contain this lt TITLE gt Programming Wisely lt TITLE gt It would result in a symbol added to the symbol database as TITLE Program ming Wisely The maximum length of a symbol is 79 characters Using HTML and ASP Compound Languages The HTML Language also supports embedded scripts Server and client side scripting blocks will appear using the syntax formatting appropriate for what ever scripting language is used
476. tion 312 Close Project 137 Beginning of Line 127 Close Window 137 Beginning of Selection 128 CloseBuf function 316 Blank Line Down 128 CloseProj function 339 Blank Line Up 128 CloseWnd function 323 Block Down 128 Closing Projects 50 Source Insight User Manual 365 D Closing the Current Project 103 CmdFromKey function 313 Coding Tips for Good Parsing Results 65 Color Options 138 Color Printing Printing color 220 Command Line symbol access 73 syntax 101 Command Reference 121 Command Shell 139 Commands Overview 121 commands defined 104 Comment Heading Styles 80 Comment Headings 282 Comment Right Style 80 Comment Styles 79 Comment Styles and Custom Languages 80 Comments and Ranges 198 comments styles for 80 common project 60 Common Projects the project symbol path 56 Common Projects defined 263 Compile Command creating a custom command 151 Complete Symbol 139 Condition Variables 61 Condition Variables editing 62 Condition Variables ignoring 62 Conditional Evaluation 304 Conditional Parsing 61 168 Conditions editing 167 Conditions and Loops if else and while 302 Configuration loading 108 204 saving 106 Configuration Files 107 Configuration Files where stored 107 Configuration Settings for All Users 119 Configurations saving 106 108 Configuring Source Insight 17 Context Window 34 73 140 locking 207 Context Window Properties 140 Copy 142 Copy Line 143 Copy Line Right 143 Copy List 143 Copy Symbol 14
477. tion 325 GetWndSelIchFirst function 325 GetWndSellIchLim function 326 GetWndSelLnFirst function 326 GetWndSelLnLast function 326 GetWndVertScroll function 326 Global Configuration 204 Global Variables 296 Go Back 178 Go Back and Go Forward commands 89 Go Back to View a Function Call Chain 178 Go Back Toggle 178 Go Forward 178 Go To First Link 179 Go To Line 181 Go To Next Change 181 Go To Next Link 181 Go To Previous Change 181 Go To Previous Link 181 Goto Arrows 81 H Having Multiple Configurations 252 Header and Footer Codes 217 header files opening 187 Help 181 Help Mode 182 Help Toolbar 24 Highlight Word 182 Horizontal Scroll Bar 183 Horizontal Spacing Options 158 HTML 59 ASP 59 HTML Help 183 IchFromXpos function 326 ifdefs 60 Importing and Exporting Keyword Lists 192 Improved Browsing and Analysis Features 356 Improved Editing and Display Features 357 Improved Language Features 355 Inactive Code ifdef Support 60 Inactive Code Style 79 Incremental Search 182 Incremental Search Backward 183 Incremental Search Mode 183 Indent Left 183 Indent Right 183 Indenting Automatically 166 Indenting Options 166 Index options for projects 70 Index Performance 227 Indexing syllables 68 368 Source Insight User Manual Index N Indexing Into Strings 298 Language Info 196 InsBufLine function 317 Language Keyword Styles 77 Insert ASCII 184 Language Keywords Dialog box 191 Insert File
478. tiple projects Add to Project Path Click this button to pick a project to append to the exit ing project symbol path Create Common Projects Click this button to open the Create Common Projects dialog box where you can create the common external projects that will be helpful to have on the project symbol path Source Insight User Manual 275 Command Reference Chapter 5 Symbol Window command The Symbol Window command opens and closes the symbol window in the current file window The symbol window is a vertical list of symbols defined in the file that are normally visible at global scope The symbol window can be sorted by using the Sort Symbol Window command The symbol window is only available if the file s document type has a parsed language selected Symbol Window Properties Displays the properties of the Symbol Window which appears on the left of each source window Symbol Window Properties x Outline Display MV Show class members Apply Now M Show structure members Cancel MV Show enum constants Symbol Types Show local definitions Font m me E Era i Help Text Color Back Color Show class members If checked the member contents of classes are included in the Symbol Window If unchecked then only the class name is included in the list Show structure members If checked then the structure field members are included in the Symbol Window If not che
479. tly 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 Clickthe List button A new file named Symlist txt will be created contain ing a list of all the symbols displayed in the Symbol List along with the file and line number where the symbol is found Source Insight User Manual 131 Command Reference Chapter 5 To create a partial symbol cross reference list 1 2 6 Run the Browse Project Symbols command Click the Symbol Types button to specify the desired types of symbols to appear in the list 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 2Word searches for all symbols containing the substring Word 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
480. to all this trouble Can t you make a tab stop be inch or whatever The answer is a little complicated The problem is that unlike a word processor Source Insight is trying to maintain a text file that other people may want to look at in a simple text editor Source Insight User Manual 159 Command Reference Chapter 5 Let s assume there are other people in your work group that don t use Source Insight or that always use a fixed pitch font for their source code You don t want the pretty code you ve edited in Source Insight to mess up the simple fixed width tab stops when they look at the code A word processing program attempts to show text the way it would be printed on a physical printer Source Insight is trying to show you how the text would look if you were looking at it in another editor in a fixed pitch font In a word processing program text dimensions are measured in physical units like inches or centimeters It makes sense to have a tab stop at say inch When the text is printed the word processor makes sure the tab stop looks inch wide on the printer too In Source Insight tab stops are measured in fixed size character columns Source Insight tries to line up tabbed columns the same way it does with a fixed pitch font If Source Insight just did the simple thing of moving to the next tab position based on the horizontal pixel position then when you look at the code with a simple fixed pitch font there may a
481. to travel down a function call chain and pop back up the chain and then travel down another path with a different function call The Go Back command jumps to the previous location in the selection history The Go Forward command jumps to the next location in the selection history The selection history list is circular so if you reach the end of the list the Go Forward and Go Back commands will wrap around to the other end of the list Source Insight User Manual 89 Source Insight Concepts Chapter 4 Navigation Using Source Links Source Links connect two lines in two files Source Links connect two locations in two different text files They connect a line of text in a link source file to a location in a link target file Links are associated with individual lines Source Links are part of the current work space Links are traversed by using the Jump To Link command which takes you to the other end of the source link at the current line A link can be traversed as long as the link source file is open If the link target file is not open the Jump To Link command will open the file automatically LEICA PICE EEE TDI DoF S085 job ii DenG slis Source Links connect two locations These links connect Search Results with matches Drita wel wwe a0 tee E Z o erbe sce Ai rob cried indio io Ecc t Dri M nut Cececotitp mer Herp Umm DETA badecb cut crevice Aodig
482. ts window will be selected Automatically load selection into Find pattern The word under the cursor is automatically loaded into the Find pattern of the Search dialog boxes If dis abled then the previous search pattern is preserved Reselect original lines after Replace operation The original whole line selec tion is selected again after the Replace operation completes Select All The Select All command selects all the text in the current file 260 Source Insight User Manual Chapter 5 Select Block Select Block The Select Block command selects the smallest C block that encloses the cur rent selection Each time the Select Block command is used it selects the next larger C block Select Char Left The Select Char Left command extends the current selection left by one charac ter Select Char Right The Select Char Right command extends the current selection right by one character Select Function or Symbol The Select Function or Symbol command attempts to select the whole enclos ing symbol such as the enclosing function You can also invoke this command by double clicking the mouse in the left margin Select Line The Select Line command selects all of the current line Select Line Down The Select Line Down command extends the current selection down by one line Select Line Up The Select Line Up command extends the current selection up by one line Select Match The Select Match command sel
483. u Separator Close Close All Reload File Rename Delete File Reload Modified Files Restore File Keys Menu Separator Insert Delete b I o E 3 Im fa th o t 8 ls Help Closes the current file Command You can type into this text box to narrow down the command list so that you can find the command you want easily Source Insight User Manual 211 Command Reference Chapter 5 New Command list This lists all the Source Insight commands including macros and custom commands that you ve defined The commands are listed by cate gory When you select a command here the menu it appears on if any is selected in the Menu list and the contents of that menu are loaded into the Menu Contents Note that there is a special command in the list called Menu Separator Insert this item on the menu to create a separator line in the menu Menu list This pull down list contains the titles of all the menus When you select a menu from here the contents of the menu are loaded into the Menu Contents Menu Contents This lists the menu items of the menu selected in the Menu list Select a menu item here to indicate what item should be deleted and where to insert new items OK Click to record your menu assignment changes in the current configura tion Cancel Click to cancel the command None of your changes up to this point will be saved in the current configuratio
484. u can activate and set the focus to the Project Window by run ning the Activate Project Window command This command will make the Project Window visible if it was hidden If a project is open then the Open command activates the Project Window If the Context Window is open then it will display the contents of any files selected in the Project Window Rebuild Project The Rebuild Project command rebuilds the project database files You may want to rebuild the project to get all the files re parsed after a large change or if you suspect the project data is not correct A project may become corrupted if Source Insight was abnormally aborted without closing the project The Rebuild Project dialog box also lists some statistics about your project The number of symbol database records symbol index entries and files is dis played This information is also output by the Project Report command Rebuild Project x This command rebuilds the current project You might want to rebuild 4 project if you suspect its database is corrupted or you just want to reprocess all source files Cancel Rebuilding Method C Re Parse all source files Help C Fix database file corruption if any Re Create the whole project from scratch Project c si Sinew contains 25771 symbol records 100814 index entries and 548 files There are three methods of rebuilding the project The last method is recom mended Re Parse all
485. u must first specify known conditions in the Prefer ences Languages dialog box in order for Source Insight to know what condi tions are active or not Conditional compilation only applies to some languages Skip Comments If enabled then comments will not be searched Search Only Comments If enabled then only comments will be searched This is mutually exclusive with the Skip Comments option The comment options slow the search down a little Smart Reference Matching This enables Source Insight s smart reference matching feature Source Insight will determine whether each reference found is actually referring to the symbol you are looking for The Smart Reference Matching option means that the search results will only contain references strictly to the exact symbol you specified For example if you select a member ofa struct and look up its references the search results will only contain references to that particular member of that particular struct not just any string that is equivalent Note that this option slows the process down because each same string occurrence has to be qualified with a symbol lookup Source Insight User Manual 209 Command Reference Chapter 5 Touch files and cause recompile Turn this on to cause each files last modi fied time stamp to be set to the current time This is useful if you have a com pile time dependency on an identifier usage Just turn this on and search for references with this com
486. uf MakeBufClip hbuf fClip e eese eee e ee eene eene nere nein eene en etas ta senses etas tas eno NewbB f ALTE sssccccsuccevedsosscsiesvsessesscceseccssesasesvesossseosbebcvesesessdesseccssesdsoesesecsioesvaees OpenBuf filename OpenMiscFile filename cscsccccscscscescscscecesescecssccsscsseccsesscssscecssccecssecesssseses PasteBufLine hbuf In eere e eene e eee eerte nnne eterna aaa e eee tn neas eee ean sess ee eee os e PrintBuf hbuf fUseDialogBox PutBufLine hbuf In S eere eno ena eei enano ao ha eran aaa a o ee a iEn ook a Pn ipae Pa o Epi ran aea noe ra OE xii Source Insight User Manual Contents Rename Buf hbuf SLNCEWNAaMe cccccccccssssccsccccssssscssccccccssssssscccsscsssscsceesessscescoses 319 SaveBuf hbuf SaveBufAs hbuf filename in SetBufDirty hbuf fDirty ecce eee e esee eere eene enean teas tn aeneae tasas essen stesse SetBuflns hbuf In ich eee ense nu orania aea noeh ta prin a noa e nare naa eta Iano eoi Ta vno Cra 00 SetBufSelText hbuf s SetCurrentBuf hbuf Environment and Process FUNCTIONS eene eee e eere eee eee eee tete ettet esee ee 320 GetEnV enV NAME escosecorsscvas coco eene ev beaeS udo aano rosea ne Seb no FER pre oen veau p ea piae Eo osios a GetReg reg key name s IsCmdEnabled cmd name
487. ul feature that we recommend enabling it unless the above condition is true If you think performance is affected the symptoms of too large an index are e Disk thrashing while building or rebuilding a large project while little progress is being made Opening or closing a project takes a long time e Synchronizing individual files is slow e Browse Project Symbols F7 is slow to come up accompanied by a lot of disk activity Some delay is normal the first time you use it e Your project has over 2 or 3 million index entries Obviously this limit depends on the amount of RAM you have Your hard drive light never seems to go off or your system pauses for a long time while the disk is flushed If you experience slow downs and you have a large project say over 200 000 symbols you should try turning off Quick browsing for symbol syllables You Source Insight User Manual 227 Command Reference Chapter 5 can find out how large the database is by selecting Project gt Rebuild Project and looking at the statistics on the bottom of the dialog box Just cancel this dialog box when you are done If the index entries are in the millions then things can start to slow down However a Pentium III class machine with 256 MB of RAM should handle this size project well Adding more memory to your machine will improve performance Project Report The Project Report command generates an output report file called lt project gt
488. umber and position the insertion point on that line GoTo x E Go to Line z Cancel Go to Line Type the line number here OK Click to go to the line number If you type a line number beyond the end of the file Source Insight positions to the last line in the file Cancel Click to cancel the Go To Line command Go To Next Change Moves the cursor to the next block of lines that were edited It moves the cursor to the next set of change marks Go To Previous Change Moves the cursor to the previous block of lines that were edited It moves the cursor to the last set of change marks Go To Next Link The Go To Next Link command behaves the same as the Go To First Link com mand except the next link is used See Also Go To First Link command Go To Previous Link The Go To Previous Link command behaves the same as the Go To Next Link command except the previous link is used See Also Go To First Link com mand Help The Help command brings up help on Source Insight You can also press F1 while a dialog box is up and Source Insight will display help on the current command Source Insight User Manual 181 Command Reference Chapter 5 Help Mode The Help Mode command turns on the help mode When a command is invoked while the help mode is on Source Insight displays help on the com mand and turns off the help mode instead of running the command You can cancel the help mode by running the Help M
489. und while you edit by turning on the Background project synchronization option in the Preferences General dialog box Synchronize Files X Add new files automatically Force all files to be re parsed v Suppress warning messages Synchronize the current source file only Cancel Help Add new files automatically Before synchronizing all the files Source Insight will add new files in the project s source directory and in all subdirectories recursively However only directories that already have project files in them are scanned Directories that are not descendents of the project source directory are not scanned This feature allows you to add new files to your project direc tories and then run the Synchronize Files to add those new files to your Source Insight project automatically Force all files to be re parsed If checked then Source Insight will ignore file time stamps and consider all files in the project to be out of date It will update the symbol database for all files This provides an easy and relatively quick way to completely rebuild Source Insight s project data files If not checked then only those files in the project that are considered out of date are updated Source Insight User Manual 277 Command Reference Chapter 5 Synchronize the current source file only Only the currently active source file is synchronized with the symbol database This has the effect of replacing all symbol d
490. ur receipt of the Software Any implied warranties on the Software are limited to 90 days Some states do not allow limitations on duration of an implied warranty so the above limitation may not apply to you SOURCE DYNAMICS INC DISCLAIMS ALL OTHER WARRANTIES EITHER EXPRESS OR IMPLIED INCLUDING BUT NOT LIM ITED TO IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT WITH RESPECT TO THE SOFTWARE AND THE ACCOMPANYING WRITTEN MATERIALS This limited warranty gives you specific legal rights You may have others which vary from state to state 9 LIMITATION OF LIABILITY IN NO EVENT SHALL SOURCE DYNAMICS OR ITS SUPPLIERS BE LIA BLE TO YOU FOR ANY CONSEQUENTIAL SPECIAL INCIDENTAL ORINDIRECT DAMAGES OF ANY KIND ARISING OUT OF THE DELIVERY PERFORMANCE OR USE OF THE SOFTWARE EVEN IF SOURCE DYNAMICS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES IN ANY EVENT SOURCE DYNAMICS LIABILITY FOR ANY CLAIM WHETHER IN CONTRACT TORT OR ANY OTHER THEORY OF LIABILITY WILL NOT EXCEED THE GREATER OF U S 1 00 OR LICENSE FEE PAID BY YOU 10 U S GOVERNMENT RESTRICTED RIGHTS The SOFTWARE is provided with RESTRICTED RIGHTS Use duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph 1 ii of The Rights in Technical Data and Computer SOFTWARE clause of DFARS 252 227 7013 or subparagraphs i and 2 of the Commercial Computer SOFT WARE Restricted Rights at 48 CFR 52
491. uts You can use these shortcuts when typing into a symbol name field to specify strict prefix matching or member name matching Prefix the spec with a single space or the caret character to match strictly prefixes only For example Format and space Format will match only symbols that start with format Case insensitively It will not match Line Format The prefix actually toggles syllable matching on and off If you Prefix the spec with a dot to match strictly prefixes of only leaf member names For example fdirty will match only struct or class members that start with fdirty This also works with nested class members For example draw will match the method Class1 Class2 Draw Underscores which are common in program identifier names are ignored For example insert and insert would also appear in the list together Analysis Features Source Insight provides many ways to locate symbols and review symbolic information in your projects This is one of Source Insights important strengths This section describes briefly the Source Insight features that help you access symbol information Source Insight User Manual 71 Source Insight Concepts The symbol data base is automati cally kept up to date To jump to a defini tion hold down Ctrl and double click on its name The Browse Project Symbols dialog box lists all the symbols in your project Chapter 4
492. utton Pressing Esc cancels the assign procedure To Delete a Key Assignment To delete a keystroke assignment from a command 1 Select the command in the Command list 2 Select the keystroke to be deleted in the Keystroke list 3 Click the Delete button Keyword List Brings up the Language Keywords dialog box which lets you edit the language keywords used for syntax formatting in the current language The Language Keywords dialog box lists keywords and styles The title of the dialog box will specify which language type you are working with Source Insight uses a very fast hashing technique to maintain large keyword lists and still have outstanding performance Keywords and Styles The keyword list contains all the language keywords that can be highlighted with syntax formatting Each keyword in the list is associated with a style name The Style Properties command is used to set the formatting options of each style For example in the C Language keyword list the word NULL is associated with the Null Value style To determine the formatting of any given word in a window Source Insight locates the word in the keyword list of the appropriate language type The key word list contains a style name which in turn implies the formatting associated with the style 190 Source Insight User Manual Chapter 5 Keyword List Therefore starting with a file name and a word in the file Source Insight derives the word s sty
493. ve Delete Word Click this button to delete the word currently selected in the key word list Import Click this button to import new keyword list entries from an external text file See below for more information Export Click this button to export the keyword list to a text file Reset Click this button to return the language keyword list to the factory default settings Importing and Exporting Keyword Lists The Import and Export buttons in the Language Keyword dialog box allow you to import and export keyword style associations from and to text files The text file should contain keyword style name pairs one per line lt keyword gt lt style name gt or lt keyword gt lt style name gt Each keyword should be a single word without white space The style name should be one of the defined style names that are listed in the Language Key words style list or the Style Properties style list You may enclose the keyword or style name in double quotes When importing duplicate keywords are ignored When you click the Import button in the Language Keywords dialog box you will be given the option of either replacing or merging the keyword list x C Replace current keyword list with imported list z Merge current keyword list with imported list Cancel Replace current keyword list with imported list Select this if you want to com pletely replace the keyword list currently loaded with the imported lis
494. ve a function call The Smart Tab works well with auto completion of function calls When you insert a function call via the popup auto completion window the functions parameter types and names are also inserted and the first parameter is selected You only have to start typing over the first parameter then press Smart Tab to select the next parameter Sort Symbol Window The Sort Symbol Window command cycles the sorting state of the symbol win dow in the current file window You can sort it by e Name e Line number the default e Type Name Sort Symbols By Line Sorts the symbol entries listed in the Symbol Window by line number Each symbol in the file will appear in the list in the order of occurrence By default the Symbol Window is sorted by line number occurrence If you want all Symbol Windows to be sorted this way by default then right click on the Symbol Window and run the Record New Default Properties com mand on the Symbol Window s right click shortcut menu Sort Symbols by Name Sorts the symbol entries listed in the Symbol Window alphabetically by symbol name By default the Symbol Window is sorted by line number occurrence If you want all Symbol Windows to be sorted this way by default then right click on the Symbol Window and run the Record New Default Properties com mand on the Symbol Window s right click shortcut menu Source Insight User Manual 269 Command Reference Chapter 5
495. ve the option of inserting function call parameters when a function name is inserted You can change the auto completion options using the Preferences command Context Window This command toggles the Context Window visibility on and off The Activate Context Window command also makes the Context Window visible and it changes focus to the Context Window Context Window Properties This command allows you to specify properties for the Context Window The Context Window tracks what you select and type in text windows as well as what files you select in the Project Window Relation Window and Clip Win dow Context Window Properties x Symbol Matching Show all matches on the current symbol C Show only the first symbol match even if multiple matches are found Options v Show base structure for data structure variables Show line numbers Tracking Options 2 cma Help Show all matches on the current symbol Select this to have the Context Win dow show a complete list of all symbol matches in its list If you have multiple definitions with the same name then they will all appear in the list 140 Source Insight User Manual Chapter 5 Context Window Properties Show only the first symbol match Select this to show only first matching sym bol s definition If you often have symbols that are defined in more than one place but are essentially the same thing then you might wan
496. verview 291 Jump to Definition command 72 Macro Scopes and References 292 Jump To Definition Mouse Shortcut 187 Macros as Commands 292 Jump To Link 187 Maintaining Multiple Parse Patterns 219 Jump To Prototype 187 Make Column Selection 211 JumpToLocation function 334 MakeBufClip function 318 JumpToSymbolDef function 335 Managing Tasks With Workspaces 109 MaximizeWnd function 327 K Menu Assignments 211 MinimizeWnd function 327 Key Assignments 187 Miscellaneous Macro Functions 342 Key Assignments Dialog box 188 Moving Through a File 92 KeyFromChar function 314 Msg function 315 Keypad Dunenec 189 Multiple Relation Windows 41 Keyword Expressions 210 My Documents 47 49 107 113 116 117 118 352 Keyword List 190 Keyword Search Results 211 N Keyword Variations 210 Keywords and Styles 190 Naming Conventions 304 Keyword style searching 85 210 Navigation scrolling and selecting text 92 L selection history 89 sourcelinks 90 91 Language Navigation Toolbar 23 selecting for a document type 164 Source Insight User Manual 369 o Net Framework 59 113 116 NetFramework project 59 Networking 52 New 212 New Clip 213 New Command List 358 New Commands 358 New features in Version 3 354 New Project 213 New Relation Window 213 New Window 214 NewBuf function 318 NewProj function 341 NewWnd function 327 Next File 214 Next Relation Window View 214 No project open Working With 57 No Self Modifying Macros 342 Normalized File Names 4
497. ws Print dialog box will appear You can control what font is used for printing files with the Document Options command The Document Options command lets you specify what font should be used for printing and what font should be used for the screen Alter natively you can tell Source Insight to emulate the screen font when printing If you have a TrueType font selected then emulating that font on the printer should work just fine If you have a raster font selected such as MS San Serif or Courier then printing that font on the printer may look blocky or the printer driver may just substitute that font with something similar Color Printing If you want to print your files with syntax formatting and color you need to make sure you have enabled those options in the Page Setup dialog box 220 Source Insight User Manual Chapter 5 Print Relation Window Print Relation Window This command prints the graphic contents of the Relation Window You can access this command by right clicking on the Relation Window Source Insight can print a multiple page graph Each page will indicate its page coordinate at the bottom For example if a graph spans a 4 x 3 page output the bottom of the first page printed will contain Cell 1 1 of 4 x 3 square Project Document Types Displays a list of project files categorized by document type in the Project Window Sinew Project lt gt g al x Document Type Size Modified a
498. xpanding Variables in a String You can insert a variable into another string by using the special character When a variable name appears inside a literal string and the variable name is Source Insight User Manual 297 Macro Language Guide Chapter 6 Variables are converted to numbers before arithmetic Indexing into a vari able yields a new string containing a single character surrounded by characters then Source Insight replaces the variable with the variable value For example S Hey username don t break the build again This example replaces username with the value of the variable username in the string You can escape the character with a backslash or by using two characters together For example S Mail info company com for information Variable Arithmetic Even though variables are represented as strings you can perform arithmetic on them E g s 1 x s 2 x now contains the string 3 y 2 x 5 x now contains 11 Using variables numerically is very natural and normally you don t have to even think about how they are stored The only time you need to be careful is if a variable might contain a string that does not evaluate to a number In that case an error is generated For example s hello x s 1 error You can tell if a string is numeric by calling the IsNumber function if IsNumber x x x 4 okay to do arithmetic Floating
499. ymListNew Allocates a new empty symbollist Returns the new symbol list handle or hNil iferrors You should call SymListFree when you are finished with the symbol list SymListRemove hsyml isym Removes an element from the symbol list hsyml The symbol element at isym is deleted 330 Source Insight User Manual Chapter 6 Symbol Functions Symbol Functions Symbol functions allow you to access Source Insight s symbol lookup engine Source Insight maintains symbolic information about your project in a symbol database These symbol functions make use of the symbol database and Source Insight s built in language parsers to locate symbols in your source files You may want to review the section Symbols and Projects in the Projects chapter for a description of how Source Insight maintains symbolic information and what the lookup rules are Symbol Record The Symbol record describes a symbol declaration It specifies the location and type of a symbol It is used to uniquely describe a symbol in a project or in an open file buffer Symbol records are returned by several functions and Symbol records are used as input to several functions See also Symbol Record on page 309 GetBufSymCount hbuf Returns the number of symbols declared in the buffer hbuf Returns zero if no symbols are declared or if the file could not be processed or if the document type for the file does not specify a language parser GetBufSy
500. ymbols command 72 Adding a New File to the Current Project 250 Browsing Non Project Files 32 Adding Files to a Project 49 Buffer List Functions 315 adding files to a project 123 BufListCount function 315 Adding New File Extensions 163 BufListItem function 316 Adding New File Types 68 Bufprop Record 306 Adding Remote Files to a Project 52 Build Toolbar 25 Advanced Options 127 Built In Languages 58 Analysis Features 71 AppendBufLine function 316 c Appendix 351 Array Techniques 300 C NET symbols 59 ASCII C C Language Features 60 inserting codes 184 Call Graphs 41 AsciiFromChar function 311 Call Trees and Reference Trees 73 Ask function 312 caller ASP 59 jumpto 187 Assigning Keys and Mouse Clicks 189 Cascade Windows 134 AssignKeyToCmd function 312 cat function 311 Associating Files with Document Types 67 Changing the Width of the Symbol Window 28 Associating Special File Names 68 Character Spacing Options 158 Auto Indenting 166 CharFromAscii function 311 auto completion 60 CharFromKey function 312 auto completion enabling in a document type 165 Checkpoint 134 Auto Completion speeding up 116 Checkpoint All 134 Clear Highlights 134 B ClearBuf function 316 Clip Properties 135 Back Tab 127 Clip Storage 43 Background Tasks 177 Clip Window 42 Backspace 127 Clip Window Properties 135 Backup Folder 175 Clip defined 42 Base Project 57 118 Clips base type new clip command 213 jumpto 186 Close 136 Basic Syntax Rules 291 Close All 137 Beep func
501. you are telling Source Insight where to store the project data files This can be the same directory where your source files are or you can pick a totally separate location If you are creating a project for source files that are stored locally on your machine there should not be any problem creating the project files in the same directory as your source files Source Insight User Manual 213 Command Reference Chapter 5 If you are creating a project that refers to files on a shared server or any other place that you do not have permission to write to then you should create the project somewhere on your local machine You can use the Project Settings dialog box later to point the project source directory to the location of the source files The directory where you create the project will be the project s default root or home directory In the Project Settings dialog box you can specify a different path for the project source directory The project source directory typically is the path of the topmost directory containing your source files When Source Insight displays file names the files are displayed relative to project source directory If you point the project source directory to the directory containing most of your source files then you will not have to look at a lot of redundant path information In addition the Add new files automatically feature in Preferences General only will add new files automatically t
502. you open and save files Files that are changed by other project team members are also automatically syn chronized with the symbol database in the background Languages Used to Parse Source Files The language parser used for each file is determined by its document type See also Document Types on page 66 Source Insights language parsers recog nize a wide variety of declarations Source Insight uses sophisticated error tolerant pattern matching parsers to find symbol declarations in your source files This goes far beyond what other batch tools such as ctags can do You also can specify custom regular expres sion patterns to use when parsing symbols from your files by using the Prefer ences Languages command and clicking the Properties button Symbol Naming In Source Insight symbol names are stored as a dotted path The dotted path contains the symbol s container name followed by a dot and the symbols name For example a member of a class make look like MyClass member All symbols that have their declarations nested inside of another symbol will have a dotted path If you look through the symbols listed in the Project Win dow you will see the dotted paths Even in languages like C where the scope resolution operator is used to declare members the symbol name is stored internally as a dotted path 54 Source Insight User Manual Chapter 4 Synchronizing means the symbol database is upda
503. you switch to a different program use the Preferences Files dialog box and select the check box that says Save all files when Source Insight program is deactivated Source Insight User Manual 249 Command Reference Chapter 5 Prompting for Each File Separately If you want Source Insight to prompt for each file using a separate Yes No Cancel message then use the Preferences Files dialog box and select the check box that says Save All operation will query on each file separately For each file that has changed and requires saving a dialog box is presented Source Insight Ed Q Save changes to Taglook c Yes Click this button to save the file No Click this button to not save the file and to continue Cancel Click this button to stop the Save All command Save All Quietly The Save All Quietly command saves all files that are open and have changed since they were saved last Source Insight will not ask you if want to save each file they will be saved automatically Save As The Save As command saves the current file to disk as the name that you spec ify Adding a New File to the Current Project If the file being saved is a new file that hasn t been saved before and you have a project open then Source Insight will ask if you if you want to add the file to the current project Source Insight 2 Do you want to add D vip32 T estsNother c to the current project i No Yes Click
504. you want to rename a symbol across multiple files the Smart Rename com mand is usually better because it is context sensitive See also Smart Rename on page 266 Searching for Keywords If you want to search your whole project as though it was an Internet web site then use the Search Project command Using keyword searching you can find any combination of terms that occur within a specified number of lines of con text See also Search Project on page 259 Regular Expressions Regular expressions are special search strings that are useful for matching com plicated patterns In a regular expression string many characters have special meanings For example there is a special character that means the beginning of the line This section describes all the special characters understood by Source Insight Wildcard Matching dot The dot matches any character Example b g matches big beg and bag but not bp or baag Source Insight User Manual 85 Source Insight Concepts Chapter 4 Matching the Beginning or End of a Line and The caret matches the beginning of a line when the caret appears as the first character in the search pattern Example He110 matches only if Hello appears at the beginning of a line The matches the end of a line Example TRUES matches only if TRUE appears at the very end of a line Matching a Tab or Space t s w t matches a single tab character Example t int

Download Pdf Manuals

image

Related Search

Related Contents

Grove - Magnetic Switch User Manual  BD-1000『ぴたお君 』  DS 2418 splitter de audio manual de instrucciones  ESG Environnement  Modèle R3 Mode d`emploi  第一部分 MCU网管卡使用手册 - Agenda  

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.