| Online Eiffel Documentation

EiffelStudio

# Search tool

## Description and usage

EiffelStudio includes a search tool which allows you to look for a word or a pattern in the editor, the class tool, the feature tool or the output tool, and to replace it by another word if you want. It is located in the left part of the development window, like the cluster tool or the favorites for instance.

To make it appear, if it is not displayed, click on the search icon or choose the Search entry in the Edit menu. The search panel is divided in three parts (see Fig. 1).

Fig. 1: Search panel

In the top part, you will find a combo box and a check box. The title of this text field is "Search for:", it will be used to enter the pattern you want to look for. The button is labeled "Replace with". If you click on it, another text field will appear. If you click again, the second text field will be hidden. This text field will be used to enter the word which you want the editor to use to replace found patterns.
In the middle part of the search panel, you will find search options. They are described below.
The bottom part contains two buttons: "Search" and "Replace". Click on the first one to launch the search for the pattern entered in the "Search for" field. The "Replace" button will be active only if the "Replace with" field is displayed. Press this button if you want to replace the last found pattern by the contents of the "Replace with" text field.

## Options

The options are located in the middle of the search panel. There are five buttons, each of them corresponding to an option:

- Match case: If this option is selected, the search will be case-sensitive, which means that if you search for "example", the tool will highlight "example" but not "EXAMPLE" or "Example", as there are no capital letters in the searched pattern.

- Whole word: If this option is selected, the tool will look for isolated words. A word is isolated if it is surrounded by spaces or if it is at the beginning or the end of a line.

- Use wildcards: If this option is not selected, the tool will look for the exact sequence of letters you entered in the "Search for" field. If it is selected, you will be able to use '*' and '?'wildcards. '?' in the searched pattern is equivalent to any character. For instance, "sample" and "simple" will be highlighted if you look for "s?mple".
  '*' is equivalent to any sequence of characters, including no characters at all. It means that if you search for "exam*ple", every piece of text beginning with "exam" and finishing with "ple" will be highlighted. Use it in combination with "Whole word" to search for words beginning with "exam" and finishing with "ple".

- Replace all: If it is selected when you press the "Replace" button, every occurrence of the searched pattern will be replaced with the content of the "Replace with" field. It is possible to activate this option only if the "Replace with" field is displayed.

- Search backwards: If this option is selected, the tool will highlight the previous occurrence of the searched pattern instead of the next occurrence when you press the "Search" button.

Note: If the search tool hits one end of the text, it will automatically continue from the other end.

See Also
There are keyboard shortcuts and menu entries to launch searches without using the search tool directly. They are described the editor section of this help.