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