Java Reference
In-Depth Information
Figure 9.10 Editing variables of your structured search lets you apply more
fine-grained search criteria.
blocks that catch number format exceptions. Click the Edit variables button to
apply additional constraints to the $ExceptionType$ variable. This brings up the
Edit Variables screen shown in figure 9.10.
All the variables referenced in your template are listed here, and you can
apply additional constraints to any, all, or none of them. If no constraints are
applied, a variable matches anything. To achieve the desired result of limiting
the search to those dealing with NumberFormatException s, select the Exception-
Type variable and add a text constraint so that only exceptions that match that
class name are matched. Note that you can enter a fully qualified type or even a
regular expression.
Applying variable constraints
Text constraints are relatively straightforward: Specify the text pattern to match
against in the Edit Variables window. In the case of references to symbols such as
class names, you can optionally fully qualify the reference. If you hold down the
Ctrl key while placing the mouse over the symbol name, IDEA shows you the fully
qualified name, if any. If your search contains any regular expression metachar-
acters such as parentheses, brackets, dollars signs, and so forth, you need to
escape them with a single backslash ( \ ). You can invert the match to a “don't
match” by selecting the Invert condition option, or limit the match to those
within word boundaries with Whole words only . The remaining option, Apply
 
 
 
 
 
Search WWH ::




Custom Search