Repository navigation
Open
Labels
Kind: Enhancement 🌟Level: Intermediate (3)Plugin: C#Issues related to the parsing and presentation of C# projects.
Milestone
Description
C# plugin: Function call diagram
Part of #822 . The original issue covers all C# diagrams (function call, class, file/directory dependency, CodeBites). Implementing them in one PR would be too big, so this issue covers only the function call diagram. The other diagram types will get their own issues.
Goal
The C# plugin should be able to produce a function call diagram the same way as the C++ plugin does: an interactive Graphviz SVG diagram, to keep a unified approach for diagrams.
Expected behaviour (same as the C++ plugin)
- The diagram can be opened from the text context menu of a C# method (Diagrams → Function call diagram).
- The selected method is the center node.
- Methods directly called by the selected method (callees) are shown on one side, methods directly calling it (callers) on the other side.
- Nodes are grouped into subgraphs by source file.
- The diagram is interactive like in the C++ plugin: clicking a node opens the diagram for that method.
- A legend is available for the diagram.
Tasks
- Implement
getDiagramTypes,getDiagramandgetDiagramLegendfor the C# service, reusing the C++ plugin's Graphviz-based approach (util::Graph,util::LegendBuilder). - Make sure the C# parser stores method invocations in a way that callees and callers can be queried (e.g. member access calls like
obj.Method(),this.Method()). - Make sure AST node IDs are stable between parses, so the diagram doesn't show duplicated nodes.
References
Some initial work has been done on the csharp_diagrams branch of @intjftw's fork, which should be checked and reused if possible:
https://github.com/intjftw/CodeCompass/commits/csharp_diagrams/
Code changes can be tracked here:
intjftw#1
Metadata
Metadata
Assignees
Labels
Kind: Enhancement 🌟Level: Intermediate (3)Plugin: C#Issues related to the parsing and presentation of C# projects.
Activity