You can replace any string of characters contained in the source code of an active object window.
By default, Stop find at end editor option described in Program Editor Options in the Using Natural Studio documentation.
restarts a search from the beginning when the end of the source code is reached. However, you can change the default setting and instruct to terminate when the end of the source is reached by setting theTo replace a character string
From the
menu, choose .Or:
Choose the following toolbar button:
Or:
Press CTRL+H.
The Replace dialog box appears.
In the Replace dialog box, you can specify the following:
In the Find combo box, enter the character string to be found or select a string from the drop-down list box. All character strings used in previous searches are retained in the list box for the duration of the current Natural session.
In the Replace with combo box, enter a replacement string or select a string from the drop-down list box. All character strings used for previous replacements are retained in the list for the duration of the current Natural session.
Select the Case sensitive check box (not selected by default) to find and replace only characters strings that exactly match the entry in the Find text box. Otherwise, any combination of upper and lower-case letters will be found and replaced.
Select the Whole words only check box (not selected by default) to find and replace whole words only. Otherwise, all occurrences of the string will be found and replaced.
Select the Exclude collapsed blocks check box to exclude collapsed blocks from the search and replace functions; do not select the box (this is the default setting) if you want to search and replace in the entire (expanded) source code. Exclude collapsed blocks is only available if structured mode was used for the source(s) to be scanned and if the Expand/Collapse editor option is selected (see Program Editor Options in the Using Natural Studio documentation).
For more information on expanded and collapsed code blocks, see Showing and Hiding Source Code.
Select the Search up check box to perform the search and replace functions from the current position of the text insertion caret to the beginning of the source (up). If this check box is not selected (this is the default setting), the search and replace functions are performed from the current caret position to the end of the source (down).
Select the Current editor window radio button (selected by default), if you want to execute the search and replace functions only in the source code contained in the current window of the program editor.
Select the All program editor windows radio button, if you want to execute the search and replace functions in the source code contained in all open windows of the program editor.
Select the Selection radio button, if you want to execute the Replace All function for a selected portion of source code. This button is only enabled, if the text selected in the current editor window spans one or more lines. The buttons Find Next and Replace are then disabled.
You can choose the
button to invoke the online documentation for help information on replacing text.Choose the button
, or to execute the find and/or replace function.Depending on the setting of the Search up check box, the find and/or replace goes down or up the source code from the current caret position. If no instance of the search string is found, a corresponding message is displayed. If an instance of the search string is found, the following applies:
If
was selected, the search string is selected.If
was selected, the previously selected search string is replaced by the replacement string.If
was selected, all search strings found are replaced by the replacement string.If the first instance of a search string is selected, you can go to the next instance by choosing one of the following methods:
From the Find Next or .
menu, chooseOr:
Choose one of the following toolbar buttons:
for Find Next
for Replace Next
Or:
Press F3 for Find Next or
CTRL+F3 for Replace Next.
You can choose the Replace dialog box. However, you can also edit the current source when the Replace dialog box is open.
button to close theWhen the Replace dialog box is closed, you can continue the find and/or replace functions by using the alternative methods described earlier in Step 4.