85 references to EnterKeyRule
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (29)
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (1)
162protected async Task VerifySendEnterThroughToEnterAsync(string initialMarkup, string textTypedSoFar, EnterKeyRule sendThroughEnterOption, bool expected)
Completion\CompletionProviders\AttributeNamedParameterCompletionProviderTests.cs (3)
42await VerifySendEnterThroughToEnterAsync(markup, "Color =", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 43await VerifySendEnterThroughToEnterAsync(markup, "Color =", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 44await VerifySendEnterThroughToEnterAsync(markup, "Color =", sendThroughEnterOption: EnterKeyRule.Always, expected: true);
Completion\CompletionProviders\KeywordCompletionProviderTests.cs (3)
32await VerifySendEnterThroughToEnterAsync("$$", "class", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 33await VerifySendEnterThroughToEnterAsync("$$", "class", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 34await VerifySendEnterThroughToEnterAsync("$$", "class", sendThroughEnterOption: EnterKeyRule.Always, expected: true);
Completion\CompletionProviders\NamedParameterCompletionProviderTests.cs (3)
37await VerifySendEnterThroughToEnterAsync(markup, "a:", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 38await VerifySendEnterThroughToEnterAsync(markup, "a:", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 39await VerifySendEnterThroughToEnterAsync(markup, "a:", sendThroughEnterOption: EnterKeyRule.Always, expected: true);
Completion\CompletionProviders\ObjectCreationCompletionProviderTests.cs (3)
160await VerifySendEnterThroughToEnterAsync(markup, "D", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 161await VerifySendEnterThroughToEnterAsync(markup, "D", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 162await VerifySendEnterThroughToEnterAsync(markup, "D", sendThroughEnterOption: EnterKeyRule.Always, expected: true);
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (4)
68[InlineData(EnterKeyRule.Never)] 69[InlineData(EnterKeyRule.AfterFullyTypedWord)] 70[InlineData(EnterKeyRule.Always)] // note: GAC completion helper uses its own EnterKeyRule 71public async Task SendEnterThroughToEditorTest(EnterKeyRule enterKeyRule)
Completion\CompletionProviders\SnippetCompletionProviderTests.cs (6)
112await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcu", sendThroughEnterOption: EnterKeyRule.Always, expected: true); 113await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcut", sendThroughEnterOption: EnterKeyRule.Always, expected: true); 115await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcu", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: false); 116await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcut", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 118await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcu", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 119await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcut", sendThroughEnterOption: EnterKeyRule.Never, expected: false);
Completion\CompletionProviders\SpeculativeTCompletionProviderTests.cs (3)
48await VerifySendEnterThroughToEnterAsync(markup, "T", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 49await VerifySendEnterThroughToEnterAsync(markup, "T", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 50await VerifySendEnterThroughToEnterAsync(markup, "T", sendThroughEnterOption: EnterKeyRule.Always, expected: true);
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (3)
64await VerifySendEnterThroughToEnterAsync("class C { void M() { System.Console.$$", "Beep", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 65await VerifySendEnterThroughToEnterAsync("class C { void M() { System.Console.$$", "Beep", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 66await VerifySendEnterThroughToEnterAsync("class C { void M() { System.Console.$$", "Beep", sendThroughEnterOption: EnterKeyRule.Always, expected: true);
Microsoft.CodeAnalysis.CSharp.Features (5)
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (1)
164private static readonly CompletionItemRules s_rules = CompletionItemRules.Create(enterKeyRule: EnterKeyRule.Never);
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
385enterKeyRule: EnterKeyRule.Never);
Completion\CSharpCompletionService.cs (3)
50var enterRule = options.EnterKeyBehavior; 55if (enterRule == EnterKeyRule.Default) 57enterRule = EnterKeyRule.Never;
Microsoft.CodeAnalysis.EditorFeatures (6)
IntelliSense\AsyncCompletion\CommitManager.cs (6)
369var rule = item.Rules.EnterKeyRule; 370if (rule == EnterKeyRule.Default) 378case EnterKeyRule.Default: 379case EnterKeyRule.Never: 381case EnterKeyRule.Always: 383case EnterKeyRule.AfterFullyTypedWord:
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (4)
IntelliSense\CSharpCompletionCommandHandlerTests.vb (2)
1241state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.EnterKeyBehavior, LanguageNames.CSharp, EnterKeyRule.AfterFullyTypedWord) 1269state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.EnterKeyBehavior, LanguageNames.CSharp, EnterKeyRule.AfterFullyTypedWord)
IntelliSense\VisualBasicCompletionCommandHandlerTests.vb (2)
1840state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.EnterKeyBehavior, LanguageNames.VisualBasic, EnterKeyRule.AfterFullyTypedWord) 1865state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.EnterKeyBehavior, LanguageNames.VisualBasic, EnterKeyRule.AfterFullyTypedWord)
Microsoft.CodeAnalysis.Features (26)
Completion\CommonCompletionProvider.cs (1)
23private static readonly CompletionItemRules s_suggestionItemRules = CompletionItemRules.Create(enterKeyRule: EnterKeyRule.Never);
Completion\CompletionItemRules.cs (10)
43enterKeyRule: EnterKeyRule.Default, 61public EnterKeyRule EnterKeyRule { get; } 82EnterKeyRule enterKeyRule, 107EnterKeyRule enterKeyRule, 130EnterKeyRule enterKeyRule = EnterKeyRule.Default, 164EnterKeyRule enterKeyRule, 175Optional<EnterKeyRule> enterKeyRule = default, 182var newEnterKeyRule = enterKeyRule.HasValue ? enterKeyRule.Value : EnterKeyRule; 226public CompletionItemRules WithEnterKeyRule(EnterKeyRule enterKeyRule)
Completion\CompletionOptions.cs (2)
18public EnterKeyRule EnterKeyBehavior { get; init; } = EnterKeyRule.Default;
Completion\CompletionRules.cs (9)
35public EnterKeyRule DefaultEnterKeyRule { get; } 46EnterKeyRule defaultEnterKeyRule, 67EnterKeyRule defaultEnterKeyRule) 85EnterKeyRule defaultEnterKeyRule = EnterKeyRule.Default, 100Optional<EnterKeyRule> defaultEnterKeyRule = default, 106var newDefaultEnterKeyRule = defaultEnterKeyRule.HasValue ? defaultEnterKeyRule.Value : DefaultEnterKeyRule; 149public CompletionRules WithDefaultEnterKeyRule(EnterKeyRule defaultEnterKeyRule) 170defaultEnterKeyRule: EnterKeyRule.Default,
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
236enterKeyRule: EnterKeyRule.Never);
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
106private static readonly CompletionItemRules s_rules = CompletionItemRules.Create(enterKeyRule: EnterKeyRule.Never);
Completion\Providers\Scripting\AbstractLoadDirectiveCompletionProvider.cs (1)
20enterKeyRule: EnterKeyRule.Never,
Completion\Providers\Scripting\AbstractReferenceDirectiveCompletionProvider.cs (1)
21enterKeyRule: EnterKeyRule.Never,
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\Options\CompletionOptionsStorage.cs (2)
43public static readonly PerLanguageOption2<EnterKeyRule> EnterKeyBehavior = new("dotnet_return_key_completion_behavior", CompletionOptions.Default.EnterKeyBehavior, serializer: EditorConfigValueSerializer.CreateSerializerForEnum<EnterKeyRule>(), group: s_completionOptionGroup);
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (1)
354enterKeyRule:=EnterKeyRule.Never)
Completion\VisualBasicCompletionService.vb (3)
41defaultEnterKeyRule:=EnterKeyRule.Always) 59If enterRule = EnterKeyRule.Default Then 60enterRule = EnterKeyRule.Always
Microsoft.VisualStudio.LanguageServices.CSharp (5)
Options\AutomationObject\AutomationObject.Completion.cs (2)
38set { SetOption(CompletionOptionsStorage.EnterKeyBehavior, (EnterKeyRule)value); } 44set { SetOption(CompletionOptionsStorage.EnterKeyBehavior, (EnterKeyRule)value); }
Options\IntelliSenseOptionPageControl.xaml.cs (3)
36BindToOption(Never_add_new_line_on_enter, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.Never, LanguageNames.CSharp); 37BindToOption(Only_add_new_line_on_enter_with_whole_word, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.AfterFullyTypedWord, LanguageNames.CSharp); 38BindToOption(Always_add_new_line_on_enter, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.Always, LanguageNames.CSharp);
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
Options\AutomationObject\AutomationObject.Completion.vb (1)
32SetOption(CompletionOptionsStorage.EnterKeyBehavior, DirectCast(value, EnterKeyRule))
Options\IntelliSenseOptionPageControl.xaml.vb (3)
29BindToOption(Never_add_new_line_on_enter, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.Never, LanguageNames.VisualBasic) 30BindToOption(Only_add_new_line_on_enter_with_whole_word, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.AfterFullyTypedWord, LanguageNames.VisualBasic) 31BindToOption(Always_add_new_line_on_enter, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.Always, LanguageNames.VisualBasic)