Java Reference
In-Depth Information
3.3.3
Navigating to a symbol by name
The feature that lets you navigate to a symbol by name is similar to the Go To |
Class and Go To | File commands you've already learned about. The Go To |
Symbol command ( Ctrl+Alt+Shift+N ) lets you navigate to the declaration
point of any symbol in the project, including classes, methods, instance variables,
and so forth with just the symbol's short name. It also supports wildcard expan-
sion, as illustrated in figure 3.2; in the figure, we've brought up the list of all the
symbols in our project that contain the substring serv (the match is case insensi-
tive.) You can expand the search to include your libraries as well, by enabling the
Include non-project symbols option in the search dialog.
As you type, the suggestion list brings up the first 30 matching symbols. Using
the mouse or arrow keys, select the symbol you're interested in, and you'll be
whisked away to its declaration point. Like most of IDEA 's suggestion boxes, this
one is limited to a few dozen selections; if the symbol you're hunting for isn't
listed, try specifying a more unique search term.
In version 5.0, IDEA has added a couple of nice enhancements to the ability to
navigate to a class, file, or symbol by name through the Go To menu. First, if the
term you enter doesn't find any matches within the Project, IDEA implicitly acti-
vates the option to extend the search to the Java classes and other libraries in use
for your project. Very handy!
Second, you can see additional matches when your search returns more than
one page of results. If the last row of your search results is an ellipsis (…), this
indicates that the results were truncated. Pressing Enter or double-clicking the
ellipsis loads an additional page of results. You can repeat as necessary to load
additional matches.
Figure 3.2 The Go To | Symbol feature lets you navigate to the
declaration point of any symbol in your project with just its name.
 
 
 
 
Search WWH ::




Custom Search