2 instantiations of CompletionItem
Microsoft.CodeAnalysis.Features (2)
Completion\CompletionItem.cs (2)
290return new CompletionItem( 386return new CompletionItem(
566 references to CompletionItem
Microsoft.AspNetCore.App.Analyzers (7)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (4)
66public override Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 77public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken) 271context.AddItem(CompletionItem.Create( 280context.SuggestionModeItem = CompletionItem.Create(
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (3)
60public override Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 71public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken) 150context.AddItem(CompletionItem.Create(
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\FrameworkParametersCompletionProviderTests.cs (1)
845var item = result.Completions.ItemsList.FirstOrDefault(i => i.DisplayText == "id");
Microsoft.AspNetCore.App.CodeFixes (1)
Dependencies\ExtensionMethodsCompletionProvider.cs (1)
76context.AddItem(CompletionItem.Create(
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (11)
Completion\CompletionProviders\ConversionCompletionProviderTests.cs (8)
13using CompletionItem = Microsoft.CodeAnalysis.Completion.CompletionItem; 29var castCompletionItem = (await GetCompletionItemsAsync(""" 46CompletionItem.Create("SomeText0"), 48CompletionItem.Create("SomeText1"), 49CompletionItem.Create("\uffdcStartWith_FFDC_Identifier"), // http://www.fileformat.info/info/unicode/char/ffdc/index.htm 50CompletionItem.Create("SomeText2"), 51CompletionItem.Create("\uD884\uDF4AStartWith_3134A_Identifier"), // http://www.fileformat.info/info/unicode/char/3134a/index.htm 52CompletionItem.Create("SomeText3"),
Completion\CompletionProviders\TypeImportCompletionProviderTests.cs (1)
1419private static void AssertRelativeOrder(List<string> expectedTypesInRelativeOrder, ImmutableArray<CompletionItem> allCompletionItems)
Completion\CompletionServiceTests.cs (2)
59var item = CompletionItem.Create("ThirdPartyCompletionProviderItem");
Microsoft.CodeAnalysis.CSharp.Features (58)
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (5)
153private static ImmutableArray<CompletionItem> GetNameEqualsItems( 176private static IEnumerable<CompletionItem> GetNameColonItems( 198internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 246protected override Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken) 249private static TextChange? GetTextChange(CompletionItem selectedItem, char? ch)
Completion\CompletionProviders\CrefCompletionProvider.cs (5)
236private static IEnumerable<CompletionItem> CreateCompletionItems( 260ImmutableArray<KeyValuePair<string, string>> options, [NotNullWhen(true)] out CompletionItem? item) 275private static CompletionItem CreateItem( 328private static CompletionItem CreateItemFromBuilder( 375protected override Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
31protected override async Task<CompletionItem?> GetSuggestionModeItemAsync(
Completion\CompletionProviders\DeclarationName\DeclarationNameCompletionProvider.cs (1)
101private static CompletionItem CreateCompletionItem(string name, Glyph glyph, string sortText)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
316internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.cs (3)
39CompletionItem completionItem, 69protected override SyntaxToken GetToken(CompletionItem completionItem, SyntaxTree tree, CancellationToken cancellationToken) 128internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.ItemGetter.cs (2)
61public override async Task<ImmutableArray<CompletionItem>> GetItemsAsync() 161CompletionItem CreateCompletionItem(ISymbol member)
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
144protected override CompletionItem CreateItem(
Completion\CompletionProviders\FunctionPointerUnmanagedCallingConventionCompletionProvider.cs (9)
74var completionItems = new HashSet<CompletionItem>(CompletionItemComparer.Instance); 81completionItems.Add(CompletionItem.Create(callingConvention, tags: GlyphTags.GetTags(Glyph.Keyword))); 92private static void AddTypes(HashSet<CompletionItem> completionItems, int contextPosition, SemanticModel semanticModel, CancellationToken cancellationToken) 122internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 125private sealed class CompletionItemComparer : IEqualityComparer<CompletionItem> 127public static readonly IEqualityComparer<CompletionItem> Instance = new CompletionItemComparer(); 129public bool Equals(CompletionItem? x, CompletionItem? y) 134public int GetHashCode(CompletionItem obj)
Completion\CompletionProviders\ImportCompletion\ExtensionMethodImportCompletionProvider.cs (1)
53CompletionItem item,
Completion\CompletionProviders\ImportCompletion\TypeImportCompletionProvider.cs (1)
53CompletionItem item,
Completion\CompletionProviders\KeywordCompletionProvider.cs (1)
189protected override CompletionItem CreateItem(RecommendedKeyword keyword, CSharpSyntaxContext context, CancellationToken cancellationToken)
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (2)
132internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 280protected override Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\CompletionProviders\ObjectCreationCompletionProvider.cs (1)
136protected override string GetInsertionText(CompletionItem item, char ch)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (4)
144CompletionItem item, 160CompletionItem item, 175private static Task<CompletionChange> ReplaceTextAfterOperatorAsync(Document document, CompletionItem item, string text, CancellationToken cancellationToken) 180CompletionItem item,
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (3)
77Document document, CompletionItem item, CancellationToken cancellationToken) 132private static async Task<CompletionDescription?> GetConversionDescriptionAsync(Document document, CompletionItem item, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 142private static async Task<ISymbol?> TryRehydrateAsync(Document document, CompletionItem item, CancellationToken cancellationToken)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Indexers.cs (2)
39private static Task<CompletionChange> GetIndexerChangeAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 42private static Task<CompletionDescription> GetIndexerDescriptionAsync(Document document, CompletionItem item, SymbolDescriptionOptions options, CancellationToken cancellationToken)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (2)
124Document document, CompletionItem item, CancellationToken cancellationToken) 160private static Task<CompletionDescription> GetOperatorDescriptionAsync(Document document, CompletionItem item, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
44protected override SyntaxToken GetToken(CompletionItem completionItem, SyntaxTree tree, CancellationToken cancellationToken)
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
70protected override SyntaxToken GetToken(CompletionItem completionItem, SyntaxTree tree, CancellationToken cancellationToken)
Completion\CompletionProviders\PartialTypeCompletionProvider.cs (1)
82Document document, CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (1)
160internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\CompletionProviders\SnippetCompletionProvider.cs (2)
101private static async Task<ImmutableArray<CompletionItem>> GetSnippetsForDocumentAsync( 166private static ImmutableArray<CompletionItem> GetSnippetCompletionItems(
Completion\CompletionProviders\SymbolCompletionProvider.cs (2)
220protected override CompletionItem CreateItem( 268protected override string GetInsertionText(CompletionItem item, char ch)
Completion\CompletionProviders\TupleNameCompletionProvider.cs (1)
116protected override Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (3)
68protected override async Task<IEnumerable<CompletionItem>?> GetItemsWorkerAsync( 140var items = new List<CompletionItem>(); 194private void AddXmlElementItems(List<CompletionItem> items, XmlElementStartTagSyntax startTag)
SpellCheck\CSharpSpellcheckCodeFixProvider.cs (1)
65protected override bool IsGeneric(CompletionItem completionItem)
Microsoft.CodeAnalysis.EditorFeatures (49)
Extensibility\Completion\ICustomCommitCompletionProvider.cs (1)
17void Commit(CompletionItem completionItem, Document document, ITextView textView, ITextBuffer subjectBuffer, ITextSnapshot triggerSnapshot, char? commitChar);
IntelliSense\AsyncCompletion\CommitManager.cs (6)
28using RoslynCompletionItem = Microsoft.CodeAnalysis.Completion.CompletionItem; 121var roslynItem = itemData.RoslynItem; 134if (session.Properties.TryGetProperty(CompletionSource.ExcludedCommitCharactersMap, out MultiDictionary<char, RoslynCompletionItem> excludedCommitCharactersMap)) 189RoslynCompletionItem roslynItem, 352internal static bool IsCommitCharacter(CompletionRules completionRules, CompletionItem item, char ch) 384internal static bool SendEnterThroughToEditor(CompletionRules rules, RoslynCompletionItem item, string textTypedSoFar)
IntelliSense\AsyncCompletion\CompletionItemData.cs (7)
7using RoslynCompletionItem = Microsoft.CodeAnalysis.Completion.CompletionItem; 11internal sealed record class CompletionItemData(RoslynCompletionItem RoslynItem, SnapshotPoint? TriggerLocation) 18public static RoslynCompletionItem GetOrAddDummyRoslynItem(CompletionItem vsItem) 24var roslynItem = CreateDummyRoslynItem(vsItem); 30public static void AddData(CompletionItem vsCompletionItem, RoslynCompletionItem roslynItem, SnapshotPoint? triggerLocation) 33private static RoslynCompletionItem CreateDummyRoslynItem(CompletionItem vsItem) 34=> RoslynCompletionItem.Create(
IntelliSense\AsyncCompletion\CompletionSource.cs (8)
31using RoslynCompletionItem = Microsoft.CodeAnalysis.Completion.CompletionItem; 53private static readonly ConditionalWeakTable<RoslynCompletionItem, StrongBox<VSCompletionItemData>> s_roslynItemToVsItemData = new(); 427if (session.Properties.TryGetProperty(ExcludedCommitCharactersMap, out MultiDictionary<char, RoslynCompletionItem> excludedCommitCharactersMap)) 510RoslynCompletionItem roslynItem, 575private static MultiDictionary<char, RoslynCompletionItem> GetExcludedCommitCharacters(IReadOnlyList<RoslynCompletionItem> roslynItems) 577var map = new MultiDictionary<char, RoslynCompletionItem>(); 578foreach (var roslynItem in roslynItems)
IntelliSense\AsyncCompletion\FilterSet.cs (3)
17using RoslynCompletionItem = Microsoft.CodeAnalysis.Completion.CompletionItem; 132public (ImmutableArray<CompletionFilter> filters, int data) GetFiltersAndAddToSet(RoslynCompletionItem item) 157internal static List<CompletionFilter> GetFilters(RoslynCompletionItem item)
IntelliSense\AsyncCompletion\Helpers.cs (8)
13using RoslynCompletionItem = Microsoft.CodeAnalysis.Completion.CompletionItem; 26public static RoslynCompletionItem PromoteItem(RoslynCompletionItem item, int index) 32public static RoslynCompletionItem DemoteItem(RoslynCompletionItem item) 44public static bool TryGetOriginalIndexOfPromotedItem(RoslynCompletionItem item, out int originalIndex) 116public static bool IsFilterCharacter(RoslynCompletionItem item, char ch, string textTypedSoFar) 159public static bool TextTypedSoFarMatchesItem(RoslynCompletionItem item, string textTypedSoFar)
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (10)
25using RoslynCompletionItem = Microsoft.CodeAnalysis.Completion.CompletionItem; 312var completionItem = includedDefault.CompletionItem; 452var item = matchResult.CompletionItem; 562var xItem = x.CompletionItem; 563var yItem = y.CompletionItem; 575static int GetPriority(RoslynCompletionItem item) 623static Span GetOffsetSpan(TextSpan span, RoslynCompletionItem item) 757private bool IsHardSelection(RoslynCompletionItem item, bool matchedFilterText) 840var selectedItem = items[itemSelection.SelectedItemIndex].CompletionItem; 901var item = matches[i].CompletionItem;
IntelliSense\AsyncCompletion\ItemManager.cs (4)
18using RoslynCompletionItem = Microsoft.CodeAnalysis.Completion.CompletionItem; 189var xRoslyn = x is not null ? CompletionItemData.GetOrAddDummyRoslynItem(x) : null; 190var yRoslyn = y is not null ? CompletionItemData.GetOrAddDummyRoslynItem(y) : null; 193return Comparer<RoslynCompletionItem>.Default.Compare(xRoslyn, yRoslyn);
IntelliSense\AsyncCompletion\RecentItemsManager.cs (2)
31public void MakeMostRecentItem(CompletionItem item) 48public int GetRecentItemIndex(CompletionItem item)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (11)
Completion\AbstractCompletionProviderTests.cs (11)
244bool Predicate(RoslynCompletion.CompletionItem c) 302private static bool FiltersMatch(List<CompletionFilter> expectedMatchingFilters, RoslynCompletion.CompletionItem item) 617var firstItem = items.First(i => CompareItems(i.DisplayText, itemToCommit)); 632RoslynCompletion.CompletionItem completionItem, 673RoslynCompletion.CompletionItem completionItem, 740var firstItem = items.First(i => CompareItems(i.DisplayText + i.DisplayTextSuffix, itemToCommit)); 973var item = completionList.ItemsList.First(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)); 1343protected async Task<IReadOnlyList<RoslynCompletion.CompletionItem>> GetCompletionItemsAsync(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (4)
Intellisense\TestState.vb (4)
397Public Async Function AssertCompletionItemsContain(predicate As Func(Of CompletionItem, Boolean)) As Task 523Public Function GetSelectedItem() As CompletionItem 537Public Function GetCompletionItems() As IList(Of CompletionItem) 543Private Shared Function GetRoslynCompletionItem(item As Data.CompletionItem) As CompletionItem
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
Completion\CompletionServiceTests.cs (4)
114var completionItem = CompletionItem.Create(displayText: nameof(DebugAssertTestCompletionProvider), displayTextSuffix: "", rules: CompletionItemRules.Default); 119public override Task<CompletionDescription> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 124public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
Completion\FileSystemCompletionHelperTests.cs (1)
17private static void AssertItemsEqual(ImmutableArray<CompletionItem> actual, params string[] expected)
Completion\GlobalAssemblyCacheCompletionHelperTests.cs (1)
42private static IEnumerable<CompletionItem> GetItems(string pathSoFar)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (35)
IntelliSense\CompletionRulesTests.vb (2)
66Dim item = CompletionItem.Create(word) 84Dim item = CompletionItem.Create(word)
IntelliSense\CompletionServiceTests.vb (4)
82context.AddItem(CompletionItem.Create("Completion Item From Test Completion Provider")) 120Public Shared Item As CompletionItem = CompletionItem.Create("MyRoleItem") 137Public Overrides Function GetDescriptionAsync(document As Document, item As CompletionItem, cancellationToken As Threading.CancellationToken) As Task(Of CompletionDescription)
IntelliSense\CompletionServiceTests_Exclusivitiy.vb (1)
91context.AddItem(CompletionItem.Create(String.Format(s_itemText, s_index)))
IntelliSense\CSharpCompletionCommandHandlerTests.vb (20)
8219context.AddItem(CompletionItem.Create( 8229Public Overrides Function GetChangeAsync(document As Document, item As CompletionItem, commitKey As Char?, cancellationToken As CancellationToken) As Task(Of CompletionChange) 8258Dim intelliCodeItem = CompletionItem.Create(displayText:="★ Length", filterText:="Length") 8262context.AddItem(CompletionItem.Create(displayText:="★ Normalize", filterText:="Normalize", displayTextSuffix:="()")) 8263context.AddItem(CompletionItem.Create(displayText:="Normalize", filterText:="Normalize")) 8264context.AddItem(CompletionItem.Create(displayText:="Length", filterText:="Length")) 8265context.AddItem(CompletionItem.Create(displayText:="ToString", filterText:="ToString", displayTextSuffix:="()")) 8266context.AddItem(CompletionItem.Create(displayText:="First", filterText:="First", displayTextSuffix:="()")) 8274Public Overrides Function GetChangeAsync(document As Document, item As CompletionItem, commitKey As Char?, cancellationToken As CancellationToken) As Task(Of CompletionChange) 9591Public Property Items As ImmutableArray(Of CompletionItem) 9599Dim builder = ArrayBuilder(Of CompletionItem).GetInstance(items.Length) 9601builder.Add(CompletionItem.Create(displayText:=item.displayText, rules:=CompletionItemRules.Default.WithMatchPriority(item.matchPriority))) 9686context.AddItem(CompletionItem.Create(displayText:="★ Length2", filterText:="Length")) 10269context.AddItem(CompletionItem.Create(displayText:="★ length", filterText:="length", rules:=rules)) 10342context.AddItem(CompletionItem.Create(displayText:=DisplayText, filterText:=DisplayText)) 10351Public Function NotifyCommittingItemAsync(document As Document, item As CompletionItem, commitKey As Char?, cancellationToken As CancellationToken) As Task Implements INotifyCommittingItemCompletionProvider.NotifyCommittingItemAsync 10769context.AddItem(CompletionItem.Create(displayText:="Consolation")) 10770context.AddItem(CompletionItem.Create(displayText:="Add code that write to console", filterText:="cw").WithAdditionalFilterTexts(ImmutableArray.Create("Console", "Write"))) 10771context.AddItem(CompletionItem.Create(displayText:="Add code that write line to console", filterText:="cwl").WithAdditionalFilterTexts(ImmutableArray.Create("Console", "WriteLine"))) 10779Public Overrides Function GetChangeAsync(document As Document, item As CompletionItem, commitKey As Char?, cancellationToken As CancellationToken) As Task(Of CompletionChange)
IntelliSense\CSharpCompletionCommandHandlerTests_DefaultsSource.vb (6)
430context.AddItem(CompletionItem.Create(displayText:="★ FirstStarred", filterText:="FirstStarred", sortText:=GetSortText(1), rules:=rules)) 431context.AddItem(CompletionItem.Create(displayText:="★ SecondStarred", filterText:="SecondStarred", sortText:=GetSortText(2), rules:=rules)) 673Dim builder = ArrayBuilder(Of CompletionItem).GetInstance(RegularCount + ExpandedCount) 697Private Async Function CreateExpandedItems(builder As ArrayBuilder(Of CompletionItem), count As Integer) As Task 713Private Shared Sub CreateRegularItems(builder As ArrayBuilder(Of CompletionItem), count As Integer) 715builder.Add(CompletionItem.Create($"ItemRegular{i}"))
IntelliSense\MockCompletionProvider.vb (2)
17Private ReadOnly _getItems As Func(Of Document, Integer, CancellationToken, IEnumerable(Of CompletionItem)) 21Public Sub New(Optional getItems As Func(Of Document, Integer, CancellationToken, IEnumerable(Of CompletionItem)) = Nothing,
Microsoft.CodeAnalysis.ExternalAccess.FSharp (5)
Completion\FSharpCommonCompletionItem.cs (1)
15public static CompletionItem Create(
Completion\FSharpFileSystemCompletionHelper.cs (1)
37public Task<ImmutableArray<CompletionItem>> GetItemsAsync(string directoryPath, CancellationToken cancellationToken)
Completion\IFSharpCommonCompletionProvider.cs (2)
22Func<CompletionItem, char?, CancellationToken, Task<TextChange?>> baseGetTextChangeAsync, 23CompletionItem selectedItem,
Internal\Completion\FSharpInternalCommonCompletionProvider.cs (1)
31protected override Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (2)
Completion\OmniSharpCompletionService.cs (2)
43CompletionItem item, 50public static string? GetProviderName(this CompletionItem completionItem) => completionItem.ProviderName;
Microsoft.CodeAnalysis.Features (308)
Completion\CommonCompletionItem.cs (4)
17public static CompletionItem Create( 50return CompletionItem.CreateInternal( 63public static bool HasDescription(CompletionItem item) 66public static CompletionDescription GetDescription(CompletionItem item)
Completion\CommonCompletionProvider.cs (8)
56public sealed override Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 64internal override async Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 76Document document, CompletionItem item, 103Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 110public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default) 117public virtual Task<TextChange?> GetTextChangeAsync(Document document, CompletionItem selectedItem, char? ch, CancellationToken cancellationToken) 120protected virtual Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken) 123protected static CompletionItem CreateSuggestionModeItem(string? displayText, string? description)
Completion\CommonCompletionService.cs (5)
19protected override CompletionItem GetBetterItem(CompletionItem item, CompletionItem existingItem) 37protected static bool IsKeywordItem(CompletionItem item) 40protected static bool IsSnippetItem(CompletionItem item)
Completion\CompletionChange.cs (3)
13/// The change to be applied to the document when a <see cref="CompletionItem"/> is committed. 37/// True if the changes include the typed character that caused the <see cref="CompletionItem"/> 70/// cref="CompletionItem"/> to be committed. If false, the completion host will determine if and where the
Completion\CompletionContext.cs (13)
23private readonly SegmentedList<CompletionItem> _items = []; 25private CompletionItem? _suggestionModeItem; 49/// This is the most common value used for <see cref="CompletionItem.Span"/> and will 50/// be automatically assigned to any <see cref="CompletionItem"/> that has no <see cref="CompletionItem.Span"/> specified. 163internal IReadOnlyList<CompletionItem> Items => _items; 165public void AddItem(CompletionItem item) 176public void AddItems(IEnumerable<CompletionItem> items) 183foreach (var item in items) 190/// An optional <see cref="CompletionItem"/> that appears selected in the list presented to the user during suggestion mode. 199public CompletionItem? SuggestionModeItem 225private CompletionItem FixItem(CompletionItem item)
Completion\CompletionDescription.cs (1)
12/// The description of a <see cref="CompletionItem"/>.
Completion\CompletionHelper.cs (13)
70static bool IsKeywordItem(CompletionItem item) 73static bool TagsEqual(CompletionItem item1, CompletionItem item2) 80CompletionItem item1, 81CompletionItem item2, 190private static int CompareSpecialMatchPriorityValues(CompletionItem item1, CompletionItem item2) 204private static int ComparePreselection(CompletionItem item1, CompletionItem item2) 210private static int CompareDeprioritization(CompletionItem item1, CompletionItem item2) 213private static int CompareExpandedItem(CompletionItem item1, PatternMatch match1, CompletionItem item2, PatternMatch match2)
Completion\CompletionItem.cs (42)
20public sealed class CompletionItem : IComparable<CompletionItem> 163/// <see cref="CompletionItem"/>. Not available to clients. Only used by 215public static CompletionItem Create( 227public static CompletionItem Create( 241public static CompletionItem Create( 257public static CompletionItem Create( 269var result = CreateInternal( 278internal static CompletionItem CreateInternal( 305/// Creates a new <see cref="CompletionItem"/> 316public static CompletionItem Create( 325var result = new CompletionItem( 343private CompletionItem With( 407/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="Span"/> property changed. 411public CompletionItem WithSpan(TextSpan span) 415/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="DisplayText"/> property changed. 417public CompletionItem WithDisplayText(string text) 421/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="DisplayTextPrefix"/> property changed. 423public CompletionItem WithDisplayTextPrefix(string displayTextPrefix) 427/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="DisplayTextSuffix"/> property changed. 429public CompletionItem WithDisplayTextSuffix(string displayTextSuffix) 433/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="FilterText"/> property changed. 435public CompletionItem WithFilterText(string text) 439/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="SortText"/> property changed. 441public CompletionItem WithSortText(string text) 445/// Creates a copy of this <see cref="CompletionItem"/> with the specified property changed. 447public CompletionItem WithProperties(ImmutableDictionary<string, string> properties) 449var result = With(properties: properties.AsImmutableOrNull()); 456internal CompletionItem WithProperties(ImmutableArray<KeyValuePair<string, string>> properties) 460/// Creates a copy of this <see cref="CompletionItem"/> with the specified property. 462public CompletionItem AddProperty(string name, string value) 466/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="Tags"/> property changed. 468public CompletionItem WithTags(ImmutableArray<string> tags) 472/// Creates a copy of this <see cref="CompletionItem"/> with a tag added to the <see cref="Tags"/> collection. 474public CompletionItem AddTag(string tag) 492/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="Rules"/> property changed. 494public CompletionItem WithRules(CompletionItemRules rules) 498/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="IsComplexTextEdit"/> property changed. 500public CompletionItem WithIsComplexTextEdit(bool isComplexTextEdit) 504/// Creates a copy of this <see cref="CompletionItem"/> with the <see cref="AdditionalFilterTexts"/> property changed. 506internal CompletionItem WithAdditionalFilterTexts(ImmutableArray<string> additionalFilterTexts) 509int IComparable<CompletionItem>.CompareTo([AllowNull] CompletionItem other)
Completion\CompletionItemFlags.cs (2)
15/// Indicates this <see cref="CompletionItem"/> is cached and reused across completion sessions. 25/// Indicates this <see cref="CompletionItem"/> should be shown only when expanded items is requested.
Completion\CompletionItemRules.cs (1)
37/// The rule used when no rule is specified when constructing a <see cref="CompletionItem"/>.
Completion\CompletionList.cs (21)
19private readonly Lazy<ImmutableArray<CompletionItem>> _lazyItems; 26public ImmutableArray<CompletionItem> Items => _lazyItems.Value; 33public IReadOnlyList<CompletionItem> ItemsList { get; } 37/// Individual <see cref="CompletionItem"/> spans may vary. 50/// to the document. If this is the case, <see cref="CompletionItem.IsComplexTextEdit"/> must be 61/// An optional <see cref="CompletionItem"/> that appears selected in the list presented to the user during suggestion mode. 67public CompletionItem? SuggestionModeItem { get; } 76IReadOnlyList<CompletionItem> itemsList, 78CompletionItem? suggestionModeItem, 89foreach (var item in ItemsList) 101/// <param name="suggestionModeItem">An optional <see cref="CompletionItem"/> that appears selected in the list presented to the user during suggestion mode.</param> 104ImmutableArray<CompletionItem> items, 106CompletionItem? suggestionModeItem = null) 113IReadOnlyList<CompletionItem> itemsList, 115CompletionItem? suggestionModeItem, 123Optional<IReadOnlyList<CompletionItem>> itemsList = default, 125Optional<CompletionItem> suggestionModeItem = default) 130var newSuggestionModeItem = suggestionModeItem.HasValue ? suggestionModeItem.Value : SuggestionModeItem; 159public CompletionList WithItems(ImmutableArray<CompletionItem> items) 166internal CompletionList WithItemsList(IReadOnlyList<CompletionItem> itemsList) 178public CompletionList WithSuggestionModeItem(CompletionItem suggestionModeItem)
Completion\CompletionProvider.cs (4)
25/// Implement to contribute <see cref="CompletionItem"/>'s and other details to a <see cref="CompletionList"/> 63public virtual Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 66internal virtual Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 78public virtual Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
Completion\CompletionRules.cs (2)
27/// Individual <see cref="CompletionItem"/>s can override this. 33/// Individual <see cref="CompletionItem"/>s can override this.
Completion\CompletionService.cs (7)
170/// This is the most common value used for <see cref="CompletionItem.Span"/>. 193CompletionItem item, 209internal virtual async Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken = default) 240CompletionItem item, 283public virtual ImmutableArray<CompletionItem> FilterItems( 285ImmutableArray<CompletionItem> items, 393internal CompletionProvider? GetProvider(CompletionItem item, Project? project)
Completion\CompletionService.ProviderManager.cs (1)
151public CompletionProvider? GetProvider(CompletionItem item, Project? project)
Completion\CompletionTags.cs (1)
12/// The set of well known tags used for the <see cref="CompletionItem.Tags"/> property.
Completion\FileSystemCompletionHelper.cs (9)
86private CompletionItem CreateNetworkRoot() 94private CompletionItem CreateUnixRoot() 102private CompletionItem CreateFileSystemEntryItem(string fullPath, bool isDirectory) 110private CompletionItem CreateLogicalDriveItem(string drive) 118public Task<ImmutableArray<CompletionItem>> GetItemsAsync(string directoryPath, CancellationToken cancellationToken) 121private ImmutableArray<CompletionItem> GetItems(string directoryPath, CancellationToken cancellationToken) 129var result = ArrayBuilder<CompletionItem>.GetInstance(); 214private IEnumerable<CompletionItem> GetItemsInDirectory(string fullDirectoryPath, CancellationToken cancellationToken) 263internal ImmutableArray<CompletionItem> GetItems(string directoryPath, CancellationToken cancellationToken)
Completion\INotifyCommittingItemCompletionProvider.cs (1)
24Task NotifyCommittingItemAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken);
Completion\MatchResult.cs (3)
11CompletionItem completionItem, 21public readonly CompletionItem CompletionItem = completionItem; 31public string FilterTextUsed => MatchedAdditionalFilterText ?? CompletionItem.FilterText;
Completion\PatternMatchHelper.cs (3)
99CompletionItem item, 132public bool MatchesPattern(CompletionItem item, CultureInfo culture) 136CompletionItem item,
Completion\Providers\AbstractAggregateEmbeddedLanguageCompletionProvider.cs (3)
107public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken) 110internal override Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 113private IEmbeddedLanguage GetLanguage(CompletionItem item)
Completion\Providers\AbstractAwaitCompletionProvider.cs (2)
147static CompletionItem CreateCompletionItem( 166public sealed override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
Completion\Providers\AbstractCrefCompletionProvider.cs (1)
19Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\Providers\AbstractDocCommentCompletionProvider.cs (20)
91protected abstract Task<IEnumerable<CompletionItem>?> GetItemsWorkerAsync(Document document, int position, CompletionTrigger trigger, CancellationToken cancellationToken); 104private CompletionItem GetItem(string name) 116protected IEnumerable<CompletionItem> GetAttributeItems(string tagName, ISet<string> existingAttributes, bool addEqualsAndQuotes) 126protected IEnumerable<CompletionItem> GetAlwaysVisibleItems() 129private CompletionItem GetCommentItem() 136private CompletionItem GetCDataItem() 143protected IEnumerable<CompletionItem> GetNestedItems(ISymbol? symbol, bool includeKeywords) 161private IEnumerable<CompletionItem> GetParamRefItems(ISymbol symbol) 171private IEnumerable<CompletionItem> GetTypeParamRefItems(ISymbol symbol) 181protected IEnumerable<CompletionItem> GetAttributeValueItems(ISymbol? symbol, string tagName, string attributeName) 213protected ImmutableArray<CompletionItem> GetTopLevelItems(ISymbol? symbol, TSyntax syntax) 215using var _1 = ArrayBuilder<CompletionItem>.GetInstance(out var items); 252protected IEnumerable<CompletionItem> GetItemTagItems() 255protected IEnumerable<CompletionItem> GetListItems() 258protected IEnumerable<CompletionItem> GetListHeaderItems() 261private IEnumerable<CompletionItem> GetParameterItems<TSymbol>(ImmutableArray<TSymbol> symbols, TSyntax syntax, string tagName) where TSymbol : ISymbol 274public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitChar = null, CancellationToken cancellationToken = default) 309private CompletionItem CreateCompletionItem(string displayText) 317private CompletionItem CreateLangwordCompletionItem(string displayText) 325protected CompletionItem CreateCompletionItem(string displayText, string beforeCaretText, string afterCaretText)
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (2)
155var completionItem = CommonCompletionItem.Create( 268public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default)
Completion\Providers\AbstractKeywordCompletionProvider.cs (7)
29protected abstract CompletionItem CreateItem(RecommendedKeyword keyword, TContext context, CancellationToken cancellationToken); 43private async Task<ImmutableArray<CompletionItem>> RecommendCompletionItemsAsync(Document document, CompletionContext context, CancellationToken cancellationToken) 73public sealed override Task<TextChange?> GetTextChangeAsync(Document document, CompletionItem item, char? ch, CancellationToken cancellationToken) 76private sealed class Comparer : IEqualityComparer<CompletionItem> 78public bool Equals(CompletionItem? x, CompletionItem? y) 81public int GetHashCode(CompletionItem obj)
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (6)
36protected abstract SyntaxToken GetToken(CompletionItem completionItem, SyntaxTree tree, CancellationToken cancellationToken); 39Document document, CompletionItem item, Compilation compilation, ISymbol member, INamedTypeSymbol containingType, CancellationToken cancellationToken); 46public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default) 78CompletionItem completionItem, 138CompletionItem completionItem, 227internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\Providers\AbstractObjectCreationCompletionProvider.cs (1)
26protected override CompletionItem CreateItem(
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
84internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\Providers\AbstractOverrideCompletionProvider.BaseItemGetter.cs (1)
54public abstract Task<ImmutableArray<CompletionItem>> GetItemsAsync();
Completion\Providers\AbstractOverrideCompletionProvider.cs (1)
35Document document, CompletionItem completionItem, Compilation compilation, ISymbol overriddenMember, INamedTypeSymbol containingType, CancellationToken cancellationToken)
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (2)
46public override async Task<ImmutableArray<CompletionItem>> GetItemsAsync() 69private CompletionItem CreateItem(
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (3)
63Document document, CompletionItem item, Compilation compilation, ISymbol member, INamedTypeSymbol containingType, CancellationToken cancellationToken) 82protected async Task<IEnumerable<CompletionItem>?> CreatePartialItemsAsync( 105private CompletionItem CreateItem(IMethodSymbol method, int line, TextSpan span, SemanticModel semanticModel, DeclarationModifiers modifiers, SyntaxToken token)
Completion\Providers\AbstractPartialTypeCompletionProvider.cs (3)
61private CompletionItem CreateCompletionItem(INamedTypeSymbol symbol, TSyntaxContext context) 110internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 113public override Task<TextChange?> GetTextChangeAsync(Document document, CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (2)
133protected override CompletionItem CreateItem( 204Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\Providers\AbstractSuggestionModeCompletionProvider.cs (2)
14protected abstract Task<CompletionItem?> GetSuggestionModeItemAsync(Document document, int position, TextSpan span, CompletionTrigger triggerInfo, CancellationToken cancellationToken); 22protected static CompletionItem CreateEmptySuggestionModeItem()
Completion\Providers\AbstractSymbolCompletionProvider.cs (10)
37protected abstract CompletionItem CreateItem( 97private ImmutableArray<CompletionItem> CreateItems( 125using var _ = ArrayBuilder<CompletionItem>.GetInstance(out var itemListBuilder); 152var item = CreateItem( 220protected static CompletionItem CreateItemDefault( 249internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 289private async Task<ImmutableArray<CompletionItem>> GetItemsAsync( 419public sealed override Task<TextChange?> GetTextChangeAsync(Document document, CompletionItem selectedItem, char? ch, CancellationToken cancellationToken) 422private string GetInsertionText(CompletionItem item, char? ch) 432protected virtual string GetInsertionText(CompletionItem item, char ch)
Completion\Providers\EmbeddedLanguageCompletionProvider.cs (2)
24public abstract Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken); 25public abstract Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken);
Completion\Providers\ImportCompletionProvider\AbstractExtensionMethodImportCompletionProvider.cs (1)
114private CompletionItem Convert(SerializableImportCompletionItem serializableItem, string receiverTypeSymbolKey)
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (4)
25protected abstract Task<bool> ShouldProvideParenthesisCompletionAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken); 28public Task NotifyCommittingItemAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken) 116Document document, CompletionItem completionItem, char? commitKey, CancellationToken cancellationToken) 219internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionProvider.cs (3)
117ImmutableArray<CompletionItem> items, 124foreach (var item in items) 138CompletionItem item,
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (2)
44public async Task<(ImmutableArray<ImmutableArray<CompletionItem>>, bool)> GetAllTopLevelTypesAsync( 56ImmutableArray<CompletionItem> GetItemsFromCacheResult(TypeImportCompletionCacheEntry cacheEntry)
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (16)
32public static CompletionItem Create( 74var item = CompletionItem.CreateInternal( 94public static CompletionItem CreateAttributeItemWithoutSuffix(CompletionItem attributeItem, string attributeNameWithoutSuffix, CompletionItemFlags flags) 108var item = CompletionItem.CreateInternal( 131public static CompletionItem CreateItemWithGenericDisplaySuffix(CompletionItem item, string genericTypeSuffix) 134public static string GetContainingNamespace(CompletionItem item) 137public static async Task<CompletionDescription> GetCompletionDescriptionAsync(Document document, CompletionItem item, SymbolDescriptionOptions options, CancellationToken cancellationToken) 160public static string GetTypeName(CompletionItem item) 177private static (ISymbol? symbol, int overloadCount) GetSymbolAndOverloadCount(CompletionItem item, Compilation compilation) 220public static CompletionItem MarkItemToAlwaysFullyQualify(CompletionItem item) 227public static bool ShouldAlwaysFullyQualify(CompletionItem item) => item.TryGetProperty(AlwaysFullyQualifyKey, out var _);
Completion\Providers\ImportCompletionProvider\ITypeImportCompletionService.cs (1)
24Task<(ImmutableArray<ImmutableArray<CompletionItem>>, bool)> GetAllTopLevelTypesAsync(
Completion\Providers\ImportCompletionProvider\TypeImportCompletionCacheEntry.cs (7)
55public ImmutableArray<CompletionItem> GetItemsForContext( 72using var _ = ArrayBuilder<CompletionItem>.GetInstance(out var builder); 134static CompletionItem GetAppropriateAttributeItem(CompletionItem attributeItem, bool isCaseSensitive) 197var item = ImportCompletionItem.Create( 216private readonly struct TypeImportCompletionItemInfo(CompletionItem item, bool isPublic, bool isGeneric, bool isAttribute, bool isEditorBrowsableStateAdvanced, bool isEnumBaseType) 224public CompletionItem Item { get; } = item;
Completion\Providers\MemberInsertingCompletionItem.cs (5)
15public static CompletionItem Create( 38public static Task<CompletionDescription> GetDescriptionAsync(CompletionItem item, Document document, SymbolDescriptionOptions options, CancellationToken cancellationToken) 41public static DeclarationModifiers GetModifiers(CompletionItem item) 52public static int GetLine(CompletionItem item) 63public static int GetTokenSpanEnd(CompletionItem item)
Completion\Providers\Scripting\GlobalAssemblyCacheCompletionHelper.cs (3)
32public Task<ImmutableArray<CompletionItem>> GetItemsAsync(string directoryPath, CancellationToken cancellationToken) 36internal ImmutableArray<CompletionItem> GetItems(string directoryPath, CancellationToken cancellationToken) 38using var resultDisposer = ArrayBuilder<CompletionItem>.GetInstance(out var result);
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (3)
22public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default) 89var completionItem = SnippetCompletionItem.Create( 102internal override async Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\Providers\Snippets\SnippetCompletionItem.cs (4)
15public static CompletionItem Create( 42public static string GetSnippetIdentifier(CompletionItem item) 48public static int GetInvocationPosition(CompletionItem item) 55public static bool IsSnippet(CompletionItem item)
Completion\Providers\SymbolCompletionItem.cs (21)
29private static CompletionItem CreateWorker( 64var item = CommonCompletionItem.Create( 95public static CompletionItem AddShouldProvideParenthesisCompletion(CompletionItem item) 98public static bool GetShouldProvideParenthesisCompletion(CompletionItem item) 127public static bool HasSymbols(CompletionItem item) 132public static async Task<ImmutableArray<ISymbol>> GetSymbolsAsync(CompletionItem item, Document document, CancellationToken cancellationToken) 185CompletionItem item, Document document, SymbolDescriptionOptions options, CancellationToken cancellationToken) 192CompletionItem item, Document document, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, CancellationToken cancellationToken) 232public static SupportedPlatformData? GetSupportedPlatforms(CompletionItem item, Solution solution) 246public static int GetContextPosition(CompletionItem item) 259public static int GetDescriptionPosition(CompletionItem item) 262public static string GetInsertionText(CompletionItem item) 265public static bool TryGetInsertionText(CompletionItem item, [NotNullWhen(true)] out string? insertionText) 269public static CompletionItem CreateWithSymbolId( 300public static CompletionItem CreateWithSymbolId( 324public static CompletionItem CreateWithNameAndKind( 348internal static string? GetSymbolName(CompletionItem item) 351internal static SymbolKind? GetKind(CompletionItem item) 354internal static bool GetSymbolIsGeneric(CompletionItem item) 358CompletionItem item, ImmutableArray<ISymbol> symbols, Document document, SemanticModel semanticModel, SymbolDescriptionOptions options, CancellationToken cancellationToken)
Completion\Providers\UnionCompletionItemComparer.cs (4)
11internal sealed class UnionCompletionItemComparer : IEqualityComparer<CompletionItem> 19public bool Equals(CompletionItem? x, CompletionItem? y) 23public int GetHashCode(CompletionItem obj)
Completion\Providers\XmlDocCommentCompletionItem.cs (3)
14public static CompletionItem Create(string displayText, string beforeCaretText, string afterCaretText, CompletionItemRules rules) 32public static string GetBeforeCaretText(CompletionItem item) 35public static string? GetAfterCaretText(CompletionItem item)
Completion\Utilities.cs (1)
47public static bool IsPreferredItem(this CompletionItem completionItem)
EmbeddedLanguages\DateAndTime\DateAndTimeEmbeddedCompletionProvider.cs (3)
121context.AddItem(CompletionItem.CreateInternal( 215public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken) 230public override Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (3)
113context.AddItem(CompletionItem.CreateInternal( 445public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken) 460public override Task<CompletionDescription> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken)
ExternalAccess\Pythia\Api\PythiaCompletionProviderBase.cs (8)
21public static CompletionItem CreateCommonCompletionItem( 35public static CompletionItem CreateSymbolCompletionItem( 52public static Task<CompletionDescription> GetDescriptionAsync(CompletionItem item, Document document, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 57public static CompletionDescription GetDescription(CompletionItem item) 61Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 70public static bool TryGetInsertionText(CompletionItem item, [NotNullWhen(true)] out string? insertionText) 79public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default) 82public virtual Task NotifyCommittingItemAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (3)
34protected abstract bool IsGeneric(CompletionItem completionItem); 155foreach (var item in completionList.ItemsList) 200private static async Task<string> GetInsertionTextAsync(Document document, CompletionItem item, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.LanguageServer (2)
Services\StarredCompletions\StarredCompletionProvider.cs (2)
30public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default) 37internal override async Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.LanguageServer.Protocol (15)
Handler\Completion\CompletionHandler.cs (1)
218foreach (var item in completionList.ItemsList)
Handler\Completion\CompletionResolveHandler.cs (2)
92var roslynItem = cachedCompletionList.ItemsList 116private static bool MatchesLSPCompletionItem(LSP.CompletionItem lspCompletionItem, CompletionItem completionItem)
Handler\Completion\CompletionResultFactory.cs (12)
75foreach (var item in list.ItemsList) 109async Task<LSP.CompletionItem> CreateLSPCompletionItemAsync(CompletionItem item, string typedText) 229CompletionItem item, 317CompletionItem item, 365CompletionItem item, 503CompletionItem item, 521CompletionItem selectedItem, 546private static async Task<CompletionChange> GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(CompletionService completionService, Document document, CompletionItem completionItem, CancellationToken cancellationToken) 561CompletionItem roslynItem, 577CompletionItem roslynItem, 627CompletionItem roslynItem, 668CompletionItem selectedItem,
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (14)
Completion\CompletionFeaturesTests.cs (10)
600var builder = ImmutableArray.CreateBuilder<CodeAnalysis.Completion.CompletionItem>(); 603builder.Add(CodeAnalysis.Completion.CompletionItem.Create($"ItemWithDefaultChar{i}", rules: CompletionItemRules.Default)); 606builder.Add(CodeAnalysis.Completion.CompletionItem.Create($"ItemNonDefaultChar{i}", rules: NonDefaultRule)); 882public ImmutableArray<CodeAnalysis.Completion.CompletionItem> ReturnedItems { get; set; } = []; 896public override Task<CompletionChange> GetChangeAsync(Document document, CodeAnalysis.Completion.CompletionItem item, char? commitCharacter = null, CancellationToken cancellationToken = default) 930var builder = ImmutableArray.CreateBuilder<CodeAnalysis.Completion.CompletionItem>(); 931builder.Add(CodeAnalysis.Completion.CompletionItem.Create("SimpleItem")); 933var importItem = CodeAnalysis.Completion.CompletionItem.Create("ExpandedItem"); 937builder.Add(CodeAnalysis.Completion.CompletionItem.Create("ComplexItem", isComplexTextEdit: true));
Completion\CompletionResolveTests.cs (4)
184var selectedItem = CodeAnalysis.Completion.CompletionItem.Create(displayText: "M", isComplexTextEdit: true); 499CodeAnalysis.Completion.CompletionItem item, 517internal override Task<CompletionDescription> GetDescriptionAsync(Document document, CodeAnalysis.Completion.CompletionItem item, CodeAnalysis.Completion.CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken = default)
Microsoft.CodeAnalysis.VisualBasic.Features (34)
Completion\CompletionProviders\CompletionListTagCompletionProvider.vb (1)
99supportedPlatformData As SupportedPlatformData) As CompletionItem
Completion\CompletionProviders\CompletionUtilities.vb (1)
127Public Function GetInsertionTextAtInsertionTime(item As CompletionItem, ch As Char) As String
Completion\CompletionProviders\CrefCompletionProvider.vb (3)
198symbols As IEnumerable(Of ISymbol), position As Integer) As IEnumerable(Of CompletionItem) 213symbol As ISymbol, position As Integer, builder As StringBuilder) As CompletionItem 256Private Shared Function CreateOfCompletionItem() As CompletionItem
Completion\CompletionProviders\EnumCompletionProvider.vb (2)
131supportedPlatformData As SupportedPlatformData) As CompletionItem 157Protected Overrides Function GetInsertionText(item As CompletionItem, ch As Char) As String
Completion\CompletionProviders\HandlesClauseCompletionProvider.vb (2)
160Protected Overrides Function GetInsertionText(item As CompletionItem, ch As Char) As String 164Protected Overrides Function CreateItem(completionContext As CompletionContext, displayText As String, displayTextSuffix As String, insertionText As String, symbols As ImmutableArray(Of SymbolAndSelectionInfo), context As VisualBasicSyntaxContext, supportedPlatformData As SupportedPlatformData) As CompletionItem
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (2)
307supportedPlatformData As SupportedPlatformData) As CompletionItem 319Protected Overrides Function GetInsertionText(item As CompletionItem, ch As Char) As String
Completion\CompletionProviders\ImportCompletionProvider\ExtensionMethodImportCompletionProvider.vb (1)
48Protected Overrides Function ShouldProvideParenthesisCompletionAsync(document As Document, item As CompletionItem, commitKey As Char?, cancellationToken As CancellationToken) As Task(Of Boolean)
Completion\CompletionProviders\ImportCompletionProvider\TypeImportCompletionProvider.vb (1)
43Protected Overrides Function ShouldProvideParenthesisCompletionAsync(document As Document, item As CompletionItem, commitKey As Char?, cancellationToken As CancellationToken) As Task(Of Boolean)
Completion\CompletionProviders\KeywordCompletionProvider.vb (1)
186Protected Overrides Function CreateItem(keyword As RecommendedKeyword, context As VisualBasicSyntaxContext, cancellationToken As CancellationToken) As CompletionItem
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (2)
110Friend Overrides Function GetDescriptionWorkerAsync(document As Document, item As CompletionItem, options As CompletionOptions, displayOptions As SymbolDescriptionOptions, cancellationToken As CancellationToken) As Task(Of CompletionDescription) 230Protected Overrides Function GetTextChangeAsync(selectedItem As CompletionItem, ch As Char?, cancellationToken As CancellationToken) As Task(Of TextChange?)
Completion\CompletionProviders\OverrideCompletionProvider.vb (1)
55Protected Overrides Function GetToken(completionItem As CompletionItem, syntaxTree As SyntaxTree, cancellationToken As CancellationToken) As SyntaxToken
Completion\CompletionProviders\PartialTypeCompletionProvider.vb (1)
73Public Overrides Async Function GetTextChangeAsync(document As Document, selectedItem As CompletionItem, ch As Char?, cancellationToken As CancellationToken) As Task(Of TextChange?)
Completion\CompletionProviders\SymbolCompletionProvider.vb (1)
78Protected Overrides Function GetInsertionText(item As CompletionItem, ch As Char) As String
Completion\CompletionProviders\VisualBasicSuggestionModeCompletionProvider.vb (1)
33Protected Overrides Async Function GetSuggestionModeItemAsync(document As Document, position As Integer, itemSpan As TextSpan, trigger As CompletionTrigger, cancellationToken As CancellationToken) As Task(Of CompletionItem)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (7)
68Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, trigger As CompletionTrigger, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of CompletionItem)) 100Dim items = New List(Of CompletionItem)() 181Return SpecializedCollections.EmptyEnumerable(Of CompletionItem) 185Private Sub AddXmlElementItems(items As List(Of CompletionItem), xmlElement As SyntaxNode) 196Private Function GetCloseTagItem(token As SyntaxToken) As IEnumerable(Of CompletionItem) 227items As List(Of CompletionItem), 337Private Function GetAttributes(token As SyntaxToken, tagName As String, attributes As SyntaxList(Of XmlNodeSyntax)) As IEnumerable(Of CompletionItem)
Completion\VisualBasicCompletionService.vb (6)
75Protected Overrides Function GetBetterItem(item As CompletionItem, existingItem As CompletionItem) As CompletionItem 85Protected Overrides Function ItemsMatch(item As CompletionItem, existingItem As CompletionItem) As Boolean 111Private Function GetChangeText(item As CompletionItem) As String
SpellCheck\VisualBasicSpellCheckCodeFixProvider.vb (1)
69Protected Overrides Function IsGeneric(completionItem As CompletionItem) As Boolean
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
Completion\MockCompletionProvider.vb (1)
26Public Overrides Function GetTextChangeAsync(document As Document, selectedItem As CompletionItem, ch As Char?, cancellationToken As CancellationToken) As Task(Of TextChange?)
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
Snippets\SnippetCompletionProvider.vb (2)
80Private Shared Function CreateCompletionItems(snippets As IEnumerable(Of SnippetInfo)) As IEnumerable(Of CompletionItem) 96Public Sub Commit(completionItem As CompletionItem,