-
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
Convert SymbolSearchOptions to editorconfig options #74378
Conversation
70d8272
to
728a2c9
Compare
src/Features/Core/Portable/AddMissingReference/AbstractAddMissingReferenceCodeFixProvider.cs
Show resolved
Hide resolved
src/Features/Core/Portable/AddPackage/AbstractAddPackageCodeFixProvider.cs
Show resolved
Hide resolved
@@ -46,31 +33,35 @@ internal abstract partial class AbstractAddPackageCodeFixProvider : CodeFixProvi | |||
|
|||
var workspaceServices = document.Project.Solution.Services; | |||
|
|||
var symbolSearchService = _symbolSearchService ?? workspaceServices.GetService<ISymbolSearchService>(); | |||
var installerService = _packageInstallerService ?? workspaceServices.GetService<IPackageInstallerService>(); | |||
if (workspaceServices.GetService<ISymbolSearchService>() is not { } symbolSearchService || |
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.
fwiw, i don't like not { } name
to mix the retrival and null check. i'd prefer a distinct null check step.
IPackageInstallerService packageInstallerService = null, | ||
ISymbolSearchService symbolSearchService = null) | ||
: base(packageInstallerService, symbolSearchService) | ||
protected AbstractAddSpecificPackageCodeFixProvider() |
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.
feeel free to remove.
|
||
internal static class SymbolSearchOptionsStorage | ||
{ | ||
private static readonly OptionGroup s_optionGroup = new(name: "symbol_search", description: FeaturesResources.Symbol_search); |
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.
maybe dotnet_symbol_search? what's the namign we're generally using for these groups?
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.
"dotnet" is part of the option name. It ends up as dotnet.symbolSearch.searchReferenceAssemblies
in VS Code after the transformations we do.
Changes
dotnet_search_reference_assemblies
to a supported editorconfig option (used by VS Code) anddotnet_unsupported_search_nuget_packages
to an unsupported one.SymbolSearchOptions
were the last options onCodeActionOptions
. Removing the former allows us to remove the latter.