# Conducting a Java search using pop-up menus

Open the context menu on any Java element visible in a view.

- Search, Outline, and Hierarchy views: The selected Java element in these views can be searched for declarations and references.
- Package Explorer: Packages, Java compilation units, types and their members can be searched for declarations and references. If a compilation unit or CLASS file contains more than one type, a dialog prompts you to choose one.

The search pop-up menu is also available in the Java editor. If the selection in the Java editor can be resolved to a Java element, then you can search for declarations and references.

To conduct a search from a pop-up menu, follow these steps:

1. Select a Java element (for example a Java compilation unit in the Package Explorer or a method in the Outline view) or some text in a Java editor.
2. From the selection's pop-up menu, navigate to the available Java searches. After you select a search to perform, the search progress is shown in a dialog. Note: in the editor searches are available under the Search submenu.
3. You may stop the search process by clicking Cancel in the progress dialog.

The type of the selected Java element defines which search pop-up menus are available. The Java editor does not constrain the list of available Java searches based on the selection.

Java search

Searching Java code

Java search tab
Search menu