Show static members of matching types in completion#52163
Show static members of matching types in completion#52163sharwell merged 6 commits intodotnet:mainfrom
Conversation
...CSharp/Portable/Completion/CompletionProviders/EnumAndCompletionListTagCompletionProvider.cs
Outdated
Show resolved
Hide resolved
...CSharp/Portable/Completion/CompletionProviders/EnumAndCompletionListTagCompletionProvider.cs
Outdated
Show resolved
Hide resolved
...CSharp/Portable/Completion/CompletionProviders/EnumAndCompletionListTagCompletionProvider.cs
Outdated
Show resolved
Hide resolved
...CSharp/Portable/Completion/CompletionProviders/EnumAndCompletionListTagCompletionProvider.cs
Show resolved
Hide resolved
...CSharp/Portable/Completion/CompletionProviders/EnumAndCompletionListTagCompletionProvider.cs
Show resolved
Hide resolved
heaths
left a comment
There was a problem hiding this comment.
Thank you! This will be great for the many "extensible enums" we have in the Azure SDKs!
...CSharpTest/Completion/CompletionProviders/EnumAndCompletionListTagCompletionProviderTests.cs
Show resolved
Hide resolved
...CSharp/Portable/Completion/CompletionProviders/EnumAndCompletionListTagCompletionProvider.cs
Show resolved
Hide resolved
src/EditorFeatures/Test2/IntelliSense/CSharpCompletionCommandHandlerTests.vb
Outdated
Show resolved
Hide resolved
CyrusNajmabadi
left a comment
There was a problem hiding this comment.
need clarification on potential behavioral change and if the new behavior is desirable.
ad1525d to
bf59b6c
Compare
There was a problem hiding this comment.
Does it work with top level statement?
There was a problem hiding this comment.
➡️ Yes, at least for the case of typing this:
int.Parse(empty)
|
Experimentation revealed a whole bunch of cases where it's a problem to automatically show the completion list. For the new cases, will modify this to only show the completion list after a character is typed. |
bf59b6c to
0d2372a
Compare
35346b2 to
f604235
Compare
f604235 to
b252b30
Compare
Would this work as designed if someone were to force the completion list using, for example (bindings vary), Ctrl+Space? I.e. the completion list would show, but would it initially show/have selected one of these well-known possible values? |
|
@heaths Yes, explicit Ctrl+Space will bring up completion with these items included. |
Included, or selected by default. E.g. in the case of enums, the enum is selected automatically after the completion list is filled (seems to be a very short delay): Just trying to understand the expectation here. The hope was that these work like enums, though I can imagine some of the issues you might've hit above, and appreciate having to workaround that to maintain development productivity and consistency. |
|
@heaths They will be included, but do not influence the selection algorithm. Depending on other factors, an element from this collection may or may not be selected by default. |

Closes #28603