JavaScript Editor js editor     Web development 

Main Page

After performing a code reference search, you can replace code or text in your projects or folders. For more information, see How to: Search For Code References.

To replace a code reference in a project or folder

  1. Perform a code reference search to locate the code or text you want to replace.

    If your search is successful, the Code References window displays the search results in the results pane.

  2. In the Code References window, choose the lines of code in which you want to replace the code reference or text by performing one of the following:

    • To select particular lines of code, click the check box for each line of code you want that appears in the results pane.

    • To select all lines of code, right-click in the results pane to display a shortcut menu and choose Select All.

  3. In the Code References window, click Replace on the toolbar to open the Replace dialog box.

    If you select lines of code for replacement in which data files might be affected or where changes to data structures, property values, or property and method names in forms (.scx) or visual class libraries (.vcx) might occur, Visual FoxPro prompts you to confirm or decline the replacement operation. If you confirm replacement, Visual FoxPro performs only those replacements that do not affect data files and provides code in the search string node under the Replacement Logs node for you to manually perform the desired changes. If you decline replacement, no changes are made.

  4. In the Replace with box of the Replace dialog box, type the replacement code or text.

  5. Select options that you want from the Options group.

  6. Click Replace to begin replacement.

    If you selected Confirm replacements from the Options group, you must confirm the replacement operation for each line of code you selected. The Code References window displays a record of the replacement operation as a log node below the Replacement Logs node in the search pane and the results of the replacement in the results pane.

For more information, see Code References Window and Replace Dialog Box.

After the Code References tool finishes replacing the code or text, you must confirm whether you want to refresh the results in the Code References window.

See Also

JavaScript Editor js editor     Web development