In the Search dialog, you can perform file, text or Java searches. Java searches operate on the structure of the code. With File Search you can search files by name and/or text content. Indexing makes Java searches faster, while searches on text content will allow you to find matches inside comments and strings.
1.
|
In the Java perspective, click the Search
button in the workbench toolbar or use Search
> Java from the menu bar.
|
2.
|
If it is not already selected, select the Java
Search tab.
|
3.
|
In the Search string
field, type runTest. In the Search For
area, select Method, and in the Limit To
area, select References.
Verify that the Scope is set to Workspace. ![]() Then click Search. While
searching you may click Cancel at
any time to stop the search. Partial results will be shown.
|
4.
|
In the Java perspective, the Search view shows the search
results.
![]() Use the Show Next Match
and Show Previous Match buttons to navigate
to each match. If the file in which the match was found is not currently
open, it is opened in an editor.
|
5.
|
Note that when you navigate to a search match using the
Search view buttons, the file opens in the editor at the position of the
match. Search matches are tagged with a search marker in the marker bar.
![]() |
1.
|
In the Package Explorer view, double-click junit.framework.Assert.java
to open it in an editor.
|
2.
|
In the Outline view, select the fail(String) method,
and from its context menu, select References >
Workspace.
![]() |
1.
|
In the Java perspective, click the Search
button in the workbench toolbar or select Search > File from the menu bar.
|
2.
|
If it is not already selected, select the File
Search tab.
|
3.
|
In the Containing text
field, type TestCase. In the File
name patterns field, make sure that is set to *.java.
The Scope should be set to Workspace.
Then click Search. ![]() |
4. | To find all files with a given file name pattern, leave the Containing Text field empty. |