Summary
Implement textDocument/prepareCallHierarchy and callHierarchy/incomingCalls / callHierarchy/outgoingCalls to show call trees for functions and FBs.
Scope
- Prepare: identify FUNCTION or FUNCTION_BLOCK under cursor as hierarchy root
- Incoming: all PROGRAM/FUNCTION_BLOCK/FUNCTION bodies that call this function/FB
- Outgoing: all functions/FBs called from the current PROGRAM/FUNCTION_BLOCK/FUNCTION
- Cross-file via workspace indexer
Implementation Notes
- New
CallHierarchyProvider in src/server/providers/
- Requires workspace indexer to track call sites per file
- Register capability in
server.ts
Acceptance
- Right-click → Show Call Hierarchy works on any FUNCTION or FUNCTION_BLOCK
- Incoming and outgoing populated correctly cross-file
- Tests cover direct and transitive call cases
Summary
Implement
textDocument/prepareCallHierarchyandcallHierarchy/incomingCalls/callHierarchy/outgoingCallsto show call trees for functions and FBs.Scope
Implementation Notes
CallHierarchyProviderinsrc/server/providers/server.tsAcceptance