74 instantiations of ClassifiedSpan
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (27)
Classification\SyntacticClassifierTests.cs (27)
6216new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(0, 3)),
6217new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentText, new TextSpan(3, 1)),
6218new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(4, 1)),
6219new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentName, new TextSpan(5, 5)),
6220new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeName, new TextSpan(11, 4)),
6221new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(15, 1)),
6222new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeQuotes, new TextSpan(16, 1)),
6223new ClassifiedSpan(ClassificationTypeNames.Identifier, new TextSpan(17, 5)),
6224new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeQuotes, new TextSpan(22, 1)),
6225new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(23, 1)),
6226new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(24, 2)),
6227new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentName, new TextSpan(26, 5)),
6228new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(31, 1))
6246new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(2, 3)),
6247new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentText, new TextSpan(5, 1)),
6248new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(6, 1)),
6249new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentName, new TextSpan(7, 5)),
6250new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(14, 3)),
6251new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeName, new TextSpan(18, 4)),
6252new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(22, 1)),
6253new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeQuotes, new TextSpan(23, 1)),
6254new ClassifiedSpan(ClassificationTypeNames.Identifier, new TextSpan(24, 5)),
6255new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeQuotes, new TextSpan(29, 1)),
6256new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(30, 1)),
6257new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(31, 2)),
6258new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentName, new TextSpan(33, 5)),
6259new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(38, 1))
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (14)
146classifiedSpan = new ClassifiedSpan(name.Span, ClassificationTypeNames.NamespaceName);
154classifiedSpan = new ClassifiedSpan(name.Span, ClassificationTypeNames.Keyword);
161classifiedSpan = new ClassifiedSpan(name.Span, ClassificationTypeNames.Keyword);
169classifiedSpan = new ClassifiedSpan(name.Span, ClassificationTypeNames.Keyword);
176classifiedSpan = new ClassifiedSpan(name.Span, ClassificationTypeNames.Keyword);
197classifiedSpan = new ClassifiedSpan(token.Span, GetClassificationForField(fieldSymbol));
201classifiedSpan = new ClassifiedSpan(token.Span, GetClassificationForMethod(methodSymbol));
205classifiedSpan = new ClassifiedSpan(token.Span, ClassificationTypeNames.PropertyName);
209classifiedSpan = new ClassifiedSpan(token.Span, ClassificationTypeNames.EventName);
218classifiedSpan = new ClassifiedSpan(token.Span, ClassificationTypeNames.ParameterName);
222classifiedSpan = new ClassifiedSpan(token.Span, GetClassificationForLocal(localSymbol));
226classifiedSpan = new ClassifiedSpan(token.Span, ClassificationTypeNames.LabelName);
298result.Add(new ClassifiedSpan(token.Span, ClassificationTypeNames.Keyword));
313result.Add(new ClassifiedSpan(name.Identifier.Span, ClassificationTypeNames.Keyword));
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.Features (5)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (16)
Classification\SyntaxClassification\NameSyntaxClassifier.vb (13)
106classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, ClassificationTypeNames.NamespaceName)
112classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, classification)
116classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, ClassificationTypeNames.EventName)
119classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, ClassificationTypeNames.PropertyName)
124classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, classification)
128classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, ClassificationTypeNames.ParameterName)
133classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, classification)
158classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, ClassificationTypeNames.Keyword)
180classifiedSpan = New ClassifiedSpan(token.Span, ClassificationTypeNames.Keyword)
187classifiedSpan = New ClassifiedSpan(token.Span, ClassificationTypeNames.Keyword)
257result.Add(New ClassifiedSpan(token.Span, ClassificationTypeNames.Keyword))
284result.Add(New ClassifiedSpan(methodStatement.Identifier.Span, ClassificationTypeNames.ExtensionMethodName))
292result.Add(New ClassifiedSpan(node.LabelToken.Span, ClassificationTypeNames.LabelName))
Microsoft.VisualStudio.LanguageServices (2)
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
271 references to ClassifiedSpan
IdeBenchmarks (2)
IdeCoreBenchmarks (1)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Features (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (30)
Microsoft.CodeAnalysis.EditorFeatures (17)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (8)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (9)
Classification\ClassificationTests.vb (9)
239Private Shared Function ToTestString(text As SourceText, span As ClassifiedSpan) As String
327Dim result = New SegmentedList(Of ClassifiedSpan)()
342Public Sub AddLexicalClassifications(text As SourceText, textSpan As TextSpan, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) Implements IClassificationService.AddLexicalClassifications
345Public Sub AddSyntacticClassifications(services As SolutionServices, root As SyntaxNode, textSpans As ImmutableArray(Of TextSpan), result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) Implements IClassificationService.AddSyntacticClassifications
348Public Function AddSemanticClassificationsAsync(document As Document, textSpans As ImmutableArray(Of TextSpan), options As ClassificationOptions, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) As Task Implements IClassificationService.AddSemanticClassificationsAsync
352Public Function AddSyntacticClassificationsAsync(document As Document, textSpans As ImmutableArray(Of TextSpan), result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) As Task Implements IClassificationService.AddSyntacticClassificationsAsync
356Public Function AdjustStaleClassification(text As SourceText, classifiedSpan As ClassifiedSpan) As ClassifiedSpan Implements IClassificationService.AdjustStaleClassification
367Public Function AddEmbeddedLanguageClassificationsAsync(document As Document, textSpans As ImmutableArray(Of TextSpan), options As ClassificationOptions, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) As Task Implements IClassificationService.AddEmbeddedLanguageClassificationsAsync
Microsoft.CodeAnalysis.ExternalAccess.FSharp (13)
Classification\IFSharpClassificationService.cs (5)
28void AddLexicalClassifications(SourceText text, TextSpan textSpan, List<ClassifiedSpan> result, CancellationToken cancellationToken);
36Task AddSyntacticClassificationsAsync(Document document, TextSpan textSpan, List<ClassifiedSpan> result, CancellationToken cancellationToken);
44Task AddSemanticClassificationsAsync(Document document, TextSpan textSpan, List<ClassifiedSpan> result, CancellationToken cancellationToken);
55ClassifiedSpan AdjustStaleClassification(SourceText text, ClassifiedSpan classifiedSpan);
Internal\Classification\FSharpClassificationService.cs (8)
26private readonly ObjectPool<List<ClassifiedSpan>> s_listPool = new(() => []);
35public void AddLexicalClassifications(SourceText text, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
42public async Task AddSemanticClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
52public async Task AddSyntacticClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
62public ClassifiedSpan AdjustStaleClassification(SourceText text, ClassifiedSpan classifiedSpan)
67public void AddSyntacticClassifications(SolutionServices services, SyntaxNode? root, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
84public Task AddEmbeddedLanguageClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (3)
Microsoft.CodeAnalysis.Features (17)
EmbeddedLanguages\Classification\AbstractEmbeddedLanguageClassificationService.cs (4)
39Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
52SolutionServices services, Project? project, SemanticModel semanticModel, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
72SegmentedList<ClassifiedSpan> result,
81private readonly SegmentedList<ClassifiedSpan> _result = result;
Microsoft.CodeAnalysis.LanguageServer.Protocol (13)
Microsoft.CodeAnalysis.Remote.ServiceHub (9)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (27)
Microsoft.CodeAnalysis.Workspaces (110)
Classification\AbstractClassificationService.cs (13)
30public abstract void AddLexicalClassifications(SourceText text, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
31public abstract ClassifiedSpan AdjustStaleClassification(SourceText text, ClassifiedSpan classifiedSpan);
34Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
40Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
50SegmentedList<ClassifiedSpan> result,
112SegmentedList<ClassifiedSpan> result,
141SegmentedList<ClassifiedSpan> result,
201public async Task AddSyntacticClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
208SolutionServices services, SyntaxNode? root, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
220protected static void AddRange(ArrayBuilder<ClassifiedSpan> temp, List<ClassifiedSpan> result)
222foreach (var span in temp)
Classification\ClassifierHelper.cs (23)
29public static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansAsync(
52public static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansAsync(
97private static void RemoveAdditiveSpans(SegmentedList<ClassifiedSpan> spans)
101var span = spans[i];
107private static ImmutableArray<ClassifiedSpan> MergeClassifiedSpans(
108SegmentedList<ClassifiedSpan> syntaxSpans,
109SegmentedList<ClassifiedSpan> semanticSpans,
145private static readonly Comparison<ClassifiedSpan> s_spanComparison = static (s1, s2) => s1.TextSpan.Start - s2.TextSpan.Start;
147private static void Order(SegmentedList<ClassifiedSpan> syntaxSpans)
155private static void AdjustSpans(SegmentedList<ClassifiedSpan> spans, TextSpan widenedSpan)
159var span = spans[i];
169var previousSpan = spans[i - 1];
181var newSpan = new ClassifiedSpan(span.ClassificationType, intersection.GetValueOrDefault());
187int startPosition, SegmentedList<ClassifiedSpan> classifiedSpans, SegmentedList<ClassifiedSpan> result)
189foreach (var span in classifiedSpans)
218SegmentedList<ClassifiedSpan> syntaxParts,
219SegmentedList<ClassifiedSpan> semanticParts,
220SegmentedList<ClassifiedSpan> finalParts)
222MergeParts<ClassifiedSpan, ClassifiedSpanIntervalIntrospector>(
231/// <inheritdoc cref="MergeParts(SegmentedList{ClassifiedSpan}, SegmentedList{ClassifiedSpan}, SegmentedList{ClassifiedSpan})"/>
Classification\IClassificationService.cs (7)
28void AddLexicalClassifications(SourceText text, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
34void AddSyntacticClassifications(SolutionServices services, SyntaxNode? root, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
46Task AddSyntacticClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
63Task AddSemanticClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
74Task AddEmbeddedLanguageClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
85ClassifiedSpan AdjustStaleClassification(SourceText text, ClassifiedSpan classifiedSpan);
Classification\SyntaxClassification\AbstractSyntaxClassifier.cs (2)
22public virtual void AddClassifications(SyntaxNode syntax, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
26public virtual void AddClassifications(SyntaxToken syntax, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
Classification\SyntaxClassification\ISyntaxClassifier.cs (2)
29void AddClassifications(SyntaxNode node, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
34void AddClassifications(SyntaxToken token, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
Microsoft.VisualStudio.LanguageServices (5)