Skip to content

C# plugin Function call diagramm - #883

Open
HorvathDaniel15 wants to merge 1 commit into
Ericsson:feature/csharp_pluginfrom
HorvathDaniel15:feature/function-call-diagram
Open

HorvathDaniel15 wants to merge 1 commit into
Ericsson:feature/csharp_pluginfrom
HorvathDaniel15:feature/function-call-diagram

Conversation

@HorvathDaniel15

Copy link
Copy Markdown
Collaborator

Resolves #880

@HorvathDaniel15
HorvathDaniel15 requested review from mcserep and a balanced review from Copilot November 8, 2026 13:51
@HorvathDaniel15 HorvathDaniel15 self-assigned this Nov 8, 2026
@HorvathDaniel15 HorvathDaniel15 added Plugin: C# Issues related to the parsing and presentation of C# projects. Kind: Enhancement 🌟 labels Nov 8, 2026
@HorvathDaniel15 HorvathDaniel15 added this to the Upcoming Release milestone Nov 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Kind: Enhancement 🌟 Plugin: C# Issues related to the parsing and presentation of C# projects.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants