feat(tools): recognize procedures stored in COMMANDBLOCK properties
Add a new module that parses PostConfigurator COMMANDBLOCK values (CONF_* set ...) to extract the first word of braced list elements as procedure names with precise line/column spans. - server/src/tools/stored_procs.py: implement stored_command_names(command) which returns (name, line, column) for static/braced list elements. - Integrate into navigation (build_file_symbol_index) to index these names as non-definitions so Go To Definition / Find References can resolve them. - Integrate into semantic highlighting to mark known stored procedures as functions when appropriate. - Add tests (server/tests/python_tests/test_stored_procs.py) covering parsing, goto-definition, references, and highlighting behavior. - Update CHANGELOG to note the new capability. Notes/constraints: - Only static/braced COMMANDBLOCK values (BracedWord) are considered. - Names must match the command-name pattern and are taken from the first word of each list element.
This commit is contained in:
@@ -7,6 +7,7 @@ Versions correspond to the Git tags of this repository.
|
||||
|
||||
### Added
|
||||
|
||||
- Procedures stored in PostConfigurator COMMANDBLOCK properties (`CONF_CTRL_tool set auto_preselect_last_template {custom_header}`) are highlighted as procedures and support Go to Definition, Find References, Rename, and the call hierarchy
|
||||
- Go to Definition from block template and address arguments in Tcl (`MOM_do_template`, `MOM_force`, `MOM_suppress`, `MOM_ask_address_value`, ...) to the `BLOCK_TEMPLATE`/`ADDRESS` declaration in the PSC `.def` files
|
||||
- Hover over block templates shows the template body; hover over addresses shows format, leader, trailer, min/max, and modality
|
||||
- Find References and Rename for block templates and addresses across Tcl and `.def` files, including addresses used inside block templates
|
||||
|
||||
Reference in New Issue
Block a user