90 references to EnterKeyRule
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (29)
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (1)
175protected async Task VerifySendEnterThroughToEnterAsync(string initialMarkup, string textTypedSoFar, EnterKeyRule sendThroughEnterOption, bool expected)
Completion\CompletionProviders\AttributeNamedParameterCompletionProviderTests.cs (3)
43await VerifySendEnterThroughToEnterAsync(markup, "Color =", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 44await VerifySendEnterThroughToEnterAsync(markup, "Color =", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 45await VerifySendEnterThroughToEnterAsync(markup, "Color =", sendThroughEnterOption: EnterKeyRule.Always, expected: true);
Completion\CompletionProviders\KeywordCompletionProviderTests.cs (3)
33await VerifySendEnterThroughToEnterAsync("$$", "class", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 34await VerifySendEnterThroughToEnterAsync("$$", "class", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 35await VerifySendEnterThroughToEnterAsync("$$", "class", sendThroughEnterOption: EnterKeyRule.Always, expected: true);
Completion\CompletionProviders\NamedParameterCompletionProviderTests.cs (3)
38await VerifySendEnterThroughToEnterAsync(markup, "a:", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 39await VerifySendEnterThroughToEnterAsync(markup, "a:", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 40await 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)
66[InlineData(EnterKeyRule.Never)] 67[InlineData(EnterKeyRule.AfterFullyTypedWord)] 68[InlineData(EnterKeyRule.Always)] // note: GAC completion helper uses its own EnterKeyRule 69public async Task SendEnterThroughToEditorTest(EnterKeyRule enterKeyRule)
Completion\CompletionProviders\SnippetCompletionProviderTests.cs (6)
114await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcu", sendThroughEnterOption: EnterKeyRule.Always, expected: true); 115await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcut", sendThroughEnterOption: EnterKeyRule.Always, expected: true); 117await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcu", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: false); 118await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcut", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 120await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcu", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 121await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcut", sendThroughEnterOption: EnterKeyRule.Never, expected: false);
Completion\CompletionProviders\SpeculativeTCompletionProviderTests.cs (3)
49await VerifySendEnterThroughToEnterAsync(markup, "T", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 50await VerifySendEnterThroughToEnterAsync(markup, "T", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 51await VerifySendEnterThroughToEnterAsync(markup, "T", sendThroughEnterOption: EnterKeyRule.Always, expected: true);
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (3)
63await VerifySendEnterThroughToEnterAsync("class C { void M() { System.Console.$$", "Beep", sendThroughEnterOption: EnterKeyRule.Never, expected: false); 64await VerifySendEnterThroughToEnterAsync("class C { void M() { System.Console.$$", "Beep", sendThroughEnterOption: EnterKeyRule.AfterFullyTypedWord, expected: true); 65await VerifySendEnterThroughToEnterAsync("class C { void M() { System.Console.$$", "Beep", sendThroughEnterOption: EnterKeyRule.Always, expected: true);
Microsoft.CodeAnalysis.CSharp.Features (5)
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (1)
163private static readonly CompletionItemRules s_rules = CompletionItemRules.Create(enterKeyRule: EnterKeyRule.Never);
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
410enterKeyRule: EnterKeyRule.Never);
Completion\CSharpCompletionService.cs (3)
45var enterRule = options.EnterKeyBehavior; 50if (enterRule == EnterKeyRule.Default) 52enterRule = EnterKeyRule.Never;
Microsoft.CodeAnalysis.EditorFeatures (6)
IntelliSense\AsyncCompletion\CommitManager.cs (6)
386var rule = item.Rules.EnterKeyRule; 387if (rule == EnterKeyRule.Default) 395case EnterKeyRule.Default: 396case EnterKeyRule.Never: 398case EnterKeyRule.Always: 400case EnterKeyRule.AfterFullyTypedWord:
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (4)
IntelliSense\CSharpCompletionCommandHandlerTests.vb (2)
1246state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.EnterKeyBehavior, LanguageNames.CSharp, EnterKeyRule.AfterFullyTypedWord) 1274state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.EnterKeyBehavior, LanguageNames.CSharp, EnterKeyRule.AfterFullyTypedWord)
IntelliSense\VisualBasicCompletionCommandHandlerTests.vb (2)
1802state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.EnterKeyBehavior, LanguageNames.VisualBasic, EnterKeyRule.AfterFullyTypedWord) 1827state.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)
19public 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) 167defaultEnterKeyRule: EnterKeyRule.Default,
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
230enterKeyRule: EnterKeyRule.Never);
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
106private static readonly CompletionItemRules s_rules = CompletionItemRules.Create(enterKeyRule: EnterKeyRule.Never);
Completion\Providers\Scripting\AbstractLoadDirectiveCompletionProvider.cs (1)
19enterKeyRule: EnterKeyRule.Never,
Completion\Providers\Scripting\AbstractReferenceDirectiveCompletionProvider.cs (1)
20enterKeyRule: EnterKeyRule.Never,
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\Options\CompletionOptionsStorage.cs (2)
49public 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)
368enterKeyRule:=EnterKeyRule.Never)
Completion\VisualBasicCompletionService.vb (3)
41defaultEnterKeyRule:=EnterKeyRule.Always) 59If enterRule = EnterKeyRule.Default Then 60enterRule = EnterKeyRule.Always
Microsoft.VisualStudio.LanguageServices.CSharp (6)
Options\AutomationObject\AutomationObject.Completion.cs (2)
38set { SetOption(CompletionOptionsStorage.EnterKeyBehavior, (EnterKeyRule)value); } 44set { SetOption(CompletionOptionsStorage.EnterKeyBehavior, (EnterKeyRule)value); }
Options\IntelliSenseOptionPageControl.xaml.cs (4)
35BindToOption(Never_add_new_line_on_enter, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.Never, LanguageNames.CSharp); 36BindToOption(Only_add_new_line_on_enter_with_whole_word, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.AfterFullyTypedWord, LanguageNames.CSharp); 37BindToOption(Always_add_new_line_on_enter, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.Always, LanguageNames.CSharp); 61if (enterKeyBehavior == EnterKeyRule.Default)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
UnifiedSettings\CSharpUnifiedSettingsTests.cs (2)
52return allValues.Where(value => !value.Equals(EnterKeyRule.Default)).ToArray(); 72return EnterKeyRule.Never;
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
UnifiedSettings\VisualBasicUnifiedSettingsTests.vb (2)
43Return allValues.Where(Function(value) Not value.Equals(EnterKeyRule.Default)).ToArray() 59Return EnterKeyRule.Always
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
Options\AutomationObject\AutomationObject.Completion.vb (1)
32SetOption(CompletionOptionsStorage.EnterKeyBehavior, DirectCast(value, EnterKeyRule))
Options\IntelliSenseOptionPageControl.xaml.vb (3)
28BindToOption(Never_add_new_line_on_enter, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.Never, LanguageNames.VisualBasic) 29BindToOption(Only_add_new_line_on_enter_with_whole_word, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.AfterFullyTypedWord, LanguageNames.VisualBasic) 30BindToOption(Always_add_new_line_on_enter, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.Always, LanguageNames.VisualBasic)