Search Actions

Search menu commands:

Name

Function

Search...

Opens the search dialog (Ctrl+H)

File...

Opens the search dialog on the File search page

Java...

Opens the search dialog on the Java search page

Text

Searches for the selected text in the chosen scope:

  • Workspace (Ctrl+Alt+G)
  • Project
  • Hierarchy
  • Working Set

References

Finds all references to the selected Java element in the chosen scope:

  • Workspace (Ctrl+Shift+G):
  • Project
  • Hierarchy
  • Working Set

Declarations

Finds all declarations of the selected Java element in the chosen scope:

  • Workspace (Ctrl+G)
  • Project
  • Hierarchy
  • Working Set

Note: A strict declaration search would only ever return a single declaration. Since that's not interesting, declaration searches are relaxed as follows:

  • Method declarations: Hierarchy search finds overriding and overridden methods in the hierarchy. Other searches find methods with the same name and signature, but ignoring declaring type and return type.
  • Field declarations: Ignore the declaring type and the field's type.

Implementors

Finds all implementors of the selected interface in the chosen scope:

  • Workspace
  • Project
  • Working Set
Read Access

Finds all read accesses to the selected field in the chosen scope:

  • Workspace
  • Project
  • Hierarchy
  • Working Set
Write Access

Finds all write accesses to the selected field in the chosen scope:

  • Workspace
  • Project
  • Hierarchy
  • Working Set

Occurrences in File

Finds all occurrences of the selected Java element in its file (Ctrl+Shift+U)

  • Identifier: Occurrences of all identifiers resolving to the selected element
  • Implementing Methods: All methods implemented by the selected super-interface declaration
  • Throwing Exceptions: All statements that possible throw the selected declared exception
  • Method Exits: All statements that can exit the method of the selected return type
  • Break/Continue Target: The targets of the selected break and continue statement

Referring Tests

Finds all JUnit tests that refer to the currently selected type

Search scopes submenu:

Scope

Availability

Description

Workspace

all elements

Searches in the full workspace

Project

all elements

Searches in the project enclosing the selected element

Hierarchy

types and members

Searches in the type's hierarchy

Working Set

all elements

Searches in a working set

Custom scopes can be configured using the working set dialog. Existing working sets are shown in the Search scope submenus after they've been used in a search.

A Java search can also be conducted via the context menu of all Java views. The search context menu is also available in the Java editor. The search is only performed if the currently selected text can be resolved to a Java element.

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

Related concepts

Java search

Related reference

Java search tab