find_references
Locates all references to a Java symbol across your project. Position on a symbol to see every usage with context.
Instructions
Find all references to a symbol across the project.
USAGE: Position on symbol, find all usages OUTPUT: List of reference locations with context
The references of a symbol of a class file, such as a JDK method, are those in the project's source files. A position on a name the compiler cannot resolve has no symbol: SYMBOL_NOT_FOUND. maxResults outside 0 to 1000 is INVALID_PARAMETER.
IMPORTANT: Uses ZERO-BASED coordinates.
potentialMatches, present only when there are any, holds the places JDT's search reports as possible matches but cannot confirm, because a type or name there does not resolve (a missing dependency or a compile error): count is their exact number, and locations lists them, as many as the results it stands beside may list. They are never counted or listed as results.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Zero-based line number | |
| column | Yes | Zero-based column number | |
| filePath | Yes | Path to source file | |
| maxResults | No | Max references to return, 0 to 1000 (default 100) |