Skip to content

call hierarchy (incoming/outgoing calls) #103

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: MediumenhancementNew feature or requestlspLanguage Server Protocol relatedv1.5.0Targeted for the v1.5.0 milestone

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions