Name Fragment Matching Symbol Names. Source Dynamics Source Insight 4.0
विज्ञापन
विज्ञापन
Name Fragment Matching Symbol Names
Name Fragment Matching Symbol Names
Name Fragment 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 name fragment 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.
Name Fragment matching also works in most type-in boxes that are associated with lists; not just symbol lists.
A name fragment (or word fragment) 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
CreateWindow
OpenHTML
HTMLOpen
FOpenDoc
Vip32Test open_file
Name Fragments
Create and Window
Open and HTML
HTML and Open
Open and Doc
Vip32 and Test open and file
For example, the symbol name "CreateWindow" has two name fragments: "Create" and "Window". Source
Insight indexes both name fragments so that you can browse for the symbol by typing "Cre" or "Win" or any combination, and in any order. Each name fragment is prefix matched by what you type.
You can browse symbols this way using the Project Window symbol and file list. This also works in the text box above the symbol window pane on the left side of each source window.
In addition, all lists in Source Insight that are matched with a text box have this standard ability as well.
Controlling Name Fragment Matching
You can control whether lists are affected by name fragment matching in the Options > Preferences: Typing dialog box. The check box Match name fragments while typing controls whether name fragment matching is active or not, regardless of whether the project setting indicate that name fragments are indexed in the symbol database.
Tip:
Type a space character in front of a name fragment to toggle name fragment matching for an individual case.
As a shortcut, you can toggle the use of name fragment matching by prefixing what you type with a space character. For example, if you turned name fragment matching off in the Options > Preferences: Typing dialog box, you can use it selectively by adding a space character in front of the name fragment you type.
Using Name Fragment Matching
Many of the text boxes where you can type a symbol or file name allow you to type a series of name fragments. The list box associated with the text box will be filtered down based on what you type.
Tip:
Type name fragments into any text box associated with a list box. You can type multiple name fragments for filtering.
When you type, begin with the starting two or more characters of a name fragment, and follow that with another name fragment. For example, "CreWin". You can separate name fragments with a space also. For example, "Cre Win". For the most part, you can type the name fragments in any order.
64 Source Insight 4 User Guide
Name Fragment Matching Symbol Names
The name fragment filtering is not case sensitive. However, once the filtered list is displayed, Source Insight will try to select the item in the list that most closely matches what you typed, including the case.
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 Name Fragment Shortcuts
You can use these shortcuts when typing into a symbol name field to specify strict prefix matching, or member name matching:
To match strictly prefixes only, prefix the spec with a single space or the caret
^
character.
For example,
^Format
and
<space>Format
will match only symbols that start with "format". (Case insensitively.) It will not match "LineFormat". The prefix actually toggles name fragment matching on and off.
To match strictly prefixes of member names, prefix the spec with a dot
.
character. 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.
Source Insight 4 User Guide 65
डाउनलोड
विज्ञापन