Repository navigation
C# plugin Function call diagramm - #883
Open
HorvathDaniel15 wants to merge 1 commit into
Open
HorvathDaniel15 wants to merge 1 commit into
HorvathDaniel15 wants to merge 1 commit into
Conversation
HorvathDaniel15
requested review from
mcserep
and
a balanced review from Copilot
November 8, 2026 13:51
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
An unchecked null file lookup can crash the request handler, while diagram generation can corrupt or erase method signatures and overwrite the selected method’s highlighting.
4 open issues
What changed in this PR
Adds Graphviz-based function call diagrams to the C# plugin, extending its language service toward the behavior requested in #880.
Changes:
- Adds caller/callee diagrams grouped by source file, with a matching legend.
- Connects diagram discovery and rendering through the C# service.
- Records additional method invocation forms and introduces deterministic parser hashes.
| File | Description |
|---|---|
plugins/csharp/service/src/csharpservice.cpp |
Implements diagram endpoints and corrects file ID conversion. |
plugins/csharp/service/src/csharpdiagram.h |
Declares the diagram builder and styling helpers. |
plugins/csharp/service/src/csharpdiagram.cpp |
Builds call graphs, file clusters, labels, and legends. |
plugins/csharp/service/src_csharp/CSharpQueryHandler.cs |
Returns AST node details and advertises method diagrams. |
plugins/csharp/service/include/service/csharpservice.h |
Adds diagram/reference constants and removes diagram forwarding. |
plugins/csharp/service/csharpservice.thrift |
Removes the backend diagram-rendering RPC. |
plugins/csharp/service/CMakeLists.txt |
Includes the new diagram implementation in the build. |
plugins/csharp/parser/src_csharp/AstVisitor.cs |
Adds deterministic hashes and records additional method calls. |
Review effort: Balanced
| }); | ||
| std::stringstream ss; | ||
| ss << file; | ||
| ss << file->id; |
Comment on lines
+34
to
+35
| if (line.find('[') != 0) | ||
| result << line << '\n'; |
Comment on lines
+42
to
+44
| std::size_t pos = str_.find(tag); | ||
| if (pos != std::string::npos) | ||
| str_.erase(pos, tag.length() + 1); |
| } | ||
| } | ||
|
|
||
| _subgraphs.clear(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Resolves #880