78 references to EnterKeyRule
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (29)
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (1)
178
string textTypedSoFar,
EnterKeyRule
sendThroughEnterOption, bool expected)
Completion\CompletionProviders\AttributeNamedParameterCompletionProviderTests.cs (3)
43
await VerifySendEnterThroughToEnterAsync(markup, "Color =", sendThroughEnterOption:
EnterKeyRule
.Never, expected: false);
44
await VerifySendEnterThroughToEnterAsync(markup, "Color =", sendThroughEnterOption:
EnterKeyRule
.AfterFullyTypedWord, expected: true);
45
await VerifySendEnterThroughToEnterAsync(markup, "Color =", sendThroughEnterOption:
EnterKeyRule
.Always, expected: true);
Completion\CompletionProviders\KeywordCompletionProviderTests.cs (3)
33
await VerifySendEnterThroughToEnterAsync("$$", "class", sendThroughEnterOption:
EnterKeyRule
.Never, expected: false);
34
await VerifySendEnterThroughToEnterAsync("$$", "class", sendThroughEnterOption:
EnterKeyRule
.AfterFullyTypedWord, expected: true);
35
await VerifySendEnterThroughToEnterAsync("$$", "class", sendThroughEnterOption:
EnterKeyRule
.Always, expected: true);
Completion\CompletionProviders\NamedParameterCompletionProviderTests.cs (3)
38
await VerifySendEnterThroughToEnterAsync(markup, "a:", sendThroughEnterOption:
EnterKeyRule
.Never, expected: false);
39
await VerifySendEnterThroughToEnterAsync(markup, "a:", sendThroughEnterOption:
EnterKeyRule
.AfterFullyTypedWord, expected: true);
40
await VerifySendEnterThroughToEnterAsync(markup, "a:", sendThroughEnterOption:
EnterKeyRule
.Always, expected: true);
Completion\CompletionProviders\ObjectCreationCompletionProviderTests.cs (3)
143
await VerifySendEnterThroughToEnterAsync(markup, "D", sendThroughEnterOption:
EnterKeyRule
.Never, expected: false);
144
await VerifySendEnterThroughToEnterAsync(markup, "D", sendThroughEnterOption:
EnterKeyRule
.AfterFullyTypedWord, expected: true);
145
await 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
69
public async Task SendEnterThroughToEditorTest(
EnterKeyRule
enterKeyRule)
Completion\CompletionProviders\SnippetCompletionProviderTests.cs (6)
111
await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcu", sendThroughEnterOption:
EnterKeyRule
.Always, expected: true);
112
await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcut", sendThroughEnterOption:
EnterKeyRule
.Always, expected: true);
114
await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcu", sendThroughEnterOption:
EnterKeyRule
.AfterFullyTypedWord, expected: false);
115
await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcut", sendThroughEnterOption:
EnterKeyRule
.AfterFullyTypedWord, expected: true);
117
await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcu", sendThroughEnterOption:
EnterKeyRule
.Never, expected: false);
118
await VerifySendEnterThroughToEnterAsync("$$", "SnippetShortcut", sendThroughEnterOption:
EnterKeyRule
.Never, expected: false);
Completion\CompletionProviders\SpeculativeTCompletionProviderTests.cs (3)
45
await VerifySendEnterThroughToEnterAsync(markup, "T", sendThroughEnterOption:
EnterKeyRule
.Never, expected: false);
46
await VerifySendEnterThroughToEnterAsync(markup, "T", sendThroughEnterOption:
EnterKeyRule
.AfterFullyTypedWord, expected: true);
47
await VerifySendEnterThroughToEnterAsync(markup, "T", sendThroughEnterOption:
EnterKeyRule
.Always, expected: true);
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (3)
63
await VerifySendEnterThroughToEnterAsync("class C { void M() { System.Console.$$", "Beep", sendThroughEnterOption:
EnterKeyRule
.Never, expected: false);
64
await VerifySendEnterThroughToEnterAsync("class C { void M() { System.Console.$$", "Beep", sendThroughEnterOption:
EnterKeyRule
.AfterFullyTypedWord, expected: true);
65
await VerifySendEnterThroughToEnterAsync("class C { void M() { System.Console.$$", "Beep", sendThroughEnterOption:
EnterKeyRule
.Always, expected: true);
Microsoft.CodeAnalysis.CSharp.Features (5)
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (1)
162
private static readonly CompletionItemRules s_rules = CompletionItemRules.Create(enterKeyRule:
EnterKeyRule
.Never);
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
411
enterKeyRule:
EnterKeyRule
.Never);
Completion\CSharpCompletionService.cs (3)
45
var
enterRule = options.EnterKeyBehavior;
50
if (enterRule ==
EnterKeyRule
.Default)
52
enterRule =
EnterKeyRule
.Never;
Microsoft.CodeAnalysis.EditorFeatures (6)
IntelliSense\AsyncCompletion\CommitManager.cs (6)
386
var
rule = item.Rules.EnterKeyRule;
387
if (rule ==
EnterKeyRule
.Default)
395
case
EnterKeyRule
.Default:
396
case
EnterKeyRule
.Never:
398
case
EnterKeyRule
.Always:
400
case
EnterKeyRule
.AfterFullyTypedWord:
Microsoft.CodeAnalysis.Features (26)
Completion\CommonCompletionProvider.cs (1)
23
private static readonly CompletionItemRules s_suggestionItemRules = CompletionItemRules.Create(enterKeyRule:
EnterKeyRule
.Never);
Completion\CompletionItemRules.cs (10)
43
enterKeyRule:
EnterKeyRule
.Default,
61
public
EnterKeyRule
EnterKeyRule { get; }
82
EnterKeyRule
enterKeyRule,
106
EnterKeyRule
enterKeyRule,
128
EnterKeyRule
enterKeyRule =
EnterKeyRule
.Default,
161
EnterKeyRule
enterKeyRule,
172
Optional<
EnterKeyRule
> enterKeyRule = default,
179
var
newEnterKeyRule = enterKeyRule.HasValue ? enterKeyRule.Value : EnterKeyRule;
223
public CompletionItemRules WithEnterKeyRule(
EnterKeyRule
enterKeyRule)
Completion\CompletionOptions.cs (2)
17
public
EnterKeyRule
EnterKeyBehavior { get; init; } =
EnterKeyRule
.Default;
Completion\CompletionRules.cs (9)
35
public
EnterKeyRule
DefaultEnterKeyRule { get; }
46
EnterKeyRule
defaultEnterKeyRule,
67
EnterKeyRule
defaultEnterKeyRule)
85
EnterKeyRule
defaultEnterKeyRule =
EnterKeyRule
.Default,
100
Optional<
EnterKeyRule
> defaultEnterKeyRule = default,
106
var
newDefaultEnterKeyRule = defaultEnterKeyRule.HasValue ? defaultEnterKeyRule.Value : DefaultEnterKeyRule;
149
public CompletionRules WithDefaultEnterKeyRule(
EnterKeyRule
defaultEnterKeyRule)
167
defaultEnterKeyRule:
EnterKeyRule
.Default,
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
31
enterKeyRule:
EnterKeyRule
.Never);
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
89
private static readonly CompletionItemRules s_rules = CompletionItemRules.Create(enterKeyRule:
EnterKeyRule
.Never);
Completion\Providers\Scripting\AbstractLoadDirectiveCompletionProvider.cs (1)
18
enterKeyRule:
EnterKeyRule
.Never,
Completion\Providers\Scripting\AbstractReferenceDirectiveCompletionProvider.cs (1)
21
enterKeyRule:
EnterKeyRule
.Never,
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\Options\CompletionOptionsStorage.cs (2)
48
public static readonly PerLanguageOption2<
EnterKeyRule
> EnterKeyBehavior = new("dotnet_return_key_completion_behavior", CompletionOptions.Default.EnterKeyBehavior, serializer: EditorConfigValueSerializer.CreateSerializerForEnum<
EnterKeyRule
>(), group: s_completionOptionGroup);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Options\AutomationObject\AutomationObject.Completion.cs (2)
38
set { SetOption(CompletionOptionsStorage.EnterKeyBehavior, (
EnterKeyRule
)value); }
44
set { SetOption(CompletionOptionsStorage.EnterKeyBehavior, (
EnterKeyRule
)value); }
Roslyn.VisualStudio.Next.UnitTests (8)
UnifiedSettings\UnifiedSettingsTests.cs (8)
97
customDefaultValue:
EnterKeyRule
.Never,
99
enumValues: [
EnterKeyRule
.Never,
EnterKeyRule
.AfterFullyTypedWord,
EnterKeyRule
.Always],
209
customDefaultValue:
EnterKeyRule
.Always,
211
enumValues: [
EnterKeyRule
.Never,
EnterKeyRule
.AfterFullyTypedWord,
EnterKeyRule
.Always],