Difference between revisions of "OtfSearchReplace"

From emotive
Jump to navigation Jump to search
Line 24: Line 24:
  
 
==Replacing a text==
 
==Replacing a text==
To replace a text, you can adjust the settings as you search a text, [[#Search|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 the object with the specified text and then use the "'''Replace'''" button to replace the text in the focused object.
+
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 the object with the specified text and then use the "'''Replace'''" button to replace the text in the focused object.

Revision as of 09:23, 17 September 2014

Overview

In the OTF, you can search for a text in the current procedure, the current document, the current package ect. You can also replace a text. To bring up the "Search and Replace" dialog box, please click on the "Search and Replace" button 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 allows for searching and replacing 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":
    1. Check 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 next to the "Find what" field then becomes available, 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.
  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 setting 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 everytime 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 the object with the specified text and then use the "Replace" button to replace the text in the focused object.