![]() |
![]() |
VisualAge for Java is designed to make it easy for you to find program elements and to move around within the interface. This section tells you how to take advantage of the search features of the IDE.
The IDE gives you several choices for searching for program elements. For example, in program element panes, if you press a letter key, VisualAge for Java selects the first displayed program element that begins with that letter. If you press the same letter again, the next program element that begins with that letter is selected.
You can use the Search dialog to perform powerful searches of the workspace. To open the Search dialog, use any one of the following methods:
This will open the Search dialog. If you selected text or a program element before launching the search, the Search string field will contain what was selected.
Select the type of program element you want to search for, the scope of the search, and the usage of the element, by enabling the appropriate radio buttons. Click Start. When the search is complete, and if the IDE finds a match to your criteria, the Search Results window will open.
In the Search Results window, you can browse and modify the contained program elements, and re-run searches.
The pop-up menu for types and methods contains special searches that are often needed. For classes and interfaces, The References To pop-up menu option has sub-options that search the workspace for references to the selected type or one of its fields. Results of the search are displayed in the Search Results window.
For methods, the References To pop-up menu option has sub-options that search the workspace for references to the selected method, methods it calls, fields it accesses, or types it references. The Declarations Of sub-options search for declarations of these same program elements. Results of the search are displayed in the Search Results window.
You can also search for a program element by selecting one of the Open selections from the Workspace menu. Running this search will result in opening a browser on the searched-for element. For example, if you select Open Type Browser from the Workspace menu, the Open Type dialog is displayed:
As you enter string in the Pattern field, the Type Names list updates to show only the classes and interfaces that match what you have typed in so far. Select String from the Type Names list and select OK to open a browser on the String class. For some type names, which may exist in more than one package, you also need to select a package from the Package Names list.
If you want to find a program element that you know is contained in the current browser page, use the Go To menu option for the element type. For example, if you are in the Projects page of the workbench, and you want to find the java.lang.String class, Select Go To, Type from the Selected menu. In the Go To Type dialog, enter string in the Pattern field, select the String class from the type list, and java.lang from the package list. When you click OK, the IDE will go to and select the java.lang.String class in the All Projects pane in the Workbench.
![]() |
![]() |