How to: Replace Code References
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
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.
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.
In the Code References window, click Replace on the toolbar to open the Replace dialog box.
Warning
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.
In the Replace with box of the Replace dialog box, type the replacement code or text.
Select options that you want from the Options group.
Click Replace to begin replacement.
Note
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.