OtfSearchReplace

From emotive
Jump to navigation Jump to search

Overview

In the OTF, you can search for and replace a text in the current procedure, the current document, the current package etc. To bring up the "Search and Replace" dialog box, please click on the "Search and Replace" button ("Search.png") in the "Start" tab of the Ribbon, or you can press CTRL + F or F3. Please note that you can open the "Search and Replace" dialog box only if a solution is loaded in the Solution Explorer.

SearchReplace.png
The "Search and Replace" dialog box help you to search for and replace a text

Searching for a text

To search a text, please proceed as follows:

  1. Enter a piece of text in the "Find what" text box.
  2. Select the search scope in the "Look in" combo box.
  3. In the "Find options" section:
    1. Tick at the "Match case" check box if you want to perform a case-sensitive search.
    2. Check "Match whole word" check box if you want to find the search text as a standalone word.
    3. If the search text is a regular expression or a wildcard, check the "Use" check box and select the corresponding type (After you select the corresponding type, the triangular "Expression Builder" button at the right of the "Find what" text box will be enabled, click on the button to view help for building expression).
  4. You can search the text in all object types by checking the "All objects" check box. To search in one or several particular object types, uncheck the "All objects" check box and check the object types you want to search in.
  5. Click the "Find" button.
  6. The results of the search will be displayed in the Search Results tool window, double-click on a result, the corresponding object will be focused.

With all the settings you have set for the search above, you can also move to the tab "Replace" and use the "Find next" button. There will be no search results in the Search Results tool window but each element containing the text will be focused sequentially every time the "Find next" button is clicked.

Replacing a text

To replace a text, you can adjust the settings as you search a text, see above. After setting, enter the text in the "Replace with" text box. You can replace the specified text in each object by the "Replace" button, or replace the specified text in all the objects within the search scope by the "Replace All" button. You can use the "Find next" button to find and set focus on each object with the specified text and then use the "Replace" button to replace the text in the expected object.