This dialog box helps create a custom code pattern, search for it and replace it. Depending on your goals, you can open Search with Pattern dialog box in two modes:
Find Mode
By default the Search with Pattern dialog box opens in Find mode. All controls in this dialog box can be divided into logical groups.
| Item | Description |
|
Menu bar |
This area contains menu items. |
|
Find |
Click this button to switch to the Find mode. |
|
Replace |
Click this button to switch to the Replace mode. |
|
|
Click to open the Pattern Catalog dialog box and look through the list of recently created and saved patterns. |
|
|
Click to expand the list with recently used custom patterns. |
|
Search area |
This area contains controls that allow you to create a custom pattern and specify search options. |
|
Search pattern |
In this area enter your own search pattern using
|
|
Look in |
Use the drop-down list to specify the search scope. Several scopes are provided:
|
|
Match similar constructs |
Use this control to specify whether to match similar constructs. ReSharper considers following constructs as similar:
|
|
Placeholder area |
This area contains controls that help you create placeholders and manage them. |
|
|
Click this button to create new placeholder. There are 5 types of placeholders:
After you choose the desired type, the Create/Edit Placeholder dialog box opens. The following controls can be used in this dialog box:
|
|
|
Click this button or double-click at the placeholder name to edit the selected placeholder using the
|
|
|
Click this button to remove the selected placeholder. |
|
Command buttons |
Command buttons that are available in this dialog box and are used to initiate immediate actions. |
|
Find |
Click this button to perform your search. |
|
Save |
Click this button to save current pattern to the catalog. |
|
Close |
Click this button to close the Search with Pattern dialog box. |
Replace Mode
Most controls in Replace mode are completely the same as in Find mode. Controls that only appear in Replace mode are described below:
| Item | Description |
|
Replace area |
This area contains controls that allow to create a replace pattern and specify actions after the replacement. |
|
Replace pattern |
In this area enter a replace pattern using
|
|
Format after replace |
Specify whether to apply formatting to code. |
|
Shorten references |
Specify whether to replace fully qualified names with short names. |
|
Command buttons |
Command buttons that are available in this dialog box and are used to initiate immediate actions. |
|
Replace |
Click this button to find pattern occurrences and specify which of them to replace. |

