-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract name recommendation logic into a separate type #64981
Conversation
c488c89
to
4bb6117
Compare
[Shared] | ||
internal partial class DeclarationNameCompletionProvider : LSPCompletionProvider | ||
{ | ||
private ImmutableArray<DeclarationNameRecommender> Recommenders { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readonly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already a readonly property
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d'oh!
description: CSharpFeaturesResources.Suggested_name.ToSymbolDisplayParts()); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this all a move? did anything hange?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The only change (except simply moving code around) is extracting code into methods. I intentionally excluded any real change to make review of the next PR easier.
using Microsoft.CodeAnalysis.Shared.Extensions; | ||
using static Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles.SymbolSpecification; | ||
|
||
namespace Microsoft.CodeAnalysis.CSharp.Completion.Providers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very confused why github didn't pick upt he rename. is this substantively chnaged at all?
...Portable/Completion/CompletionProviders/DeclarationName/DeclarationNameCompletionProvider.cs
Outdated
Show resolved
Hide resolved
0e2060f
to
19a0f5f
Compare
19a0f5f
to
c7b399f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to trust you didn't change anything
c7b399f
to
7e470ce
Compare
This just refactor the code w/o any change to the logic. I have extracted the code for declaration name recommendation into a separate type. The goal is to make name recommender an extension point so IntelliCode can provide suggestion as well, which will be in a follow up PR.