get_enclosing_element
Find the enclosing method, type, and package for a specific position in Java source code using zero-based coordinates.
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 |
|---|---|---|---|
| column | Yes | Zero-based column number | |
| line | Yes | Zero-based line number | |
| filePath | Yes | Path to source file |