Java Reference
In-Depth Information
Replace
substitutes the current match with your replacement text and
moves to the next match.
■
Skip
ignores this match and continues to the next one.
■
All
replaces all the rest of the matches without asking, ending the search-
and-replace operation.
■
Cancel
aborts the search-and-replace operation. Any replacements already
made are kept.
■
The
Replace Text
window is regular-expression capable, just like the
Find Text
window. You can, for example, use a regular expression in the
Text to find
text field that contains grouped sequences and then use
back references in the
Replace with
text field.
TIP
Search across a project
IDEA
gives you the ability to search for matching text in all the files in your
project or, if you prefer, a particular directory hierarchy. You do so through the
Search | Find in Path
command (
Ctrl+Shift+F
), whose dialog box is shown in
figure 2.18.
As you can see, you have some of these same options as in a single-file search,
but your scoping control has changed. Now you can choose between the entire
project, a specific module, and a specified directory. You can use the drop-down
to choose a module or the file browser control to select the folder to search (and
then, optionally, enable the
Recursively
option to search any child directories of
your selected directory). Additionally, the
File mask
option restricts the search to
files matching a certain naming pattern. Click
Find
to begin the search.
Figure 2.18
The Find in Path operation expands
the scope of the Find operation and
lets you specify a single directory, a
recursive directory, a complete
module, or the whole project as the
scope of the search.