49 references to MatchPriority
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Completion\CompletionProviders\ObjectInitializerCompletionProviderTests.cs (1)
1074await VerifyItemExistsAsync(markup, "RequiredField", inlineDescription: FeaturesResources.Required, matchPriority: MatchPriority.Preselect);
Microsoft.CodeAnalysis.CSharp.Features (10)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
33.WithMatchPriority(MatchPriority.Preselect)
Completion\CompletionProviders\ObjectCreationCompletionProvider.cs (3)
104matchPriority: MatchPriority.Default, 110matchPriority: MatchPriority.Preselect, 116matchPriority: MatchPriority.Preselect,
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (1)
38private static readonly CompletionItemRules s_conversionRules = CompletionItemRules.Default.WithMatchPriority(MatchPriority.Deprioritize);
Completion\KeywordRecommenders\AbstractSyntacticSingleKeywordRecommender.cs (1)
24protected virtual int DefaultMatchPriority => MatchPriority.Default;
Completion\KeywordRecommenders\NuintKeywordRecommender.cs (2)
13/// We set the <see cref="MatchPriority"/> of this item less than the default value so that completion selects 19protected override RecommendedKeyword Keyword => new("nuint", matchPriority: MatchPriority.Default - 1);
Completion\KeywordRecommenders\UShortKeywordRecommender.cs (2)
23/// We set the <see cref="MatchPriority"/> of this item less than the default value so that 26protected override int DefaultMatchPriority => MatchPriority.Default - 1;
Microsoft.CodeAnalysis.EditorFeatures (4)
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (4)
576=> item.Rules.SelectionBehavior == CompletionItemSelectionBehavior.HardSelection ? item.Rules.MatchPriority : MatchPriority.Default; 798if (item.Rules.MatchPriority == MatchPriority.Default) 806Debug.Assert(_filterText.Length > 0 || item.Rules.MatchPriority != MatchPriority.Default); 841if (selectedItem.Rules.MatchPriority >= MatchPriority.Preselect)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (10)
IntelliSense\CSharpCompletionCommandHandlerTests.vb (9)
9541("item1", MatchPriority.Default - 1), 9542("item2", MatchPriority.Default + 1), 9543("item3", MatchPriority.Default), 9544("Item4", MatchPriority.Preselect)}) 9573("item1", MatchPriority.Preselect), 9574("item2", MatchPriority.Default + 1), 9575("Item3", If(uppercaseItemIsDeprioritize, MatchPriority.Deprioritize, MatchPriority.Default - 1))}) 10268Dim rules = CompletionItemRules.Default.WithSelectionBehavior(CompletionItemSelectionBehavior.HardSelection).WithMatchPriority(MatchPriority.Preselect)
IntelliSense\CSharpCompletionCommandHandlerTests_DefaultsSource.vb (1)
429Dim rules = CompletionItemRules.Default.WithSelectionBehavior(CompletionItemSelectionBehavior.HardSelection).WithMatchPriority(MatchPriority.Preselect)
Microsoft.CodeAnalysis.Features (16)
Completion\CommonCompletionService.cs (1)
29if (existingItem.Rules.MatchPriority != MatchPriority.Default && IsSnippetItem(item))
Completion\CompletionHelper.cs (4)
205=> (item1.Rules.MatchPriority != MatchPriority.Preselect).CompareTo(item2.Rules.MatchPriority != MatchPriority.Preselect); 211=> (item1.Rules.MatchPriority == MatchPriority.Deprioritize).CompareTo(item2.Rules.MatchPriority == MatchPriority.Deprioritize);
Completion\CompletionItemRules.cs (3)
45matchPriority: Completion.MatchPriority.Default, 168var matchPriority = preselect ? Completion.MatchPriority.Preselect : Completion.MatchPriority.Default;
Completion\PatternMatchHelper.cs (1)
223if (recentItemIndex >= 0 || matchPriority > MatchPriority.Default)
Completion\Providers\AbstractObjectCreationCompletionProvider.cs (1)
40rules: GetCompletionItemRules(symbols).WithMatchPriority(MatchPriority.Preselect),
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
79rules = rules.WithSelectionBehavior(CompletionItemSelectionBehavior.HardSelection).WithMatchPriority(MatchPriority.Preselect);
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
144var matchPriority = preselect ? ComputeSymbolMatchPriority(symbols[0].Symbol) : MatchPriority.Default;
Completion\Providers\AbstractSymbolCompletionProvider.cs (2)
242.WithMatchPriority(preselect ? MatchPriority.Preselect : MatchPriority.Default)
Completion\Providers\RecommendedKeyword.cs (1)
25public int MatchPriority { get; } = matchPriority ?? Completion.MatchPriority.Default;
EmbeddedLanguages\DateAndTime\DateAndTimeEmbeddedCompletionProvider.cs (1)
127? s_rules.WithMatchPriority(MatchPriority.Preselect)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\Completion\CompletionHandler.cs (1)
240.Concat(matchResultsBuilder.Skip(completionListMaxSize).Where(match => match.CompletionItem.Rules.MatchPriority == MatchPriority.Preselect))
Handler\Completion\CompletionResultFactory.cs (1)
139lspItem.Preselect = item.Rules.MatchPriority == MatchPriority.Preselect;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Completion\CompletionFeaturesTests.cs (1)
770mockService.NonDefaultRule = CompletionItemRules.Default.WithMatchPriority(MatchPriority.Preselect);
Microsoft.CodeAnalysis.VisualBasic.Features (5)
Completion\CompletionProviders\CompletionListTagCompletionProvider.vb (1)
111rules:=CompletionItemRules.Default.WithMatchPriority(MatchPriority.Preselect),
Completion\CompletionProviders\EnumCompletionProvider.vb (1)
29Private Shared ReadOnly s_enumMemberCompletionItemRules As CompletionItemRules = CompletionItemRules.Default.WithMatchPriority(MatchPriority.Preselect)
Completion\CompletionProviders\ObjectCreationCompletionProvider.vb (1)
62matchPriority:=MatchPriority.Preselect,
Completion\KeywordRecommenders\Expressions\MeKeywordRecommender.vb (1)
28Dim priority = MatchPriority.Default
Completion\KeywordRecommenders\Types\BuiltInTypesKeywordRecommender.vb (1)
113Dim priority = If(inferredSpecialTypes.Contains(specialType), SymbolMatchPriority.Keyword, MatchPriority.Default)