IBM
Contents Index Previous Next



Searching and Replacing


From the Table Editor, you can search for and replace text, either on system, document or table level. You specify the search in the search bar of the Table Editor and start the search (and replace) from menu choices in the Search menu.

Figure 203 : The TTCN Table Editor search bar

Specifying Search and Replace Settings

Delimiting the Scope of Search

You can search for text on three levels:

Selecting the Type of Search

There are three types of search patterns:

Selecting the Search Direction

The search direction can be forward (down arrow) or backward (up arrow).

Specifying the Text to Search For

You specify the text to search for in the Look for field. If you search for text using a regular expression, you will be notified if you try to use an incorrect regular expression.

Specifying the Replacement Text

You specify the replacement text (or replacement pattern, if the type of search is regular expression) in the Change to field.

If you search and replace using regular expressions, the replacement pattern must be compatible with the search pattern. If it is not, you will be notified.

Something important to note about regular expressions, is that the actual replacement text is a result of a combination of the search pattern, the match found and the replacement pattern. This means that the actual replacement text may not literally match the text in the Change to field. However, the actual replacement text will be presented in the status bar when you start searching and a match is found.

Starting the Search and Replace

Search > Search

Starts the search from the current position. If you search in the current table, selected text will be skipped. If the Table Editor is empty, the search will start from the beginning or end of the document or system, depending on the scope and direction that you have specified.

Search > Replace

Replaces currently selected text with the replacement text. If you searched using regular expressions, the replacement text will be presented in the status bar when a match is found.

You can also replace manually selected text. This only requires that Text or Wildcard is selected and that the Change to field contains some text. Note that you cannot manually make an empty selection, but it is possible to search and find an empty match that you can replace.

Search > Proceed

Searches for and replaces text sequentially. If text is selected, it will be replaced and after that the search will proceed.

Search > Replace All

Replaces selected text and then continues the search and replace from the current position. If the Table Editor is empty, the search will start from the beginning or end of the document or system, depending on the scope and direction that you have specified. The number of replacements will be presented in the status bar.


http://www.ibm.com/rational
Contents Index Previous Next