83 references to SymbolKind
Microsoft.CodeAnalysis.LanguageServer.Protocol (57)
Extensions\ProtocolConversions.cs (43)
542public static LSP.SymbolKind NavigateToKindToSymbolKind(string kind) 544if (Enum.TryParse<LSP.SymbolKind>(kind, out var symbolKind)) 553return LSP.SymbolKind.EnumMember; 555return LSP.SymbolKind.Struct; 557return LSP.SymbolKind.Function; 559return LSP.SymbolKind.Object; 585public static Glyph SymbolKindToGlyph(LSP.SymbolKind kind) 589case LSP.SymbolKind.File: 591case LSP.SymbolKind.Module: 593case LSP.SymbolKind.Namespace: 595case LSP.SymbolKind.Package: 597case LSP.SymbolKind.Class: 599case LSP.SymbolKind.Method: 601case LSP.SymbolKind.Property: 603case LSP.SymbolKind.Field: 605case LSP.SymbolKind.Constructor: 607case LSP.SymbolKind.Enum: 609case LSP.SymbolKind.Interface: 611case LSP.SymbolKind.Function: 613case LSP.SymbolKind.Variable: 615case LSP.SymbolKind.Constant: 616case LSP.SymbolKind.Number: 618case LSP.SymbolKind.String: 619case LSP.SymbolKind.Boolean: 620case LSP.SymbolKind.Array: 621case LSP.SymbolKind.Object: 622case LSP.SymbolKind.Key: 623case LSP.SymbolKind.Null: 625case LSP.SymbolKind.EnumMember: 627case LSP.SymbolKind.Struct: 629case LSP.SymbolKind.Event: 631case LSP.SymbolKind.Operator: 633case LSP.SymbolKind.TypeParameter: 640public static LSP.SymbolKind GlyphToSymbolKind(Glyph glyph) 649if (Enum.TryParse<LSP.SymbolKind>(glyphString, out var symbolKind)) 660return LSP.SymbolKind.Package; 663return LSP.SymbolKind.File; 672return LSP.SymbolKind.Method; 677return LSP.SymbolKind.Variable; 682return LSP.SymbolKind.Struct; 684return LSP.SymbolKind.Object;
Handler\Symbols\DocumentSymbolsHandler.cs (1)
94var kind = ProtocolConversions.GlyphToSymbolKind(item.Glyph);
Handler\Symbols\SymbolInformationFactory.cs (1)
12public static SymbolInformation Create(string name, string? containerName, LSP.SymbolKind kind, LSP.Location location, Glyph glyph, bool supportsVSExtensions)
Protocol\DocumentSymbol.cs (2)
44/// The <see cref="SymbolKind" /> of this symbol. 47public SymbolKind Kind
Protocol\Extensions\VSSymbolInformation.cs (1)
18/// Gets or sets the icon associated with the symbol. If specified, this icon is used instead of <see cref="SymbolKind" />.
Protocol\Navigation\CallHierarchyItem.cs (1)
30public SymbolKind Kind { get; init; }
Protocol\Navigation\TypeHierarchyItem.cs (1)
30public SymbolKind Kind { get; init; }
Protocol\SymbolInformation.cs (2)
40/// Gets or sets the <see cref="SymbolKind"/> of this symbol. 44public SymbolKind Kind
Protocol\SymbolKindSetting.cs (4)
10/// Represents the <see cref="SymbolKind"/> values that the client supports. 22/// from <see cref="SymbolKind.File"/> to <see cref="SymbolKind.Array"/> as 28public SymbolKind[]? ValueSet
Protocol\WorkspaceSymbol.cs (1)
30public SymbolKind Kind { get; init; }
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (22)
Symbols\DocumentSymbolsTests.cs (12)
52var classSymbol = CreateDocumentSymbol(LSP.SymbolKind.Class, "A", "Test.A", testLspServer.GetLocations("class").Single(), testLspServer.GetLocations("classSelection").Single()); 53var constructorSymbol = CreateDocumentSymbol(LSP.SymbolKind.Method, "A", "A()", testLspServer.GetLocations("constructor").Single(), testLspServer.GetLocations("constructorSelection").Single(), classSymbol); 54var methodSymbol = CreateDocumentSymbol(LSP.SymbolKind.Method, "M", "M()", testLspServer.GetLocations("method").Single(), testLspServer.GetLocations("methodSelection").Single(), classSymbol); 55var operatorSymbol = CreateDocumentSymbol(LSP.SymbolKind.Operator, "operator +", "operator +(A a1, A a2)", testLspServer.GetLocations("operator").Single(), testLspServer.GetLocations("operatorSelection").Single(), classSymbol); 90CreateSymbolInformation(LSP.SymbolKind.Class, "Test.A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal), 91CreateSymbolInformation(LSP.SymbolKind.Method, "A()", testLspServer.GetLocations("constructor").Single(), Glyph.MethodPublic, "Test.A"), 92CreateSymbolInformation(LSP.SymbolKind.Method, "M()", testLspServer.GetLocations("method").Single(), Glyph.MethodPrivate, "Test.A"), 93CreateSymbolInformation(LSP.SymbolKind.Operator, "operator +(A a1, A a2)", testLspServer.GetLocations("operator").Single(), Glyph.OperatorPrivate, "Test.A"), 206var classSymbol = CreateDocumentSymbol(LSP.SymbolKind.Class, "A", "Test.A", testLspServer.GetLocations("class").Single(), testLspServer.GetLocations("classSelection").Single()); 207var methodSymbol = CreateDocumentSymbol(LSP.SymbolKind.Method, "M", "M()", testLspServer.GetLocations("method").Single(), testLspServer.GetLocations("methodSelection").Single(), classSymbol); 208var localFunctionSymbol = CreateDocumentSymbol(LSP.SymbolKind.Method, "LocalFunction", "LocalFunction()", testLspServer.GetLocations("localFunction").Single(), testLspServer.GetLocations("localFunctionSelection").Single(), methodSymbol); 249private static LSP.DocumentSymbol CreateDocumentSymbol(LSP.SymbolKind kind, string name, string detail,
Symbols\WorkspaceSymbolsTests.cs (10)
50CreateSymbolInformation(LSP.SymbolKind.Class, "A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal, GetContainerName(testLspServer.GetCurrentSolution())) 72CreateSymbolInformation(LSP.SymbolKind.Class, "A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal, GetContainerName(testLspServer.GetCurrentSolution())) 100CreateSymbolInformation(LSP.SymbolKind.Method, "M", testLspServer.GetLocations("method").Single(), Glyph.MethodPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "A")) 125CreateSymbolInformation(LSP.SymbolKind.Variable, "i", testLspServer.GetLocations("local").Single(), Glyph.Local, GetContainerName(testLspServer.GetCurrentSolution(), "A.M.i")) 153CreateSymbolInformation(LSP.SymbolKind.Field, "F", testLspServer.GetLocations("field")[0], Glyph.FieldPrivate, classAContainerName), 154CreateSymbolInformation(LSP.SymbolKind.Class, "F", testLspServer.GetLocations("class").Single(), Glyph.ClassPrivate, classAContainerName), 155CreateSymbolInformation(LSP.SymbolKind.Field, "F", testLspServer.GetLocations("field")[1], Glyph.FieldPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "A.F")) 188CreateSymbolInformation(LSP.SymbolKind.Method, "M", testLspServer.GetLocations("method")[0], Glyph.MethodPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "A")), 189CreateSymbolInformation(LSP.SymbolKind.Method, "M", testLspServer.GetLocations("method")[1], Glyph.MethodPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "B")) 227CreateSymbolInformation(LSP.SymbolKind.Class, "A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal, GetContainerName(testLspServer.GetCurrentSolution()))
Microsoft.VisualStudio.LanguageServices (4)
DocumentOutline\DocumentOutlineViewModel_Utilities.cs (1)
143(Roslyn.LanguageServer.Protocol.SymbolKind)currentParent.Kind,
DocumentOutline\DocumentSymbolData.cs (2)
11using SymbolKind = Roslyn.LanguageServer.Protocol.SymbolKind; 19SymbolKind SymbolKind,
DocumentOutline\SortOption.cs (1)
21/// Sort by document symbol <see cref="Roslyn.LanguageServer.Protocol.SymbolKind"/>.