15 instantiations of ClassifiedTextElement
Microsoft.CodeAnalysis.EditorFeatures (1)
Extensions\LSPExtensions.cs (1)
21=> new(element.Runs.Select(r => r.ToLSPRun()));
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
Extensions\Extensions.cs (2)
271=> new(definition.DisplayParts.Select(part => new ClassifiedTextRun(part.Tag.ToClassificationTypeName(), part.Text))); 339=> new(element.Runs.Select(ToLSPRun));
Handler\Completion\CompletionResultFactory.cs (1)
659vsCompletionItem.Description = new ClassifiedTextElement(description.TaggedParts
Handler\References\FindUsagesLSPContext.cs (1)
320return new ClassifiedTextElement([.. classifiedTextRuns]);
Handler\SignatureHelp\SignatureHelpHandler.cs (1)
163return new ClassifiedTextElement(taggedTexts.ToArray().Select(part => new ClassifiedTextRun(part.Tag.ToClassificationTypeName(), part.Text)));
Protocol\Internal\Converters\ClassifiedTextElementConverter.cs (1)
25return new ClassifiedTextElement(objects);
Protocol\Internal\Text\ClassifiedTextElement.cs (2)
34return new ClassifiedTextElement(new ClassifiedTextRun("text", text, navigationAction: navigationAction, tooltip: tooltip)); 40return new ClassifiedTextElement(new ClassifiedTextRun("text", text));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Completion\CompletionResolveTests.cs (2)
67var description = new ClassifiedTextElement(CreateClassifiedTextRunForClass("A")); 91var description = new ClassifiedTextElement(CreateClassifiedTextRunForClass("A"));
Microsoft.CodeAnalysis.Razor.Workspaces (4)
Tooltip\ClassifiedTagHelperTooltipFactory.cs (4)
469classifiedElementContainer.Add(new ContainerElement(ContainerElementStyle.Wrapped, new ClassifiedTextElement())); 472classifiedElementContainer.Add(new ContainerElement(ContainerElementStyle.Wrapped, glyph, new ClassifiedTextElement(classification.Type))); 476classifiedElementContainer.Add(new ContainerElement(ContainerElementStyle.Wrapped, new ClassifiedTextElement(classification.Documentation))); 503return new ClassifiedTextElement(runs);
89 references to ClassifiedTextElement
Microsoft.CodeAnalysis.EditorFeatures (1)
Extensions\LSPExtensions.cs (1)
20public static Roslyn.Text.Adornments.ClassifiedTextElement ToLSPElement(this VisualStudio.Text.Adornments.ClassifiedTextElement element)
Microsoft.CodeAnalysis.LanguageServer.Protocol (35)
Extensions\Extensions.cs (2)
270public static ClassifiedTextElement GetClassifiedText(this DefinitionItem definition) 338public static ClassifiedTextElement ToLSPElement(this QuickInfoClassifiedTextElement element)
Extensions\ProtocolConversions.cs (1)
400DocumentSpan documentSpan, ClassifiedTextElement text, CancellationToken cancellationToken)
Handler\References\FindImplementationsHandler.cs (1)
59var text = definition.GetClassifiedText();
Handler\References\FindUsagesLSPContext.cs (6)
187ClassifiedTextElement? definitionText, 195var text = await ComputeTextAsync(definitionId, documentSpan, definitionText, isWrittenTo, cancellationToken).ConfigureAwait(false); 209ClassifiedTextElement text, 212ClassifiedTextElement? definitionText, 300private async Task<ClassifiedTextElement?> ComputeTextAsync( 303ClassifiedTextElement? definitionText,
Handler\SignatureHelp\SignatureHelpHandler.cs (1)
139private static ClassifiedTextElement GetSignatureClassifiedText(SignatureHelpItem item)
Protocol\Internal\Converters\ClassifiedTextElementConverter.cs (8)
13internal sealed class ClassifiedTextElementConverter : JsonConverter<ClassifiedTextElement> 17public override ClassifiedTextElement Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 34case nameof(ClassifiedTextElement.Runs): 45if (reader.GetString() != nameof(ClassifiedTextElement)) 46throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ClassifiedTextElement)}"); 58public override void Write(Utf8JsonWriter writer, ClassifiedTextElement value, JsonSerializerOptions options) 61writer.WritePropertyName(nameof(ClassifiedTextElement.Runs)); 70writer.WriteStringValue(nameof(ClassifiedTextElement));
Protocol\Internal\Converters\ObjectContentConverter.cs (4)
21/// <item><description><see cref="ClassifiedTextElement"/></description></item>, 60case nameof(ClassifiedTextElement): 102case ClassifiedTextElement: 103ClassifiedTextElementConverter.Instance.Write(writer, (ClassifiedTextElement)value, options);
Protocol\Internal\Text\ClassifiedTextElement.cs (2)
30public static ClassifiedTextElement CreateHyperlink(string text, string tooltip, Action navigationAction) 37public static ClassifiedTextElement CreatePlainText(string text)
Protocol\Internal\VSInternalCompletionItem.cs (1)
35public ClassifiedTextElement? Description { get; set; }
Protocol\Internal\VSInternalLocation.cs (2)
19/// Gets or sets the text value for a location reference. Must be of type <see cref="ImageElement"/> or <see cref="ContainerElement"/> or <see cref="ClassifiedTextElement"/> or <see cref="string"/>. 33if (value is ImageElement or ContainerElement or ClassifiedTextElement or string)
Protocol\Internal\VSInternalReferenceItem.cs (6)
53/// Must be of type <see cref="string"/>, <see cref="ClassifiedTextElement"/>, <see cref="ContainerElement"/> and <see cref="ImageElement"/>. 57/// embedded within <see cref="ClassifiedTextElement"/> should not define <see cref="ClassifiedTextRun.MarkerTagType"/>. 72if (value is null or ImageElement or ContainerElement or ClassifiedTextElement or string) 133/// Must be of type <see cref="ImageElement"/> or <see cref="ContainerElement"/> or <see cref="ClassifiedTextElement"/> or <see cref="string"/>. 139/// on <see cref="ClassifiedTextRun"/> embedded within <see cref="ClassifiedTextElement"/>. 160if (value is ImageElement or ContainerElement or ClassifiedTextElement or string)
Protocol\Internal\VSInternalSignatureInformation.cs (1)
21public ClassifiedTextElement? ColorizedLabel
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (12)
Completion\CompletionResolveTests.cs (3)
67var description = new ClassifiedTextElement(CreateClassifiedTextRunForClass("A")); 91var description = new ClassifiedTextElement(CreateClassifiedTextRunForClass("A")); 431ClassifiedTextElement description,
Hover\HoverTests.cs (3)
616using var _ = ArrayBuilder<ClassifiedTextElement>.GetInstance(out var classifiedTextElements); 623private static void GetClassifiedTextElements(ContainerElement container, ArrayBuilder<ClassifiedTextElement> classifiedTextElements) 627if (element is ClassifiedTextElement classifiedTextElement)
References\FindAllReferencesHandlerTests.cs (6)
138var textElement = results[0].Text as ClassifiedTextElement; 292var textRuns = ((ClassifiedTextElement)results.First().Text).Runs; 540item => ((ClassifiedTextElement)item.Text).Runs.Where(run => run.MarkerTagType == ReferenceHighlightingConstants.DefinitionTagId)).Where(i => i.Any()).Count(); 542item => ((ClassifiedTextElement)item.Text).Runs.Where(run => run.MarkerTagType == ReferenceHighlightingConstants.WrittenReferenceTagId)).Where(i => i.Any()).Count(); 544item => ((ClassifiedTextElement)item.Text).Runs.Where(run => run.MarkerTagType == ReferenceHighlightingConstants.ReferenceTagId)).Where(i => i.Any()).Count();
Microsoft.CodeAnalysis.Razor.Workspaces (4)
Completion\RazorCompletionItemResolver.cs (1)
70ClassifiedTextElement? tagHelperClassifiedTextTooltip = null;
Tooltip\ClassifiedTagHelperTooltipFactory.cs (3)
100public static async Task<ClassifiedTextElement?> TryCreateTooltipAsync( 124public static bool TryCreateTooltip(AggregateBoundAttributeDescription attributeDescriptionInfo, [NotNullWhen(true)] out ClassifiedTextElement? tooltipContent) 483private static ClassifiedTextElement GenerateClassifiedTextElement(ImmutableArray<DescriptionClassification> descriptionClassifications)
Microsoft.CodeAnalysis.Razor.Workspaces.UnitTests (23)
Hover\HoverFactoryTest.cs (4)
551var classifiedTextElement = (ClassifiedTextElement)innerContainer[1]; 588var classifiedTextElement = (ClassifiedTextElement)innerContainer[1];
Tooltip\ClassifiedTagHelperTooltipFactoryTest.cs (19)
175var classifiedTextElement = await ClassifiedTagHelperTooltipFactory.TryCreateTooltipAsync("file.razor", elementDescription, componentAvailabilityService, DisposalToken); 197var classifiedTextElement = await ClassifiedTagHelperTooltipFactory.TryCreateTooltipAsync("file.razor", elementDescription, componentAvailabilityService, DisposalToken); 239var classifiedTextElement = await ClassifiedTagHelperTooltipFactory.TryCreateTooltipAsync("file.razor", elementDescription, componentAvailabilityService, DisposalToken); 278var classifiedTextElement = await ClassifiedTagHelperTooltipFactory.TryCreateTooltipAsync("file.razor", elementDescription, componentAvailabilityService, DisposalToken); 325Assert.False(ClassifiedTagHelperTooltipFactory.TryCreateTooltip(elementDescription, out ClassifiedTextElement _)); 343Assert.True(ClassifiedTagHelperTooltipFactory.TryCreateTooltip(attributeDescription, out ClassifiedTextElement classifiedTextElement)); 393Assert.True(ClassifiedTagHelperTooltipFactory.TryCreateTooltip(attributeDescription, out ClassifiedTextElement classifiedTextElement)); 492var classifiedTextElement = (ClassifiedTextElement)innerContainer[1]; 504classifiedTextElement = (ClassifiedTextElement)innerContainer[0]; 516classifiedTextElement = (ClassifiedTextElement)innerContainer[0]; 522classifiedTextElement = (ClassifiedTextElement)innerContainer[1]; 534classifiedTextElement = (ClassifiedTextElement)innerContainer[0]; 591var classifiedTextElement = (ClassifiedTextElement)innerContainer[1]; 609classifiedTextElement = (ClassifiedTextElement)innerContainer[0]; 621classifiedTextElement = (ClassifiedTextElement)innerContainer[0]; 627classifiedTextElement = (ClassifiedTextElement)innerContainer[1]; 646classifiedTextElement = (ClassifiedTextElement)innerContainer[0];
Microsoft.VisualStudio.LanguageServices.Razor (4)
src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.CohostingShared\Hover\CohostHoverEndpoint.cs (4)
113var htmlStringClassifiedTextElement = ClassifiedTextElement.CreatePlainText(htmlStringResponse); 114var verticalSpacingTextElement = ClassifiedTextElement.CreatePlainText(string.Empty);
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests (4)
Cohost\HoverAssertions.cs (2)
49var classifiedText = Assert.IsType<ClassifiedTextElement>(o);
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostDocumentCompletionEndpointTest.cs (1)
1572private static string? FlattenDescription(ClassifiedTextElement? description)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostFindAllReferencesEndpointTest.cs (1)
315if (referenceItem.Text is ClassifiedTextElement classifiedText)
Microsoft.VisualStudioCode.RazorExtension (4)
src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.CohostingShared\Hover\CohostHoverEndpoint.cs (4)
113var htmlStringClassifiedTextElement = ClassifiedTextElement.CreatePlainText(htmlStringResponse); 114var verticalSpacingTextElement = ClassifiedTextElement.CreatePlainText(string.Empty);
Microsoft.VisualStudioCode.RazorExtension.UnitTests (2)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostDocumentCompletionEndpointTest.cs (1)
1572private static string? FlattenDescription(ClassifiedTextElement? description)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostFindAllReferencesEndpointTest.cs (1)
315if (referenceItem.Text is ClassifiedTextElement classifiedText)