get_enclosing_element
Retrieve the enclosing method, type, and package at a given position in Java source code, using zero-based line and column coordinates. Requires a loaded project.
Instructions
Get the enclosing element at a position.
USAGE: Position anywhere in code OUTPUT: Enclosing method, type, and package info
IMPORTANT: Uses ZERO-BASED coordinates.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to source file | |
| line | Yes | Zero-based line number | |
| column | Yes | Zero-based column number |