1 write to DisplayText
Microsoft.CodeAnalysis.Features (1)
Completion\CompletionItem.cs (1)
190DisplayText = displayText ?? "";
171 references to DisplayText
Microsoft.AspNetCore.App.Analyzers.Test (52)
Dependencies\ExtensionMethodsCompletionProviderTests.cs (6)
40Assert.Contains(result.Completions.ItemsList, item => item.DisplayText == "AddOpenApi"); 63Assert.Contains(result.Completions.ItemsList, item => item.DisplayText == "AddOpenApi"); 86Assert.DoesNotContain(result.Completions.ItemsList, item => item.DisplayText == "AddOpenApi"); 109Assert.Contains(result.Completions.ItemsList, item => item.DisplayText == "MapOpenApi"); 132Assert.Contains(result.Completions.ItemsList, item => item.DisplayText == "MapOpenApi"); 155Assert.DoesNotContain(result.Completions.ItemsList, item => item.DisplayText == "MapOpenApi");
RouteEmbeddedLanguage\FrameworkParametersCompletionProviderTests.cs (26)
35i => Assert.Equal("id", i.DisplayText)); 63i => Assert.Equal("id", i.DisplayText)); 91i => Assert.Equal("id", i.DisplayText)); 119i => Assert.Equal("id", i.DisplayText)); 149i => Assert.Equal("id", i.DisplayText)); 177i => Assert.Equal("id", i.DisplayText)); 205i => Assert.Equal("id", i.DisplayText)); 233i => Assert.Equal("id", i.DisplayText)); 261i => Assert.Equal("ids", i.DisplayText)); 334i => Assert.Equal("id", i.DisplayText)); 359i => Assert.Equal("id", i.DisplayText)); 405i => Assert.Equal("id2", i.DisplayText)); 429i => Assert.Equal("id", i.DisplayText), 430i => Assert.Equal("id2", i.DisplayText)); 454i => Assert.Equal("id", i.DisplayText)); 531i => Assert.Equal("id", i.DisplayText)); 564i => Assert.Equal("id", i.DisplayText)); 660i => Assert.Equal("id", i.DisplayText)); 747i => Assert.Equal("id", i.DisplayText)); 801i => Assert.Equal("id", i.DisplayText)); 845var item = result.Completions.ItemsList.FirstOrDefault(i => i.DisplayText == "id"); 875i => Assert.Equal("id", i.DisplayText)); 935i => Assert.Equal("id", i.DisplayText)); 965i => Assert.Equal("id", i.DisplayText)); 995i => Assert.Equal("id", i.DisplayText)); 1060i => Assert.Equal("id", i.DisplayText));
RouteEmbeddedLanguage\RoutePatternCompletionProviderTests.cs (20)
64Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 95Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 120Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 149Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 178Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 210Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 258i => Assert.Equal("id", i.DisplayText)); 283i => Assert.Equal("id1", i.DisplayText)); 312i => Assert.Equal("id", i.DisplayText)); 341i => Assert.Equal("id", i.DisplayText)); 370i => Assert.Equal("id", i.DisplayText)); 406i => Assert.Equal("id", i.DisplayText)); 446i => Assert.Equal("PageIndex", i.DisplayText), 447i => Assert.Equal("PageNumber", i.DisplayText)); 520i => Assert.Equal("id", i.DisplayText)); 603i => Assert.Equal("id2", i.DisplayText)); 636i => Assert.Equal("id", i.DisplayText)); 658Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 680Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 706Assert.Equal("bool", result.Completions.ItemsList[0].DisplayText);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (39)
Completion\CompletionProviders\ConversionCompletionProviderTests.cs (13)
56c => Assert.Equal("SomeText0", c.DisplayText), 57c => Assert.Equal("SomeText1", c.DisplayText), 58c => Assert.Equal("SomeText2", c.DisplayText), 59c => Assert.Equal("SomeText3", c.DisplayText), 60c => Assert.Equal("\uD884\uDF4AStartWith_3134A_Identifier", c.DisplayText), 61c => Assert.Equal("\uffdcStartWith_FFDC_Identifier", c.DisplayText), 65Assert.Equal("float", c.DisplayText); 251i => Assert.Equal(displayText1, i.DisplayText), 252i => Assert.Equal(displayText2, i.DisplayText)); 279i => Assert.Equal("float", i.DisplayText), 280i => Assert.Equal("int", i.DisplayText)); 454AssertEx.SetEqual(items.Select(i => i.DisplayText), toTypes); 516AssertEx.SetEqual(items.Select(i => i.DisplayText), expected);
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (1)
1174items.Select(item => item.DisplayText));
Completion\CompletionProviders\OperatorCompletionProviderTests.cs (25)
227i => Assert.Equal("==", i.DisplayText), 228i => Assert.Equal("!=", i.DisplayText), 229i => Assert.Equal(">", i.DisplayText), 230i => Assert.Equal(">=", i.DisplayText), 231i => Assert.Equal("<", i.DisplayText), 232i => Assert.Equal("<=", i.DisplayText), 233i => Assert.Equal("!", i.DisplayText), 234i => Assert.Equal("+", i.DisplayText), // Addition a+b 235i => Assert.Equal("-", i.DisplayText), // Subtraction a-b 236i => Assert.Equal("*", i.DisplayText), 237i => Assert.Equal("/", i.DisplayText), 238i => Assert.Equal("%", i.DisplayText), 239i => Assert.Equal("++", i.DisplayText), 240i => Assert.Equal("--", i.DisplayText), 241i => Assert.Equal("+", i.DisplayText), // Unary plus +a 242i => Assert.Equal("-", i.DisplayText), // Unary minus -a 243i => Assert.Equal("&", i.DisplayText), 244i => Assert.Equal("|", i.DisplayText), 245i => Assert.Equal("^", i.DisplayText), 246i => Assert.Equal("<<", i.DisplayText), 247i => Assert.Equal(">>", i.DisplayText), 248i => Assert.Equal(">>>", i.DisplayText), 249i => Assert.Equal("~", i.DisplayText) 455Assert.Equal("+", i.DisplayText); 460Assert.Equal("+", i.DisplayText);
Microsoft.CodeAnalysis.CSharp.Features (11)
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (1)
251var displayText = selectedItem.DisplayText + selectedItem.DisplayTextSuffix;
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
379insertionText = selectedItem.DisplayText;
Completion\CompletionProviders\FunctionPointerUnmanagedCallingConventionCompletionProvider.cs (3)
131return x?.DisplayText == y?.DisplayText; 136return obj?.DisplayText.GetHashCode() ?? 0;
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
286ch == '(' ? selectedItem.GetEntireDisplayText() : selectedItem.DisplayText));
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (1)
94var castText = $"(({item.DisplayText})";
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (3)
130return await ReplaceTextAfterOperatorAsync(document, item, text: $" {item.DisplayText} ", cancellationToken).ConfigureAwait(false); 133return await ReplaceTextAfterOperatorAsync(document, item, text: $"{item.DisplayText} ", cancellationToken).ConfigureAwait(false); 143var replacement = item.DisplayText + text.ToString(TextSpan.FromBounds(expressionStart, dotLikeToken.SpanStart));
Completion\CompletionProviders\TupleNameCompletionProvider.cs (1)
120selectedItem.DisplayText));
Microsoft.CodeAnalysis.EditorFeatures (8)
IntelliSense\AsyncCompletion\CompletionSource.cs (3)
533insertionText = roslynItem.DisplayText; 541Icon: new ImageElement(new ImageId(imageId.Guid, imageId.Id), roslynItem.DisplayText), 564automationText: roslynItem.AutomationText ?? roslynItem.DisplayText,
IntelliSense\AsyncCompletion\Helpers.cs (4)
28return item.WithDisplayText(Completion.Utilities.UnicodeStarAndSpace + item.DisplayText) 37Debug.Assert(item.DisplayText.StartsWith(Completion.Utilities.UnicodeStarAndSpace)); 40.WithDisplayText(item.DisplayText[Completion.Utilities.UnicodeStarAndSpace.Length..]) 166return item.DisplayText.StartsWith(textTypedSoFar, StringComparison.CurrentCultureIgnoreCase) ||
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (1)
780if (_filterText.Length > 0 && CompletionService.IsAllPunctuation(_filterText) && _filterText != item.DisplayText)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (12)
Completion\AbstractCompletionProviderTests.cs (12)
225c => CompareItems(c.DisplayText, result.Name) 246if (!CompareItems(c.DisplayText, result.Name)) 616Assert.Contains(itemToCommit, items.Select(x => x.DisplayText), GetStringComparer()); 617var firstItem = items.First(i => CompareItems(i.DisplayText, itemToCommit)); 739Assert.Contains(items, i => i.DisplayText + i.DisplayTextSuffix == itemToCommit); 740var firstItem = items.First(i => CompareItems(i.DisplayText + i.DisplayTextSuffix, itemToCommit)); 971AssertEx.Any(completionList.ItemsList, c => CompareItems(c.DisplayText, expectedItem)); 973var item = completionList.ItemsList.First(c => CompareItems(c.DisplayText, expectedItem)); 989AssertEx.None(completionList.ItemsList, c => CompareItems(c.DisplayText, expectedItem)); 1022var item = completionList.ItemsList.FirstOrDefault(i => i.DisplayText == expectedItem); 1052var item = completionList.ItemsList.Single(c => c.DisplayText == expectedItem); 1328var item = completionList.ItemsList.First(i => i.DisplayText.StartsWith(textTypedSoFar));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (3)
Intellisense\TestState.vb (3)
630Dim currentText = GetSelectedItem().DisplayText 639Dim newText = GetSelectedItem().DisplayText 644newText = GetSelectedItem().DisplayText
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Completion\FileSystemCompletionHelperTests.cs (1)
21actual.Select(c => $"'{c.DisplayText}', {string.Join(", ", c.Tags)}, '{c.GetProperty(CommonCompletionItem.DescriptionProperty)}'"),
Completion\GlobalAssemblyCacheCompletionHelperTests.cs (1)
39Assert.True(completions.Any(c => c.DisplayText == completionItem));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
IntelliSense\CSharpCompletionCommandHandlerTests.vb (1)
8275Dim commitText = item.DisplayText
Microsoft.CodeAnalysis.Features (36)
Completion\CommonCompletionProvider.cs (2)
83new TextChange(item.Span, item.DisplayText); 113?? new TextChange(item.Span, item.DisplayText);
Completion\CompletionItem.cs (17)
33/// An optional prefix to be displayed prepended to <see cref="DisplayText"/>. Can be null. 35/// cref="DisplayText"/>. 40/// An optional suffix to be displayed appended to <see cref="DisplayText"/>. Can be null. 42/// cref="DisplayText"/>. 48/// This is often the same as <see cref="DisplayText"/> but may be different in certain circumstances. 50public string FilterText => _filterText ?? DisplayText; 60/// Returns <see langword="true"/> if <see cref="DisplayText"/> is identical to <see cref="FilterText"/>. 71/// This is often the same as the <see cref="DisplayText"/> but may be different in certain circumstances. 76/// Descriptive text to place after <see cref="DisplayText"/> in the display layer. Should 171/// null, narration will use the <see cref="DisplayText"/> instead. 193SortText = sortText ?? DisplayText; 208if (!DisplayText.Equals(filterText ?? "", StringComparison.Ordinal)) 359var newDisplayText = displayText.HasValue ? displayText.Value : DisplayText; 372newDisplayText == DisplayText && 416/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="DisplayText"/> property changed. 549? DisplayTextPrefix + DisplayText + DisplayTextSuffix 550: DisplayText;
Completion\CompletionProvider.cs (1)
79=> Task.FromResult(CompletionChange.Create(new TextChange(item.Span, item.DisplayText)));
Completion\CompletionService.cs (1)
267return CompletionChange.Create(new TextChange(item.Span, item.DisplayText));
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (1)
273var assemblyName = item.DisplayText;
Completion\Providers\AbstractKeywordCompletionProvider.cs (5)
74=> Task.FromResult((TextChange?)new TextChange(item.Span, item.DisplayText)); 79=> x?.DisplayText == y?.DisplayText; 82=> Hash.Combine(obj.DisplayText.GetHashCode(), obj.DisplayText.GetHashCode());
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (1)
125var insertText = completionItem.DisplayText;
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (3)
103builder.Add(KeyValuePairUtil.Create(AttributeFullName, attributeItem.DisplayText)); 164: item.DisplayText; 206var typeName = item.TryGetProperty(AttributeFullName, out var attributeFullName) ? attributeFullName : item.DisplayText;
Completion\Providers\ImportCompletionProvider\TypeImportCompletionCacheEntry.cs (1)
136if (attributeItem.DisplayText.TryGetWithoutAttributeSuffix(isCaseSensitive: isCaseSensitive, out var attributeNameWithoutSuffix))
Completion\Providers\UnionCompletionItemComparer.cs (3)
21x is not null && y is not null && x.DisplayText == y.DisplayText && x.Tags.SequenceEqual(y.Tags); 24=> Hash.Combine(obj.DisplayText.GetHashCode(), obj.Tags.Length);
Completion\Utilities.cs (1)
48=> completionItem.DisplayText.StartsWith(UnicodeStarAndSpace);
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Handler\Completion\CompletionResultFactory.cs (3)
340var completionChangeNewText = item.Flags.IsExpanded() ? item.DisplayText : typedText; 533if (change.NewText == selectedItem.DisplayText) 555return CompletionChange.Create(new TextChange(completionItem.Span, completionItem.DisplayText));
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Completion\VisualBasicCompletionService.vb (2)
101If changeText = keywordCompletionItem.DisplayText Then 121Return item.DisplayText
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
Snippets\SnippetCompletionProvider.vb (2)
108subjectBuffer.Replace(currentSpan, completionItem.DisplayText) 111snippetClient.TryInsertExpansion(updatedSpan.Start, updatedSpan.Start + completionItem.DisplayText.Length, CancellationToken.None)