Skip to content

call hierarchy (incoming/outgoing calls) #103

@michaeldistel

Description

@michaeldistel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions