Update, add tooltips for more Symbol types (#49)

Co-authored-by: Matt Parker <61717342+MattParkerDev@users.noreply.github.com>
This commit is contained in:
Manuel Gasser
2025-12-22 04:10:18 +01:00
committed by GitHub
parent 9867a5d7c9
commit 2228785a3d
15 changed files with 438 additions and 31 deletions

View File

@@ -0,0 +1,27 @@
using Godot;
using Microsoft.CodeAnalysis;
namespace SharpIDE.Godot.Features.CodeEditor;
public static partial class SymbolInfoComponents
{
public static RichTextLabel GetLabelSymbolInfo(ILabelSymbol symbol)
{
var label = new RichTextLabel();
label.PushColor(CachedColors.White);
label.PushFont(MonospaceFont);
label.AddText("label ");
label.AddLabelName(symbol);
label.Pop();
label.Pop();
return label;
}
private static void AddLabelName(this RichTextLabel label, ILabelSymbol symbol)
{
label.PushColor(CachedColors.White);
label.AddText(symbol.Name);
label.Pop();
}
}