Compartir a través de


Look Up Reference Dialog Box

Provides a way for you to search for occurrences of a code reference in a project, specific folder or subfolder. You can filter your search by file type.

The Look Up Reference dialog box appears only in design mode when you select Code References on the Tools menu. You can also select Look Up Reference when you right-click inside the editing window for programs or open the Look Up Reference dialog box programmatically for the first time using the following code:

DO(_FOXREF)

For more information about calling the _FOXREF system variable, see _FOXREF System Variable.

  • Look for
    Specifies the target search expression.

    Visual FoxPro populates the Look for box with the expression selected in the Editing window. The Look for box contains any recently selected or previously searched expressions.

    When you select the Use regular expressions check box, an arrow button next to the Look for box becomes available. Selecting the Use regular expressions check box allows for wildcard character searches. For more information, see "Use regular expressions" in this topic.

  • Scope
    Specifies the range of the search and contains the following options:

    • Folder   Search the current folder and optionally, subfolders.
    • Project   Search the set of files in the selected project. Only opened projects appear in the drop-down list.
  • Look in
    Specifies the current folder and contains a drop-down list with the history of previously selected folders when Folder is selected in the Scope box. To select a different folder, click the ellipsis (...) button to open the Select Directory dialog box.

    The Look in box is not available when Project is selected in the Scope box.

  • Search subfolders
    Includes subfolders of the selected folder in your search. The Search subfolders check box is available only when Folder is selected in the Scope box.

  • Limit search to project home directory and subfolders
    Includes only those files in the project that are located within the project's home folder and subfolders. Shared files are excluded. This check box is available only when Project is selected in the Scope box.

  • Overwrite prior results
    Controls whether results from an earlier search are included or overwritten in the new search. This option functions similarly to selecting Clear All Results from the context menu in the Code References window to replace all the content in the Search pane. The Overwrite prior results check box is available when Folder or Project scope is selected.

  • File Types
    Specifies a set of file types for limiting your search. File types are separated by commas. The most recent value used in a search is used in the next search. You can add custom file types using the FoxRefAddin.dbf file. The FoxRefAddin table allows for specific file type extensions that are excluded when doing a wildcard file name (*.*) search. The following table lists all Visual FoxPro file types that are supported and how searches on a file type are conducted.

    File extension Behavior
    .cdx Search index expressions. Selecting this extension requires a table to be open to find the expression.
    .dbc Search stored procedures, remote view source, connections, and other .dbc data, excluding .dbf files and structures.
    .dbf Search field names and any extended .dbc file metadata such as trigger expressions but not table contents. Visual FoxPro might need to temporarily open or close tables if you select this extension.
    .frx, .lbx Search report and label expressions, label values, and data environment.
    .mnx Search menu names and associated code.
    .prg Search program files and display the line number for the reference if found.
    .scx Search all method code, data environment, and non-default property values.
    .vcx Search all method code and non-default property values.
    Other file types Treat search expressions as strict text.

    The following table lists default file type groups appearing in the drop-down list in the File Types box.

    File types File extensions
    All Files *.*
    Common *.scx, *.vcx, *.prg, *.frx, *.lbx, *.mnx, *.dbc, *.qpr, *.h
    All Source *.scx, *.vcx, *.prg, *.frx, *.lbx, *.mnx, *.dbc, *.dbf, *.cdx, *.qpr, *.h
    Forms and Classes *.scx, *.vcx, *.prg
    Reports and Labels *.frx, *.lbx
    Menus *.mnx
    Programs *.prg, *.h, *.qpr, *.mpr
    Data Structures *.dbc, *.dbf, *.cdx
    Text *.txt, *.xml, *.xsl, *.html, *.log, *.asp, *.aspx

    Note   The Common source file type group includes only .dbc files as a data source option by default. The default behavior is to search only stored procedures. You can change this behavior by clicking the Options button in the Look Up Reference dialog box.

  • Options
    Opens the Options dialog box to set additional options for your search. For more information, see Look Up Reference Dialog Box, Options Dialog Box.

Options Group

The Options group box includes additional options you can specify to customize your search.

  • Match case
    Specifies whether your search is sensitive to text casing.
  • Match whole word
    Specifies whether your search must match entire words exactly.
  • Use regular expressions
    Allows for wildcard character searches. Selecting the Use regular expressions check box enables the arrow button next to the Look for box. Clicking the arrow button opens a menu from which you can select a regular expression type to insert in the Look for box. For more information about regular expressions, see Regular Expressions and Operators.
  • Comments
    Specifies whether to include code comments in your search. Comments begin with an asterisk (*), double ampersand (&&), or NOTE keyword. The Comments drop-down list includes the following options:
    • Include Comments   Include comments in your search.
    • Ignore Comments   Ignore comments in your search.
    • Comments Only   Search comments only.

See Also

Dialog Boxes | Code References Window | Viewing Code Definitions | _FOXREF System Variable