diff --git a/src/EditorFeatures/CSharp/EventHookup/EventHookupCommandHandler_TabKeyCommand.cs b/src/EditorFeatures/CSharp/EventHookup/EventHookupCommandHandler_TabKeyCommand.cs index a535d18191974..122e6f12d5da8 100644 --- a/src/EditorFeatures/CSharp/EventHookup/EventHookupCommandHandler_TabKeyCommand.cs +++ b/src/EditorFeatures/CSharp/EventHookup/EventHookupCommandHandler_TabKeyCommand.cs @@ -17,6 +17,7 @@ using Microsoft.CodeAnalysis.Editing; using Microsoft.CodeAnalysis.Editor.Shared.Extensions; using Microsoft.CodeAnalysis.Editor.Shared.Options; +using Microsoft.CodeAnalysis.EventHookup; using Microsoft.CodeAnalysis.Formatting; using Microsoft.CodeAnalysis.Internal.Log; using Microsoft.CodeAnalysis.LanguageService; @@ -39,7 +40,7 @@ internal partial class EventHookupCommandHandler : IChainedCommandHandler Enabled = new("SplitStringLiteralOptions_Enabled", defaultValue: true); + public static Option2 Enabled = new("csharp_split_string_literal_on_return", defaultValue: true); } diff --git a/src/EditorFeatures/CSharpTest/InlineDiagnostics/InlineDiagnosticsTaggerProviderTests.cs b/src/EditorFeatures/CSharpTest/InlineDiagnostics/InlineDiagnosticsTaggerProviderTests.cs index 0f5a23e5520e4..162385113ab67 100644 --- a/src/EditorFeatures/CSharpTest/InlineDiagnostics/InlineDiagnosticsTaggerProviderTests.cs +++ b/src/EditorFeatures/CSharpTest/InlineDiagnostics/InlineDiagnosticsTaggerProviderTests.cs @@ -57,7 +57,7 @@ private static async Task>> GetTag private static async Task>> GetTagSpansAsync(TestWorkspace workspace) { - workspace.GlobalOptions.SetGlobalOption(InlineDiagnosticsOptions.EnableInlineDiagnostics, LanguageNames.CSharp, true); + workspace.GlobalOptions.SetGlobalOption(InlineDiagnosticsOptionsStorage.EnableInlineDiagnostics, LanguageNames.CSharp, true); return (await TestDiagnosticTagProducer.GetDiagnosticsAndErrorSpans(workspace)).Item2; } } diff --git a/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs b/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs index 2c35211e39d15..fae343d2d9571 100644 --- a/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs +++ b/src/EditorFeatures/CSharpTest/Squiggles/ErrorSquiggleProducerTests.cs @@ -81,7 +81,7 @@ void Test() "; using var workspace = TestWorkspace.Create(workspaceXml); - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); var spans = (await TestDiagnosticTagProducer.GetDiagnosticsAndErrorSpans(workspace)).Item2; @@ -117,7 +117,7 @@ void Test() using var workspace = TestWorkspace.Create(workspaceXml, composition: SquiggleUtilities.CompositionWithSolutionCrawler); var language = workspace.Projects.Single().Language; - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); workspace.GlobalOptions.SetGlobalOption( CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, language, @@ -212,7 +212,7 @@ public async Task SemanticErrorReported(bool pull) { using var workspace = TestWorkspace.CreateCSharp("class C : Bar { }", composition: SquiggleUtilities.CompositionWithSolutionCrawler); - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); var spans = await TestDiagnosticTagProducer.GetDiagnosticsAndErrorSpans(workspace); @@ -237,7 +237,7 @@ public async Task SemanticErrorReported(bool pull) public async Task TestNoErrorsAfterDocumentRemoved(bool pull) { using var workspace = TestWorkspace.CreateCSharp("class"); - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); using var wrapper = new DiagnosticTaggerWrapper(workspace); @@ -267,7 +267,7 @@ public async Task TestNoErrorsAfterDocumentRemoved(bool pull) public async Task TestNoErrorsAfterProjectRemoved(bool pull) { using var workspace = TestWorkspace.CreateCSharp("class"); - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); using var wrapper = new DiagnosticTaggerWrapper(workspace); @@ -313,7 +313,7 @@ class Test "; using var workspace = TestWorkspace.Create(workspaceXml, composition: s_mockComposition); - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); var document = workspace.Documents.First(); @@ -357,7 +357,7 @@ class Test "; using var workspace = TestWorkspace.Create(workspaceXml, composition: s_mockComposition); - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); var document = workspace.Documents.First(); @@ -401,7 +401,7 @@ private static async Task>> GetTagSpansInSour private static async Task>> GetTagSpansAsync(TestWorkspace workspace, bool pull) { - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); return (await TestDiagnosticTagProducer.GetDiagnosticsAndErrorSpans(workspace)).Item2; } diff --git a/src/EditorFeatures/CSharpTest/SuggestionTags/SuggestionTagProducerTests.cs b/src/EditorFeatures/CSharpTest/SuggestionTags/SuggestionTagProducerTests.cs index 3612562abf6de..307b970771a09 100644 --- a/src/EditorFeatures/CSharpTest/SuggestionTags/SuggestionTagProducerTests.cs +++ b/src/EditorFeatures/CSharpTest/SuggestionTags/SuggestionTagProducerTests.cs @@ -44,7 +44,7 @@ void M() { string content, bool pull) { using var workspace = TestWorkspace.CreateCSharp(content); - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); var analyzerMap = new Dictionary>() { diff --git a/src/EditorFeatures/Core.Cocoa/Options/VisualStudioMacOptionsStorage.cs b/src/EditorFeatures/Core.Cocoa/Options/VisualStudioMacOptionsStorage.cs index 81e31977d9343..03a46b1959741 100644 --- a/src/EditorFeatures/Core.Cocoa/Options/VisualStudioMacOptionsStorage.cs +++ b/src/EditorFeatures/Core.Cocoa/Options/VisualStudioMacOptionsStorage.cs @@ -56,22 +56,22 @@ public string GetName(string? language) /// public static readonly IReadOnlyDictionary PersistedOptionsWithLegacyPropertyNames = new Dictionary() { - {"BraceCompletionOptions_AutoFormattingOnCloseBrace", new PropertyName("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Close Brace")}, - {"FormattingOptions_AutoFormattingOnReturn", new PropertyName("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Return")}, - {"FormattingOptions_AutoFormattingOnSemicolon", new PropertyName("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Semicolon")}, - {"FormattingOptions_AutoFormattingOnTyping", new PropertyName("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Typing")}, - {"FormattingOptions_FormatOnPaste", new PropertyName("TextEditor.%LANGUAGE%.SpeciAddImportsOnPaste2fic.FormatOnPaste")}, + {"csharp_format_on_close_brace", new PropertyName("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Close Brace")}, + {"csharp_format_on_return", new PropertyName("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Return")}, + {"csharp_format_on_semicolon", new PropertyName("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Semicolon")}, + {"csharp_format_on_typing", new PropertyName("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Typing")}, + {"dotnet_format_on_paste", new PropertyName("TextEditor.%LANGUAGE%.SpeciAddImportsOnPaste2fic.FormatOnPaste")}, {"dotnet_sort_system_directives_first", new PropertyName("TextEditor.%LANGUAGE%.Specific.PlaceSystemNamespaceFirst")}, {"dotnet_separate_import_directive_groups", new PropertyName("TextEditor.%LANGUAGE%.Specific.SeparateImportDirectiveGroups")}, - {"QuickInfoOptions_ShowRemarksInQuickInfo", new PropertyName("TextEditor.%LANGUAGE%.Specific.ShowRemarks")}, + {"dotnet_show_remarks_in_quick_info", new PropertyName("TextEditor.%LANGUAGE%.Specific.ShowRemarks")}, {"dotnet_add_imports_on_paste", new PropertyName("TextEditor.%LANGUAGE%.Specific.AddImportsOnPaste2")}, - {"CompletionOptions_ShowItemsFromUnimportedNamespaces", new PropertyName("TextEditor.%LANGUAGE%.Specific.ShowItemsFromUnimportedNamespaces")}, - {"CompletionOptions_TriggerOnDeletion", new PropertyName("TextEditor.%LANGUAGE%.Specific.TriggerOnDeletion")}, - {"CompletionOptions_TriggerOnTypingLetters", new PropertyName("TextEditor.%LANGUAGE%.Specific.TriggerOnTypingLetters")}, - {"CompletionOptions_ShowCompletionItemFilters", new PropertyName("TextEditor.%LANGUAGE%.Specific.ShowCompletionItemFilters")}, - {"SolutionCrawlerOptionsStorage_BackgroundAnalysisScopeOption", new PropertyName("TextEditor.%LANGUAGE%.Specific.BackgroundAnalysisScopeOption")}, - {"SolutionCrawlerOptionsStorage_CompilerDiagnosticsScopeOption", new PropertyName("TextEditor.%LANGUAGE%.Specific.CompilerDiagnosticsScopeOption")}, - {"SymbolSearchOptions_SuggestForTypesInNuGetPackages", new PropertyName("TextEditor.%LANGUAGE%.Specific.SuggestForTypesInNuGetPackages")}, + {"dotnet_show_completion_items_from_unimported_namespaces", new PropertyName("TextEditor.%LANGUAGE%.Specific.ShowItemsFromUnimportedNamespaces")}, + {"dotnet_trigger_completion_on_deletion", new PropertyName("TextEditor.%LANGUAGE%.Specific.TriggerOnDeletion")}, + {"dotnet_trigger_completion_on_typing_letters", new PropertyName("TextEditor.%LANGUAGE%.Specific.TriggerOnTypingLetters")}, + {"dotnet_show_completion_item_filters", new PropertyName("TextEditor.%LANGUAGE%.Specific.ShowCompletionItemFilters")}, + {"dotnet_solution_crawler_background_analysis_scope", new PropertyName("TextEditor.%LANGUAGE%.Specific.BackgroundAnalysisScopeOption")}, + {"dotnet_compiler_diagnostics_scope", new PropertyName("TextEditor.%LANGUAGE%.Specific.CompilerDiagnosticsScopeOption")}, + {"dotnet_search_nuget_packages", new PropertyName("TextEditor.%LANGUAGE%.Specific.SuggestForTypesInNuGetPackages")}, {"csharp_complete_statement_on_semicolon", new PropertyName("TextEditor.AutomaticallyCompleteStatementOnSemicolon")}, }; } diff --git a/src/EditorFeatures/Core.Cocoa/Snippets/AbstractSnippetCommandHandler.cs b/src/EditorFeatures/Core.Cocoa/Snippets/AbstractSnippetCommandHandler.cs index 2d881175aabce..a030baa550126 100644 --- a/src/EditorFeatures/Core.Cocoa/Snippets/AbstractSnippetCommandHandler.cs +++ b/src/EditorFeatures/Core.Cocoa/Snippets/AbstractSnippetCommandHandler.cs @@ -10,6 +10,7 @@ using Microsoft.CodeAnalysis.LanguageService; using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; +using Microsoft.CodeAnalysis.Snippets; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.Commanding; using Microsoft.VisualStudio.Text; @@ -290,7 +291,7 @@ protected bool TryHandleTypedSnippet(ITextView textView, ITextBuffer subjectBuff protected bool AreSnippetsEnabled(EditorCommandArgs args) { - return EditorOptionsService.GlobalOptions.GetOption(InternalFeatureOnOffOptions.Snippets) && + return EditorOptionsService.GlobalOptions.GetOption(SnippetsOptionsStorage.Snippets) && // TODO (https://github.com/dotnet/roslyn/issues/5107): enable in interactive !(Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out var workspace) && workspace.Kind == WorkspaceKind.Interactive); } diff --git a/src/EditorFeatures/Core.Wpf/InlineDiagnostics/InlineDiagnosticsAdornmentManager.cs b/src/EditorFeatures/Core.Wpf/InlineDiagnostics/InlineDiagnosticsAdornmentManager.cs index 31036cc0179c3..8d7615ae36982 100644 --- a/src/EditorFeatures/Core.Wpf/InlineDiagnostics/InlineDiagnosticsAdornmentManager.cs +++ b/src/EditorFeatures/Core.Wpf/InlineDiagnostics/InlineDiagnosticsAdornmentManager.cs @@ -69,7 +69,7 @@ private void TextView_ViewportWidthChanged(object sender, EventArgs e) return; } - var option = _globalOptions.GetOption(InlineDiagnosticsOptions.Location, document.Project.Language); + var option = _globalOptions.GetOption(InlineDiagnosticsOptionsStorage.Location, document.Project.Language); if (option == InlineDiagnosticsLocations.PlacedAtEndOfEditor) { var normalizedCollectionSpan = new NormalizedSnapshotSpanCollection(TextView.TextViewLines.FormattedSpan); diff --git a/src/EditorFeatures/Core.Wpf/InlineDiagnostics/InlineDiagnosticsTaggerProvider.cs b/src/EditorFeatures/Core.Wpf/InlineDiagnostics/InlineDiagnosticsTaggerProvider.cs index 292d5848de957..3f9d9182a79a9 100644 --- a/src/EditorFeatures/Core.Wpf/InlineDiagnostics/InlineDiagnosticsTaggerProvider.cs +++ b/src/EditorFeatures/Core.Wpf/InlineDiagnostics/InlineDiagnosticsTaggerProvider.cs @@ -35,8 +35,8 @@ internal sealed class InlineDiagnosticsTaggerProvider : AbstractDiagnosticsAdorn private readonly IClassificationFormatMapService _classificationFormatMapService; private readonly IClassificationTypeRegistryService _classificationTypeRegistryService; - protected sealed override ImmutableArray Options { get; } = ImmutableArray.Create(InlineDiagnosticsOptions.EnableInlineDiagnostics); - protected sealed override ImmutableArray FeatureOptions { get; } = ImmutableArray.Create(InlineDiagnosticsOptions.Location); + protected sealed override ImmutableArray Options { get; } = ImmutableArray.Create(InlineDiagnosticsOptionsStorage.EnableInlineDiagnostics); + protected sealed override ImmutableArray FeatureOptions { get; } = ImmutableArray.Create(InlineDiagnosticsOptionsStorage.Location); [ImportingConstructor] [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] @@ -91,7 +91,7 @@ diagnostic.Severity is DiagnosticSeverity.Warning or DiagnosticSeverity.Error && return null; } - var locationOption = GlobalOptions.GetOption(InlineDiagnosticsOptions.Location, project.Language); + var locationOption = GlobalOptions.GetOption(InlineDiagnosticsOptionsStorage.Location, project.Language); var navigateService = workspace.Services.GetRequiredService(); return new InlineDiagnosticsTag(errorType, diagnostic, _editorFormatMap, _classificationFormatMapService, _classificationTypeRegistryService, locationOption, navigateService); diff --git a/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsKeyProcessorProvider.cs b/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsKeyProcessorProvider.cs index 23cffcfdf0fc2..1abbca29a0f02 100644 --- a/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsKeyProcessorProvider.cs +++ b/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsKeyProcessorProvider.cs @@ -115,7 +115,7 @@ private void Toggle(bool on) // We can only enter the on-state if the user has the chord feature enabled. We can always enter the // off state though. - on = on && _globalOptions.GetOption(InlineHintsViewOptions.DisplayAllHintsWhilePressingAltF1); + on = on && _globalOptions.GetOption(InlineHintsViewOptionsStorage.DisplayAllHintsWhilePressingAltF1); _globalOptions.RefreshOption(new OptionKey2(InlineHintsGlobalStateOption.DisplayAllOverride), on); } } diff --git a/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsTagger.cs b/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsTagger.cs index 429562ee1528e..d4fc20e64596f 100644 --- a/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsTagger.cs +++ b/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsTagger.cs @@ -167,7 +167,7 @@ public IEnumerable> GetTags(NormalizedSnapshotSp } var document = snapshot.GetOpenDocumentInCurrentContextWithChanges(); - var classify = document != null && _taggerProvider.EditorOptionsService.GlobalOptions.GetOption(InlineHintsViewOptions.ColorHints, document.Project.Language); + var classify = document != null && _taggerProvider.EditorOptionsService.GlobalOptions.GetOption(InlineHintsViewOptionsStorage.ColorHints, document.Project.Language); var selectedSpans = new List>(); for (var i = 0; i < _cache.Count; i++) diff --git a/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsViewOptions.cs b/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsViewOptionsStorage.cs similarity index 69% rename from src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsViewOptions.cs rename to src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsViewOptionsStorage.cs index 0cbbf48bb8d37..c4188e0c17927 100644 --- a/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsViewOptions.cs +++ b/src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsViewOptionsStorage.cs @@ -6,12 +6,12 @@ namespace Microsoft.CodeAnalysis.Editor.InlineHints { - internal sealed class InlineHintsViewOptions + internal sealed class InlineHintsViewOptionsStorage { public static readonly Option2 DisplayAllHintsWhilePressingAltF1 = new( - "InlineHintsOptions_DisplayAllHintsWhilePressingAltF1", defaultValue: true); + "dotnet_display_inline_hints_while_pressing_alt_f1", defaultValue: true); public static readonly PerLanguageOption2 ColorHints = new( - "InlineHintsOptions_ColorHints", defaultValue: true); + "dotnet_colorize_inline_hints", defaultValue: true); } } diff --git a/src/EditorFeatures/Core.Wpf/InlineRename/UI/Adornment/RenameFlyoutViewModel.cs b/src/EditorFeatures/Core.Wpf/InlineRename/UI/Adornment/RenameFlyoutViewModel.cs index a71799b676ae5..7fab304af236e 100644 --- a/src/EditorFeatures/Core.Wpf/InlineRename/UI/Adornment/RenameFlyoutViewModel.cs +++ b/src/EditorFeatures/Core.Wpf/InlineRename/UI/Adornment/RenameFlyoutViewModel.cs @@ -165,12 +165,12 @@ public bool RenameOverloadsFlag public bool IsCollapsed { - get => _globalOptionService.GetOption(InlineRenameUIOptions.CollapseUI); + get => _globalOptionService.GetOption(InlineRenameUIOptionsStorage.CollapseUI); set { if (value != IsCollapsed) { - _globalOptionService.SetGlobalOption(InlineRenameUIOptions.CollapseUI, value); + _globalOptionService.SetGlobalOption(InlineRenameUIOptionsStorage.CollapseUI, value); NotifyPropertyChanged(nameof(IsCollapsed)); NotifyPropertyChanged(nameof(IsExpanded)); } diff --git a/src/EditorFeatures/Core.Wpf/InlineRename/UI/InlineRenameAdornmentManager.cs b/src/EditorFeatures/Core.Wpf/InlineRename/UI/InlineRenameAdornmentManager.cs index 521ea12a83a9f..778ed133f5b99 100644 --- a/src/EditorFeatures/Core.Wpf/InlineRename/UI/InlineRenameAdornmentManager.cs +++ b/src/EditorFeatures/Core.Wpf/InlineRename/UI/InlineRenameAdornmentManager.cs @@ -105,7 +105,7 @@ private void UpdateAdornments() return null; } - var useInlineAdornment = _globalOptionService.GetOption(InlineRenameUIOptions.UseInlineAdornment); + var useInlineAdornment = _globalOptionService.GetOption(InlineRenameUIOptionsStorage.UseInlineAdornment); if (useInlineAdornment) { if (!_textView.HasAggregateFocus) diff --git a/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs b/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs index 9382a614d08ce..37b5042e527e9 100644 --- a/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs +++ b/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs @@ -98,7 +98,7 @@ public SuggestedActionsSourceProvider( // if user has explicitly set the option defer to that. otherwise, we are enabled by default (unless our // A/B escape hatch disables us). - var asyncEnabled = _globalOptions.GetOption(SuggestionsOptions.Asynchronous) is bool b ? b : !_globalOptions.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag); + var asyncEnabled = _globalOptions.GetOption(SuggestionsOptionsStorage.Asynchronous) is bool b ? b : !_globalOptions.GetOption(SuggestionsOptionsStorage.AsynchronousQuickActionsDisableFeatureFlag); return asyncEnabled ? new AsyncSuggestedActionsSource(_threadingContext, _globalOptions, this, textView, textBuffer, _suggestedActionCategoryRegistry) diff --git a/src/EditorFeatures/Core/AutomaticCompletion/AbstractAutomaticLineEnderCommandHandler.cs b/src/EditorFeatures/Core/AutomaticCompletion/AbstractAutomaticLineEnderCommandHandler.cs index 88356af53664b..11c427dd46f4b 100644 --- a/src/EditorFeatures/Core/AutomaticCompletion/AbstractAutomaticLineEnderCommandHandler.cs +++ b/src/EditorFeatures/Core/AutomaticCompletion/AbstractAutomaticLineEnderCommandHandler.cs @@ -5,9 +5,7 @@ using System; using System.Collections.Generic; using System.Threading; -using Microsoft.CodeAnalysis.Editor; using Microsoft.CodeAnalysis.Editor.Shared.Extensions; -using Microsoft.CodeAnalysis.Editor.Shared.Options; using Microsoft.CodeAnalysis.Formatting; using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; @@ -17,7 +15,6 @@ using Microsoft.VisualStudio.Text.Editor; using Microsoft.VisualStudio.Text.Editor.Commanding.Commands; using Microsoft.VisualStudio.Text.Operations; -using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.AutomaticCompletion { @@ -92,7 +89,7 @@ public void ExecuteCommand(AutomaticLineEnderCommandArgs args, Action nextHandle } // feature off - if (!EditorOptionsService.GlobalOptions.GetOption(InternalFeatureOnOffOptions.AutomaticLineEnder)) + if (!EditorOptionsService.GlobalOptions.GetOption(AutomaticLineEnderOptionsStorage.AutomaticLineEnder)) { NextAction(operations, nextHandler); return; diff --git a/src/EditorFeatures/Core/AutomaticCompletion/AutomaticLineEnderOptionsStorage.cs b/src/EditorFeatures/Core/AutomaticCompletion/AutomaticLineEnderOptionsStorage.cs new file mode 100644 index 0000000000000..07d195560a047 --- /dev/null +++ b/src/EditorFeatures/Core/AutomaticCompletion/AutomaticLineEnderOptionsStorage.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.CodeAnalysis.Options; + +namespace Microsoft.CodeAnalysis.AutomaticCompletion +{ + internal static class AutomaticLineEnderOptionsStorage + { + public static readonly Option2 AutomaticLineEnder = new("dotnet_enable_automatic_line_ender", defaultValue: true); + } +} diff --git a/src/EditorFeatures/Core/BraceMatching/BraceHighlightingViewTaggerProvider.cs b/src/EditorFeatures/Core/BraceMatching/BraceHighlightingViewTaggerProvider.cs index 4864cd0801760..7c9c3e589f65b 100644 --- a/src/EditorFeatures/Core/BraceMatching/BraceHighlightingViewTaggerProvider.cs +++ b/src/EditorFeatures/Core/BraceMatching/BraceHighlightingViewTaggerProvider.cs @@ -35,7 +35,7 @@ internal sealed class BraceHighlightingViewTaggerProvider : AsynchronousViewTagg { private readonly IBraceMatchingService _braceMatcherService; - protected sealed override ImmutableArray Options { get; } = ImmutableArray.Create(InternalFeatureOnOffOptions.BraceMatching); + protected sealed override ImmutableArray Options { get; } = ImmutableArray.Create(BraceMatchingOptionsStorage.BraceMatching); [ImportingConstructor] [SuppressMessage("RoslynDiagnosticsReliability", "RS0033:Importing constructor should be [Obsolete]", Justification = "Used in test code: https://github.com/dotnet/roslyn/issues/42814")] diff --git a/src/EditorFeatures/Core/BraceMatching/BraceMatchingOptionsStorage.cs b/src/EditorFeatures/Core/BraceMatching/BraceMatchingOptionsStorage.cs new file mode 100644 index 0000000000000..4acf0702fe187 --- /dev/null +++ b/src/EditorFeatures/Core/BraceMatching/BraceMatchingOptionsStorage.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.CodeAnalysis.Options; + +namespace Microsoft.CodeAnalysis.BraceMatching +{ + internal static class BraceMatchingOptionsStorage + { + public static readonly Option2 BraceMatching = new("dotnet_enable_brace_matching", defaultValue: true); + } +} diff --git a/src/EditorFeatures/Core/Classification/Semantic/AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs b/src/EditorFeatures/Core/Classification/Semantic/AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs index 1ec853cf07491..3d7f549f51429 100644 --- a/src/EditorFeatures/Core/Classification/Semantic/AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs +++ b/src/EditorFeatures/Core/Classification/Semantic/AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs @@ -9,7 +9,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Editor.Shared.Extensions; -using Microsoft.CodeAnalysis.Editor.Shared.Options; using Microsoft.CodeAnalysis.Editor.Shared.Tagging; using Microsoft.CodeAnalysis.Editor.Shared.Utilities; using Microsoft.CodeAnalysis.Editor.Tagging; @@ -21,7 +20,6 @@ using Microsoft.VisualStudio.Text; using Microsoft.VisualStudio.Text.Editor; using Microsoft.VisualStudio.Text.Tagging; -using Newtonsoft.Json; using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.Classification @@ -40,7 +38,7 @@ internal abstract class AbstractSemanticOrEmbeddedClassificationViewTaggerProvid // We want to track text changes so that we can try to only reclassify a method body if // all edits were contained within one. protected sealed override TaggerTextChangeBehavior TextChangeBehavior => TaggerTextChangeBehavior.TrackTextChanges; - protected sealed override ImmutableArray Options { get; } = ImmutableArray.Create(InternalFeatureOnOffOptions.SemanticColorizer); + protected sealed override ImmutableArray Options { get; } = ImmutableArray.Create(SemanticColorizerOptionsStorage.SemanticColorizer); protected AbstractSemanticOrEmbeddedClassificationViewTaggerProvider( IThreadingContext threadingContext, @@ -118,7 +116,7 @@ protected sealed override Task ProduceTagsAsync( return Task.CompletedTask; // If the LSP semantic tokens feature flag is enabled, return nothing to prevent conflicts. - var isLspSemanticTokensEnabled = _globalOptions.GetOption(LspOptions.LspSemanticTokensFeatureFlag); + var isLspSemanticTokensEnabled = _globalOptions.GetOption(LspOptionsStorage.LspSemanticTokensFeatureFlag); if (isLspSemanticTokensEnabled) return Task.CompletedTask; diff --git a/src/EditorFeatures/Core/Classification/Semantic/SemanticColorizerOptionsStorage.cs b/src/EditorFeatures/Core/Classification/Semantic/SemanticColorizerOptionsStorage.cs new file mode 100644 index 0000000000000..40e1f43405d86 --- /dev/null +++ b/src/EditorFeatures/Core/Classification/Semantic/SemanticColorizerOptionsStorage.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.CodeAnalysis.Options; + +namespace Microsoft.CodeAnalysis.Classification +{ + internal static class SemanticColorizerOptionsStorage + { + public static readonly Option2 SemanticColorizer = new("dotnet_enable_semantic_colorizer", defaultValue: true); + } +} diff --git a/src/EditorFeatures/Core/Classification/Syntactic/SyntacticClassificationTaggerProvider.cs b/src/EditorFeatures/Core/Classification/Syntactic/SyntacticClassificationTaggerProvider.cs index 17344a7bb3f35..3ed43c4cd9424 100644 --- a/src/EditorFeatures/Core/Classification/Syntactic/SyntacticClassificationTaggerProvider.cs +++ b/src/EditorFeatures/Core/Classification/Syntactic/SyntacticClassificationTaggerProvider.cs @@ -7,7 +7,6 @@ using System.Runtime.CompilerServices; using Microsoft.CodeAnalysis.Editor; using Microsoft.CodeAnalysis.Editor.Shared.Extensions; -using Microsoft.CodeAnalysis.Editor.Shared.Options; using Microsoft.CodeAnalysis.Editor.Shared.Tagging; using Microsoft.CodeAnalysis.Editor.Shared.Utilities; using Microsoft.CodeAnalysis.Editor.Tagging; @@ -50,7 +49,7 @@ public SyntacticClassificationTaggerProvider( public ITagger? CreateTagger(ITextBuffer buffer) where T : ITag { _threadingContext.ThrowIfNotOnUIThread(); - if (!_globalOptions.GetOption(InternalFeatureOnOffOptions.SyntacticColorizer)) + if (!_globalOptions.GetOption(SyntacticColorizerOptionsStorage.SyntacticColorizer)) return null; if (!_tagComputers.TryGetValue(buffer, out var tagComputer)) diff --git a/src/EditorFeatures/Core/Classification/Syntactic/SyntacticColorizerOptionsStorage.cs b/src/EditorFeatures/Core/Classification/Syntactic/SyntacticColorizerOptionsStorage.cs new file mode 100644 index 0000000000000..b30c19bc3e7a8 --- /dev/null +++ b/src/EditorFeatures/Core/Classification/Syntactic/SyntacticColorizerOptionsStorage.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.CodeAnalysis.Options; + +namespace Microsoft.CodeAnalysis.Classification +{ + internal static class SyntacticColorizerOptionsStorage + { + public static readonly Option2 SyntacticColorizer = new("dotnet_enable_syntactic_colorizer", defaultValue: true); + } +} diff --git a/src/EditorFeatures/Core/Diagnostics/AbstractPushOrPullDiagnosticsTaggerProvider.cs b/src/EditorFeatures/Core/Diagnostics/AbstractPushOrPullDiagnosticsTaggerProvider.cs index b0094aafd4920..e6109cfd419eb 100644 --- a/src/EditorFeatures/Core/Diagnostics/AbstractPushOrPullDiagnosticsTaggerProvider.cs +++ b/src/EditorFeatures/Core/Diagnostics/AbstractPushOrPullDiagnosticsTaggerProvider.cs @@ -16,10 +16,10 @@ namespace Microsoft.CodeAnalysis.Diagnostics; -internal static class DiagnosticTaggingOptions +internal static class DiagnosticTaggingOptionsStorage { public static readonly Option2 PullDiagnosticTagging = new( - "DiagnosticTaggingOptions_PullDiagnosticTagging", defaultValue: true); + "dotnet_pull_diagnostic_tagging", defaultValue: true); } /// @@ -59,7 +59,7 @@ protected AbstractPushOrPullDiagnosticsTaggerProvider( // Put another way, if DiagnosticMode is 'Push' (non-LSP), then this type does all the work, choosing tagging // pull/push for all features. If DiagnosticMode is 'pull' (LSP), then LSP takes over classification, // squiggles, and suggestions, while we still handle inline-diagnostics. - if (globalOptions.GetOption(DiagnosticTaggingOptions.PullDiagnosticTagging)) + if (globalOptions.GetOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging)) { _underlyingTaggerProvider = new PullDiagnosticsTaggerProvider( this, threadingContext, diagnosticService, analyzerService, globalOptions, visibilityTracker, listener); diff --git a/src/EditorFeatures/Core/Diagnostics/DiagnosticsClassificationTaggerProvider.cs b/src/EditorFeatures/Core/Diagnostics/DiagnosticsClassificationTaggerProvider.cs index 4f456db4bd76b..602ab6dd6a479 100644 --- a/src/EditorFeatures/Core/Diagnostics/DiagnosticsClassificationTaggerProvider.cs +++ b/src/EditorFeatures/Core/Diagnostics/DiagnosticsClassificationTaggerProvider.cs @@ -37,7 +37,7 @@ internal sealed partial class DiagnosticsClassificationTaggerProvider : Abstract private readonly ClassificationTag _classificationTag; private readonly EditorOptionsService _editorOptionsService; - protected sealed override ImmutableArray Options { get; } = ImmutableArray.Create(InternalFeatureOnOffOptions.Classification); + protected sealed override ImmutableArray Options { get; } = ImmutableArray.Create(DiagnosticsOptionsStorage.Classification); [ImportingConstructor] [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] diff --git a/src/EditorFeatures/Core/Diagnostics/DiagnosticsOptionsStorage.cs b/src/EditorFeatures/Core/Diagnostics/DiagnosticsOptionsStorage.cs new file mode 100644 index 0000000000000..2b712fcd47133 --- /dev/null +++ b/src/EditorFeatures/Core/Diagnostics/DiagnosticsOptionsStorage.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.CodeAnalysis.Options; + +namespace Microsoft.CodeAnalysis.Diagnostics +{ + internal static class DiagnosticsOptionsStorage + { + public static readonly Option2 Classification = new("dotnet_enable_classification", defaultValue: true); + + public static readonly Option2 Squiggles = new("dotnet_enable_squiggles", defaultValue: true); + } +} diff --git a/src/EditorFeatures/Core/Diagnostics/DiagnosticsSquiggleTaggerProvider.cs b/src/EditorFeatures/Core/Diagnostics/DiagnosticsSquiggleTaggerProvider.cs index 2d7ef33678da2..028f7d5643cec 100644 --- a/src/EditorFeatures/Core/Diagnostics/DiagnosticsSquiggleTaggerProvider.cs +++ b/src/EditorFeatures/Core/Diagnostics/DiagnosticsSquiggleTaggerProvider.cs @@ -28,7 +28,7 @@ namespace Microsoft.CodeAnalysis.Diagnostics [TagType(typeof(IErrorTag))] internal sealed partial class DiagnosticsSquiggleTaggerProvider : AbstractDiagnosticsAdornmentTaggerProvider { - protected override ImmutableArray Options { get; } = ImmutableArray.Create(InternalFeatureOnOffOptions.Squiggles); + protected override ImmutableArray Options { get; } = ImmutableArray.Create(DiagnosticsOptionsStorage.Squiggles); [ImportingConstructor] [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] diff --git a/src/EditorFeatures/Core/Diagnostics/DiagnosticsSuggestionTaggerProvider.cs b/src/EditorFeatures/Core/Diagnostics/DiagnosticsSuggestionTaggerProvider.cs index bddf81034b661..014d8b360639a 100644 --- a/src/EditorFeatures/Core/Diagnostics/DiagnosticsSuggestionTaggerProvider.cs +++ b/src/EditorFeatures/Core/Diagnostics/DiagnosticsSuggestionTaggerProvider.cs @@ -28,7 +28,7 @@ namespace Microsoft.CodeAnalysis.Diagnostics internal sealed partial class DiagnosticsSuggestionTaggerProvider : AbstractDiagnosticsAdornmentTaggerProvider { - protected sealed override ImmutableArray Options { get; } = ImmutableArray.Create(InternalFeatureOnOffOptions.Squiggles); + protected sealed override ImmutableArray Options { get; } = ImmutableArray.Create(DiagnosticsOptionsStorage.Squiggles); [ImportingConstructor] [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] diff --git a/src/EditorFeatures/Core/EventHookup/EventHookupOptionsStorage.cs b/src/EditorFeatures/Core/EventHookup/EventHookupOptionsStorage.cs new file mode 100644 index 0000000000000..9a3d45b144495 --- /dev/null +++ b/src/EditorFeatures/Core/EventHookup/EventHookupOptionsStorage.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.CodeAnalysis.Options; + +namespace Microsoft.CodeAnalysis.EventHookup +{ + internal static class EventHookupOptionsStorage + { + public static readonly Option2 EventHookup = new("dotnet_enable_event_hook_up", defaultValue: true); + } +} diff --git a/src/EditorFeatures/Core/ExternalAccess/UnitTesting/Api/UnitTestingGlobalOptions.cs b/src/EditorFeatures/Core/ExternalAccess/UnitTesting/Api/UnitTestingGlobalOptions.cs index b5efe513b4830..94ede4b1e671a 100644 --- a/src/EditorFeatures/Core/ExternalAccess/UnitTesting/Api/UnitTestingGlobalOptions.cs +++ b/src/EditorFeatures/Core/ExternalAccess/UnitTesting/Api/UnitTestingGlobalOptions.cs @@ -23,6 +23,6 @@ public UnitTestingGlobalOptions(IGlobalOptionService globalOptions) } public bool IsServiceHubProcessCoreClr - => _globalOptions.GetOption(RemoteHostOptions.OOPCoreClrFeatureFlag); + => _globalOptions.GetOption(RemoteHostOptionsStorage.OOPCoreClrFeatureFlag); } } diff --git a/src/EditorFeatures/Core/ExternalAccess/VSTypeScript/Api/VSTypeScriptGlobalOptions.cs b/src/EditorFeatures/Core/ExternalAccess/VSTypeScript/Api/VSTypeScriptGlobalOptions.cs index 2e07016985570..12580317b2d78 100644 --- a/src/EditorFeatures/Core/ExternalAccess/VSTypeScript/Api/VSTypeScriptGlobalOptions.cs +++ b/src/EditorFeatures/Core/ExternalAccess/VSTypeScript/Api/VSTypeScriptGlobalOptions.cs @@ -25,8 +25,8 @@ public VSTypeScriptGlobalOptions(IGlobalOptionService globalOptions) public bool BlockForCompletionItems { - get => _globalOptions.GetOption(CompletionViewOptions.BlockForCompletionItems, InternalLanguageNames.TypeScript); - set => _globalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, InternalLanguageNames.TypeScript, value); + get => _globalOptions.GetOption(CompletionViewOptionsStorage.BlockForCompletionItems, InternalLanguageNames.TypeScript); + set => _globalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, InternalLanguageNames.TypeScript, value); } public void SetBackgroundAnalysisScope(bool openFilesOnly) diff --git a/src/EditorFeatures/Core/ExtractMethod/ExtractMethodPresentationOptionsStorage.cs b/src/EditorFeatures/Core/ExtractMethod/ExtractMethodPresentationOptionsStorage.cs index cfe5462982223..145d1135535a9 100644 --- a/src/EditorFeatures/Core/ExtractMethod/ExtractMethodPresentationOptionsStorage.cs +++ b/src/EditorFeatures/Core/ExtractMethod/ExtractMethodPresentationOptionsStorage.cs @@ -8,6 +8,6 @@ namespace Microsoft.CodeAnalysis.ExtractMethod { internal static class ExtractMethodPresentationOptionsStorage { - public static readonly PerLanguageOption2 AllowBestEffort = new("ExtractMethodOptions_AllowBestEffort", defaultValue: true); + public static readonly PerLanguageOption2 AllowBestEffort = new("dotnet_allow_best_effort_when_extracting_method", defaultValue: true); } } diff --git a/src/EditorFeatures/Core/Formatting/FormatCommandHandler.Paste.cs b/src/EditorFeatures/Core/Formatting/FormatCommandHandler.Paste.cs index 6cf6e63a4698b..f5a0788d9d27c 100644 --- a/src/EditorFeatures/Core/Formatting/FormatCommandHandler.Paste.cs +++ b/src/EditorFeatures/Core/Formatting/FormatCommandHandler.Paste.cs @@ -64,7 +64,7 @@ private void ExecuteCommandWorker(PasteCommandArgs args, SnapshotPoint? caretPos if (document == null) return; - if (!_globalOptions.GetOption(FormattingOptionsMetadata.FormatOnPaste, document.Project.Language)) + if (!_globalOptions.GetOption(FormattingOptionsStorage.FormatOnPaste, document.Project.Language)) return; var solution = document.Project.Solution; diff --git a/src/EditorFeatures/Core/Formatting/FormattingOptionsMetadata.cs b/src/EditorFeatures/Core/Formatting/FormattingOptionsStorage.cs similarity index 62% rename from src/EditorFeatures/Core/Formatting/FormattingOptionsMetadata.cs rename to src/EditorFeatures/Core/Formatting/FormattingOptionsStorage.cs index cc1c4dd0db645..f186c34faa6d7 100644 --- a/src/EditorFeatures/Core/Formatting/FormattingOptionsMetadata.cs +++ b/src/EditorFeatures/Core/Formatting/FormattingOptionsStorage.cs @@ -6,9 +6,11 @@ namespace Microsoft.CodeAnalysis.Formatting { - internal sealed class FormattingOptionsMetadata + internal sealed class FormattingOptionsStorage { public static readonly PerLanguageOption2 FormatOnPaste = - new("FormattingOptions_FormatOnPaste", defaultValue: true); + new("dotnet_format_on_paste", defaultValue: true); + + public static readonly Option2 FormatOnSave = new("dotnet_format_on_save", defaultValue: true); } } diff --git a/src/EditorFeatures/Core/InlineDiagnostics/InlineDiagnosticsOptions.cs b/src/EditorFeatures/Core/InlineDiagnostics/InlineDiagnosticsOptionsStorage.cs similarity index 80% rename from src/EditorFeatures/Core/InlineDiagnostics/InlineDiagnosticsOptions.cs rename to src/EditorFeatures/Core/InlineDiagnostics/InlineDiagnosticsOptionsStorage.cs index 964d06f986631..8919d7e82a792 100644 --- a/src/EditorFeatures/Core/InlineDiagnostics/InlineDiagnosticsOptions.cs +++ b/src/EditorFeatures/Core/InlineDiagnostics/InlineDiagnosticsOptionsStorage.cs @@ -6,14 +6,14 @@ namespace Microsoft.CodeAnalysis.Editor.InlineDiagnostics { - internal sealed class InlineDiagnosticsOptions + internal sealed class InlineDiagnosticsOptionsStorage { public static readonly PerLanguageOption2 EnableInlineDiagnostics = - new("InlineDiagnosticsOptions_EnableInlineDiagnostics", + new("dotnet_enable_inline_diagnostics", defaultValue: false); public static readonly PerLanguageOption2 Location = - new("InlineDiagnosticsOptions_Location", + new("dotnet_inline_diagnostics_location", defaultValue: InlineDiagnosticsLocations.PlacedAtEndOfCode, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); } } diff --git a/src/EditorFeatures/Core/InlineHints/InlineHintsOptionsStorage.cs b/src/EditorFeatures/Core/InlineHints/InlineHintsOptionsStorage.cs index e06881455d7b0..96626fa067705 100644 --- a/src/EditorFeatures/Core/InlineHints/InlineHintsOptionsStorage.cs +++ b/src/EditorFeatures/Core/InlineHints/InlineHintsOptionsStorage.cs @@ -42,53 +42,53 @@ public static InlineTypeHintsOptions GetInlineTypeHintsOptions(this IGlobalOptio // Parameter hints public static readonly PerLanguageOption2 EnabledForParameters = - new("InlineHintsOptions_EnabledForParameters", + new("dotnet_enable_inline_hints_for_parameters", InlineParameterHintsOptions.Default.EnabledForParameters); public static readonly PerLanguageOption2 ForLiteralParameters = - new("InlineHintsOptions_ForLiteralParameters", + new("dotnet_enable_inline_hints_for_literal_parameters", InlineParameterHintsOptions.Default.ForLiteralParameters); public static readonly PerLanguageOption2 ForIndexerParameters = - new("InlineHintsOptions_ForIndexerParameters", + new("dotnet_enable_inline_hints_for_indexer_parameters", InlineParameterHintsOptions.Default.ForIndexerParameters); public static readonly PerLanguageOption2 ForObjectCreationParameters = - new("InlineHintsOptions_ForObjectCreationParameters", + new("dotnet_enable_inline_hints_for_object_creation_parameters", InlineParameterHintsOptions.Default.ForObjectCreationParameters); public static readonly PerLanguageOption2 ForOtherParameters = - new("InlineHintsOptions_ForOtherParameters", + new("dotnet_enable_inline_hints_for_other_parameters", InlineParameterHintsOptions.Default.ForOtherParameters); public static readonly PerLanguageOption2 SuppressForParametersThatDifferOnlyBySuffix = - new("InlineHintsOptions_SuppressForParametersThatDifferOnlyBySuffix", + new("dotnet_suppress_inline_hints_for_parameters_that_differ_only_by_suffix", InlineParameterHintsOptions.Default.SuppressForParametersThatDifferOnlyBySuffix); public static readonly PerLanguageOption2 SuppressForParametersThatMatchMethodIntent = - new("InlineHintsOptions_SuppressForParametersThatMatchMethodIntent", + new("dotnet_suppress_inline_hints_for_parameters_that_match_method_intent", InlineParameterHintsOptions.Default.SuppressForParametersThatMatchMethodIntent); public static readonly PerLanguageOption2 SuppressForParametersThatMatchArgumentName = - new("InlineHintsOptions_SuppressForParametersThatMatchArgumentName", + new("dotnet_suppress_inline_hints_for_parameters_that_match_argument_name", InlineParameterHintsOptions.Default.SuppressForParametersThatMatchArgumentName); // Type Hints public static readonly PerLanguageOption2 EnabledForTypes = - new("InlineHintsOptions_EnabledForTypes", + new("csharp_enable_inline_hints_for_types", defaultValue: InlineTypeHintsOptions.Default.EnabledForTypes); public static readonly PerLanguageOption2 ForImplicitVariableTypes = - new("InlineHintsOptions_ForImplicitVariableTypes", + new("csharp_enable_inline_hints_for_implicit_variable_types", defaultValue: InlineTypeHintsOptions.Default.ForImplicitVariableTypes); public static readonly PerLanguageOption2 ForLambdaParameterTypes = - new("InlineHintsOptions_ForLambdaParameterTypes", + new("csharp_enable_inline_hints_for_lambda_parameter_types", defaultValue: InlineTypeHintsOptions.Default.ForLambdaParameterTypes); public static readonly PerLanguageOption2 ForImplicitObjectCreation = - new("InlineHintsOptions_ForImplicitObjectCreation", + new("csharp_enable_inline_hints_for_implicit_object_creation", defaultValue: InlineTypeHintsOptions.Default.ForImplicitObjectCreation); } } diff --git a/src/EditorFeatures/Core/InlineRename/AbstractInlineRenameUndoManager.cs b/src/EditorFeatures/Core/InlineRename/AbstractInlineRenameUndoManager.cs index bdba0b6a703b4..71b250170c69d 100644 --- a/src/EditorFeatures/Core/InlineRename/AbstractInlineRenameUndoManager.cs +++ b/src/EditorFeatures/Core/InlineRename/AbstractInlineRenameUndoManager.cs @@ -55,7 +55,7 @@ private void InlineRenameService_ActiveSessionChanged(object sender, InlineRenam _trackedSession.ReplacementTextChanged -= InlineRenameSession_ReplacementTextChanged; } - if (!_globalOptionService.GetOption(InlineRenameUIOptions.UseInlineAdornment)) + if (!_globalOptionService.GetOption(InlineRenameUIOptionsStorage.UseInlineAdornment)) { // If the user is typing directly into the editor as the only way to change // the replacement text then we don't need to respond to text changes. The diff --git a/src/EditorFeatures/Core/InlineRename/InlineRenameSessionOptionsStorage.cs b/src/EditorFeatures/Core/InlineRename/InlineRenameSessionOptionsStorage.cs index 7f5d12a23681b..0f8b0efe714cf 100644 --- a/src/EditorFeatures/Core/InlineRename/InlineRenameSessionOptionsStorage.cs +++ b/src/EditorFeatures/Core/InlineRename/InlineRenameSessionOptionsStorage.cs @@ -8,11 +8,11 @@ namespace Microsoft.CodeAnalysis.InlineRename { internal static class InlineRenameSessionOptionsStorage { - public static readonly Option2 RenameOverloads = new("InlineRenameSessionOptions_RenameOverloads", defaultValue: false); - public static readonly Option2 RenameInStrings = new("InlineRenameSessionOptions_RenameInStrings", defaultValue: false); - public static readonly Option2 RenameInComments = new("InlineRenameSessionOptions_RenameInComments", defaultValue: false); - public static readonly Option2 RenameFile = new("InlineRenameSessionOptions_RenameFile", defaultValue: true); - public static readonly Option2 PreviewChanges = new("InlineRenameSessionOptions_PreviewChanges", defaultValue: false); - public static readonly Option2 RenameAsynchronously = new("InlineRenameSessionOptions_RenameAsynchronously", defaultValue: true); + public static readonly Option2 RenameOverloads = new("dotnet_rename_overloads", defaultValue: false); + public static readonly Option2 RenameInStrings = new("dotnet_rename_in_strings", defaultValue: false); + public static readonly Option2 RenameInComments = new("dotnet_rename_in_comments", defaultValue: false); + public static readonly Option2 RenameFile = new("dotnet_rename_file", defaultValue: true); + public static readonly Option2 PreviewChanges = new("dotnet_preview_inline_rename_changes", defaultValue: false); + public static readonly Option2 RenameAsynchronously = new("dotnet_rename_asynchronously", defaultValue: true); } } diff --git a/src/EditorFeatures/Core/InlineRename/InlineRenameUIOptions.cs b/src/EditorFeatures/Core/InlineRename/InlineRenameUIOptionsStorage.cs similarity index 61% rename from src/EditorFeatures/Core/InlineRename/InlineRenameUIOptions.cs rename to src/EditorFeatures/Core/InlineRename/InlineRenameUIOptionsStorage.cs index 5380799b60ba4..6be37719ac353 100644 --- a/src/EditorFeatures/Core/InlineRename/InlineRenameUIOptions.cs +++ b/src/EditorFeatures/Core/InlineRename/InlineRenameUIOptionsStorage.cs @@ -6,9 +6,9 @@ namespace Microsoft.CodeAnalysis.Editor.InlineRename { - internal sealed class InlineRenameUIOptions + internal sealed class InlineRenameUIOptionsStorage { - public static readonly Option2 UseInlineAdornment = new("InlineRename_UseInlineAdornment", defaultValue: true); - public static readonly Option2 CollapseUI = new("InlineRename_CollapseRenameUI", defaultValue: false); + public static readonly Option2 UseInlineAdornment = new("dotnet_rename_use_inline_adornment", defaultValue: true); + public static readonly Option2 CollapseUI = new("dotnet_collapse_inline_rename_ui", defaultValue: false); } } diff --git a/src/EditorFeatures/Core/IntelliSense/AsyncCompletion/CompletionSource.cs b/src/EditorFeatures/Core/IntelliSense/AsyncCompletion/CompletionSource.cs index cfcb0955b598c..13bb950ee92e6 100644 --- a/src/EditorFeatures/Core/IntelliSense/AsyncCompletion/CompletionSource.cs +++ b/src/EditorFeatures/Core/IntelliSense/AsyncCompletion/CompletionSource.cs @@ -124,7 +124,7 @@ public AsyncCompletionData.CompletionStartData InitializeCompletion( // There could be mixed desired behavior per textView and even per same completion session. // The right fix would be to send this information as a result of the method. // Then, the Editor would choose the right behavior for mixed cases. - _textView.Options.GlobalOptions.SetOptionValue(s_nonBlockingCompletionEditorOption, !_editorOptionsService.GlobalOptions.GetOption(CompletionViewOptions.BlockForCompletionItems, service.Language)); + _textView.Options.GlobalOptions.SetOptionValue(s_nonBlockingCompletionEditorOption, !_editorOptionsService.GlobalOptions.GetOption(CompletionViewOptionsStorage.BlockForCompletionItems, service.Language)); _responsiveCompletionEnabled = _textView.Options.GetOptionValue(DefaultOptions.ResponsiveCompletionOptionId); // In case of calls with multiple completion services for the same view (e.g. TypeScript and C#), those completion services must not be called simultaneously for the same session. @@ -264,7 +264,7 @@ public async Task GetCompletionContextAsync( // contemplate such action thus typing slower before commit and/or spending more time examining the list, which give us some opportunities // to still provide those items later before they are truly required. - var showCompletionItemFilters = _editorOptionsService.GlobalOptions.GetOption(CompletionViewOptions.ShowCompletionItemFilters, document.Project.Language); + var showCompletionItemFilters = _editorOptionsService.GlobalOptions.GetOption(CompletionViewOptionsStorage.ShowCompletionItemFilters, document.Project.Language); var options = _editorOptionsService.GlobalOptions.GetCompletionOptions(document.Project.Language) with { UpdateImportCompletionCacheInBackground = true, diff --git a/src/EditorFeatures/Core/IntelliSense/AsyncCompletion/ItemManager.CompletionListUpdater.cs b/src/EditorFeatures/Core/IntelliSense/AsyncCompletion/ItemManager.CompletionListUpdater.cs index c1bb74f918dbd..ce88b9b714c40 100644 --- a/src/EditorFeatures/Core/IntelliSense/AsyncCompletion/ItemManager.CompletionListUpdater.cs +++ b/src/EditorFeatures/Core/IntelliSense/AsyncCompletion/ItemManager.CompletionListUpdater.cs @@ -100,9 +100,9 @@ public CompletionListUpdater( // Nothing to highlight if user hasn't typed anything yet. _highlightMatchingPortions = _filterText.Length > 0 - && globalOptions.GetOption(CompletionViewOptions.HighlightMatchingPortionsOfCompletionListItems, _document.Project.Language); + && globalOptions.GetOption(CompletionViewOptionsStorage.HighlightMatchingPortionsOfCompletionListItems, _document.Project.Language); - _showCompletionItemFilters = globalOptions.GetOption(CompletionViewOptions.ShowCompletionItemFilters, _document.Project.Language); + _showCompletionItemFilters = globalOptions.GetOption(CompletionViewOptionsStorage.ShowCompletionItemFilters, _document.Project.Language); } else { diff --git a/src/EditorFeatures/Core/IntelliSense/QuickInfo/QuickInfoSourceProvider.QuickInfoSource.cs b/src/EditorFeatures/Core/IntelliSense/QuickInfo/QuickInfoSourceProvider.QuickInfoSource.cs index ac4f55be6dca8..f0e4745ac6050 100644 --- a/src/EditorFeatures/Core/IntelliSense/QuickInfo/QuickInfoSourceProvider.QuickInfoSource.cs +++ b/src/EditorFeatures/Core/IntelliSense/QuickInfo/QuickInfoSourceProvider.QuickInfoSource.cs @@ -64,7 +64,7 @@ public async Task GetQuickInfoItemAsync(IAsyncQuickIn // Until https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1611398 is resolved we can't disable // quickinfo in InlineRename. Instead, we return no quickinfo information while the adornment // is being shown. This can be removed after IFeaturesService supports disabling quickinfo - if (_editorOptionsService.GlobalOptions.GetOption(InlineRenameUIOptions.UseInlineAdornment) && _inlineRenameService.ActiveSession is not null) + if (_editorOptionsService.GlobalOptions.GetOption(InlineRenameUIOptionsStorage.UseInlineAdornment) && _inlineRenameService.ActiveSession is not null) return null; var triggerPoint = session.GetTriggerPoint(_subjectBuffer.CurrentSnapshot); diff --git a/src/EditorFeatures/Core/LanguageServer/AlwaysActivateInProcLanguageClient.cs b/src/EditorFeatures/Core/LanguageServer/AlwaysActivateInProcLanguageClient.cs index 01288e48fd3c4..293903c8f970d 100644 --- a/src/EditorFeatures/Core/LanguageServer/AlwaysActivateInProcLanguageClient.cs +++ b/src/EditorFeatures/Core/LanguageServer/AlwaysActivateInProcLanguageClient.cs @@ -59,7 +59,7 @@ public AlwaysActivateInProcLanguageClient( public override ServerCapabilities GetCapabilities(ClientCapabilities clientCapabilities) { // If the LSP editor feature flag is enabled advertise support for LSP features here so they are available locally and remote. - var isLspEditorEnabled = GlobalOptions.GetOption(LspOptions.LspEditorFeatureFlag); + var isLspEditorEnabled = GlobalOptions.GetOption(LspOptionsStorage.LspEditorFeatureFlag); var serverCapabilities = isLspEditorEnabled ? (VSInternalServerCapabilities)_experimentalCapabilitiesProvider.GetCapabilities(clientCapabilities) @@ -114,7 +114,7 @@ public override ServerCapabilities GetCapabilities(ClientCapabilities clientCapa // However, when the experimental LSP editor is enabled we want LSP to power NavigateTo, so we set DisableGoToWorkspaceSymbols=false. serverCapabilities.DisableGoToWorkspaceSymbols = !isLspEditorEnabled; - var isLspSemanticTokensEnabled = GlobalOptions.GetOption(LspOptions.LspSemanticTokensFeatureFlag); + var isLspSemanticTokensEnabled = GlobalOptions.GetOption(LspOptionsStorage.LspSemanticTokensFeatureFlag); if (isLspSemanticTokensEnabled) { // Using only range handling has shown to be more performant than using a combination of full/edits/range handling, diff --git a/src/EditorFeatures/Core/LanguageServer/LiveShareInProcLanguageClient.cs b/src/EditorFeatures/Core/LanguageServer/LiveShareInProcLanguageClient.cs index 965d4f489b5ef..4eb4e78b76e79 100644 --- a/src/EditorFeatures/Core/LanguageServer/LiveShareInProcLanguageClient.cs +++ b/src/EditorFeatures/Core/LanguageServer/LiveShareInProcLanguageClient.cs @@ -47,7 +47,7 @@ public LiveShareInProcLanguageClient( public override ServerCapabilities GetCapabilities(ClientCapabilities clientCapabilities) { - var isLspEditorEnabled = GlobalOptions.GetOption(LspOptions.LspEditorFeatureFlag); + var isLspEditorEnabled = GlobalOptions.GetOption(LspOptionsStorage.LspEditorFeatureFlag); // If the preview feature flag to turn on the LSP editor in local scenarios is on, advertise no capabilities for this Live Share // LSP server as LSP requests will be serviced by the AlwaysActiveInProcLanguageClient in both local and remote scenarios. @@ -68,7 +68,7 @@ public override ServerCapabilities GetCapabilities(ClientCapabilities clientCapa // If the LSP semantic tokens feature flag is enabled, advertise no semantic tokens capabilities for this Live Share // LSP server as LSP semantic tokens requests will be serviced by the AlwaysActiveInProcLanguageClient in both local and // remote scenarios. - var isLspSemanticTokenEnabled = GlobalOptions.GetOption(LspOptions.LspSemanticTokensFeatureFlag); + var isLspSemanticTokenEnabled = GlobalOptions.GetOption(LspOptionsStorage.LspSemanticTokensFeatureFlag); if (isLspSemanticTokenEnabled) { defaultCapabilities.SemanticTokensOptions = null; diff --git a/src/EditorFeatures/Core/Options/CompletionViewOptions.cs b/src/EditorFeatures/Core/Options/CompletionViewOptionsStorage.cs similarity index 65% rename from src/EditorFeatures/Core/Options/CompletionViewOptions.cs rename to src/EditorFeatures/Core/Options/CompletionViewOptionsStorage.cs index b31f548f788aa..7e7924fdc4853 100644 --- a/src/EditorFeatures/Core/Options/CompletionViewOptions.cs +++ b/src/EditorFeatures/Core/Options/CompletionViewOptionsStorage.cs @@ -6,19 +6,19 @@ namespace Microsoft.CodeAnalysis.Completion { - internal sealed class CompletionViewOptions + internal sealed class CompletionViewOptionsStorage { public static readonly PerLanguageOption2 HighlightMatchingPortionsOfCompletionListItems = - new("CompletionOptions_HighlightMatchingPortionsOfCompletionListItems", defaultValue: true); + new("dotnet_highlight_matching_portions_of_completion_list_items", defaultValue: true); public static readonly PerLanguageOption2 ShowCompletionItemFilters = - new("CompletionOptions_ShowCompletionItemFilters", defaultValue: true); + new("dotnet_show_completion_item_filters", defaultValue: true); // Use tri-value so the default state can be used to turn on the feature with experimentation service. public static readonly PerLanguageOption2 EnableArgumentCompletionSnippets = - new("CompletionOptions_EnableArgumentCompletionSnippets", defaultValue: null); + new("dotnet_enable_argument_completion_snippets", defaultValue: null); public static readonly PerLanguageOption2 BlockForCompletionItems = - new("CompletionOptions_BlockForCompletionItems", defaultValue: true); + new("block_for_completion_items", defaultValue: true); } } diff --git a/src/EditorFeatures/Core/Options/LegacyGlobalOptionsWorkspaceService.cs b/src/EditorFeatures/Core/Options/LegacyGlobalOptionsWorkspaceService.cs index 1ab4da03b1516..1e8bc9215e0c8 100644 --- a/src/EditorFeatures/Core/Options/LegacyGlobalOptionsWorkspaceService.cs +++ b/src/EditorFeatures/Core/Options/LegacyGlobalOptionsWorkspaceService.cs @@ -23,22 +23,18 @@ internal sealed class LegacyGlobalOptionsWorkspaceService : ILegacyGlobalOptions private readonly CodeActionOptionsStorage.Provider _provider; private static readonly Option2 s_generateOverridesOption = new( - "GenerateOverridesOptions_SelectAll", defaultValue: true); + "dotnet_generate_overrides_for_all_members", defaultValue: true); private static readonly PerLanguageOption2 s_generateOperators = new( - "GenerateEqualsAndGetHashCodeFromMembersOptions_GenerateOperators", + "dotnet_generate_equality_operators", defaultValue: false); private static readonly PerLanguageOption2 s_implementIEquatable = new( - "GenerateEqualsAndGetHashCodeFromMembersOptions_ImplementIEquatable", + "dotnet_generate_iequatable_implementation", defaultValue: false); - private static readonly PerLanguageOption2 s_addNullChecks = new( - "GenerateConstructorFromMembersOptions_AddNullChecks", - defaultValue: false); - - internal static readonly PerLanguageOption2 AddNullChecksToConstructorsGeneratedFromMembers = new( - "GenerateConstructorFromMembersOptions_AddNullChecks", + internal static readonly PerLanguageOption2 s_addNullChecks = new( + "dotnet_generate_constructor_parameter_null_checks", defaultValue: false); [ImportingConstructor] diff --git a/src/EditorFeatures/Core/Options/NavigationBarViewOptionsStorage.cs b/src/EditorFeatures/Core/Options/NavigationBarViewOptionsStorage.cs index 76a6a3126a12e..5913d1f2d6a6a 100644 --- a/src/EditorFeatures/Core/Options/NavigationBarViewOptionsStorage.cs +++ b/src/EditorFeatures/Core/Options/NavigationBarViewOptionsStorage.cs @@ -9,5 +9,5 @@ namespace Microsoft.CodeAnalysis.Editor.Options; internal sealed class NavigationBarViewOptionsStorage { public static readonly PerLanguageOption2 ShowNavigationBar = new( - "NavigationBarOptions_ShowNavigationBar", defaultValue: true); + "dotnet_show_navigation_bar", defaultValue: true); } diff --git a/src/EditorFeatures/Core/Options/SignatureHelpViewOptionsStorage.cs b/src/EditorFeatures/Core/Options/SignatureHelpViewOptionsStorage.cs index 10817e454cd26..0cd1e25a95401 100644 --- a/src/EditorFeatures/Core/Options/SignatureHelpViewOptionsStorage.cs +++ b/src/EditorFeatures/Core/Options/SignatureHelpViewOptionsStorage.cs @@ -9,5 +9,5 @@ namespace Microsoft.CodeAnalysis.Editor.Options; internal sealed class SignatureHelpViewOptionsStorage { public static readonly PerLanguageOption2 ShowSignatureHelp = new( - "SignatureHelpOptions_ShowSignatureHelp", defaultValue: true); + "dotnet_show_signature_help", defaultValue: true); } diff --git a/src/EditorFeatures/Core/Remote/RemoteHostOptions.cs b/src/EditorFeatures/Core/Remote/RemoteHostOptionsStorage.cs similarity index 57% rename from src/EditorFeatures/Core/Remote/RemoteHostOptions.cs rename to src/EditorFeatures/Core/Remote/RemoteHostOptionsStorage.cs index c4ac3c0fc7752..a731b5d8d58bc 100644 --- a/src/EditorFeatures/Core/Remote/RemoteHostOptions.cs +++ b/src/EditorFeatures/Core/Remote/RemoteHostOptionsStorage.cs @@ -6,14 +6,14 @@ namespace Microsoft.CodeAnalysis.Remote { - internal sealed class RemoteHostOptions + internal sealed class RemoteHostOptionsStorage { // use 64bit OOP - public static readonly Option2 OOP64Bit = new("InternalFeatureOnOffOptions_OOP64Bit", defaultValue: true); + public static readonly Option2 OOP64Bit = new("dotnet_code_analysis_in_separate_process", defaultValue: true); - public static readonly Option2 OOPServerGCFeatureFlag = new("InternalFeatureOnOffOptions_OOPServerGCFeatureFlag", defaultValue: false); + public static readonly Option2 OOPServerGCFeatureFlag = new("dotnet_enable_server_garbage_collection_in_code_analysis_process", defaultValue: false); // use coreclr host for OOP - public static readonly Option2 OOPCoreClrFeatureFlag = new("InternalFeatureOnOffOptions_OOPCoreClrFeatureFlag", defaultValue: false); + public static readonly Option2 OOPCoreClrFeatureFlag = new("dotnet_enable_core_clr_in_code_analysis_process", defaultValue: false); } } diff --git a/src/EditorFeatures/Core/RenameTracking/RenameTrackingOptionsStorage.cs b/src/EditorFeatures/Core/RenameTracking/RenameTrackingOptionsStorage.cs index 6a389e310b5dd..409c7b3e087ae 100644 --- a/src/EditorFeatures/Core/RenameTracking/RenameTrackingOptionsStorage.cs +++ b/src/EditorFeatures/Core/RenameTracking/RenameTrackingOptionsStorage.cs @@ -4,10 +4,12 @@ using Microsoft.CodeAnalysis.Options; -namespace Microsoft.CodeAnalysis.RenameTracking +namespace Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking { internal static class RenameTrackingOptionsStorage { + public static readonly Option2 RenameTracking = new("dotnet_enable_rename_tracking", defaultValue: true); + public static readonly PerLanguageOption2 RenameTrackingPreview = new("dotnet_show_preview_for_rename_tracking", defaultValue: true); } } diff --git a/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs b/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs index 160aa06bbeeb7..b388e7bc9b0eb 100644 --- a/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs +++ b/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs @@ -8,11 +8,9 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.CodeActions; -using Microsoft.CodeAnalysis.Editor.Shared.Options; using Microsoft.CodeAnalysis.Editor.Shared.Utilities; using Microsoft.CodeAnalysis.Notification; using Microsoft.CodeAnalysis.Options; -using Microsoft.CodeAnalysis.RenameTracking; using Microsoft.CodeAnalysis.Shared.Utilities; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.Text.Operations; diff --git a/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.StateMachine.cs b/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.StateMachine.cs index 12abb83b795e0..09dd5efaa2ddd 100644 --- a/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.StateMachine.cs +++ b/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.StateMachine.cs @@ -6,14 +6,12 @@ using System; using System.Collections.Generic; -using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Threading; using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Editor.Shared.Extensions; -using Microsoft.CodeAnalysis.Editor.Shared.Options; using Microsoft.CodeAnalysis.Editor.Shared.Utilities; using Microsoft.CodeAnalysis.ErrorReporting; using Microsoft.CodeAnalysis.Internal.Log; @@ -78,7 +76,7 @@ private void Buffer_Changed(object sender, TextContentChangedEventArgs e) { ThreadingContext.ThrowIfNotOnUIThread(); - if (!GlobalOptions.GetOption(InternalFeatureOnOffOptions.RenameTracking)) + if (!GlobalOptions.GetOption(RenameTrackingOptionsStorage.RenameTracking)) { // When disabled, ignore all text buffer changes and do not trigger retagging return; diff --git a/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.Tagger.cs b/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.Tagger.cs index cd84927ced6ec..67b8e2d5e73c2 100644 --- a/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.Tagger.cs +++ b/src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.Tagger.cs @@ -6,12 +6,8 @@ using System; using System.Collections.Generic; -using Microsoft.CodeAnalysis.Editor.Host; -using Microsoft.CodeAnalysis.Editor.Shared.Extensions; -using Microsoft.CodeAnalysis.Editor.Shared.Options; using Microsoft.VisualStudio.Text; using Microsoft.VisualStudio.Text.Adornments; -using Microsoft.VisualStudio.Text.Operations; using Microsoft.VisualStudio.Text.Tagging; namespace Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking @@ -51,7 +47,7 @@ IEnumerable> ITagger.GetTags(NormalizedSnapshotSp private IEnumerable> GetTags(NormalizedSnapshotSpanCollection spans, T tag) where T : ITag { - if (!_stateMachine.GlobalOptions.GetOption(InternalFeatureOnOffOptions.RenameTracking)) + if (!_stateMachine.GlobalOptions.GetOption(RenameTrackingOptionsStorage.RenameTracking)) { // Changes aren't being triggered by the buffer, but there may still be taggers // out there which we should prevent from doing work. diff --git a/src/EditorFeatures/Core/Shared/Options/ComponentOnOffOptions.cs b/src/EditorFeatures/Core/Shared/Options/ComponentOnOffOptions.cs index eaabc09e15d2e..b41276010b223 100644 --- a/src/EditorFeatures/Core/Shared/Options/ComponentOnOffOptions.cs +++ b/src/EditorFeatures/Core/Shared/Options/ComponentOnOffOptions.cs @@ -11,8 +11,8 @@ namespace Microsoft.CodeAnalysis.Editor.Shared.Options /// internal sealed class EditorComponentOnOffOptions { - public static readonly Option2 Adornment = new("EditorComponentOnOffOptions_Adornment", defaultValue: true); - public static readonly Option2 Tagger = new("EditorComponentOnOffOptions_Tagger", defaultValue: true); - public static readonly Option2 CodeRefactorings = new("EditorComponentOnOffOptions_CodeRefactorings", defaultValue: true); + public static readonly Option2 Adornment = new("dotnet_enable_editor_adornment", defaultValue: true); + public static readonly Option2 Tagger = new("dotnet_enable_editor_tagger", defaultValue: true); + public static readonly Option2 CodeRefactorings = new("dotnet_enable_code_refactorings", defaultValue: true); } } diff --git a/src/EditorFeatures/Core/Shared/Options/InternalFeatureOnOffOptions.cs b/src/EditorFeatures/Core/Shared/Options/InternalFeatureOnOffOptions.cs deleted file mode 100644 index 55afe651cd0b3..0000000000000 --- a/src/EditorFeatures/Core/Shared/Options/InternalFeatureOnOffOptions.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.CodeAnalysis.Options; - -namespace Microsoft.CodeAnalysis.Editor.Shared.Options -{ - internal sealed class InternalFeatureOnOffOptions - { - public static readonly Option2 BraceMatching = new("InternalFeatureOnOffOptions_BraceMatching", defaultValue: true); - public static readonly Option2 Classification = new("InternalFeatureOnOffOptions_Classification", defaultValue: true); - public static readonly Option2 SemanticColorizer = new("InternalFeatureOnOffOptions_SemanticColorizer", defaultValue: true); - public static readonly Option2 SyntacticColorizer = new("InternalFeatureOnOffOptions_SyntacticColorizer", defaultValue: true); - public static readonly Option2 AutomaticLineEnder = new("InternalFeatureOnOffOptions_AutomaticLineEnder", defaultValue: true); - public static readonly Option2 SmartIndenter = new("InternalFeatureOnOffOptions_SmartIndenter", defaultValue: true); - public static readonly Option2 Squiggles = new("InternalFeatureOnOffOptions_Squiggles", defaultValue: true); - public static readonly Option2 FormatOnSave = new("InternalFeatureOnOffOptions_FormatOnSave", defaultValue: true); - public static readonly Option2 RenameTracking = new("InternalFeatureOnOffOptions_RenameTracking", defaultValue: true); - public static readonly Option2 EventHookup = new("InternalFeatureOnOffOptions_EventHookup", defaultValue: true); - public static readonly Option2 Snippets = new("InternalFeatureOnOffOptions_Snippets", defaultValue: true); - public static readonly Option2 BackgroundAnalysisMemoryMonitor = new("InternalFeatureOnOffOptions_FullSolutionAnalysisMemoryMonitor", defaultValue: true); - } -} diff --git a/src/EditorFeatures/Core/Shared/Utilities/IWorkspaceContextService.cs b/src/EditorFeatures/Core/Shared/Utilities/IWorkspaceContextService.cs index 6658a44ea5337..ffb9b76a40296 100644 --- a/src/EditorFeatures/Core/Shared/Utilities/IWorkspaceContextService.cs +++ b/src/EditorFeatures/Core/Shared/Utilities/IWorkspaceContextService.cs @@ -43,7 +43,7 @@ public DefaultWorkspaceContextService(IGlobalOptionService globalOptionsService) _globalOptionsService = globalOptionsService; } - public bool IsInLspEditorContext() => _globalOptionsService.GetOption(LspOptions.LspEditorFeatureFlag); + public bool IsInLspEditorContext() => _globalOptionsService.GetOption(LspOptionsStorage.LspEditorFeatureFlag); public bool IsCloudEnvironmentClient() => false; } diff --git a/src/EditorFeatures/Core/SmartIndent/SmartIndent.cs b/src/EditorFeatures/Core/SmartIndent/SmartIndent.cs index dc102fa0ad08c..1114993551bf9 100644 --- a/src/EditorFeatures/Core/SmartIndent/SmartIndent.cs +++ b/src/EditorFeatures/Core/SmartIndent/SmartIndent.cs @@ -5,7 +5,6 @@ using System; using System.Threading; using Microsoft.CodeAnalysis.Editor.Shared.Extensions; -using Microsoft.CodeAnalysis.Formatting; using Microsoft.CodeAnalysis.Indentation; using Microsoft.CodeAnalysis.Internal.Log; using Microsoft.CodeAnalysis.Options; @@ -13,7 +12,6 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.Text; using Microsoft.VisualStudio.Text.Editor; -using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.Editor.Implementation.SmartIndent { diff --git a/src/EditorFeatures/Core/SmartIndent/SmartIndentProvider.cs b/src/EditorFeatures/Core/SmartIndent/SmartIndentProvider.cs index 304713a70565b..6832865b4b523 100644 --- a/src/EditorFeatures/Core/SmartIndent/SmartIndentProvider.cs +++ b/src/EditorFeatures/Core/SmartIndent/SmartIndentProvider.cs @@ -4,8 +4,6 @@ using System; using System.ComponentModel.Composition; -using Microsoft.CodeAnalysis.Editor.Shared.Extensions; -using Microsoft.CodeAnalysis.Editor.Shared.Options; using Microsoft.CodeAnalysis.Host.Mef; using Microsoft.CodeAnalysis.Options; using Microsoft.VisualStudio.Text.Editor; @@ -34,7 +32,7 @@ public SmartIndentProvider(EditorOptionsService editorOptionsService) throw new ArgumentNullException(nameof(textView)); } - if (!_editorOptionsService.GlobalOptions.GetOption(InternalFeatureOnOffOptions.SmartIndenter)) + if (!_editorOptionsService.GlobalOptions.GetOption(SmartIndenterOptionsStorage.SmartIndenter)) { return null; } diff --git a/src/EditorFeatures/Core/SmartIndent/SmartIndenterOptionsStorage.cs b/src/EditorFeatures/Core/SmartIndent/SmartIndenterOptionsStorage.cs new file mode 100644 index 0000000000000..e2118af9b3ec9 --- /dev/null +++ b/src/EditorFeatures/Core/SmartIndent/SmartIndenterOptionsStorage.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.CodeAnalysis.Options; + +namespace Microsoft.CodeAnalysis.Editor.Implementation.SmartIndent +{ + internal static class SmartIndenterOptionsStorage + { + public static readonly Option2 SmartIndenter = new("dotnet_enable_smart_indenter", defaultValue: true); + } +} diff --git a/src/EditorFeatures/Core/Snippets/SnippetsOptionsStorage.cs b/src/EditorFeatures/Core/Snippets/SnippetsOptionsStorage.cs new file mode 100644 index 0000000000000..0b0cffab4904b --- /dev/null +++ b/src/EditorFeatures/Core/Snippets/SnippetsOptionsStorage.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.CodeAnalysis.Options; + +namespace Microsoft.CodeAnalysis.Snippets +{ + internal static class SnippetsOptionsStorage + { + public static readonly Option2 Snippets = new("dotnet_enable_snippets", defaultValue: true); + } +} diff --git a/src/EditorFeatures/Core/SplitComment/SplitCommentCommandHandler.cs b/src/EditorFeatures/Core/SplitComment/SplitCommentCommandHandler.cs index 394b31e67858c..143beae6502fd 100644 --- a/src/EditorFeatures/Core/SplitComment/SplitCommentCommandHandler.cs +++ b/src/EditorFeatures/Core/SplitComment/SplitCommentCommandHandler.cs @@ -74,7 +74,7 @@ public bool ExecuteCommand(ReturnKeyCommandArgs args, CommandExecutionContext co if (document == null) return false; - if (!_globalOptions.GetOption(SplitCommentOptions.Enabled, document.Project.Language)) + if (!_globalOptions.GetOption(SplitCommentOptionsStorage.Enabled, document.Project.Language)) return false; var splitCommentService = document.GetLanguageService(); diff --git a/src/EditorFeatures/Core/SplitComment/SplitCommentOptions.cs b/src/EditorFeatures/Core/SplitComment/SplitCommentOptionsStorage.cs similarity index 73% rename from src/EditorFeatures/Core/SplitComment/SplitCommentOptions.cs rename to src/EditorFeatures/Core/SplitComment/SplitCommentOptionsStorage.cs index 5e591d0fd3cfb..c8120ac528191 100644 --- a/src/EditorFeatures/Core/SplitComment/SplitCommentOptions.cs +++ b/src/EditorFeatures/Core/SplitComment/SplitCommentOptionsStorage.cs @@ -6,9 +6,9 @@ namespace Microsoft.CodeAnalysis.Editor.Implementation.SplitComment { - internal sealed class SplitCommentOptions + internal sealed class SplitCommentOptionsStorage { public static PerLanguageOption2 Enabled = - new PerLanguageOption2("SplitCommentOptions_Enabled", defaultValue: true); + new PerLanguageOption2("dotnet_split_comments", defaultValue: true); } } diff --git a/src/EditorFeatures/Core/Suggestions/SuggestionsOptions.cs b/src/EditorFeatures/Core/Suggestions/SuggestionsOptionsStorage.cs similarity index 67% rename from src/EditorFeatures/Core/Suggestions/SuggestionsOptions.cs rename to src/EditorFeatures/Core/Suggestions/SuggestionsOptionsStorage.cs index 6617121b19f02..ffc384bb0a815 100644 --- a/src/EditorFeatures/Core/Suggestions/SuggestionsOptions.cs +++ b/src/EditorFeatures/Core/Suggestions/SuggestionsOptionsStorage.cs @@ -6,9 +6,9 @@ namespace Microsoft.CodeAnalysis.Editor.Implementation.Suggestions { - internal sealed class SuggestionsOptions + internal sealed class SuggestionsOptionsStorage { - public static readonly Option2 Asynchronous = new("SuggestionsOptions_Asynchronous", defaultValue: null); - public static readonly Option2 AsynchronousQuickActionsDisableFeatureFlag = new("SuggestionsOptions_AsynchronousQuickActionsDisableFeatureFlag", defaultValue: false); + public static readonly Option2 Asynchronous = new("dotnet_enable_asynchronous_suggestions", defaultValue: null); + public static readonly Option2 AsynchronousQuickActionsDisableFeatureFlag = new("dotnet_disable_asynchronous_quick_actions", defaultValue: false); } } diff --git a/src/EditorFeatures/DiagnosticsTestUtilities/SplitComments/AbstractSplitCommentCommandHandlerTests.cs b/src/EditorFeatures/DiagnosticsTestUtilities/SplitComments/AbstractSplitCommentCommandHandlerTests.cs index db6086559579e..f5f8ed910908b 100644 --- a/src/EditorFeatures/DiagnosticsTestUtilities/SplitComments/AbstractSplitCommentCommandHandlerTests.cs +++ b/src/EditorFeatures/DiagnosticsTestUtilities/SplitComments/AbstractSplitCommentCommandHandlerTests.cs @@ -55,7 +55,7 @@ private void TestWorker( var globalOptions = workspace.GlobalOptions; var language = workspace.Projects.Single().Language; - globalOptions.SetGlobalOption(SplitCommentOptions.Enabled, language, enabled); + globalOptions.SetGlobalOption(SplitCommentOptionsStorage.Enabled, language, enabled); globalOptions.SetGlobalOption(FormattingOptions2.UseTabs, language, useTabs); var document = workspace.Documents.Single(); diff --git a/src/EditorFeatures/Test/Diagnostics/DiagnosticsSquiggleTaggerProviderTests.cs b/src/EditorFeatures/Test/Diagnostics/DiagnosticsSquiggleTaggerProviderTests.cs index 055fee910a8e5..95acbf3a07e87 100644 --- a/src/EditorFeatures/Test/Diagnostics/DiagnosticsSquiggleTaggerProviderTests.cs +++ b/src/EditorFeatures/Test/Diagnostics/DiagnosticsSquiggleTaggerProviderTests.cs @@ -46,7 +46,7 @@ public async Task Test_TagSourceDiffer(bool pull) }; using var workspace = TestWorkspace.CreateCSharp(new string[] { "class A { }", "class E { }" }, parseOptions: CSharpParseOptions.Default); - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); using var wrapper = new DiagnosticTaggerWrapper(workspace, analyzerMap); @@ -78,7 +78,7 @@ public async Task Test_TagSourceDiffer(bool pull) public async Task MultipleTaggersAndDispose(bool pull) { using var workspace = TestWorkspace.CreateCSharp(new string[] { "class A {" }, parseOptions: CSharpParseOptions.Default); - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); using var wrapper = new DiagnosticTaggerWrapper(workspace); @@ -102,7 +102,7 @@ public async Task MultipleTaggersAndDispose(bool pull) public async Task TaggerProviderCreatedAfterInitialDiagnosticsReported(bool pull) { using var workspace = TestWorkspace.CreateCSharp(new string[] { "class C {" }, parseOptions: CSharpParseOptions.Default); - workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull); + workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull); using var wrapper = new DiagnosticTaggerWrapper(workspace, analyzerMap: null, createTaggerProvider: false); // First, make sure all diagnostics have been reported. diff --git a/src/EditorFeatures/Test2/IntelliSense/CSharpCompletionCommandHandlerTests.vb b/src/EditorFeatures/Test2/IntelliSense/CSharpCompletionCommandHandlerTests.vb index 6d76977854e9c..5d11efa461225 100644 --- a/src/EditorFeatures/Test2/IntelliSense/CSharpCompletionCommandHandlerTests.vb +++ b/src/EditorFeatures/Test2/IntelliSense/CSharpCompletionCommandHandlerTests.vb @@ -5056,7 +5056,7 @@ class C Dim completionService = state.Workspace.Services.GetLanguageServices(LanguageNames.CSharp).GetRequiredService(Of CompletionService)() Dim provider = completionService.GetTestAccessor().GetImportedAndBuiltInProviders(ImmutableHashSet(Of String).Empty).OfType(Of BooleanTaskControlledCompletionProvider)().Single() - state.Workspace.GlobalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.CSharp, False) + state.Workspace.GlobalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.CSharp, False) state.SendTypeChars("Sys.") Await state.AssertNoCompletionSession() @@ -5075,7 +5075,7 @@ class C extraExportedTypes:={GetType(CompletedTaskControlledCompletionProvider)}.ToList(), showCompletionInArgumentLists:=showCompletionInArgumentLists) - state.Workspace.GlobalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.CSharp, False) + state.Workspace.GlobalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.CSharp, False) state.SendTypeChars("Sys") Await state.AssertSelectedCompletionItem(displayText:="System") @@ -5107,7 +5107,7 @@ class C Dim completionService = state.Workspace.Services.GetLanguageServices(LanguageNames.CSharp).GetRequiredService(Of CompletionService)() Dim provider = completionService.GetTestAccessor().GetImportedAndBuiltInProviders(ImmutableHashSet(Of String).Empty).OfType(Of BooleanTaskControlledCompletionProvider)().Single() - state.Workspace.GlobalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.CSharp, False) + state.Workspace.GlobalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.CSharp, False) state.SendTypeChars("Sys") @@ -5184,7 +5184,7 @@ class C Dim provider = completionService.GetTestAccessor().GetImportedAndBuiltInProviders(ImmutableHashSet(Of String).Empty).OfType(Of BooleanTaskControlledCompletionProvider)().Single() Dim globalOptions = state.Workspace.GetService(Of IGlobalOptionService) - globalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.CSharp, False) + globalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.CSharp, False) state.SendTypeChars("Sys") Dim task1 As Task = Nothing @@ -5275,7 +5275,7 @@ class C provider.Reset() ' Switch to the non-blocking mode - globalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.CSharp, False) + globalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.CSharp, False) ' re-use of TestNoBlockOnCompletionItems1 state.SendTypeChars("Sys.") @@ -5295,7 +5295,7 @@ class C provider.Reset() ' Switch to the blocking mode - globalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.CSharp, True) + globalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.CSharp, True) #Disable Warning BC42358 ' Because this call is not awaited, execution of the current method continues before the call is completed Task.Run(Function() @@ -10242,7 +10242,7 @@ class C Dim workspace = state.Workspace Dim globalOptions = workspace.GetService(Of IGlobalOptionService) - globalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.CSharp, True) + globalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.CSharp, True) state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.ShowItemsFromUnimportedNamespaces, LanguageNames.CSharp, True) state.TextView.Options.SetOptionValue(DefaultOptions.ResponsiveCompletionOptionId, True) @@ -10297,7 +10297,7 @@ class C Dim workspace = state.Workspace Dim globalOptions = workspace.GetService(Of IGlobalOptionService) - globalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.CSharp, True) + globalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.CSharp, True) state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.ShowItemsFromUnimportedNamespaces, LanguageNames.CSharp, True) state.TextView.Options.SetOptionValue(DefaultOptions.ResponsiveCompletionOptionId, True) @@ -10350,7 +10350,7 @@ class C Dim workspace = state.Workspace Dim globalOptions = workspace.GetService(Of IGlobalOptionService) - globalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.CSharp, True) + globalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.CSharp, True) state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.ShowItemsFromUnimportedNamespaces, LanguageNames.CSharp, True) state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.ForceExpandedCompletionIndexCreation, True) diff --git a/src/EditorFeatures/Test2/Rename/RenameCommandHandlerTests.vb b/src/EditorFeatures/Test2/Rename/RenameCommandHandlerTests.vb index 107a269acd118..2828e9597171c 100644 --- a/src/EditorFeatures/Test2/Rename/RenameCommandHandlerTests.vb +++ b/src/EditorFeatures/Test2/Rename/RenameCommandHandlerTests.vb @@ -235,7 +235,7 @@ End Class ' This test specifically matters for the case where a user is typing in the editor ' and is not intended to test the rename flyout tab behavior Dim optionsService = workspace.GetService(Of IGlobalOptionService)() - optionsService.SetGlobalOption(InlineRenameUIOptions.UseInlineAdornment, False) + optionsService.SetGlobalOption(InlineRenameUIOptionsStorage.UseInlineAdornment, False) Dim view = workspace.Documents.Single().GetTextView() view.Caret.MoveTo(New SnapshotPoint(view.TextBuffer.CurrentSnapshot, workspace.Documents.Single(Function(d) d.CursorPosition.HasValue).CursorPosition.Value)) diff --git a/src/EditorFeatures/Test2/Rename/RenameViewModelTests.vb b/src/EditorFeatures/Test2/Rename/RenameViewModelTests.vb index d1277e44211ce..8e2dfd4e4807f 100644 --- a/src/EditorFeatures/Test2/Rename/RenameViewModelTests.vb +++ b/src/EditorFeatures/Test2/Rename/RenameViewModelTests.vb @@ -694,7 +694,7 @@ class D : B Using workspace = CreateWorkspaceWithWaiter(test, host) Dim globalOptions = workspace.GetService(Of IGlobalOptionService)() - globalOptions.SetGlobalOption(InlineRenameUIOptions.CollapseUI, False) + globalOptions.SetGlobalOption(InlineRenameUIOptionsStorage.CollapseUI, False) Dim cursorDocument = workspace.Documents.Single(Function(d) d.CursorPosition.HasValue) Dim renameService = DirectCast(workspace.GetService(Of IInlineRenameService)(), InlineRenameService) diff --git a/src/EditorFeatures/VisualBasic/LineCommit/CommitCommandHandler.vb b/src/EditorFeatures/VisualBasic/LineCommit/CommitCommandHandler.vb index 6543ecce1d3bc..045cac342f8de 100644 --- a/src/EditorFeatures/VisualBasic/LineCommit/CommitCommandHandler.vb +++ b/src/EditorFeatures/VisualBasic/LineCommit/CommitCommandHandler.vb @@ -233,7 +233,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.LineCommit ' Do the paste in the same transaction as the commit/format nextHandler() - If Not _globalOptions.GetOption(FormattingOptionsMetadata.FormatOnPaste, LanguageNames.VisualBasic) Then + If Not _globalOptions.GetOption(FormattingOptionsStorage.FormatOnPaste, LanguageNames.VisualBasic) Then transaction.Complete() Return End If @@ -265,7 +265,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.LineCommit End Function Public Sub ExecuteCommand(args As SaveCommandArgs, nextHandler As Action, context As CommandExecutionContext) Implements IChainedCommandHandler(Of SaveCommandArgs).ExecuteCommand - If _globalOptions.GetOption(InternalFeatureOnOffOptions.FormatOnSave) Then + If _globalOptions.GetOption(FormattingOptionsStorage.FormatOnSave) Then Using context.OperationContext.AddScope(allowCancellation:=True, VBEditorResources.Formatting_Document) Using transaction = _textUndoHistoryRegistry.GetHistory(args.TextView.TextBuffer).CreateTransaction(VBEditorResources.Format_on_Save) _bufferManagerFactory.CreateForBuffer(args.SubjectBuffer).CommitDirty(isExplicitFormat:=False, cancellationToken:=context.OperationContext.UserCancellationToken) diff --git a/src/EditorFeatures/VisualBasicTest/Formatting/Indentation/SmartIndentProviderTests.vb b/src/EditorFeatures/VisualBasicTest/Formatting/Indentation/SmartIndentProviderTests.vb index 9a3b3e02ed6db..2fd5c5d0899a9 100644 --- a/src/EditorFeatures/VisualBasicTest/Formatting/Indentation/SmartIndentProviderTests.vb +++ b/src/EditorFeatures/VisualBasicTest/Formatting/Indentation/SmartIndentProviderTests.vb @@ -2,11 +2,10 @@ ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. -Imports Microsoft.CodeAnalysis.Options Imports Microsoft.CodeAnalysis.Editor.Implementation.SmartIndent -Imports Microsoft.CodeAnalysis.Editor.Shared.Options Imports Microsoft.CodeAnalysis.Editor.UnitTests Imports Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces +Imports Microsoft.CodeAnalysis.Options Imports Microsoft.VisualStudio.Text.Editor Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Formatting.Indentation @@ -26,7 +25,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Formatting.Indenta Public Sub GetSmartIndent2() Using workspace = TestWorkspace.CreateCSharp("") Dim globalOptions = workspace.GetService(Of IGlobalOptionService) - Assert.Equal(True, globalOptions.GetOption(InternalFeatureOnOffOptions.SmartIndenter)) + Assert.Equal(True, globalOptions.GetOption(SmartIndenterOptionsStorage.SmartIndenter)) Dim document = workspace.Projects.Single().Documents.Single() Dim provider = workspace.ExportProvider.GetExportedValues(Of ISmartIndentProvider)().OfType(Of SmartIndentProvider)().Single() @@ -40,7 +39,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Formatting.Indenta Public Sub GetSmartIndent3() Using workspace = TestWorkspace.CreateCSharp("") Dim globalOptions = workspace.GetService(Of IGlobalOptionService) - globalOptions.SetGlobalOption(InternalFeatureOnOffOptions.SmartIndenter, False) + globalOptions.SetGlobalOption(SmartIndenterOptionsStorage.SmartIndenter, False) Dim document = workspace.Projects.Single().Documents.Single() Dim provider = workspace.ExportProvider.GetExportedValues(Of ISmartIndentProvider)().OfType(Of SmartIndentProvider)().Single() diff --git a/src/EditorFeatures/VisualBasicTest/GenerateConstructorFromMembers/GenerateConstructorFromMembersTests.vb b/src/EditorFeatures/VisualBasicTest/GenerateConstructorFromMembers/GenerateConstructorFromMembersTests.vb index e0e1fbfd14f55..c1e5dc496d370 100644 --- a/src/EditorFeatures/VisualBasicTest/GenerateConstructorFromMembers/GenerateConstructorFromMembersTests.vb +++ b/src/EditorFeatures/VisualBasicTest/GenerateConstructorFromMembers/GenerateConstructorFromMembersTests.vb @@ -365,7 +365,7 @@ End Class", chosenSymbols:={"i"}) Public Async Function TestWithDialog1WithNullCheck() As Task Dim options = New OptionsCollection(LanguageNames.VisualBasic) - options.Add(LegacyGlobalOptionsWorkspaceService.AddNullChecksToConstructorsGeneratedFromMembers, True) + options.Add(LegacyGlobalOptionsWorkspaceService.s_addNullChecks, True) Dim parameters = New TestParameters() parameters = parameters.WithGlobalOptions(options) diff --git a/src/Features/Core/Portable/SolutionCrawler/SolutionCrawlerService.cs b/src/Features/Core/Portable/SolutionCrawler/SolutionCrawlerService.cs index 28dfa109aba43..3e701621204b2 100644 --- a/src/Features/Core/Portable/SolutionCrawler/SolutionCrawlerService.cs +++ b/src/Features/Core/Portable/SolutionCrawler/SolutionCrawlerService.cs @@ -13,7 +13,7 @@ namespace Microsoft.CodeAnalysis.SolutionCrawler { internal partial class SolutionCrawlerRegistrationService : ISolutionCrawlerRegistrationService { - internal static readonly Option2 EnableSolutionCrawler = new("InternalSolutionCrawlerOptions_Solution Crawler", defaultValue: true); + internal static readonly Option2 EnableSolutionCrawler = new("dotnet_enable_solution_crawler", defaultValue: true); /// /// nested class of since it is tightly coupled with it. diff --git a/src/Features/LanguageServer/Protocol/ExternalAccess/VSCode/API/VSCodeAnalyzerLoader.cs b/src/Features/LanguageServer/Protocol/ExternalAccess/VSCode/API/VSCodeAnalyzerLoader.cs index d4b31cfce7cb6..4196a791cfd16 100644 --- a/src/Features/LanguageServer/Protocol/ExternalAccess/VSCode/API/VSCodeAnalyzerLoader.cs +++ b/src/Features/LanguageServer/Protocol/ExternalAccess/VSCode/API/VSCodeAnalyzerLoader.cs @@ -29,7 +29,7 @@ public VSCodeAnalyzerLoader(IDiagnosticAnalyzerService analyzerService, IDiagnos public void InitializeDiagnosticsServices(Workspace workspace) { - _globalOptionService.SetGlobalOption(InternalDiagnosticsOptions.NormalDiagnosticMode, DiagnosticMode.LspPull); + _globalOptionService.SetGlobalOption(InternalDiagnosticsOptionsStorage.NormalDiagnosticMode, DiagnosticMode.LspPull); _ = ((IIncrementalAnalyzerProvider)_analyzerService).CreateIncrementalAnalyzer(workspace); _diagnosticService.Register((IDiagnosticUpdateSource)_analyzerService); } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/AutoFormattingOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/AutoFormattingOptionsStorage.cs index af136c970e369..f4d17bce0c120 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/AutoFormattingOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/AutoFormattingOptionsStorage.cs @@ -18,14 +18,14 @@ public static AutoFormattingOptions GetAutoFormattingOptions(this IGlobalOptionS }; internal static readonly PerLanguageOption2 FormatOnReturn = new( - "FormattingOptions_AutoFormattingOnReturn", AutoFormattingOptions.Default.FormatOnReturn); + "csharp_format_on_return", AutoFormattingOptions.Default.FormatOnReturn); public static readonly PerLanguageOption2 FormatOnTyping = new( - "FormattingOptions_AutoFormattingOnTyping", AutoFormattingOptions.Default.FormatOnTyping); + "csharp_format_on_typing", AutoFormattingOptions.Default.FormatOnTyping); public static readonly PerLanguageOption2 FormatOnSemicolon = new( - "FormattingOptions_AutoFormattingOnSemicolon", AutoFormattingOptions.Default.FormatOnSemicolon); + "csharp_format_on_semicolon", AutoFormattingOptions.Default.FormatOnSemicolon); public static readonly PerLanguageOption2 FormatOnCloseBrace = new( - "BraceCompletionOptions_AutoFormattingOnCloseBrace", AutoFormattingOptions.Default.FormatOnCloseBrace); + "csharp_format_on_close_brace", AutoFormattingOptions.Default.FormatOnCloseBrace); } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/BlockStructureOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/BlockStructureOptionsStorage.cs index 2ddac1ad8a655..9edc47d758044 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/BlockStructureOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/BlockStructureOptionsStorage.cs @@ -30,38 +30,38 @@ public static BlockStructureOptions GetBlockStructureOptions(this IGlobalOptionS }; public static readonly PerLanguageOption2 ShowBlockStructureGuidesForCommentsAndPreprocessorRegions = new( - "BlockStructureOptions_ShowBlockStructureGuidesForCommentsAndPreprocessorRegions", BlockStructureOptions.Default.ShowBlockStructureGuidesForCommentsAndPreprocessorRegions); + "dotnet_show_block_structure_guides_for_comments_and_preprocessor_regions", BlockStructureOptions.Default.ShowBlockStructureGuidesForCommentsAndPreprocessorRegions); public static readonly PerLanguageOption2 ShowBlockStructureGuidesForDeclarationLevelConstructs = new( - "BlockStructureOptions_ShowBlockStructureGuidesForDeclarationLevelConstructs", BlockStructureOptions.Default.ShowBlockStructureGuidesForDeclarationLevelConstructs); + "dotnet_show_block_structure_guides_for_declaration_level_constructs", BlockStructureOptions.Default.ShowBlockStructureGuidesForDeclarationLevelConstructs); public static readonly PerLanguageOption2 ShowBlockStructureGuidesForCodeLevelConstructs = new( - "BlockStructureOptions_ShowBlockStructureGuidesForCodeLevelConstructs", BlockStructureOptions.Default.ShowBlockStructureGuidesForCodeLevelConstructs); + "dotnet_show_block_structure_guides_for_code_level_constructs", BlockStructureOptions.Default.ShowBlockStructureGuidesForCodeLevelConstructs); public static readonly PerLanguageOption2 ShowOutliningForCommentsAndPreprocessorRegions = new( - "BlockStructureOptions_ShowOutliningForCommentsAndPreprocessorRegions", BlockStructureOptions.Default.ShowOutliningForCommentsAndPreprocessorRegions); + "dotnet_show_outlining_for_comments_and_preprocessor_regions", BlockStructureOptions.Default.ShowOutliningForCommentsAndPreprocessorRegions); public static readonly PerLanguageOption2 ShowOutliningForDeclarationLevelConstructs = new( - "BlockStructureOptions_ShowOutliningForDeclarationLevelConstructs", BlockStructureOptions.Default.ShowOutliningForDeclarationLevelConstructs); + "dotnet_show_outlining_for_declaration_level_constructs", BlockStructureOptions.Default.ShowOutliningForDeclarationLevelConstructs); public static readonly PerLanguageOption2 ShowOutliningForCodeLevelConstructs = new( - "BlockStructureOptions_ShowOutliningForCodeLevelConstructs", BlockStructureOptions.Default.ShowOutliningForCodeLevelConstructs); + "dotnet_show_outlining_for_code_level_constructs", BlockStructureOptions.Default.ShowOutliningForCodeLevelConstructs); public static readonly PerLanguageOption2 CollapseRegionsWhenFirstOpened = new( - "BlockStructureOptions_CollapseRegionsWhenFirstOpened", BlockStructureOptions.Default.CollapseRegionsWhenFirstOpened); + "dotnet_collapse_regions_when_first_opened", BlockStructureOptions.Default.CollapseRegionsWhenFirstOpened); public static readonly PerLanguageOption2 CollapseImportsWhenFirstOpened = new( - "BlockStructureOptions_CollapseImportsWhenFirstOpened", BlockStructureOptions.Default.CollapseImportsWhenFirstOpened); + "dotnet_collapse_imports_when_first_opened", BlockStructureOptions.Default.CollapseImportsWhenFirstOpened); public static readonly PerLanguageOption2 CollapseSourceLinkEmbeddedDecompiledFilesWhenFirstOpened = new( - "BlockStructureOptions_CollapseMetadataImplementationsWhenFirstOpened", BlockStructureOptions.Default.CollapseMetadataImplementationsWhenFirstOpened); + "dotnet_collapse_metadata_implementations_when_first_opened", BlockStructureOptions.Default.CollapseMetadataImplementationsWhenFirstOpened); public static readonly PerLanguageOption2 CollapseMetadataSignatureFilesWhenFirstOpened = new( - "BlockStructureOptions_CollapseEmptyMetadataImplementationsWhenFirstOpened", BlockStructureOptions.Default.CollapseEmptyMetadataImplementationsWhenFirstOpened); + "dotnet_collapse_empty_metadata_implementations_when_first_opened", BlockStructureOptions.Default.CollapseEmptyMetadataImplementationsWhenFirstOpened); public static readonly PerLanguageOption2 CollapseRegionsWhenCollapsingToDefinitions = new( - "BlockStructureOptions_CollapseRegionsWhenCollapsingToDefinitions", BlockStructureOptions.Default.CollapseRegionsWhenCollapsingToDefinitions); + "dotnet_collapse_regions_when_collapsing_to_definitions", BlockStructureOptions.Default.CollapseRegionsWhenCollapsingToDefinitions); public static readonly PerLanguageOption2 MaximumBannerLength = new( - "BlockStructureOptions_MaximumBannerLength", BlockStructureOptions.Default.MaximumBannerLength); + "dotnet_maximum_block_banner_length", BlockStructureOptions.Default.MaximumBannerLength); } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/ClassificationOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/ClassificationOptionsStorage.cs index df4e784311962..3be916e1e5f91 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/ClassificationOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/ClassificationOptionsStorage.cs @@ -18,11 +18,11 @@ public static ClassificationOptions GetClassificationOptions(this IGlobalOptionS }; public static PerLanguageOption2 ClassifyReassignedVariables = - new("ClassificationOptions_ClassifyReassignedVariables", ClassificationOptions.Default.ClassifyReassignedVariables); + new("dotnet_classify_reassigned_variables", ClassificationOptions.Default.ClassifyReassignedVariables); public static PerLanguageOption2 ColorizeRegexPatterns = - new("RegularExpressionsOptions_ColorizeRegexPatterns", ClassificationOptions.Default.ColorizeRegexPatterns); + new("dotnet_colorize_regex_patterns", ClassificationOptions.Default.ColorizeRegexPatterns); public static PerLanguageOption2 ColorizeJsonPatterns = - new("JsonFeatureOptions_ColorizeJsonPatterns", ClassificationOptions.Default.ColorizeJsonPatterns); + new("dotnet_colorize_json_patterns", ClassificationOptions.Default.ColorizeJsonPatterns); } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/CodeActionOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/CodeActionOptionsStorage.cs index aabe5a9bd266f..06d76fcff4683 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/CodeActionOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/CodeActionOptionsStorage.cs @@ -42,6 +42,6 @@ internal static CodeActionOptionsProvider GetCodeActionOptionsProvider(this IGlo } public static readonly PerLanguageOption2 ConditionalExpressionWrappingLength = new( - "UseConditionalExpressionOptions_ConditionalExpressionWrappingLength", CodeActionOptions.DefaultConditionalExpressionWrappingLength); + "dotnet_conditional_expression_wrapping_length", CodeActionOptions.DefaultConditionalExpressionWrappingLength); } } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/CompletionOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/CompletionOptionsStorage.cs index 211ba63d18f5c..634619385f4c6 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/CompletionOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/CompletionOptionsStorage.cs @@ -32,29 +32,29 @@ public static CompletionOptions GetCompletionOptions(this IGlobalOptionService o // feature flags - public static readonly Option2 UnnamedSymbolCompletionDisabledFeatureFlag = new("CompletionOptions_UnnamedSymbolCompletionDisabledFeatureFlag", CompletionOptions.Default.UnnamedSymbolCompletionDisabled); - public static readonly Option2 ShowNewSnippetExperienceFeatureFlag = new("CompletionOptions_ShowNewSnippetExperienceFeatureFlag", CompletionOptions.Default.ShowNewSnippetExperienceFeatureFlag); - public static readonly PerLanguageOption2 HideAdvancedMembers = new("CompletionOptions_HideAdvancedMembers", CompletionOptions.Default.HideAdvancedMembers); - public static readonly PerLanguageOption2 TriggerOnTyping = new("CompletionOptions_TriggerOnTyping", CompletionOptions.Default.TriggerOnTyping); - public static readonly PerLanguageOption2 TriggerOnTypingLetters = new("CompletionOptions_TriggerOnTypingLetters", CompletionOptions.Default.TriggerOnTypingLetters); - public static readonly PerLanguageOption2 TriggerOnDeletion = new("CompletionOptions_TriggerOnDeletion", CompletionOptions.Default.TriggerOnDeletion); - public static readonly PerLanguageOption2 EnterKeyBehavior = new("CompletionOptions_EnterKeyBehavior", CompletionOptions.Default.EnterKeyBehavior, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); - public static readonly PerLanguageOption2 SnippetsBehavior = new("CompletionOptions_SnippetsBehavior", CompletionOptions.Default.SnippetsBehavior, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); - public static readonly PerLanguageOption2 ShowNameSuggestions = new("CompletionOptions_ShowNameSuggestions", CompletionOptions.Default.ShowNameSuggestions); + public static readonly Option2 UnnamedSymbolCompletionDisabledFeatureFlag = new("dotnet_disable_unnamed_symbol_completion", CompletionOptions.Default.UnnamedSymbolCompletionDisabled); + public static readonly Option2 ShowNewSnippetExperienceFeatureFlag = new("dotnet_show_new_snippet_experience_feature_flag", CompletionOptions.Default.ShowNewSnippetExperienceFeatureFlag); + public static readonly PerLanguageOption2 HideAdvancedMembers = new("dotnet_hide_advanced_members_in_completion", CompletionOptions.Default.HideAdvancedMembers); + public static readonly PerLanguageOption2 TriggerOnTyping = new("dotnet_trigger_completion_on_typing", CompletionOptions.Default.TriggerOnTyping); + public static readonly PerLanguageOption2 TriggerOnTypingLetters = new("dotnet_trigger_completion_on_typing_letters", CompletionOptions.Default.TriggerOnTypingLetters); + public static readonly PerLanguageOption2 TriggerOnDeletion = new("dotnet_trigger_completion_on_deletion", CompletionOptions.Default.TriggerOnDeletion); + public static readonly PerLanguageOption2 EnterKeyBehavior = new("dotnet_return_key_completion_behavior", CompletionOptions.Default.EnterKeyBehavior, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); + public static readonly PerLanguageOption2 SnippetsBehavior = new("dotnet_snippets_behavior", CompletionOptions.Default.SnippetsBehavior, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); + public static readonly PerLanguageOption2 ShowNameSuggestions = new("dotnet_show_name_completion_suggestions", CompletionOptions.Default.ShowNameSuggestions); //Dev16 options // Use tri-value so the default state can be used to turn on the feature with experimentation service. - public static readonly PerLanguageOption2 ShowItemsFromUnimportedNamespaces = new("CompletionOptions_ShowItemsFromUnimportedNamespaces", CompletionOptions.Default.ShowItemsFromUnimportedNamespaces); + public static readonly PerLanguageOption2 ShowItemsFromUnimportedNamespaces = new("dotnet_show_completion_items_from_unimported_namespaces", CompletionOptions.Default.ShowItemsFromUnimportedNamespaces); - public static readonly PerLanguageOption2 TriggerInArgumentLists = new("CompletionOptions_TriggerInArgumentLists", CompletionOptions.Default.TriggerInArgumentLists); + public static readonly PerLanguageOption2 TriggerInArgumentLists = new("dotnet_trigger_completion_in_argument_lists", CompletionOptions.Default.TriggerInArgumentLists); // Test-only option public static readonly Option2 ForceExpandedCompletionIndexCreation = new("CompletionOptions_ForceExpandedCompletionIndexCreation", defaultValue: false); // Embedded languages: - public static PerLanguageOption2 ProvideRegexCompletions = new("RegularExpressionsOptions_ProvideRegexCompletions", CompletionOptions.Default.ProvideRegexCompletions); - public static readonly PerLanguageOption2 ProvideDateAndTimeCompletions = new("DateAndTime_ProvideDateAndTimeCompletions", CompletionOptions.Default.ProvideDateAndTimeCompletions); - public static readonly PerLanguageOption2 ShowNewSnippetExperienceUserOption = new("CompletionOptions_ShowNewSnippetExperienceUserOption", CompletionOptions.Default.ShowNewSnippetExperienceUserOption); + public static PerLanguageOption2 ProvideRegexCompletions = new("dotnet_provide_regex_completions", CompletionOptions.Default.ProvideRegexCompletions); + public static readonly PerLanguageOption2 ProvideDateAndTimeCompletions = new("dotnet_provide_date_and_time_completions", CompletionOptions.Default.ProvideDateAndTimeCompletions); + public static readonly PerLanguageOption2 ShowNewSnippetExperienceUserOption = new("dotnet_show_new_snippet_experience", CompletionOptions.Default.ShowNewSnippetExperienceUserOption); } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/DiagnosticModeExtensions.cs b/src/Features/LanguageServer/Protocol/Features/Options/DiagnosticModeExtensions.cs index 065c8792a2f2a..bd24dbb9146a6 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/DiagnosticModeExtensions.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/DiagnosticModeExtensions.cs @@ -11,7 +11,7 @@ internal static class DiagnosticModeExtensions { public static DiagnosticMode GetDiagnosticMode(this IGlobalOptionService globalOptions, Option2? option = null) { - option ??= InternalDiagnosticsOptions.NormalDiagnosticMode; + option ??= InternalDiagnosticsOptionsStorage.NormalDiagnosticMode; var diagnosticModeOption = globalOptions.GetOption(option); // If the workspace diagnostic mode is set to Default, defer to the feature flag service. diff --git a/src/Features/LanguageServer/Protocol/Features/Options/DiagnosticOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/DiagnosticOptionsStorage.cs index f8a1f89fbc4fe..a28769f153e76 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/DiagnosticOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/DiagnosticOptionsStorage.cs @@ -9,9 +9,9 @@ namespace Microsoft.CodeAnalysis.Diagnostics internal sealed class DiagnosticOptionsStorage { public static readonly Option2 LspPullDiagnosticsFeatureFlag = new( - "DiagnosticOptions_LspPullDiagnosticsFeatureFlag", defaultValue: false); + "dotnet_enable_lsp_pull_diagnostics", defaultValue: false); public static readonly Option2 LogTelemetryForBackgroundAnalyzerExecution = new( - "DiagnosticOptions_LogTelemetryForBackgroundAnalyzerExecution", defaultValue: false); + "dotnet_log_telemetry_for_background_analyzer_execution", defaultValue: false); } } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/DocumentationCommentOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/DocumentationCommentOptionsStorage.cs index c2ea26422a590..514a457c471a0 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/DocumentationCommentOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/DocumentationCommentOptionsStorage.cs @@ -20,6 +20,6 @@ public static DocumentationCommentOptions GetDocumentationCommentOptions(this IG }; public static readonly PerLanguageOption2 AutoXmlDocCommentGeneration = new( - "DocumentationCommentOptions_AutoXmlDocCommentGeneration", DocumentationCommentOptions.Default.AutoXmlDocCommentGeneration); + "dotnet_auto_xml_doc_comment_generation", DocumentationCommentOptions.Default.AutoXmlDocCommentGeneration); } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/ExtractMethodOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/ExtractMethodOptionsStorage.cs index ff349b010fcad..3729e2b21dffe 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/ExtractMethodOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/ExtractMethodOptionsStorage.cs @@ -34,5 +34,5 @@ public static ValueTask GetExtractMethodGenerati => document.GetExtractMethodGenerationOptionsAsync(globalOptions.GetExtractMethodGenerationOptions(document.Project.Services), cancellationToken); public static readonly PerLanguageOption2 DontPutOutOrRefOnStruct = new( - "ExtractMethodOptions_DontPutOutOrRefOnStruct", ExtractMethodOptions.Default.DontPutOutOrRefOnStruct); // NOTE: the spelling error is what we've shipped and thus should not change + "dotnet_extract_method_no_ref_or_out_structs", ExtractMethodOptions.Default.DontPutOutOrRefOnStruct); } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/HighlightingOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/HighlightingOptionsStorage.cs index acdb921e17ffc..9b4a1f9498562 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/HighlightingOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/HighlightingOptionsStorage.cs @@ -16,10 +16,10 @@ public static HighlightingOptions GetHighlightingOptions(this IGlobalOptionServi }; public static PerLanguageOption2 HighlightRelatedRegexComponentsUnderCursor = - new("RegularExpressionsOptions_HighlightRelatedRegexComponentsUnderCursor", + new("dotnet_highlight_related_regex_components", defaultValue: true); public static PerLanguageOption2 HighlightRelatedJsonComponentsUnderCursor = - new("JsonFeatureOptions_HighlightRelatedJsonComponentsUnderCursor", + new("dotnet_highlight_related_json_components", defaultValue: HighlightingOptions.Default.HighlightRelatedJsonComponentsUnderCursor); } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/IdeAnalyzerOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/IdeAnalyzerOptionsStorage.cs index 7bcef98e8662c..3287d087067c5 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/IdeAnalyzerOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/IdeAnalyzerOptionsStorage.cs @@ -36,17 +36,17 @@ public static IdeAnalyzerOptions GetIdeAnalyzerOptions(this IGlobalOptionService } public static readonly Option2 CrashOnAnalyzerException = new( - "InternalDiagnosticsOptions_CrashOnAnalyzerException", IdeAnalyzerOptions.CommonDefault.CrashOnAnalyzerException); + "dotnet_crash_on_analyzer_exception", IdeAnalyzerOptions.CommonDefault.CrashOnAnalyzerException); public static PerLanguageOption2 ReportInvalidPlaceholdersInStringDotFormatCalls = new( - "ValidateFormatStringOption_ReportInvalidPlaceholdersInStringDotFormatCalls", IdeAnalyzerOptions.CommonDefault.ReportInvalidPlaceholdersInStringDotFormatCalls); + "dotnet_report_invalid_placeholders_in_string_dot_format_calls", IdeAnalyzerOptions.CommonDefault.ReportInvalidPlaceholdersInStringDotFormatCalls); public static PerLanguageOption2 ReportInvalidRegexPatterns = new( - "RegularExpressionsOptions_ReportInvalidRegexPatterns", IdeAnalyzerOptions.CommonDefault.ReportInvalidRegexPatterns); + "dotnet_report_invalid_regex_patterns", IdeAnalyzerOptions.CommonDefault.ReportInvalidRegexPatterns); public static PerLanguageOption2 ReportInvalidJsonPatterns = new( - "JsonFeatureOptions_ReportInvalidJsonPatterns", IdeAnalyzerOptions.CommonDefault.ReportInvalidJsonPatterns); + "dotnet_report_invalid_json_patterns", IdeAnalyzerOptions.CommonDefault.ReportInvalidJsonPatterns); public static PerLanguageOption2 DetectAndOfferEditorFeaturesForProbableJsonStrings = new( - "JsonFeatureOptions_DetectAndOfferEditorFeaturesForProbableJsonStrings", IdeAnalyzerOptions.CommonDefault.DetectAndOfferEditorFeaturesForProbableJsonStrings); + "dotnet_detect_and_offer_editor_features_for_probable_json_strings", IdeAnalyzerOptions.CommonDefault.DetectAndOfferEditorFeaturesForProbableJsonStrings); } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/ImplementTypeOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/ImplementTypeOptionsStorage.cs index cc2d8f034d58d..b33f2f2e2f5e6 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/ImplementTypeOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/ImplementTypeOptionsStorage.cs @@ -22,11 +22,11 @@ public static ImplementTypeGenerationOptions GetImplementTypeGenerationOptions(t globalOptions.CreateProvider()); public static readonly PerLanguageOption2 InsertionBehavior = - new("ImplementTypeOptions_InsertionBehavior", + new("dotnet_insertion_behavior", defaultValue: ImplementTypeOptions.Default.InsertionBehavior, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); public static readonly PerLanguageOption2 PropertyGenerationBehavior = - new("ImplementTypeOptions_PropertyGenerationBehavior", + new("dotnet_property_generation_behavior", defaultValue: ImplementTypeOptions.Default.PropertyGenerationBehavior, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); } } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/InternalDiagnosticsOptions.cs b/src/Features/LanguageServer/Protocol/Features/Options/InternalDiagnosticsOptionsStorage.cs similarity index 89% rename from src/Features/LanguageServer/Protocol/Features/Options/InternalDiagnosticsOptions.cs rename to src/Features/LanguageServer/Protocol/Features/Options/InternalDiagnosticsOptionsStorage.cs index 5b7994da021af..532bdc051e011 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/InternalDiagnosticsOptions.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/InternalDiagnosticsOptionsStorage.cs @@ -6,7 +6,7 @@ namespace Microsoft.CodeAnalysis.Diagnostics; -internal static class InternalDiagnosticsOptions +internal static class InternalDiagnosticsOptionsStorage { private static readonly EditorConfigValueSerializer s_editorConfigValueSerializer = EditorConfigValueSerializer.CreateSerializerForEnum(); /// @@ -24,5 +24,5 @@ internal static class InternalDiagnosticsOptions "InternalDiagnosticsOptions_LiveShareDiagnosticMode", defaultValue: DiagnosticMode.LspPull, serializer: s_editorConfigValueSerializer); public static readonly Option2 NormalDiagnosticMode = new( - "InternalDiagnosticsOptions_NormalDiagnosticMode", defaultValue: DiagnosticMode.Default, serializer: s_editorConfigValueSerializer); + "dotnet_normal_diagnostic_mode", defaultValue: DiagnosticMode.Default, serializer: s_editorConfigValueSerializer); } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/QuickInfoOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/QuickInfoOptionsStorage.cs index 122487ac63035..9b9af3ce1b042 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/QuickInfoOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/QuickInfoOptionsStorage.cs @@ -16,9 +16,9 @@ public static QuickInfoOptions GetQuickInfoOptions(this IGlobalOptionService glo }; public static readonly PerLanguageOption2 ShowRemarksInQuickInfo = new( - "QuickInfoOptions_ShowRemarksInQuickInfo", QuickInfoOptions.Default.ShowRemarksInQuickInfo); + "dotnet_show_remarks_in_quick_info", QuickInfoOptions.Default.ShowRemarksInQuickInfo); public static readonly Option2 IncludeNavigationHintsInQuickInfo = new( - "QuickInfoOptions_IncludeNavigationHintsInQuickInfo", QuickInfoOptions.Default.IncludeNavigationHintsInQuickInfo); + "dotnet_include_navigation_hints_in_quick_info", QuickInfoOptions.Default.IncludeNavigationHintsInQuickInfo); } } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/SolutionCrawlerOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/SolutionCrawlerOptionsStorage.cs index 452115cbe5e56..1f9772394ef7c 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/SolutionCrawlerOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/SolutionCrawlerOptionsStorage.cs @@ -14,7 +14,7 @@ internal static class SolutionCrawlerOptionsStorage /// Option to turn configure background analysis scope for the current user. /// public static readonly PerLanguageOption2 BackgroundAnalysisScopeOption = new( - "SolutionCrawlerOptionsStorage_BackgroundAnalysisScopeOption", defaultValue: BackgroundAnalysisScope.Default, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); + "dotnet_solution_crawler_background_analysis_scope", defaultValue: BackgroundAnalysisScope.Default, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); /// /// Option to turn configure background analysis scope for the current solution. @@ -26,16 +26,16 @@ internal static class SolutionCrawlerOptionsStorage /// Option to configure compiler diagnostics scope for the current user. /// public static readonly PerLanguageOption2 CompilerDiagnosticsScopeOption = new( - "SolutionCrawlerOptionsStorage_CompilerDiagnosticsScopeOption", defaultValue: CompilerDiagnosticsScope.OpenFiles, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); + "dotnet_compiler_diagnostics_scope", defaultValue: CompilerDiagnosticsScope.OpenFiles, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); public static readonly PerLanguageOption2 RemoveDocumentDiagnosticsOnDocumentClose = new( - "ServiceFeatureOnOffOptions_RemoveDocumentDiagnosticsOnDocumentClose", defaultValue: false); + "remove_document_diagnostics_on_document_close", defaultValue: false); public static readonly Option2 EnableDiagnosticsInSourceGeneratedFiles = new( - "WorkspaceConfigurationOptions_EnableDiagnosticsInSourceGeneratedFiles", defaultValue: null); + "dotnet_enable_diagnostics_in_source_generated_files", defaultValue: null); public static readonly Option2 EnableDiagnosticsInSourceGeneratedFilesFeatureFlag = new( - "WorkspaceConfigurationOptions_EnableDiagnosticsInSourceGeneratedFilesFeatureFlag", defaultValue: false); + "dotnet_enable_diagnostics_in_source_generated_files_feature_flag", defaultValue: false); /// /// Enables forced scope when low VM is detected to improve performance. diff --git a/src/Features/LanguageServer/Protocol/Features/Options/SymbolSearchOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/SymbolSearchOptionsStorage.cs index b79ff1cc01eed..4af7fdac319de 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/SymbolSearchOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/SymbolSearchOptionsStorage.cs @@ -16,9 +16,9 @@ internal static SymbolSearchOptions GetSymbolSearchOptions(this IGlobalOptionSer }; public static PerLanguageOption2 SearchReferenceAssemblies = - new("SymbolSearchOptions_SuggestForTypesInReferenceAssemblies", SymbolSearchOptions.Default.SearchReferenceAssemblies); + new("dotnet_search_reference_assemblies", SymbolSearchOptions.Default.SearchReferenceAssemblies); public static PerLanguageOption2 SearchNuGetPackages = - new("SymbolSearchOptions_SuggestForTypesInNuGetPackages", SymbolSearchOptions.Default.SearchNuGetPackages); + new("dotnet_search_nuget_packages", SymbolSearchOptions.Default.SearchNuGetPackages); } } diff --git a/src/Features/LanguageServer/Protocol/Features/Options/WorkspaceConfigurationOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/Options/WorkspaceConfigurationOptionsStorage.cs index ca11effe59e25..ea95b6f751c05 100644 --- a/src/Features/LanguageServer/Protocol/Features/Options/WorkspaceConfigurationOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/Options/WorkspaceConfigurationOptionsStorage.cs @@ -20,27 +20,27 @@ public static WorkspaceConfigurationOptions GetWorkspaceConfigurationOptions(thi DisableSharedSyntaxTrees: globalOptions.GetOption(DisableSharedSyntaxTrees)); public static readonly Option2 Database = new( - "Storage_Database", WorkspaceConfigurationOptions.Default.CacheStorage, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); + "dotnet_storage_database", WorkspaceConfigurationOptions.Default.CacheStorage, serializer: EditorConfigValueSerializer.CreateSerializerForEnum()); public static readonly Option2 CloudCacheFeatureFlag = new( - "Storage_CloudCacheFeatureFlag", WorkspaceConfigurationOptions.Default.CacheStorage == StorageDatabase.CloudCache); + "dotnet_storage_cloud_cache", WorkspaceConfigurationOptions.Default.CacheStorage == StorageDatabase.CloudCache); public static readonly Option2 DisableReferenceManagerRecoverableMetadata = new( - "WorkspaceConfigurationOptions_DisableReferenceManagerRecoverableMetadata", WorkspaceConfigurationOptions.Default.DisableReferenceManagerRecoverableMetadata); + "dotnet_disable_reference_manager_recoverable_metadata", WorkspaceConfigurationOptions.Default.DisableReferenceManagerRecoverableMetadata); public static readonly Option2 DisableBackgroundCompilation = new( - "WorkspaceConfigurationOptions_DisableBackgroundCompilation", WorkspaceConfigurationOptions.Default.DisableBackgroundCompilation); + "dotnet_disable_background_compilation", WorkspaceConfigurationOptions.Default.DisableBackgroundCompilation); public static readonly Option2 DisableSharedSyntaxTrees = new( - "WorkspaceConfigurationOptions_DisableSharedSyntaxTrees", WorkspaceConfigurationOptions.Default.DisableSharedSyntaxTrees); + "dotnet_disable_shared_syntax_trees", WorkspaceConfigurationOptions.Default.DisableSharedSyntaxTrees); /// /// This option allows the user to enable this. We are putting this behind a feature flag for now since we could have extensions /// surprised by this and we want some time to work through those issues. /// public static readonly Option2 EnableOpeningSourceGeneratedFilesInWorkspace = new( - "WorkspaceConfigurationOptions_EnableOpeningSourceGeneratedFilesInWorkspace", defaultValue: null); + "dotnet_enable_opening_source_generated_files_in_workspace", defaultValue: null); public static readonly Option2 EnableOpeningSourceGeneratedFilesInWorkspaceFeatureFlag = new( - "WorkspaceConfigurationOptions_EnableOpeningSourceGeneratedFilesInWorkspaceFeatureFlag", WorkspaceConfigurationOptions.Default.EnableOpeningSourceGeneratedFiles); + "dotnet_enable_opening_source_generated_files_in_workspace_feature_flag", WorkspaceConfigurationOptions.Default.EnableOpeningSourceGeneratedFiles); } diff --git a/src/Features/LanguageServer/Protocol/Features/TaskList/TaskListOptionsStorage.cs b/src/Features/LanguageServer/Protocol/Features/TaskList/TaskListOptionsStorage.cs index 0633d02995936..726caba89cd51 100644 --- a/src/Features/LanguageServer/Protocol/Features/TaskList/TaskListOptionsStorage.cs +++ b/src/Features/LanguageServer/Protocol/Features/TaskList/TaskListOptionsStorage.cs @@ -9,8 +9,8 @@ namespace Microsoft.CodeAnalysis.TaskList { internal static class TaskListOptionsStorage { - public static readonly Option2> Descriptors = new("TaskListOptionsStorage_Descriptors", TaskListOptions.Default.Descriptors); - public static readonly Option2 ComputeTaskListItemsForClosedFiles = new("TaskListOptionsStorage_ComputeTaskListItemsForClosedFiles", defaultValue: true); + public static readonly Option2> Descriptors = new("dotnet_task_list_storage_descriptors", TaskListOptions.Default.Descriptors); + public static readonly Option2 ComputeTaskListItemsForClosedFiles = new("dotnet_compute_task_list_items_for_closed_files", defaultValue: true); public static TaskListOptions GetTaskListOptions(this IGlobalOptionService globalOptions) => new() diff --git a/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionHandler.cs index 5e78a14b0dcf5..a236065c2506e 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Completion/CompletionHandler.cs @@ -331,7 +331,7 @@ static void PromoteCommonCommitCharactersOntoList(LSP.VSInternalCompletionList c var resultId = result.Value.ResultId; - var completionListMaxSize = _globalOptions.GetOption(LspOptions.MaxCompletionListSize); + var completionListMaxSize = _globalOptions.GetOption(LspOptionsStorage.MaxCompletionListSize); var (completionList, isIncomplete) = FilterCompletionList(result.Value.List, completionListMaxSize, completionListSpan, completionTrigger, sourceText, document); return (completionList, isIncomplete, resultId); diff --git a/src/Features/LanguageServer/Protocol/Handler/Diagnostics/AbstractPullDiagnosticHandler.cs b/src/Features/LanguageServer/Protocol/Handler/Diagnostics/AbstractPullDiagnosticHandler.cs index 7f6a19db9c498..957abcc2eeb84 100644 --- a/src/Features/LanguageServer/Protocol/Handler/Diagnostics/AbstractPullDiagnosticHandler.cs +++ b/src/Features/LanguageServer/Protocol/Handler/Diagnostics/AbstractPullDiagnosticHandler.cs @@ -244,9 +244,9 @@ private DiagnosticMode GetDiagnosticMode(RequestContext context) { var diagnosticModeOption = context.ServerKind switch { - WellKnownLspServerKinds.LiveShareLspServer => InternalDiagnosticsOptions.LiveShareDiagnosticMode, - WellKnownLspServerKinds.RazorLspServer => InternalDiagnosticsOptions.RazorDiagnosticMode, - _ => InternalDiagnosticsOptions.NormalDiagnosticMode, + WellKnownLspServerKinds.LiveShareLspServer => InternalDiagnosticsOptionsStorage.LiveShareDiagnosticMode, + WellKnownLspServerKinds.RazorLspServer => InternalDiagnosticsOptionsStorage.RazorDiagnosticMode, + _ => InternalDiagnosticsOptionsStorage.NormalDiagnosticMode, }; var diagnosticMode = GlobalOptions.GetDiagnosticMode(diagnosticModeOption); diff --git a/src/Features/LanguageServer/Protocol/LspOptions.cs b/src/Features/LanguageServer/Protocol/LspOptionsStorage.cs similarity index 78% rename from src/Features/LanguageServer/Protocol/LspOptions.cs rename to src/Features/LanguageServer/Protocol/LspOptionsStorage.cs index 8e0232792982b..995a0880fc0bb 100644 --- a/src/Features/LanguageServer/Protocol/LspOptions.cs +++ b/src/Features/LanguageServer/Protocol/LspOptionsStorage.cs @@ -6,18 +6,18 @@ namespace Microsoft.CodeAnalysis.LanguageServer { - internal sealed class LspOptions + internal sealed class LspOptionsStorage { /// /// This sets the max list size we will return in response to a completion request. /// If there are more than this many items, we will set the isIncomplete flag on the returned completion list. /// - public static readonly Option2 MaxCompletionListSize = new("LspOptions_MaxCompletionListSize", defaultValue: 1000); + public static readonly Option2 MaxCompletionListSize = new("dotnet_lsp_max_completion_list_size", defaultValue: 1000); // Flag is defined in VisualStudio\Core\Def\PackageRegistration.pkgdef. - public static readonly Option2 LspEditorFeatureFlag = new("LspOptions_LspEditorFeatureFlag", defaultValue: false); + public static readonly Option2 LspEditorFeatureFlag = new("dotnet_enable_lsp_editor", defaultValue: false); // Flag is defined in VisualStudio\Core\Def\PackageRegistration.pkgdef. - public static readonly Option2 LspSemanticTokensFeatureFlag = new("LspOptions_LspSemanticTokensFeatureFlag", defaultValue: false); + public static readonly Option2 LspSemanticTokensFeatureFlag = new("dotnet_enable_lsp_semantic_tokens", defaultValue: false); } } diff --git a/src/Features/LanguageServer/ProtocolUnitTests/Completion/CompletionTests.cs b/src/Features/LanguageServer/ProtocolUnitTests/Completion/CompletionTests.cs index c4e1a87bcdccf..a5118531eda57 100644 --- a/src/Features/LanguageServer/ProtocolUnitTests/Completion/CompletionTests.cs +++ b/src/Features/LanguageServer/ProtocolUnitTests/Completion/CompletionTests.cs @@ -1289,7 +1289,7 @@ void M() var globalOptions = testLspServer.TestWorkspace.GetService(); var listMaxSize = 1; - globalOptions.SetGlobalOption(LspOptions.MaxCompletionListSize, listMaxSize); + globalOptions.SetGlobalOption(LspOptionsStorage.MaxCompletionListSize, listMaxSize); var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); Assert.True(results.IsIncomplete); diff --git a/src/Features/LanguageServer/ProtocolUnitTests/Diagnostics/AbstractPullDiagnosticTestsBase.cs b/src/Features/LanguageServer/ProtocolUnitTests/Diagnostics/AbstractPullDiagnosticTestsBase.cs index 1b6a7d4881114..2623bbd39c0be 100644 --- a/src/Features/LanguageServer/ProtocolUnitTests/Diagnostics/AbstractPullDiagnosticTestsBase.cs +++ b/src/Features/LanguageServer/ProtocolUnitTests/Diagnostics/AbstractPullDiagnosticTestsBase.cs @@ -287,7 +287,7 @@ private protected static InitializationOptions GetInitializationOptions( globalOptions.SetGlobalOption(SolutionCrawlerOptionsStorage.BackgroundAnalysisScopeOption, LanguageNames.CSharp, scope); globalOptions.SetGlobalOption(SolutionCrawlerOptionsStorage.BackgroundAnalysisScopeOption, LanguageNames.VisualBasic, scope); globalOptions.SetGlobalOption(SolutionCrawlerOptionsStorage.BackgroundAnalysisScopeOption, InternalLanguageNames.TypeScript, scope); - globalOptions.SetGlobalOption(InternalDiagnosticsOptions.NormalDiagnosticMode, mode); + globalOptions.SetGlobalOption(InternalDiagnosticsOptionsStorage.NormalDiagnosticMode, mode); globalOptions.SetGlobalOption(SolutionCrawlerOptionsStorage.EnableDiagnosticsInSourceGeneratedFiles, true); }, ServerKind = serverKind, diff --git a/src/Features/LanguageServer/ProtocolUnitTests/VSTypeScriptHandlerTests.cs b/src/Features/LanguageServer/ProtocolUnitTests/VSTypeScriptHandlerTests.cs index 1e3d8caf143f2..9ffd2fa89b0a3 100644 --- a/src/Features/LanguageServer/ProtocolUnitTests/VSTypeScriptHandlerTests.cs +++ b/src/Features/LanguageServer/ProtocolUnitTests/VSTypeScriptHandlerTests.cs @@ -65,7 +65,7 @@ public async Task TestRoslynTypeScriptHandlerInvoked() var options = new InitializationOptions() { - OptionUpdater = globalOptions => globalOptions.SetGlobalOption(InternalDiagnosticsOptions.NormalDiagnosticMode, DiagnosticMode.LspPull) + OptionUpdater = globalOptions => globalOptions.SetGlobalOption(InternalDiagnosticsOptionsStorage.NormalDiagnosticMode, DiagnosticMode.LspPull) }; await using var testLspServer = await CreateTsTestLspServerAsync(workspaceXml, options); diff --git a/src/Tools/ExternalAccess/FSharp/FSharpGlobalOptions.cs b/src/Tools/ExternalAccess/FSharp/FSharpGlobalOptions.cs index 5cc39b805f5d3..ebb4987c5faca 100644 --- a/src/Tools/ExternalAccess/FSharp/FSharpGlobalOptions.cs +++ b/src/Tools/ExternalAccess/FSharp/FSharpGlobalOptions.cs @@ -27,8 +27,8 @@ public FSharpGlobalOptions(IGlobalOptionService globalOptions) public bool BlockForCompletionItems { - get => _globalOptions.GetOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.FSharp); - set => _globalOptions.SetGlobalOption(CompletionViewOptions.BlockForCompletionItems, LanguageNames.FSharp, value); + get => _globalOptions.GetOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.FSharp); + set => _globalOptions.SetGlobalOption(CompletionViewOptionsStorage.BlockForCompletionItems, LanguageNames.FSharp, value); } public void SetBackgroundAnalysisScope(bool openFilesOnly) diff --git a/src/Tools/ExternalAccess/FSharp/Internal/Editor/FSharpSmartIndentProvider.cs b/src/Tools/ExternalAccess/FSharp/Internal/Editor/FSharpSmartIndentProvider.cs index 79ae7cda8ce05..7aff5846e719c 100644 --- a/src/Tools/ExternalAccess/FSharp/Internal/Editor/FSharpSmartIndentProvider.cs +++ b/src/Tools/ExternalAccess/FSharp/Internal/Editor/FSharpSmartIndentProvider.cs @@ -6,6 +6,7 @@ using System.ComponentModel.Composition; using System.Threading; using Microsoft.CodeAnalysis.Editor; +using Microsoft.CodeAnalysis.Editor.Implementation.SmartIndent; using Microsoft.CodeAnalysis.Editor.Shared.Extensions; using Microsoft.CodeAnalysis.Editor.Shared.Options; using Microsoft.CodeAnalysis.ExternalAccess.FSharp.Editor; @@ -49,7 +50,7 @@ public FSharpSmartIndentProvider( } public ISmartIndent? CreateSmartIndent(ITextView textView) - => _globalOptions.GetOption(InternalFeatureOnOffOptions.SmartIndenter) ? new SmartIndent(textView, this) : null; + => _globalOptions.GetOption(SmartIndenterOptionsStorage.SmartIndenter) ? new SmartIndent(textView, this) : null; private sealed class SmartIndent : ISmartIndent { diff --git a/src/Tools/ExternalAccess/Razor/RazorTestAnalyzerLoader.cs b/src/Tools/ExternalAccess/Razor/RazorTestAnalyzerLoader.cs index cbbd035324cc7..269787470cd7d 100644 --- a/src/Tools/ExternalAccess/Razor/RazorTestAnalyzerLoader.cs +++ b/src/Tools/ExternalAccess/Razor/RazorTestAnalyzerLoader.cs @@ -29,7 +29,7 @@ public RazorTestAnalyzerLoader(IDiagnosticAnalyzerService analyzerService, IDiag public void InitializeDiagnosticsServices(Workspace workspace) { - _globalOptionService.SetGlobalOption(InternalDiagnosticsOptions.NormalDiagnosticMode, DiagnosticMode.LspPull); + _globalOptionService.SetGlobalOption(InternalDiagnosticsOptionsStorage.NormalDiagnosticMode, DiagnosticMode.LspPull); _ = ((IIncrementalAnalyzerProvider)_analyzerService).CreateIncrementalAnalyzer(workspace); _diagnosticService.Register((IDiagnosticUpdateSource)_analyzerService); } diff --git a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs index 060b1495d61b3..9c75e4807affe 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs +++ b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs @@ -17,6 +17,7 @@ using Microsoft.CodeAnalysis.Editing; using Microsoft.CodeAnalysis.Editor.CSharp.BlockCommentEditing; using Microsoft.CodeAnalysis.Editor.CSharp.SplitStringLiteral; +using Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking; using Microsoft.CodeAnalysis.Editor.Implementation.SplitComment; using Microsoft.CodeAnalysis.Editor.Implementation.Suggestions; using Microsoft.CodeAnalysis.Editor.InlineDiagnostics; @@ -36,7 +37,6 @@ using Microsoft.CodeAnalysis.QuickInfo; using Microsoft.CodeAnalysis.ReferenceHighlighting; using Microsoft.CodeAnalysis.Remote; -using Microsoft.CodeAnalysis.RenameTracking; using Microsoft.CodeAnalysis.SolutionCrawler; using Microsoft.CodeAnalysis.StackTraceExplorer; using Microsoft.CodeAnalysis.StringCopyPaste; @@ -62,18 +62,18 @@ public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel compon // Analysis BindToOption(Run_background_code_analysis_for, SolutionCrawlerOptionsStorage.BackgroundAnalysisScopeOption, LanguageNames.CSharp, label: Run_background_code_analysis_for_label); BindToOption(Show_compiler_errors_and_warnings_for, SolutionCrawlerOptionsStorage.CompilerDiagnosticsScopeOption, LanguageNames.CSharp, label: Show_compiler_errors_and_warnings_for_label); - BindToOption(DisplayDiagnosticsInline, InlineDiagnosticsOptions.EnableInlineDiagnostics, LanguageNames.CSharp); - BindToOption(at_the_end_of_the_line_of_code, InlineDiagnosticsOptions.Location, InlineDiagnosticsLocations.PlacedAtEndOfCode, LanguageNames.CSharp); - BindToOption(on_the_right_edge_of_the_editor_window, InlineDiagnosticsOptions.Location, InlineDiagnosticsLocations.PlacedAtEndOfEditor, LanguageNames.CSharp); + BindToOption(DisplayDiagnosticsInline, InlineDiagnosticsOptionsStorage.EnableInlineDiagnostics, LanguageNames.CSharp); + BindToOption(at_the_end_of_the_line_of_code, InlineDiagnosticsOptionsStorage.Location, InlineDiagnosticsLocations.PlacedAtEndOfCode, LanguageNames.CSharp); + BindToOption(on_the_right_edge_of_the_editor_window, InlineDiagnosticsOptionsStorage.Location, InlineDiagnosticsLocations.PlacedAtEndOfEditor, LanguageNames.CSharp); - BindToOption(Run_code_analysis_in_separate_process, RemoteHostOptions.OOP64Bit); + BindToOption(Run_code_analysis_in_separate_process, RemoteHostOptionsStorage.OOP64Bit); BindToOption(Analyze_source_generated_files, SolutionCrawlerOptionsStorage.EnableDiagnosticsInSourceGeneratedFiles, () => { // If the option has not been set by the user, check if the option is enabled from experimentation. If so, default to that. return optionStore.GetOption(SolutionCrawlerOptionsStorage.EnableDiagnosticsInSourceGeneratedFilesFeatureFlag); }); - BindToOption(Enable_file_logging_for_diagnostics, VisualStudioLoggingOptionsMetadata.EnableFileLoggingForDiagnostics); + BindToOption(Enable_file_logging_for_diagnostics, VisualStudioLoggingOptionsStorage.EnableFileLoggingForDiagnostics); BindToOption(Skip_analyzers_for_implicitly_triggered_builds, FeatureOnOffOptions.SkipAnalyzersForImplicitlyTriggeredBuilds); BindToOption(Show_Remove_Unused_References_command_in_Solution_Explorer_experimental, FeatureOnOffOptions.OfferRemoveUnusedReferences, () => { @@ -90,7 +90,7 @@ public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel compon // Rename BindToOption(Rename_asynchronously_exerimental, InlineRenameSessionOptionsStorage.RenameAsynchronously); - BindToOption(Rename_UI_setting, InlineRenameUIOptions.UseInlineAdornment, label: Rename_UI_setting_label); + BindToOption(Rename_UI_setting, InlineRenameUIOptionsStorage.UseInlineAdornment, label: Rename_UI_setting_label); // Using Directives BindToOption(PlaceSystemNamespaceFirst, GenerationOptions.PlaceSystemNamespaceFirst, LanguageNames.CSharp); @@ -100,10 +100,10 @@ public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel compon BindToOption(AddUsingsOnPaste, AddImportOnPasteOptionsStorage.AddImportsOnPaste, LanguageNames.CSharp); // Quick Actions - BindToOption(ComputeQuickActionsAsynchronouslyExperimental, SuggestionsOptions.Asynchronous, () => + BindToOption(ComputeQuickActionsAsynchronouslyExperimental, SuggestionsOptionsStorage.Asynchronous, () => { // If the option has not been set by the user, check if the option is disabled from experimentation. - return !optionStore.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag); + return !optionStore.GetOption(SuggestionsOptionsStorage.AsynchronousQuickActionsDisableFeatureFlag); }); // Highlighting @@ -132,13 +132,13 @@ public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel compon // Comments BindToOption(GenerateXmlDocCommentsForTripleSlash, DocumentationCommentOptionsStorage.AutoXmlDocCommentGeneration, LanguageNames.CSharp); - BindToOption(InsertSlashSlashAtTheStartOfNewLinesWhenWritingSingleLineComments, SplitCommentOptions.Enabled, LanguageNames.CSharp); + BindToOption(InsertSlashSlashAtTheStartOfNewLinesWhenWritingSingleLineComments, SplitCommentOptionsStorage.Enabled, LanguageNames.CSharp); BindToOption(InsertAsteriskAtTheStartOfNewLinesWhenWritingBlockComments, BlockCommentEditingOptionsStorage.AutoInsertBlockCommentStartString, LanguageNames.CSharp); // Editor Help BindToOption(ShowRemarksInQuickInfo, QuickInfoOptionsStorage.ShowRemarksInQuickInfo, LanguageNames.CSharp); BindToOption(RenameTrackingPreview, RenameTrackingOptionsStorage.RenameTrackingPreview, LanguageNames.CSharp); - BindToOption(Split_string_literals_on_enter, SplitStringLiteralOptions.Enabled); + BindToOption(Split_string_literals_on_enter, SplitStringLiteralOptionsStorage.Enabled); BindToOption(Fix_text_pasted_into_string_literals_experimental, StringCopyPasteOptionsStorage.AutomaticallyFixStringContentsOnPaste, LanguageNames.CSharp); BindToOption(Report_invalid_placeholders_in_string_dot_format_calls, IdeAnalyzerOptionsStorage.ReportInvalidPlaceholdersInStringDotFormatCalls, LanguageNames.CSharp); BindToOption(Underline_reassigned_variables, ClassificationOptionsStorage.ClassifyReassignedVariables, LanguageNames.CSharp); @@ -161,7 +161,7 @@ public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel compon BindToOption(Highlight_related_JSON_components_under_cursor, HighlightingOptionsStorage.HighlightRelatedJsonComponentsUnderCursor, LanguageNames.CSharp); // Classifications - BindToOption(Editor_color_scheme, ColorSchemeOptions.ColorScheme); + BindToOption(Editor_color_scheme, ColorSchemeOptionsStorage.ColorScheme); // Extract Method BindToOption(DontPutOutOrRefOnStruct, ExtractMethodOptionsStorage.DontPutOutOrRefOnStruct, LanguageNames.CSharp); @@ -173,8 +173,8 @@ public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel compon BindToOption(prefer_auto_properties, ImplementTypeOptionsStorage.PropertyGenerationBehavior, ImplementTypePropertyGenerationBehavior.PreferAutoProperties, LanguageNames.CSharp); // Inline Hints - BindToOption(DisplayAllHintsWhilePressingAltF1, InlineHintsViewOptions.DisplayAllHintsWhilePressingAltF1); - BindToOption(ColorHints, InlineHintsViewOptions.ColorHints, LanguageNames.CSharp); + BindToOption(DisplayAllHintsWhilePressingAltF1, InlineHintsViewOptionsStorage.DisplayAllHintsWhilePressingAltF1); + BindToOption(ColorHints, InlineHintsViewOptionsStorage.ColorHints, LanguageNames.CSharp); BindToOption(DisplayInlineParameterNameHints, InlineHintsOptionsStorage.EnabledForParameters, LanguageNames.CSharp); BindToOption(ShowHintsForLiterals, InlineHintsOptionsStorage.ForLiteralParameters, LanguageNames.CSharp); @@ -197,7 +197,7 @@ public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel compon BindToOption(IncludeGlobalImports, InheritanceMarginOptionsStorage.InheritanceMarginIncludeGlobalImports, LanguageNames.CSharp); // Stack Trace Explorer - BindToOption(AutomaticallyOpenStackTraceExplorer, StackTraceExplorerOptionsMetadata.OpenOnFocus); + BindToOption(AutomaticallyOpenStackTraceExplorer, StackTraceExplorerOptionsStorage.OpenOnFocus); } // Since this dialog is constructed once for the lifetime of the application and VS Theme can be changed after the application has started, @@ -221,7 +221,7 @@ internal override void OnLoad() private void UpdatePullDiagnosticsOptions() { - var normalPullDiagnosticsOption = OptionStore.GetOption(InternalDiagnosticsOptions.NormalDiagnosticMode); + var normalPullDiagnosticsOption = OptionStore.GetOption(InternalDiagnosticsOptionsStorage.NormalDiagnosticMode); Enable_pull_diagnostics_experimental_requires_restart.IsChecked = GetCheckboxValueForDiagnosticMode(normalPullDiagnosticsOption); AddSearchHandler(Enable_pull_diagnostics_experimental_requires_restart); @@ -251,7 +251,7 @@ private void Enable_pull_diagnostics_experimental_requires_restart_CheckedChange } // Update the workspace option. - this.OptionStore.SetOption(InternalDiagnosticsOptions.NormalDiagnosticMode, newDiagnosticMode); + this.OptionStore.SetOption(InternalDiagnosticsOptionsStorage.NormalDiagnosticMode, newDiagnosticMode); UpdatePullDiagnosticsOptions(); @@ -268,7 +268,7 @@ static DiagnosticMode GetDiagnosticModeForCheckboxValue(bool? checkboxValue) private void Enable_pull_diagnostics_experimental_requires_restart_Indeterminate(object sender, RoutedEventArgs e) { - this.OptionStore.SetOption(InternalDiagnosticsOptions.NormalDiagnosticMode, DiagnosticMode.Default); + this.OptionStore.SetOption(InternalDiagnosticsOptionsStorage.NormalDiagnosticMode, DiagnosticMode.Default); UpdatePullDiagnosticsOptions(); } diff --git a/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.Completion.cs b/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.Completion.cs index cd83affc78f4c..2263b3ddccc34 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.Completion.cs +++ b/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.Completion.cs @@ -16,14 +16,14 @@ public int BringUpOnIdentifier public int HighlightMatchingPortionsOfCompletionListItems { - get { return GetBooleanOption(CompletionViewOptions.HighlightMatchingPortionsOfCompletionListItems); } - set { SetBooleanOption(CompletionViewOptions.HighlightMatchingPortionsOfCompletionListItems, value); } + get { return GetBooleanOption(CompletionViewOptionsStorage.HighlightMatchingPortionsOfCompletionListItems); } + set { SetBooleanOption(CompletionViewOptionsStorage.HighlightMatchingPortionsOfCompletionListItems, value); } } public int ShowCompletionItemFilters { - get { return GetBooleanOption(CompletionViewOptions.ShowCompletionItemFilters); } - set { SetBooleanOption(CompletionViewOptions.ShowCompletionItemFilters, value); } + get { return GetBooleanOption(CompletionViewOptionsStorage.ShowCompletionItemFilters); } + set { SetBooleanOption(CompletionViewOptionsStorage.ShowCompletionItemFilters, value); } } public int ShowItemsFromUnimportedNamespaces @@ -58,8 +58,8 @@ public int TriggerInArgumentLists public int EnableArgumentCompletionSnippets { - get { return GetBooleanOption(CompletionViewOptions.EnableArgumentCompletionSnippets); } - set { SetBooleanOption(CompletionViewOptions.EnableArgumentCompletionSnippets, value); } + get { return GetBooleanOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets); } + set { SetBooleanOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, value); } } } } diff --git a/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.Formatting.cs b/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.Formatting.cs index 177fb135cbd71..a3f38ab3c03a4 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.Formatting.cs +++ b/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.Formatting.cs @@ -305,8 +305,8 @@ public int Wrapping_PreserveSingleLine public int Formatting_TriggerOnPaste { - get { return GetBooleanOption(FormattingOptionsMetadata.FormatOnPaste); } - set { SetBooleanOption(FormattingOptionsMetadata.FormatOnPaste, value); } + get { return GetBooleanOption(FormattingOptionsStorage.FormatOnPaste); } + set { SetBooleanOption(FormattingOptionsStorage.FormatOnPaste, value); } } public int Formatting_TriggerOnStatementCompletion diff --git a/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.OnOff.cs b/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.OnOff.cs index d6c4800776e60..6ae74654c2dfd 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.OnOff.cs +++ b/src/VisualStudio/CSharp/Impl/Options/AutomationObject/AutomationObject.OnOff.cs @@ -5,15 +5,14 @@ using Microsoft.CodeAnalysis.AddImportOnPaste; using Microsoft.CodeAnalysis.Editor.CSharp.BlockCommentEditing; using Microsoft.CodeAnalysis.Editor.CSharp.CompleteStatement; +using Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking; using Microsoft.CodeAnalysis.Editor.Shared.Options; using Microsoft.CodeAnalysis.KeywordHighlighting; using Microsoft.CodeAnalysis.LineSeparators; using Microsoft.CodeAnalysis.MetadataAsSource; using Microsoft.CodeAnalysis.ReferenceHighlighting; -using Microsoft.CodeAnalysis.RenameTracking; using Microsoft.CodeAnalysis.StringCopyPaste; using Microsoft.CodeAnalysis.Structure; -using Microsoft.CodeAnalysis.UnusedReferences; namespace Microsoft.VisualStudio.LanguageServices.CSharp.Options { diff --git a/src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingOptionPageControl.xaml.cs b/src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingOptionPageControl.xaml.cs index ce557577dabdf..22ddbe2649e10 100644 --- a/src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingOptionPageControl.xaml.cs +++ b/src/VisualStudio/CSharp/Impl/Options/Formatting/FormattingOptionPageControl.xaml.cs @@ -36,7 +36,7 @@ public FormattingOptionPageControl(OptionStore optionStore) : base(optionStore) BindToOption(FormatOnCloseBraceCheckBox, AutoFormattingOptionsStorage.FormatOnCloseBrace, LanguageNames.CSharp); BindToOption(FormatOnSemicolonCheckBox, AutoFormattingOptionsStorage.FormatOnSemicolon, LanguageNames.CSharp); BindToOption(FormatOnReturnCheckBox, AutoFormattingOptionsStorage.FormatOnReturn, LanguageNames.CSharp); - BindToOption(FormatOnPasteCheckBox, FormattingOptionsMetadata.FormatOnPaste, LanguageNames.CSharp); + BindToOption(FormatOnPasteCheckBox, FormattingOptionsStorage.FormatOnPaste, LanguageNames.CSharp); } } } diff --git a/src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml.cs b/src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml.cs index d398048604226..d7f6d1024f39d 100644 --- a/src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml.cs +++ b/src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml.cs @@ -21,8 +21,8 @@ public IntelliSenseOptionPageControl(OptionStore optionStore) : base(optionStore BindToOption(Automatically_complete_statement_on_semicolon, CompleteStatementOptionsStorage.AutomaticallyCompleteStatementOnSemicolon); - BindToOption(Show_completion_item_filters, CompletionViewOptions.ShowCompletionItemFilters, LanguageNames.CSharp); - BindToOption(Highlight_matching_portions_of_completion_list_items, CompletionViewOptions.HighlightMatchingPortionsOfCompletionListItems, LanguageNames.CSharp); + BindToOption(Show_completion_item_filters, CompletionViewOptionsStorage.ShowCompletionItemFilters, LanguageNames.CSharp); + BindToOption(Highlight_matching_portions_of_completion_list_items, CompletionViewOptionsStorage.HighlightMatchingPortionsOfCompletionListItems, LanguageNames.CSharp); BindToOption(Show_completion_list_after_a_character_is_typed, CompletionOptionsStorage.TriggerOnTypingLetters, LanguageNames.CSharp); Show_completion_list_after_a_character_is_deleted.IsChecked = this.OptionStore.GetOption(CompletionOptionsStorage.TriggerOnDeletion, LanguageNames.CSharp) == true; @@ -43,7 +43,7 @@ public IntelliSenseOptionPageControl(OptionStore optionStore) : base(optionStore Show_items_from_unimported_namespaces.IsChecked = this.OptionStore.GetOption(CompletionOptionsStorage.ShowItemsFromUnimportedNamespaces, LanguageNames.CSharp); AddSearchHandler(Show_items_from_unimported_namespaces); - Tab_twice_to_insert_arguments.IsChecked = this.OptionStore.GetOption(CompletionViewOptions.EnableArgumentCompletionSnippets, LanguageNames.CSharp); + Tab_twice_to_insert_arguments.IsChecked = this.OptionStore.GetOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, LanguageNames.CSharp); AddSearchHandler(Tab_twice_to_insert_arguments); Show_new_snippet_experience.IsChecked = this.OptionStore.GetOption(CompletionOptionsStorage.ShowNewSnippetExperienceUserOption, LanguageNames.CSharp); @@ -75,7 +75,7 @@ private void Show_items_from_unimported_namespaces_CheckedChanged(object sender, private void Tab_twice_to_insert_arguments_CheckedChanged(object sender, RoutedEventArgs e) { Tab_twice_to_insert_arguments.IsThreeState = false; - this.OptionStore.SetOption(CompletionViewOptions.EnableArgumentCompletionSnippets, LanguageNames.CSharp, value: Tab_twice_to_insert_arguments.IsChecked); + this.OptionStore.SetOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, LanguageNames.CSharp, value: Tab_twice_to_insert_arguments.IsChecked); } private void Show_new_snippet_experience_CheckedChanged(object sender, RoutedEventArgs e) diff --git a/src/VisualStudio/Core/Def/ColorSchemes/ColorSchemeApplier.Settings.cs b/src/VisualStudio/Core/Def/ColorSchemes/ColorSchemeApplier.Settings.cs index 43361946fde9f..aaeac667e2f1f 100644 --- a/src/VisualStudio/Core/Def/ColorSchemes/ColorSchemeApplier.Settings.cs +++ b/src/VisualStudio/Core/Def/ColorSchemes/ColorSchemeApplier.Settings.cs @@ -114,29 +114,29 @@ private void SetAppliedColorScheme(ColorSchemeName schemeName) public ColorSchemeName GetConfiguredColorScheme() { - var schemeName = _globalOptions.GetOption(ColorSchemeOptions.ColorScheme); + var schemeName = _globalOptions.GetOption(ColorSchemeOptionsStorage.ColorScheme); return schemeName != ColorSchemeName.None ? schemeName - : ColorSchemeOptions.ColorScheme.Definition.DefaultValue; + : ColorSchemeOptionsStorage.ColorScheme.Definition.DefaultValue; } public void MigrateToColorSchemeSetting() { // Get the preview feature flag value. - var useEnhancedColorsSetting = _globalOptions.GetOption(ColorSchemeOptions.LegacyUseEnhancedColors); + var useEnhancedColorsSetting = _globalOptions.GetOption(ColorSchemeOptionsStorage.LegacyUseEnhancedColors); // Return if we have already migrated. - if (useEnhancedColorsSetting == ColorSchemeOptions.UseEnhancedColors.Migrated) + if (useEnhancedColorsSetting == ColorSchemeOptionsStorage.UseEnhancedColors.Migrated) { return; } - var colorScheme = useEnhancedColorsSetting == ColorSchemeOptions.UseEnhancedColors.DoNotUse + var colorScheme = useEnhancedColorsSetting == ColorSchemeOptionsStorage.UseEnhancedColors.DoNotUse ? ColorSchemeName.VisualStudio2017 : ColorSchemeName.VisualStudio2019; - _globalOptions.SetGlobalOption(ColorSchemeOptions.ColorScheme, colorScheme); - _globalOptions.SetGlobalOption(ColorSchemeOptions.LegacyUseEnhancedColors, ColorSchemeOptions.UseEnhancedColors.Migrated); + _globalOptions.SetGlobalOption(ColorSchemeOptionsStorage.ColorScheme, colorScheme); + _globalOptions.SetGlobalOption(ColorSchemeOptionsStorage.LegacyUseEnhancedColors, ColorSchemeOptionsStorage.UseEnhancedColors.Migrated); } } } diff --git a/src/VisualStudio/Core/Def/ColorSchemes/ColorSchemeApplier.cs b/src/VisualStudio/Core/Def/ColorSchemes/ColorSchemeApplier.cs index ad215de6b094c..dbaea0b282afb 100644 --- a/src/VisualStudio/Core/Def/ColorSchemes/ColorSchemeApplier.cs +++ b/src/VisualStudio/Core/Def/ColorSchemes/ColorSchemeApplier.cs @@ -70,7 +70,7 @@ public async Task InitializeAsync(CancellationToken cancellationToken) var settingsManager = await _asyncServiceProvider.GetServiceAsync(_threadingContext.JoinableTaskFactory).ConfigureAwait(false); await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); - settingsManager.GetSubset(ColorSchemeOptions.ColorSchemeSettingKey).SettingChangedAsync += ColorSchemeChangedAsync; + settingsManager.GetSubset(ColorSchemeOptionsStorage.ColorSchemeSettingKey).SettingChangedAsync += ColorSchemeChangedAsync; VSColorTheme.ThemeChanged += VSColorTheme_ThemeChanged; await TaskScheduler.Default; diff --git a/src/VisualStudio/Core/Def/DocumentOutline/DocumentOutlineOptionsMetadata.cs b/src/VisualStudio/Core/Def/DocumentOutline/DocumentOutlineOptionsStorage.cs similarity index 74% rename from src/VisualStudio/Core/Def/DocumentOutline/DocumentOutlineOptionsMetadata.cs rename to src/VisualStudio/Core/Def/DocumentOutline/DocumentOutlineOptionsStorage.cs index d859f2c314dfe..d394b3aba2b57 100644 --- a/src/VisualStudio/Core/Def/DocumentOutline/DocumentOutlineOptionsMetadata.cs +++ b/src/VisualStudio/Core/Def/DocumentOutline/DocumentOutlineOptionsStorage.cs @@ -6,8 +6,8 @@ namespace Microsoft.VisualStudio.LanguageServices.DocumentOutline { - internal sealed class DocumentOutlineOptionsMetadata + internal sealed class DocumentOutlineOptionsStorage { - public static readonly Option2 EnableDocumentOutline = new("DocumentOutlineOptions_EnableDocumentOutline", defaultValue: false); + public static readonly Option2 EnableDocumentOutline = new("dotnet_enable_document_outline", defaultValue: false); } } diff --git a/src/VisualStudio/Core/Def/ExternalAccess/Pythia/PythiaGlobalOptions.cs b/src/VisualStudio/Core/Def/ExternalAccess/Pythia/PythiaGlobalOptions.cs index 7d508e012f228..9f351c447de37 100644 --- a/src/VisualStudio/Core/Def/ExternalAccess/Pythia/PythiaGlobalOptions.cs +++ b/src/VisualStudio/Core/Def/ExternalAccess/Pythia/PythiaGlobalOptions.cs @@ -34,9 +34,9 @@ public bool RemoveRecommendationLimit } private static readonly Option2 s_showDebugInfoOption = new( - "InternalFeatureOnOffOptions_ShowDebugInfo", defaultValue: false); + "dotnet_show_intellicode_debug_info", defaultValue: false); private static readonly Option2 s_removeRecommendationLimitOption = new( - "InternalFeatureOnOffOptions_RemoveRecommendationLimit", defaultValue: false); + "dotnet_remove_intellicode_recommendation_limit", defaultValue: false); } } diff --git a/src/VisualStudio/Core/Def/FindReferences/FindUsagesPresentationOptionsStorage.cs b/src/VisualStudio/Core/Def/FindReferences/FindUsagesPresentationOptionsStorage.cs index 058ee21db9d54..ac87694ccfd64 100644 --- a/src/VisualStudio/Core/Def/FindReferences/FindUsagesPresentationOptionsStorage.cs +++ b/src/VisualStudio/Core/Def/FindReferences/FindUsagesPresentationOptionsStorage.cs @@ -15,6 +15,6 @@ internal static class FindUsagesPresentationOptionsStorage /// next FindReferences call. /// public static readonly Option2 DefinitionGroupingPriority = new( - "FindUsagesOptions_DefinitionGroupingPriority", defaultValue: -1); + "dotnet_find_usage_definition_grouping_priority", defaultValue: -1); } } diff --git a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeOptions.cs b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeOptionsStorage.cs similarity index 83% rename from src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeOptions.cs rename to src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeOptionsStorage.cs index 324108609b903..189663e88cdc4 100644 --- a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeOptions.cs +++ b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeOptionsStorage.cs @@ -6,16 +6,16 @@ namespace Microsoft.CodeAnalysis.ColorSchemes; -internal sealed class ColorSchemeOptions +internal sealed class ColorSchemeOptionsStorage { internal const string ColorSchemeSettingKey = "TextEditor.Roslyn.ColorSchemeName"; public static readonly Option2 ColorScheme = new( - "ColorSchemeOptions_ColorSchemeName", + "visual_studio_color_scheme_name", defaultValue: ColorSchemeName.VisualStudio2019); public static readonly Option2 LegacyUseEnhancedColors = new( - "ColorSchemeOptions_LegacyUseEnhancedColors", + "visual_studio_color_scheme_use_legacy_enhanced_colors", defaultValue: UseEnhancedColors.Default); public enum UseEnhancedColors diff --git a/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListener.cs b/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListener.cs index 5c201624979bc..8f3b5fd99a022 100644 --- a/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListener.cs +++ b/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListener.cs @@ -136,7 +136,7 @@ private bool ShouldDisableBackgroundAnalysis(long availableMemory) return availableMemory < MemoryThreshold && !SolutionCrawlerOptionsStorage.LowMemoryForcedMinimalBackgroundAnalysis && - _globalOptions.GetOption(InternalFeatureOnOffOptions.BackgroundAnalysisMemoryMonitor); + _globalOptions.GetOption(VirtualMemoryNotificationListenerOptionsStorage.BackgroundAnalysisMemoryMonitor); } private static void DisableBackgroundAnalysis() diff --git a/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListenerOptionsStorage.cs b/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListenerOptionsStorage.cs new file mode 100644 index 0000000000000..b50fb208e23a5 --- /dev/null +++ b/src/VisualStudio/Core/Def/Implementation/VirtualMemoryNotificationListenerOptionsStorage.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.CodeAnalysis.Options; + +namespace Microsoft.VisualStudio.LanguageServices.Implementation +{ + internal static class VirtualMemoryNotificationListenerOptionsStorage + { + public static readonly Option2 BackgroundAnalysisMemoryMonitor = new("dotnet_enable_full_solution_analysis_memory_monitor", defaultValue: true); + } +} diff --git a/src/VisualStudio/Core/Def/Implementation/VisualStudioWorkspaceContextService.cs b/src/VisualStudio/Core/Def/Implementation/VisualStudioWorkspaceContextService.cs index 331ed25fa0adc..cfbbf64bd88dd 100644 --- a/src/VisualStudio/Core/Def/Implementation/VisualStudioWorkspaceContextService.cs +++ b/src/VisualStudio/Core/Def/Implementation/VisualStudioWorkspaceContextService.cs @@ -33,7 +33,7 @@ public bool IsCloudEnvironmentClient() => UIContext.FromUIContextGuid(VSConstants.UICONTEXT.CloudEnvironmentConnected_guid).IsActive; public bool IsInLspEditorContext() - => IsLiveShareGuest() || IsCloudEnvironmentClient() || _globalOptions.GetOption(LspOptions.LspEditorFeatureFlag); + => IsLiveShareGuest() || IsCloudEnvironmentClient() || _globalOptions.GetOption(LspOptionsStorage.LspEditorFeatureFlag); /// /// Checks if the VS instance is running as a Live Share guest session. diff --git a/src/VisualStudio/Core/Def/KeybindingReset/KeybindingResetDetector.cs b/src/VisualStudio/Core/Def/KeybindingReset/KeybindingResetDetector.cs index 433d6c1226693..1bb51c5c02431 100644 --- a/src/VisualStudio/Core/Def/KeybindingReset/KeybindingResetDetector.cs +++ b/src/VisualStudio/Core/Def/KeybindingReset/KeybindingResetDetector.cs @@ -60,8 +60,8 @@ internal sealed class KeybindingResetDetector : ForegroundThreadAffinitizedObjec private static readonly Guid s_resharperCommandGroup = new("47F03277-5055-4922-899C-0F7F30D26BF1"); private static readonly ImmutableArray s_statusOptions = ImmutableArray.Create( - new OptionKey2(KeybindingResetOptions.ReSharperStatus), - new OptionKey2(KeybindingResetOptions.NeedsReset)); + new OptionKey2(KeybindingResetOptionsStorage.ReSharperStatus), + new OptionKey2(KeybindingResetOptionsStorage.NeedsReset)); private readonly IGlobalOptionService _globalOptions; private readonly System.IServiceProvider _serviceProvider; @@ -104,7 +104,7 @@ public KeybindingResetDetector( public Task InitializeAsync() { // Immediately bail if the user has asked to never see this bar again. - if (_globalOptions.GetOption(KeybindingResetOptions.NeverShowAgain)) + if (_globalOptions.GetOption(KeybindingResetOptionsStorage.NeverShowAgain)) { return Task.CompletedTask; } @@ -116,7 +116,7 @@ private void InitializeCore() { AssertIsForeground(); - if (!_globalOptions.GetOption(KeybindingResetOptions.EnabledFeatureFlag)) + if (!_globalOptions.GetOption(KeybindingResetOptionsStorage.EnabledFeatureFlag)) { return; } @@ -218,8 +218,8 @@ private async Task UpdateStateMachineWorkerAsync(CancellationToken cancellationT } _globalOptions.SetGlobalOptions(ImmutableArray.Create( - KeyValuePairUtil.Create(new OptionKey2(KeybindingResetOptions.ReSharperStatus), (object)currentStatus), - KeyValuePairUtil.Create(new OptionKey2(KeybindingResetOptions.NeedsReset), (object)needsReset))); + KeyValuePairUtil.Create(new OptionKey2(KeybindingResetOptionsStorage.ReSharperStatus), (object)currentStatus), + KeyValuePairUtil.Create(new OptionKey2(KeybindingResetOptionsStorage.NeedsReset), (object)needsReset))); if (needsReset) { @@ -353,7 +353,7 @@ private void RestoreVsKeybindings() KeybindingsResetLogger.Log("KeybindingsReset"); - _globalOptions.SetGlobalOption(KeybindingResetOptions.NeedsReset, false); + _globalOptions.SetGlobalOption(KeybindingResetOptionsStorage.NeedsReset, false); } private void OpenExtensionsHyperlink() @@ -363,13 +363,13 @@ private void OpenExtensionsHyperlink() VisualStudioNavigateToLinkService.StartBrowser(KeybindingsFwLink); KeybindingsResetLogger.Log("ExtensionsLink"); - _globalOptions.SetGlobalOption(KeybindingResetOptions.NeedsReset, false); + _globalOptions.SetGlobalOption(KeybindingResetOptionsStorage.NeedsReset, false); } private void NeverShowAgain() { - _globalOptions.SetGlobalOption(KeybindingResetOptions.NeverShowAgain, true); - _globalOptions.SetGlobalOption(KeybindingResetOptions.NeedsReset, false); + _globalOptions.SetGlobalOption(KeybindingResetOptionsStorage.NeverShowAgain, true); + _globalOptions.SetGlobalOption(KeybindingResetOptionsStorage.NeedsReset, false); KeybindingsResetLogger.Log("NeverShowAgain"); // The only external references to this object are as callbacks, which are removed by the Shutdown method. diff --git a/src/VisualStudio/Core/Def/KeybindingReset/KeybindingResetOptions.cs b/src/VisualStudio/Core/Def/KeybindingReset/KeybindingResetOptionsStorage.cs similarity index 53% rename from src/VisualStudio/Core/Def/KeybindingReset/KeybindingResetOptions.cs rename to src/VisualStudio/Core/Def/KeybindingReset/KeybindingResetOptionsStorage.cs index 10788c4a974ef..b2811802832d3 100644 --- a/src/VisualStudio/Core/Def/KeybindingReset/KeybindingResetOptions.cs +++ b/src/VisualStudio/Core/Def/KeybindingReset/KeybindingResetOptionsStorage.cs @@ -6,11 +6,11 @@ namespace Microsoft.VisualStudio.LanguageServices.KeybindingReset { - internal sealed class KeybindingResetOptions + internal sealed class KeybindingResetOptionsStorage { - public static readonly Option2 ReSharperStatus = new("KeybindingResetOptions_ReSharperStatus", defaultValue: KeybindingReset.ReSharperStatus.NotInstalledOrDisabled); - public static readonly Option2 NeedsReset = new("KeybindingResetOptions_NeedsReset", defaultValue: false); - public static readonly Option2 NeverShowAgain = new("KeybindingResetOptions_NeverShowAgain", defaultValue: false); - public static readonly Option2 EnabledFeatureFlag = new("KeybindingResetOptions_EnabledFeatureFlag", defaultValue: false); + public static readonly Option2 ReSharperStatus = new("visual_studio_resharper_key_binding_status", defaultValue: KeybindingReset.ReSharperStatus.NotInstalledOrDisabled); + public static readonly Option2 NeedsReset = new("visual_studio_key_binding_needs_reset", defaultValue: false); + public static readonly Option2 NeverShowAgain = new("visual_studio_key_binding_reset_never_show_again", defaultValue: false); + public static readonly Option2 EnabledFeatureFlag = new("visual_studio_enable_key_binding_reset", defaultValue: false); } } diff --git a/src/VisualStudio/Core/Def/LanguageService/AbstractLanguageService`2.VsCodeWindowManager.cs b/src/VisualStudio/Core/Def/LanguageService/AbstractLanguageService`2.VsCodeWindowManager.cs index 35c763bd43ffb..274531206413f 100644 --- a/src/VisualStudio/Core/Def/LanguageService/AbstractLanguageService`2.VsCodeWindowManager.cs +++ b/src/VisualStudio/Core/Def/LanguageService/AbstractLanguageService`2.VsCodeWindowManager.cs @@ -236,7 +236,7 @@ public int RemoveAdornments() // that ReleaseOutline will be called on the old window before GetOutline is called for the new window. int IVsDocOutlineProvider.GetOutline(out IntPtr phwnd, out IOleCommandTarget? ppCmdTarget) { - var enabled = _globalOptions.GetOption(DocumentOutlineOptionsMetadata.EnableDocumentOutline); + var enabled = _globalOptions.GetOption(DocumentOutlineOptionsStorage.EnableDocumentOutline); if (!enabled) { phwnd = default; diff --git a/src/VisualStudio/Core/Def/Log/LoggerOptions.cs b/src/VisualStudio/Core/Def/Log/LoggerOptionsStorage.cs similarity index 69% rename from src/VisualStudio/Core/Def/Log/LoggerOptions.cs rename to src/VisualStudio/Core/Def/Log/LoggerOptionsStorage.cs index 2854444b47eb8..9c82a9ab2e025 100644 --- a/src/VisualStudio/Core/Def/Log/LoggerOptions.cs +++ b/src/VisualStudio/Core/Def/Log/LoggerOptionsStorage.cs @@ -6,10 +6,10 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation { - internal sealed class LoggerOptions + internal sealed class LoggerOptionsStorage { - public static readonly Option2 EtwLoggerKey = new("LoggerOptions_EtwLoggerKey", defaultValue: true); - public static readonly Option2 TraceLoggerKey = new("LoggerOptions_TraceLoggerKey", defaultValue: false); - public static readonly Option2 OutputWindowLoggerKey = new("LoggerOptions_OutputWindowLoggerKey", defaultValue: false); + public static readonly Option2 EtwLoggerKey = new("visual_studio_etw_logger_key", defaultValue: true); + public static readonly Option2 TraceLoggerKey = new("visual_studio_trace_logger_key", defaultValue: false); + public static readonly Option2 OutputWindowLoggerKey = new("visual_studio_output_window_logger_key", defaultValue: false); } } diff --git a/src/VisualStudio/Core/Def/Options/VisualStudioOptionStorage.cs b/src/VisualStudio/Core/Def/Options/VisualStudioOptionStorage.cs index c84126bcf484d..79e436888e17b 100644 --- a/src/VisualStudio/Core/Def/Options/VisualStudioOptionStorage.cs +++ b/src/VisualStudio/Core/Def/Options/VisualStudioOptionStorage.cs @@ -115,43 +115,43 @@ public bool TryFetch(LocalUserRegistryOptionPersister persister, OptionKey2 opti public static readonly IReadOnlyDictionary Storages = new Dictionary() { - {"BlockStructureOptions_CollapseEmptyMetadataImplementationsWhenFirstOpened", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CollapseEmptyMetadataImplementationsWhenFirstOpened")}, - {"BlockStructureOptions_CollapseImportsWhenFirstOpened", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CollapseImportsWhenFirstOpened")}, - {"BlockStructureOptions_CollapseMetadataImplementationsWhenFirstOpened", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CollapseMetadataImplementationsWhenFirstOpened")}, - {"BlockStructureOptions_CollapseRegionsWhenCollapsingToDefinitions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CollapseRegionsWhenCollapsingToDefinitions")}, - {"BlockStructureOptions_CollapseRegionsWhenFirstOpened", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CollapseRegionsWhenFirstOpened")}, - {"BlockStructureOptions_MaximumBannerLength", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.MaximumBannerLength")}, - {"BlockStructureOptions_ShowBlockStructureGuidesForCodeLevelConstructs", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowBlockStructureGuidesForCodeLevelConstructs")}, - {"BlockStructureOptions_ShowBlockStructureGuidesForCommentsAndPreprocessorRegions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowBlockStructureGuidesForCommentsAndPreprocessorRegions")}, - {"BlockStructureOptions_ShowBlockStructureGuidesForDeclarationLevelConstructs", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowBlockStructureGuidesForDeclarationLevelConstructs")}, - {"BlockStructureOptions_ShowOutliningForCodeLevelConstructs", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowOutliningForCodeLevelConstructs")}, - {"BlockStructureOptions_ShowOutliningForCommentsAndPreprocessorRegions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowOutliningForCommentsAndPreprocessorRegions")}, - {"BlockStructureOptions_ShowOutliningForDeclarationLevelConstructs", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowOutliningForDeclarationLevelConstructs")}, - {"BraceCompletionOptions_AutoFormattingOnCloseBrace", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Close Brace")}, - {"ClassificationOptions_ClassifyReassignedVariables", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ClassificationOptions.ClassifyReassignedVariables")}, - {"CodeStyleOptions_PreferSystemHashCode", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.PreferSystemHashCode")}, - {"ColorSchemeOptions_ColorSchemeName", new RoamingProfileStorage("TextEditor.Roslyn.ColorSchemeName")}, - {"ColorSchemeOptions_LegacyUseEnhancedColors", new RoamingProfileStorage("WindowManagement.Options.UseEnhancedColorsForManagedLanguages")}, - {"CompletionOptions_BlockForCompletionItems", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.BlockForCompletionItems")}, - {"CompletionOptions_EnableArgumentCompletionSnippets", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.EnableArgumentCompletionSnippets")}, - {"CompletionOptions_EnterKeyBehavior", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.EnterKeyBehavior")}, + {"dotnet_collapse_empty_metadata_implementations_when_first_opened", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CollapseEmptyMetadataImplementationsWhenFirstOpened")}, + {"dotnet_collapse_imports_when_first_opened", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CollapseImportsWhenFirstOpened")}, + {"dotnet_collapse_metadata_implementations_when_first_opened", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CollapseMetadataImplementationsWhenFirstOpened")}, + {"dotnet_collapse_regions_when_collapsing_to_definitions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CollapseRegionsWhenCollapsingToDefinitions")}, + {"dotnet_collapse_regions_when_first_opened", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CollapseRegionsWhenFirstOpened")}, + {"dotnet_maximum_block_banner_length", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.MaximumBannerLength")}, + {"dotnet_show_block_structure_guides_for_code_level_constructs", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowBlockStructureGuidesForCodeLevelConstructs")}, + {"dotnet_show_block_structure_guides_for_comments_and_preprocessor_regions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowBlockStructureGuidesForCommentsAndPreprocessorRegions")}, + {"dotnet_show_block_structure_guides_for_declaration_level_constructs", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowBlockStructureGuidesForDeclarationLevelConstructs")}, + {"dotnet_show_outlining_for_code_level_constructs", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowOutliningForCodeLevelConstructs")}, + {"dotnet_show_outlining_for_comments_and_preprocessor_regions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowOutliningForCommentsAndPreprocessorRegions")}, + {"dotnet_show_outlining_for_declaration_level_constructs", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowOutliningForDeclarationLevelConstructs")}, + {"csharp_format_on_close_brace", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Close Brace")}, + {"dotnet_classify_reassigned_variables", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ClassificationOptions.ClassifyReassignedVariables")}, + {"dotnet_prefer_system_hash_code", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.PreferSystemHashCode")}, + {"visual_studio_color_scheme_name", new RoamingProfileStorage("TextEditor.Roslyn.ColorSchemeName")}, + {"visual_studio_color_scheme_use_legacy_enhanced_colors", new RoamingProfileStorage("WindowManagement.Options.UseEnhancedColorsForManagedLanguages")}, + {"block_for_completion_items", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.BlockForCompletionItems")}, + {"dotnet_enable_argument_completion_snippets", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.EnableArgumentCompletionSnippets")}, + {"dotnet_return_key_completion_behavior", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.EnterKeyBehavior")}, #pragma warning disable CS0612 // Type or member is obsolete - {"CompletionOptions_HideAdvancedMembers", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Hide Advanced Auto List Members", vbKey: "TextEditor.Basic.Hide Advanced Auto List Members")}, + {"dotnet_hide_advanced_members_in_completion", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Hide Advanced Auto List Members", vbKey: "TextEditor.Basic.Hide Advanced Auto List Members")}, #pragma warning restore - {"CompletionOptions_HighlightMatchingPortionsOfCompletionListItems", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.HighlightMatchingPortionsOfCompletionListItems")}, - {"CompletionOptions_ShowCompletionItemFilters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowCompletionItemFilters")}, - {"CompletionOptions_ShowItemsFromUnimportedNamespaces", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowItemsFromUnimportedNamespaces")}, - {"CompletionOptions_ShowNameSuggestions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowNameSuggestions")}, - {"CompletionOptions_ShowNewSnippetExperienceFeatureFlag", new FeatureFlagStorage(@"Roslyn.SnippetCompletion")}, - {"CompletionOptions_ShowNewSnippetExperienceUserOption", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowNewSnippetExperience")}, - {"CompletionOptions_SnippetsBehavior", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.SnippetsBehavior")}, - {"CompletionOptions_TriggerInArgumentLists", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.TriggerInArgumentLists")}, - {"CompletionOptions_TriggerOnDeletion", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.TriggerOnDeletion")}, + {"dotnet_highlight_matching_portions_of_completion_list_items", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.HighlightMatchingPortionsOfCompletionListItems")}, + {"dotnet_show_completion_item_filters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowCompletionItemFilters")}, + {"dotnet_show_completion_items_from_unimported_namespaces", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowItemsFromUnimportedNamespaces")}, + {"dotnet_show_name_completion_suggestions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowNameSuggestions")}, + {"dotnet_show_new_snippet_experience_feature_flag", new FeatureFlagStorage(@"Roslyn.SnippetCompletion")}, + {"dotnet_show_new_snippet_experience", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowNewSnippetExperience")}, + {"dotnet_snippets_behavior", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.SnippetsBehavior")}, + {"dotnet_trigger_completion_in_argument_lists", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.TriggerInArgumentLists")}, + {"dotnet_trigger_completion_on_deletion", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.TriggerOnDeletion")}, #pragma warning disable CS0612 // Type or member is obsolete - {"CompletionOptions_TriggerOnTyping", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Auto List Members", vbKey: "TextEditor.Basic.Auto List Members")}, + {"dotnet_trigger_completion_on_typing", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Auto List Members", vbKey: "TextEditor.Basic.Auto List Members")}, #pragma warning restore - {"CompletionOptions_TriggerOnTypingLetters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.TriggerOnTypingLetters")}, - {"CompletionOptions_UnnamedSymbolCompletionDisabledFeatureFlag", new FeatureFlagStorage(@"Roslyn.UnnamedSymbolCompletionDisabled")}, + {"dotnet_trigger_completion_on_typing_letters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.TriggerOnTypingLetters")}, + {"dotnet_disable_unnamed_symbol_completion", new FeatureFlagStorage(@"Roslyn.UnnamedSymbolCompletionDisabled")}, {"csharp_indent_block_contents", new RoamingProfileStorage("TextEditor.CSharp.Specific.IndentBlock")}, {"csharp_indent_braces", new RoamingProfileStorage("TextEditor.CSharp.Specific.OpenCloseBracesIndent")}, {"csharp_indent_case_contents", new RoamingProfileStorage("TextEditor.CSharp.Specific.IndentSwitchCaseSection")}, @@ -235,14 +235,14 @@ public bool TryFetch(LocalUserRegistryOptionPersister persister, OptionKey2 opti {"csharp_style_var_for_built_in_types", new RoamingProfileStorage("TextEditor.CSharp.Specific.UseImplicitTypeForIntrinsicTypes")}, {"csharp_style_var_when_type_is_apparent", new RoamingProfileStorage("TextEditor.CSharp.Specific.UseImplicitTypeWhereApparent")}, {"csharp_using_directive_placement", new RoamingProfileStorage("TextEditor.CSharp.Specific.PreferredUsingDirectivePlacement")}, - {"DateAndTime_ProvideDateAndTimeCompletions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ProvideDateAndTimeCompletions")}, - {"DiagnosticOptions_LogTelemetryForBackgroundAnalyzerExecution", new FeatureFlagStorage(@"Roslyn.LogTelemetryForBackgroundAnalyzerExecution")}, - {"DiagnosticOptions_LspPullDiagnosticsFeatureFlag", new FeatureFlagStorage(@"Lsp.PullDiagnostics")}, - {"DiagnosticTaggingOptions_PullDiagnosticTagging", new FeatureFlagStorage(@"Roslyn.PullDiagnosticTagging")}, + {"dotnet_provide_date_and_time_completions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ProvideDateAndTimeCompletions")}, + {"dotnet_log_telemetry_for_background_analyzer_execution", new FeatureFlagStorage(@"Roslyn.LogTelemetryForBackgroundAnalyzerExecution")}, + {"dotnet_enable_lsp_pull_diagnostics", new FeatureFlagStorage(@"Lsp.PullDiagnostics")}, + {"dotnet_pull_diagnostic_tagging", new FeatureFlagStorage(@"Roslyn.PullDiagnosticTagging")}, #pragma warning disable CS0612 // Type or member is obsolete - {"DocumentationCommentOptions_AutoXmlDocCommentGeneration", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Automatic XML Doc Comment Generation", "TextEditor.VisualBasic.Specific.AutoComment")}, + {"dotnet_auto_xml_doc_comment_generation", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Automatic XML Doc Comment Generation", "TextEditor.VisualBasic.Specific.AutoComment")}, #pragma warning restore - {"DocumentOutlineOptions_EnableDocumentOutline", new FeatureFlagStorage(@"Roslyn.DocumentOutline")}, + {"dotnet_enable_document_outline", new FeatureFlagStorage(@"Roslyn.DocumentOutline")}, {"dotnet_code_quality_unused_parameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.UnusedParametersPreference")}, {"dotnet_separate_import_directive_groups", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.SeparateImportDirectiveGroups")}, @@ -276,15 +276,15 @@ public bool TryFetch(LocalUserRegistryOptionPersister persister, OptionKey2 opti {"dotnet_style_qualification_for_property", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.QualifyPropertyAccess")}, {"dotnet_style_readonly_field", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.PreferReadonly")}, {"dotnet_style_require_accessibility_modifiers", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.RequireAccessibilityModifiers")}, - {"EditorComponentOnOffOptions_Adornment", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Components", "Adornment")}, - {"EditorComponentOnOffOptions_CodeRefactorings", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Components", "Code Refactorings")}, - {"EditorComponentOnOffOptions_Tagger", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Components", "Tagger")}, - {"ExtractMethodOptions_AllowBestEffort", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Allow Best Effort")}, - {"ExtractMethodOptions_DontPutOutOrRefOnStruct", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Don't Put Out Or Ref On Strcut")}, - {"FadingOptions_FadeOutUnreachableCode", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.FadeOutUnreachableCode")}, - {"FadingOptions_FadeOutUnusedImports", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.FadeOutUnusedImports")}, - {"Storage_CloudCacheFeatureFlag", new FeatureFlagStorage(@"Roslyn.CloudCache3")}, - {"Storage_Database", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Database")}, + {"dotnet_enable_editor_adornment", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Components", "Adornment")}, + {"dotnet_enable_code_refactorings", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Components", "Code Refactorings")}, + {"dotnet_enable_editor_tagger", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Components", "Tagger")}, + {"dotnet_allow_best_effort_when_extracting_method", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Allow Best Effort")}, + {"dotnet_extract_method_no_ref_or_out_structs", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Don't Put Out Or Ref On Strcut")}, + {"dotnet_fade_out_unreachable_code", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.FadeOutUnreachableCode")}, + {"dotnet_fade_out_unused_imports", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.FadeOutUnusedImports")}, + {"dotnet_storage_cloud_cache", new FeatureFlagStorage(@"Roslyn.CloudCache3")}, + {"dotnet_storage_database", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Database")}, {"dotnet_add_imports_on_paste", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.AddImportsOnPaste2")}, {"dotnet_always_use_default_symbol_servers", new RoamingProfileStorage("TextEditor.AlwaysUseDefaultSymbolServers")}, {"csharp_insert_block_comment_start_string", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Auto Insert Block Comment Start String")}, @@ -312,128 +312,128 @@ public bool TryFetch(LocalUserRegistryOptionPersister persister, OptionKey2 opti {"dotnet_show_inheritance_margin", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowInheritanceMargin")}, {"dotnet_skip_analyzers_for_implicitly_triggered_builds", new RoamingProfileStorage("TextEditor.SkipAnalyzersForImplicitlyTriggeredBuilds")}, {"dotnet_indent_strings", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.StringIdentation")}, - {"FindUsagesOptions_DefinitionGroupingPriority", new LocalUserProfileStorage(@"Roslyn\Internal\FindUsages", "DefinitionGroupingPriority")}, - {"FormattingOptions_AutoFormattingOnReturn", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Return")}, - {"FormattingOptions_AutoFormattingOnSemicolon", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Semicolon")}, - {"FormattingOptions_AutoFormattingOnTyping", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Typing")}, - {"FormattingOptions_FormatOnPaste", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.FormatOnPaste")}, + {"dotnet_find_usage_definition_grouping_priority", new LocalUserProfileStorage(@"Roslyn\Internal\FindUsages", "DefinitionGroupingPriority")}, + {"csharp_format_on_return", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Return")}, + {"csharp_format_on_semicolon", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Semicolon")}, + {"csharp_format_on_typing", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.Auto Formatting On Typing")}, + {"dotnet_format_on_paste", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.FormatOnPaste")}, #pragma warning disable CS0612 // Type or member is obsolete - {"FormattingOptions_SmartIndent", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Indent Style", vbKey: "TextEditor.Basic.Indent Style")}, + {"smart_indent", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Indent Style", vbKey: "TextEditor.Basic.Indent Style")}, #pragma warning restore - {"GenerateConstructorFromMembersOptions_AddNullChecks", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.GenerateConstructorFromMembersOptions.AddNullChecks")}, - {"GenerateEqualsAndGetHashCodeFromMembersOptions_GenerateOperators", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.GenerateEqualsAndGetHashCodeFromMembersOptions.GenerateOperators")}, - {"GenerateEqualsAndGetHashCodeFromMembersOptions_ImplementIEquatable", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.GenerateEqualsAndGetHashCodeFromMembersOptions.ImplementIEquatable")}, - {"GenerateOverridesOptions_SelectAll", new RoamingProfileStorage("TextEditor.Specific.GenerateOverridesOptions.SelectAll")}, - {"ImplementTypeOptions_InsertionBehavior", new RoamingProfileStorage("TextEditor.%LANGUAGE%.ImplementTypeOptions.InsertionBehavior")}, - {"ImplementTypeOptions_PropertyGenerationBehavior", new RoamingProfileStorage("TextEditor.%LANGUAGE%.ImplementTypeOptions.PropertyGenerationBehavior")}, + {"dotnet_generate_constructor_parameter_null_checks", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.GenerateConstructorFromMembersOptions.AddNullChecks")}, + {"dotnet_generate_equality_operators", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.GenerateEqualsAndGetHashCodeFromMembersOptions.GenerateOperators")}, + {"dotnet_generate_iequatable_implementation", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.GenerateEqualsAndGetHashCodeFromMembersOptions.ImplementIEquatable")}, + {"dotnet_generate_overrides_for_all_members", new RoamingProfileStorage("TextEditor.Specific.GenerateOverridesOptions.SelectAll")}, + {"dotnet_insertion_behavior", new RoamingProfileStorage("TextEditor.%LANGUAGE%.ImplementTypeOptions.InsertionBehavior")}, + {"dotnet_property_generation_behavior", new RoamingProfileStorage("TextEditor.%LANGUAGE%.ImplementTypeOptions.PropertyGenerationBehavior")}, #pragma warning disable CS0612 // Type or member is obsolete {"indent_size", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Indent Size", vbKey: "TextEditor.Basic.Indent Size")}, {"indent_style", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Insert Tabs", vbKey: "TextEditor.Basic.Insert Tabs")}, #pragma warning restore - {"InlineDiagnosticsOptions_EnableInlineDiagnostics", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineDiagnostics")}, - {"InlineDiagnosticsOptions_Location", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineDiagnostics.LocationOption")}, - {"InlineHintsOptions_ColorHints", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ColorHints")}, - {"InlineHintsOptions_DisplayAllHintsWhilePressingAltF1", new RoamingProfileStorage("TextEditor.Specific.DisplayAllHintsWhilePressingAltF1")}, - {"InlineHintsOptions_EnabledForParameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints")}, - {"InlineHintsOptions_EnabledForTypes", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineTypeHints")}, - {"InlineHintsOptions_ForImplicitObjectCreation", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineTypeHints.ForImplicitObjectCreation")}, - {"InlineHintsOptions_ForImplicitVariableTypes", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineTypeHints.ForImplicitVariableTypes")}, - {"InlineHintsOptions_ForIndexerParameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.ForArrayIndexers")}, - {"InlineHintsOptions_ForLambdaParameterTypes", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineTypeHints.ForLambdaParameterTypes")}, - {"InlineHintsOptions_ForLiteralParameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.ForLiteralParameters")}, - {"InlineHintsOptions_ForObjectCreationParameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.ForObjectCreationParameters")}, - {"InlineHintsOptions_ForOtherParameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.ForOtherParameters")}, - {"InlineHintsOptions_SuppressForParametersThatDifferOnlyBySuffix", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.SuppressForParametersThatDifferOnlyBySuffix")}, - {"InlineHintsOptions_SuppressForParametersThatMatchArgumentName", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.SuppressForParametersThatMatchArgumentName")}, - {"InlineHintsOptions_SuppressForParametersThatMatchMethodIntent", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.SuppressForParametersThatMatchMethodIntent")}, - {"InlineRename_CollapseRenameUI", new RoamingProfileStorage("TextEditor.CollapseRenameUI")}, - {"InlineRename_UseInlineAdornment", new RoamingProfileStorage("TextEditor.RenameUseInlineAdornment")}, - {"InlineRenameSessionOptions_PreviewChanges", new RoamingProfileStorage("TextEditor.Specific.PreviewRename")}, - {"InlineRenameSessionOptions_RenameAsynchronously", new RoamingProfileStorage("TextEditor.Specific.RenameAsynchronously")}, - {"InlineRenameSessionOptions_RenameFile", new RoamingProfileStorage("TextEditor.Specific.RenameFile")}, - {"InlineRenameSessionOptions_RenameInComments", new RoamingProfileStorage("TextEditor.Specific.RenameInComments")}, - {"InlineRenameSessionOptions_RenameInStrings", new RoamingProfileStorage("TextEditor.Specific.RenameInStrings")}, - {"InlineRenameSessionOptions_RenameOverloads", new RoamingProfileStorage("TextEditor.Specific.RenameOverloads")}, - {"InternalDiagnosticsOptions_CrashOnAnalyzerException", new LocalUserProfileStorage(@"Roslyn\Internal\Diagnostics", "CrashOnAnalyzerException")}, - {"InternalDiagnosticsOptions_EnableFileLoggingForDiagnostics", new LocalUserProfileStorage(@"Roslyn\Internal\Diagnostics", "EnableFileLoggingForDiagnostics")}, - {"InternalDiagnosticsOptions_NormalDiagnosticMode", new LocalUserProfileStorage(@"Roslyn\Internal\Diagnostics", "NormalDiagnosticMode")}, - {"InternalFeatureOnOffOptions_AutomaticLineEnder", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Automatic Line Ender")}, - {"InternalFeatureOnOffOptions_BraceMatching", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Brace Matching")}, - {"InternalFeatureOnOffOptions_Classification", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Classification")}, - {"InternalFeatureOnOffOptions_EventHookup", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Event Hookup")}, - {"InternalFeatureOnOffOptions_FormatOnSave", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "FormatOnSave")}, - {"InternalFeatureOnOffOptions_FullSolutionAnalysisMemoryMonitor", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Full Solution Analysis Memory Monitor")}, - {"InternalFeatureOnOffOptions_OOP64Bit", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "OOP64Bit")}, - {"InternalFeatureOnOffOptions_OOPCoreClrFeatureFlag", new FeatureFlagStorage(@"Roslyn.ServiceHubCore")}, - {"InternalFeatureOnOffOptions_OOPServerGCFeatureFlag", new FeatureFlagStorage(@"Roslyn.OOPServerGC")}, - {"InternalFeatureOnOffOptions_RemoveRecommendationLimit", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "RemoveRecommendationLimit")}, - {"InternalFeatureOnOffOptions_RenameTracking", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Rename Tracking")}, - {"InternalFeatureOnOffOptions_SemanticColorizer", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Semantic Colorizer")}, - {"InternalFeatureOnOffOptions_ShowDebugInfo", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "ShowDebugInfo")}, - {"InternalFeatureOnOffOptions_SmartIndenter", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Smart Indenter")}, - {"InternalFeatureOnOffOptions_Snippets", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Snippets2")}, - {"InternalFeatureOnOffOptions_Squiggles", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Squiggles")}, - {"InternalFeatureOnOffOptions_SyntacticColorizer", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Syntactic Colorizer")}, - {"InternalSolutionCrawlerOptions_Solution Crawler", new LocalUserProfileStorage(@"Roslyn\Internal\SolutionCrawler", "Solution Crawler")}, - {"JsonFeatureOptions_ColorizeJsonPatterns", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ColorizeJsonPatterns")}, - {"JsonFeatureOptions_DetectAndOfferEditorFeaturesForProbableJsonStrings", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.DetectAndOfferEditorFeaturesForProbableJsonStrings")}, - {"JsonFeatureOptions_HighlightRelatedJsonComponentsUnderCursor", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.HighlightRelatedJsonComponentsUnderCursor")}, - {"JsonFeatureOptions_ReportInvalidJsonPatterns", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ReportInvalidJsonPatterns")}, - {"KeybindingResetOptions_EnabledFeatureFlag", new FeatureFlagStorage(@"Roslyn.KeybindingResetEnabled")}, - {"KeybindingResetOptions_NeedsReset", new LocalUserProfileStorage(@"Roslyn\Internal\KeybindingsStatus", "NeedsReset")}, - {"KeybindingResetOptions_NeverShowAgain", new LocalUserProfileStorage(@"Roslyn\Internal\KeybindingsStatus", "NeverShowAgain")}, - {"KeybindingResetOptions_ReSharperStatus", new LocalUserProfileStorage(@"Roslyn\Internal\KeybindingsStatus", "ReSharperStatus")}, - {"LoggerOptions_EtwLoggerKey", new LocalUserProfileStorage(@"Roslyn\Internal\Performance\Logger", "EtwLogger")}, - {"LoggerOptions_OutputWindowLoggerKey", new LocalUserProfileStorage(@"Roslyn\Internal\Performance\Logger", "OutputWindowLogger")}, - {"LoggerOptions_TraceLoggerKey", new LocalUserProfileStorage(@"Roslyn\Internal\Performance\Logger", "TraceLogger")}, - {"LspOptions_LspEditorFeatureFlag", new FeatureFlagStorage(@"Roslyn.LSP.Editor")}, - {"LspOptions_LspSemanticTokensFeatureFlag", new FeatureFlagStorage(@"Roslyn.LSP.SemanticTokens")}, - {"LspOptions_MaxCompletionListSize", new LocalUserProfileStorage(@"Roslyn\Internal\Lsp", "MaxCompletionListSize")}, + {"dotnet_enable_inline_diagnostics", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineDiagnostics")}, + {"dotnet_inline_diagnostics_location", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineDiagnostics.LocationOption")}, + {"dotnet_colorize_inline_hints", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ColorHints")}, + {"dotnet_display_inline_hints_while_pressing_alt_f1", new RoamingProfileStorage("TextEditor.Specific.DisplayAllHintsWhilePressingAltF1")}, + {"dotnet_enable_inline_hints_for_parameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints")}, + {"csharp_enable_inline_hints_for_types", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineTypeHints")}, + {"csharp_enable_inline_hints_for_implicit_object_creation", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineTypeHints.ForImplicitObjectCreation")}, + {"csharp_enable_inline_hints_for_implicit_variable_types", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineTypeHints.ForImplicitVariableTypes")}, + {"dotnet_enable_inline_hints_for_indexer_parameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.ForArrayIndexers")}, + {"csharp_enable_inline_hints_for_lambda_parameter_types", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineTypeHints.ForLambdaParameterTypes")}, + {"dotnet_enable_inline_hints_for_literal_parameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.ForLiteralParameters")}, + {"dotnet_enable_inline_hints_for_object_creation_parameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.ForObjectCreationParameters")}, + {"dotnet_enable_inline_hints_for_other_parameters", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.ForOtherParameters")}, + {"dotnet_suppress_inline_hints_for_parameters_that_differ_only_by_suffix", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.SuppressForParametersThatDifferOnlyBySuffix")}, + {"dotnet_suppress_inline_hints_for_parameters_that_match_argument_name", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.SuppressForParametersThatMatchArgumentName")}, + {"dotnet_suppress_inline_hints_for_parameters_that_match_method_intent", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.InlineParameterNameHints.SuppressForParametersThatMatchMethodIntent")}, + {"dotnet_collapse_inline_rename_ui", new RoamingProfileStorage("TextEditor.CollapseRenameUI")}, + {"dotnet_rename_use_inline_adornment", new RoamingProfileStorage("TextEditor.RenameUseInlineAdornment")}, + {"dotnet_preview_inline_rename_changes", new RoamingProfileStorage("TextEditor.Specific.PreviewRename")}, + {"dotnet_rename_asynchronously", new RoamingProfileStorage("TextEditor.Specific.RenameAsynchronously")}, + {"dotnet_rename_file", new RoamingProfileStorage("TextEditor.Specific.RenameFile")}, + {"dotnet_rename_in_comments", new RoamingProfileStorage("TextEditor.Specific.RenameInComments")}, + {"dotnet_rename_in_strings", new RoamingProfileStorage("TextEditor.Specific.RenameInStrings")}, + {"dotnet_rename_overloads", new RoamingProfileStorage("TextEditor.Specific.RenameOverloads")}, + {"dotnet_crash_on_analyzer_exception", new LocalUserProfileStorage(@"Roslyn\Internal\Diagnostics", "CrashOnAnalyzerException")}, + {"visual_studio_enable_file_logging_for_diagnostics", new LocalUserProfileStorage(@"Roslyn\Internal\Diagnostics", "EnableFileLoggingForDiagnostics")}, + {"dotnet_normal_diagnostic_mode", new LocalUserProfileStorage(@"Roslyn\Internal\Diagnostics", "NormalDiagnosticMode")}, + {"dotnet_enable_automatic_line_ender", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Automatic Line Ender")}, + {"dotnet_enable_brace_matching", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Brace Matching")}, + {"dotnet_enable_classification", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Classification")}, + {"dotnet_enable_event_hook_up", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Event Hookup")}, + {"dotnet_format_on_save", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "FormatOnSave")}, + {"dotnet_enable_full_solution_analysis_memory_monitor", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Full Solution Analysis Memory Monitor")}, + {"dotnet_code_analysis_in_separate_process", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "OOP64Bit")}, + {"dotnet_enable_core_clr_in_code_analysis_process", new FeatureFlagStorage(@"Roslyn.ServiceHubCore")}, + {"dotnet_enable_server_garbage_collection_in_code_analysis_process", new FeatureFlagStorage(@"Roslyn.OOPServerGC")}, + {"dotnet_remove_intellicode_recommendation_limit", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "RemoveRecommendationLimit")}, + {"dotnet_enable_rename_tracking", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Rename Tracking")}, + {"dotnet_enable_semantic_colorizer", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Semantic Colorizer")}, + {"dotnet_show_intellicode_debug_info", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "ShowDebugInfo")}, + {"dotnet_enable_smart_indenter", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Smart Indenter")}, + {"dotnet_enable_snippets", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Snippets2")}, + {"dotnet_enable_squiggles", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Squiggles")}, + {"dotnet_enable_syntactic_colorizer", new LocalUserProfileStorage(@"Roslyn\Internal\OnOff\Features", "Syntactic Colorizer")}, + {"dotnet_enable_solution_crawler", new LocalUserProfileStorage(@"Roslyn\Internal\SolutionCrawler", "Solution Crawler")}, + {"dotnet_colorize_json_patterns", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ColorizeJsonPatterns")}, + {"dotnet_detect_and_offer_editor_features_for_probable_json_strings", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.DetectAndOfferEditorFeaturesForProbableJsonStrings")}, + {"dotnet_highlight_related_json_components", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.HighlightRelatedJsonComponentsUnderCursor")}, + {"dotnet_report_invalid_json_patterns", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ReportInvalidJsonPatterns")}, + {"visual_studio_enable_key_binding_reset", new FeatureFlagStorage(@"Roslyn.KeybindingResetEnabled")}, + {"visual_studio_key_binding_needs_reset", new LocalUserProfileStorage(@"Roslyn\Internal\KeybindingsStatus", "NeedsReset")}, + {"visual_studio_key_binding_reset_never_show_again", new LocalUserProfileStorage(@"Roslyn\Internal\KeybindingsStatus", "NeverShowAgain")}, + {"visual_studio_resharper_key_binding_status", new LocalUserProfileStorage(@"Roslyn\Internal\KeybindingsStatus", "ReSharperStatus")}, + {"visual_studio_etw_logger_key", new LocalUserProfileStorage(@"Roslyn\Internal\Performance\Logger", "EtwLogger")}, + {"visual_studio_output_window_logger_key", new LocalUserProfileStorage(@"Roslyn\Internal\Performance\Logger", "OutputWindowLogger")}, + {"visual_studio_trace_logger_key", new LocalUserProfileStorage(@"Roslyn\Internal\Performance\Logger", "TraceLogger")}, + {"dotnet_enable_lsp_editor", new FeatureFlagStorage(@"Roslyn.LSP.Editor")}, + {"dotnet_enable_lsp_semantic_tokens", new FeatureFlagStorage(@"Roslyn.LSP.SemanticTokens")}, + {"dotnet_lsp_max_completion_list_size", new LocalUserProfileStorage(@"Roslyn\Internal\Lsp", "MaxCompletionListSize")}, #pragma warning disable CS0612 // Type or member is obsolete - {"NavigationBarOptions_ShowNavigationBar", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Dropdown Bar", vbKey: "TextEditor.Basic.Dropdown Bar")}, + {"dotnet_show_navigation_bar", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Dropdown Bar", vbKey: "TextEditor.Basic.Dropdown Bar")}, #pragma warning restore - {"QuickInfoOptions_IncludeNavigationHintsInQuickInfo", new RoamingProfileStorage("TextEditor.Specific.IncludeNavigationHintsInQuickInfo")}, - {"QuickInfoOptions_ShowRemarksInQuickInfo", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowRemarks")}, - {"RegularExpressionsOptions_ColorizeRegexPatterns", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ColorizeRegexPatterns")}, - {"RegularExpressionsOptions_HighlightRelatedRegexComponentsUnderCursor", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.HighlightRelatedRegexComponentsUnderCursor")}, - {"RegularExpressionsOptions_ProvideRegexCompletions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ProvideRegexCompletions")}, - {"RegularExpressionsOptions_ReportInvalidRegexPatterns", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ReportInvalidRegexPatterns")}, - {"ServiceFeatureOnOffOptions_RemoveDocumentDiagnosticsOnDocumentClose", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.RemoveDocumentDiagnosticsOnDocumentClose")}, + {"dotnet_include_navigation_hints_in_quick_info", new RoamingProfileStorage("TextEditor.Specific.IncludeNavigationHintsInQuickInfo")}, + {"dotnet_show_remarks_in_quick_info", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ShowRemarks")}, + {"dotnet_colorize_regex_patterns", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ColorizeRegexPatterns")}, + {"dotnet_highlight_related_regex_components", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.HighlightRelatedRegexComponentsUnderCursor")}, + {"dotnet_provide_regex_completions", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ProvideRegexCompletions")}, + {"dotnet_report_invalid_regex_patterns", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ReportInvalidRegexPatterns")}, + {"remove_document_diagnostics_on_document_close", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.RemoveDocumentDiagnosticsOnDocumentClose")}, #pragma warning disable CS0612 // Type or member is obsolete - {"SignatureHelpOptions_ShowSignatureHelp", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Auto List Params", vbKey: "TextEditor.Basic.Auto List Params")}, + {"dotnet_show_signature_help", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Auto List Params", vbKey: "TextEditor.Basic.Auto List Params")}, #pragma warning restore - {"SimplificationOptions_NamingPreferences", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.NamingPreferences5")}, - {"SolutionCrawlerOptionsStorage_BackgroundAnalysisScopeOption", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.BackgroundAnalysisScopeOption")}, - {"SolutionCrawlerOptionsStorage_CompilerDiagnosticsScopeOption", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CompilerDiagnosticsScopeOption")}, - {"SplitCommentOptions_Enabled", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.SplitComments")}, - {"SplitStringLiteralOptions_Enabled", new RoamingProfileStorage("TextEditor.CSharp.Specific.SplitStringLiterals")}, - {"StackTraceExplorerOptions_OpenOnFocus", new RoamingProfileStorage("StackTraceExplorer.Options.OpenOnFocus")}, - {"SuggestionsOptions_Asynchronous", new RoamingProfileStorage("TextEditor.Specific.Suggestions.Asynchronous4")}, - {"SuggestionsOptions_AsynchronousQuickActionsDisableFeatureFlag", new FeatureFlagStorage(@"Roslyn.AsynchronousQuickActionsDisable2")}, - {"SymbolSearchOptions_Enabled", new LocalUserProfileStorage(@"Roslyn\Features\SymbolSearch", "Enabled")}, - {"SymbolSearchOptions_SuggestForTypesInNuGetPackages", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.SuggestForTypesInNuGetPackages")}, - {"SymbolSearchOptions_SuggestForTypesInReferenceAssemblies", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.SuggestForTypesInReferenceAssemblies")}, + {"dotnet_naming_preferences", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.NamingPreferences5")}, + {"dotnet_solution_crawler_background_analysis_scope", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.BackgroundAnalysisScopeOption")}, + {"dotnet_compiler_diagnostics_scope", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.CompilerDiagnosticsScopeOption")}, + {"dotnet_split_comments", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.SplitComments")}, + {"csharp_split_string_literal_on_return", new RoamingProfileStorage("TextEditor.CSharp.Specific.SplitStringLiterals")}, + {"visual_studio_open_stack_trace_explorer_on_focus", new RoamingProfileStorage("StackTraceExplorer.Options.OpenOnFocus")}, + {"dotnet_enable_asynchronous_suggestions", new RoamingProfileStorage("TextEditor.Specific.Suggestions.Asynchronous4")}, + {"dotnet_disable_asynchronous_quick_actions", new FeatureFlagStorage(@"Roslyn.AsynchronousQuickActionsDisable2")}, + {"visual_studio_enable_symbol_search", new LocalUserProfileStorage(@"Roslyn\Features\SymbolSearch", "Enabled")}, + {"dotnet_search_nuget_packages", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.SuggestForTypesInNuGetPackages")}, + {"dotnet_search_reference_assemblies", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.SuggestForTypesInReferenceAssemblies")}, #pragma warning disable CS0612 // Type or member is obsolete {"tab_width", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Tab Size", "TextEditor.Basic.Tab Size")}, #pragma warning restore - {"TaskListOptionsStorage_ComputeTaskListItemsForClosedFiles", new RoamingProfileStorage("TextEditor.Specific.ComputeTaskListItemsForClosedFiles")}, - {"TaskListOptionsStorage_Descriptors", new RoamingProfileStorage("Microsoft.VisualStudio.ErrorListPkg.Shims.TaskListOptions.CommentTokens")}, - {"UseConditionalExpressionOptions_ConditionalExpressionWrappingLength", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ConditionalExpressionWrappingLength")}, - {"ValidateFormatStringOption_ReportInvalidPlaceholdersInStringDotFormatCalls", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.WarnOnInvalidStringDotFormatCalls")}, + {"dotnet_compute_task_list_items_for_closed_files", new RoamingProfileStorage("TextEditor.Specific.ComputeTaskListItemsForClosedFiles")}, + {"dotnet_task_list_storage_descriptors", new RoamingProfileStorage("Microsoft.VisualStudio.ErrorListPkg.Shims.TaskListOptions.CommentTokens")}, + {"dotnet_conditional_expression_wrapping_length", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.ConditionalExpressionWrappingLength")}, + {"dotnet_report_invalid_placeholders_in_string_dot_format_calls", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.WarnOnInvalidStringDotFormatCalls")}, {"visual_basic_preferred_modifier_order", new RoamingProfileStorage("TextEditor.VisualBasic.Specific.PreferredModifierOrder")}, {"visual_basic_style_prefer_isnot_expression", new RoamingProfileStorage("TextEditor.VisualBasic.Specific.PreferIsNotExpression")}, {"visual_basic_style_prefer_simplified_object_creation", new RoamingProfileStorage("TextEditor.VisualBasic.Specific.PreferSimplifiedObjectCreation")}, {"visual_basic_style_unused_value_assignment_preference", new RoamingProfileStorage("TextEditor.VisualBasic.Specific.UnusedValueAssignmentPreference")}, {"visual_basic_style_unused_value_expression_statement_preference", new RoamingProfileStorage("TextEditor.VisualBasic.Specific.UnusedValueExpressionStatementPreference")}, - {"VisualStudioNavigationOptions_NavigateToObjectBrowser", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.NavigateToObjectBrowser")}, - {"VisualStudioWorkspaceStatusService_PartialLoadModeFeatureFlag", new FeatureFlagStorage(@"Roslyn.PartialLoadMode")}, - {"WorkspaceConfigurationOptions_DisableBackgroundCompilation", new FeatureFlagStorage(@"Roslyn.DisableBackgroundCompilation")}, - {"WorkspaceConfigurationOptions_DisableReferenceManagerRecoverableMetadata", new FeatureFlagStorage(@"Roslyn.DisableReferenceManagerRecoverableMetadata")}, - {"WorkspaceConfigurationOptions_DisableSharedSyntaxTrees", new FeatureFlagStorage(@"Roslyn.DisableSharedSyntaxTrees")}, - {"WorkspaceConfigurationOptions_EnableDiagnosticsInSourceGeneratedFiles", new RoamingProfileStorage("TextEditor.Roslyn.Specific.EnableDiagnosticsInSourceGeneratedFilesExperiment")}, - {"WorkspaceConfigurationOptions_EnableDiagnosticsInSourceGeneratedFilesFeatureFlag", new FeatureFlagStorage(@"Roslyn.EnableDiagnosticsInSourceGeneratedFiles")}, - {"WorkspaceConfigurationOptions_EnableOpeningSourceGeneratedFilesInWorkspace", new RoamingProfileStorage("TextEditor.Roslyn.Specific.EnableOpeningSourceGeneratedFilesInWorkspaceExperiment")}, - {"WorkspaceConfigurationOptions_EnableOpeningSourceGeneratedFilesInWorkspaceFeatureFlag", new FeatureFlagStorage(@"Roslyn.SourceGeneratorsEnableOpeningInWorkspace")}, - {"XamlOptions_EnableLspIntelliSenseFeatureFlag", new FeatureFlagStorage(@"Xaml.EnableLspIntelliSense")}, + {"visual_studio_navigate_to_object_browser", new RoamingProfileStorage("TextEditor.%LANGUAGE%.Specific.NavigateToObjectBrowser")}, + {"visual_studio_workspace_partial_load_mode", new FeatureFlagStorage(@"Roslyn.PartialLoadMode")}, + {"dotnet_disable_background_compilation", new FeatureFlagStorage(@"Roslyn.DisableBackgroundCompilation")}, + {"dotnet_disable_reference_manager_recoverable_metadata", new FeatureFlagStorage(@"Roslyn.DisableReferenceManagerRecoverableMetadata")}, + {"dotnet_disable_shared_syntax_trees", new FeatureFlagStorage(@"Roslyn.DisableSharedSyntaxTrees")}, + {"dotnet_enable_diagnostics_in_source_generated_files", new RoamingProfileStorage("TextEditor.Roslyn.Specific.EnableDiagnosticsInSourceGeneratedFilesExperiment")}, + {"dotnet_enable_diagnostics_in_source_generated_files_feature_flag", new FeatureFlagStorage(@"Roslyn.EnableDiagnosticsInSourceGeneratedFiles")}, + {"dotnet_enable_opening_source_generated_files_in_workspace", new RoamingProfileStorage("TextEditor.Roslyn.Specific.EnableOpeningSourceGeneratedFilesInWorkspaceExperiment")}, + {"dotnet_enable_opening_source_generated_files_in_workspace_feature_flag", new FeatureFlagStorage(@"Roslyn.SourceGeneratorsEnableOpeningInWorkspace")}, + {"xaml_enable_lsp_intellisense", new FeatureFlagStorage(@"Xaml.EnableLspIntelliSense")}, }; } diff --git a/src/VisualStudio/Core/Def/Options/XamlOptions.cs b/src/VisualStudio/Core/Def/Options/XamlOptions.cs index 7201865871edc..69881b7248b7c 100644 --- a/src/VisualStudio/Core/Def/Options/XamlOptions.cs +++ b/src/VisualStudio/Core/Def/Options/XamlOptions.cs @@ -15,6 +15,6 @@ namespace Microsoft.CodeAnalysis.Editor.Xaml /// internal sealed class XamlOptions { - public static readonly Option2 EnableLspIntelliSenseFeatureFlag = new("XamlOptions_EnableLspIntelliSenseFeatureFlag", defaultValue: false); + public static readonly Option2 EnableLspIntelliSenseFeatureFlag = new("xaml_enable_lsp_intellisense", defaultValue: false); } } diff --git a/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs b/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs index 3ab5891beda36..35849273a1202 100644 --- a/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs +++ b/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs @@ -108,7 +108,7 @@ public PackageInstallerService( globalOptions, workspace, listenerProvider, - SymbolSearchGlobalOptions.Enabled, + SymbolSearchGlobalOptionsStorage.Enabled, ImmutableArray.Create(SymbolSearchOptionsStorage.SearchReferenceAssemblies, SymbolSearchOptionsStorage.SearchNuGetPackages)) { _operationExecutor = operationExecutor; diff --git a/src/VisualStudio/Core/Def/Remote/VisualStudioRemoteHostClientProvider.cs b/src/VisualStudio/Core/Def/Remote/VisualStudioRemoteHostClientProvider.cs index 5e22dde28cc90..dbe211ae53c5b 100644 --- a/src/VisualStudio/Core/Def/Remote/VisualStudioRemoteHostClientProvider.cs +++ b/src/VisualStudio/Core/Def/Remote/VisualStudioRemoteHostClientProvider.cs @@ -55,7 +55,7 @@ public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices) { // We don't want to bring up the OOP process in a VS cloud environment client instance // Avoids proffering brokered services on the client instance. - if (!_globalOptions.GetOption(RemoteHostOptions.OOP64Bit) || + if (!_globalOptions.GetOption(RemoteHostOptionsStorage.OOP64Bit) || workspaceServices.Workspace is not VisualStudioWorkspace || workspaceServices.GetRequiredService().IsCloudEnvironmentClient()) { @@ -103,8 +103,8 @@ private VisualStudioRemoteHostClientProvider( var serviceBroker = brokeredServiceContainer.GetFullAccessServiceBroker(); var configuration = - (_globalOptions.GetOption(RemoteHostOptions.OOPCoreClrFeatureFlag) ? RemoteProcessConfiguration.Core : 0) | - (_globalOptions.GetOption(RemoteHostOptions.OOPServerGCFeatureFlag) ? RemoteProcessConfiguration.ServerGC : 0) | + (_globalOptions.GetOption(RemoteHostOptionsStorage.OOPCoreClrFeatureFlag) ? RemoteProcessConfiguration.Core : 0) | + (_globalOptions.GetOption(RemoteHostOptionsStorage.OOPServerGCFeatureFlag) ? RemoteProcessConfiguration.ServerGC : 0) | (_globalOptions.GetOption(SolutionCrawlerRegistrationService.EnableSolutionCrawler) ? RemoteProcessConfiguration.EnableSolutionCrawler : 0); // VS AsyncLazy does not currently support cancellation: diff --git a/src/VisualStudio/Core/Def/Snippets/AbstractSnippetCommandHandler.cs b/src/VisualStudio/Core/Def/Snippets/AbstractSnippetCommandHandler.cs index 962166d08a361..c2ca6270624a9 100644 --- a/src/VisualStudio/Core/Def/Snippets/AbstractSnippetCommandHandler.cs +++ b/src/VisualStudio/Core/Def/Snippets/AbstractSnippetCommandHandler.cs @@ -14,6 +14,7 @@ using Microsoft.CodeAnalysis.LanguageService; using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; +using Microsoft.CodeAnalysis.Snippets; using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.Commanding; using Microsoft.VisualStudio.Editor; @@ -322,7 +323,7 @@ protected bool AreSnippetsEnabled(EditorCommandArgs args) return false; } - return EditorOptionsService.GlobalOptions.GetOption(InternalFeatureOnOffOptions.Snippets) && + return EditorOptionsService.GlobalOptions.GetOption(SnippetsOptionsStorage.Snippets) && // TODO (https://github.com/dotnet/roslyn/issues/5107): enable in interactive !(Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out var workspace) && workspace.Kind == WorkspaceKind.Interactive); } diff --git a/src/VisualStudio/Core/Def/Snippets/AbstractSnippetExpansionClient.cs b/src/VisualStudio/Core/Def/Snippets/AbstractSnippetExpansionClient.cs index 76b68b17092d5..63452122e8668 100644 --- a/src/VisualStudio/Core/Def/Snippets/AbstractSnippetExpansionClient.cs +++ b/src/VisualStudio/Core/Def/Snippets/AbstractSnippetExpansionClient.cs @@ -541,7 +541,7 @@ private bool TryInsertArgumentCompletionSnippet(SnapshotSpan triggerSpan, Snapsh return false; } - if (!(EditorOptionsService.GlobalOptions.GetOption(CompletionViewOptions.EnableArgumentCompletionSnippets, document.Project.Language) ?? false)) + if (!(EditorOptionsService.GlobalOptions.GetOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, document.Project.Language) ?? false)) { // Argument completion snippets are not enabled return false; diff --git a/src/VisualStudio/Core/Def/StackTraceExplorer/StackTraceExplorerCommandHandler.cs b/src/VisualStudio/Core/Def/StackTraceExplorer/StackTraceExplorerCommandHandler.cs index a77aa9266b857..a82a8a194a93c 100644 --- a/src/VisualStudio/Core/Def/StackTraceExplorer/StackTraceExplorerCommandHandler.cs +++ b/src/VisualStudio/Core/Def/StackTraceExplorer/StackTraceExplorerCommandHandler.cs @@ -32,7 +32,7 @@ private StackTraceExplorerCommandHandler(RoslynPackage package) _globalOptions.OptionChanged += GlobalOptionChanged; - var enabled = _globalOptions.GetOption(StackTraceExplorerOptionsMetadata.OpenOnFocus); + var enabled = _globalOptions.GetOption(StackTraceExplorerOptionsStorage.OpenOnFocus); if (enabled) { AdviseBroadcastMessages(); @@ -108,7 +108,7 @@ private void UnadviseBroadcastMessages() private void GlobalOptionChanged(object sender, OptionChangedEventArgs e) { - if (e.Option == StackTraceExplorerOptionsMetadata.OpenOnFocus && e.Value is not null) + if (e.Option == StackTraceExplorerOptionsStorage.OpenOnFocus && e.Value is not null) { var enabled = (bool)e.Value; if (enabled) diff --git a/src/VisualStudio/Core/Def/StackTraceExplorer/StackTraceExplorerOptions.cs b/src/VisualStudio/Core/Def/StackTraceExplorer/StackTraceExplorerOptionsStorage.cs similarity index 81% rename from src/VisualStudio/Core/Def/StackTraceExplorer/StackTraceExplorerOptions.cs rename to src/VisualStudio/Core/Def/StackTraceExplorer/StackTraceExplorerOptionsStorage.cs index 8d7a2c88fddd3..85fd0f1599ce6 100644 --- a/src/VisualStudio/Core/Def/StackTraceExplorer/StackTraceExplorerOptions.cs +++ b/src/VisualStudio/Core/Def/StackTraceExplorer/StackTraceExplorerOptionsStorage.cs @@ -6,12 +6,12 @@ namespace Microsoft.CodeAnalysis.StackTraceExplorer { - internal sealed class StackTraceExplorerOptionsMetadata + internal sealed class StackTraceExplorerOptionsStorage { /// /// Used to determine if a user focusing VS should look at the clipboard for a callstack and automatically /// open the tool window with the callstack inserted /// - public static readonly Option2 OpenOnFocus = new("StackTraceExplorerOptions_OpenOnFocus", defaultValue: false); + public static readonly Option2 OpenOnFocus = new("visual_studio_open_stack_trace_explorer_on_focus", defaultValue: false); } } diff --git a/src/VisualStudio/Core/Def/SymbolSearch/SymbolSearchGlobalOptions.cs b/src/VisualStudio/Core/Def/SymbolSearch/SymbolSearchGlobalOptionsStorage.cs similarity index 63% rename from src/VisualStudio/Core/Def/SymbolSearch/SymbolSearchGlobalOptions.cs rename to src/VisualStudio/Core/Def/SymbolSearch/SymbolSearchGlobalOptionsStorage.cs index fe37a8f0def74..91b3c5bd3cba4 100644 --- a/src/VisualStudio/Core/Def/SymbolSearch/SymbolSearchGlobalOptions.cs +++ b/src/VisualStudio/Core/Def/SymbolSearch/SymbolSearchGlobalOptionsStorage.cs @@ -6,8 +6,8 @@ namespace Microsoft.CodeAnalysis.SymbolSearch { - internal sealed class SymbolSearchGlobalOptions + internal sealed class SymbolSearchGlobalOptionsStorage { - public static readonly Option2 Enabled = new("SymbolSearchOptions_Enabled", defaultValue: true); + public static readonly Option2 Enabled = new("visual_studio_enable_symbol_search", defaultValue: true); } } diff --git a/src/VisualStudio/Core/Def/SymbolSearch/VisualStudioSymbolSearchService.cs b/src/VisualStudio/Core/Def/SymbolSearch/VisualStudioSymbolSearchService.cs index 714c32f14ef84..7436a2c816fe8 100644 --- a/src/VisualStudio/Core/Def/SymbolSearch/VisualStudioSymbolSearchService.cs +++ b/src/VisualStudio/Core/Def/SymbolSearch/VisualStudioSymbolSearchService.cs @@ -65,7 +65,7 @@ public VisualStudioSymbolSearchService( globalOptions, workspace, listenerProvider, - SymbolSearchGlobalOptions.Enabled, + SymbolSearchGlobalOptionsStorage.Enabled, ImmutableArray.Create(SymbolSearchOptionsStorage.SearchReferenceAssemblies, SymbolSearchOptionsStorage.SearchNuGetPackages)) { _serviceProvider = serviceProvider; diff --git a/src/VisualStudio/Core/Def/Telemetry/FileLogger.cs b/src/VisualStudio/Core/Def/Telemetry/FileLogger.cs index 3a30f13683370..3e2252d890c80 100644 --- a/src/VisualStudio/Core/Def/Telemetry/FileLogger.cs +++ b/src/VisualStudio/Core/Def/Telemetry/FileLogger.cs @@ -38,7 +38,7 @@ public FileLogger(IGlobalOptionService globalOptions, string logFilePath) _gate = new(); _buffer = new(); _taskQueue = new(AsynchronousOperationListenerProvider.NullListener, TaskScheduler.Default); - _enabled = globalOptions.GetOption(VisualStudioLoggingOptionsMetadata.EnableFileLoggingForDiagnostics); + _enabled = globalOptions.GetOption(VisualStudioLoggingOptionsStorage.EnableFileLoggingForDiagnostics); globalOptions.OptionChanged += OptionService_OptionChanged; } @@ -52,7 +52,7 @@ private static string GetLogFileName() private void OptionService_OptionChanged(object? sender, OptionChangedEventArgs e) { - if (e.Option == VisualStudioLoggingOptionsMetadata.EnableFileLoggingForDiagnostics) + if (e.Option == VisualStudioLoggingOptionsStorage.EnableFileLoggingForDiagnostics) { Contract.ThrowIfNull(e.Value); diff --git a/src/VisualStudio/Core/Def/Telemetry/VisualStudioLoggingOptionsMetadata.cs b/src/VisualStudio/Core/Def/Telemetry/VisualStudioLoggingOptionsStorage.cs similarity index 69% rename from src/VisualStudio/Core/Def/Telemetry/VisualStudioLoggingOptionsMetadata.cs rename to src/VisualStudio/Core/Def/Telemetry/VisualStudioLoggingOptionsStorage.cs index a73d24a0cc352..3b7a0c9345ce1 100644 --- a/src/VisualStudio/Core/Def/Telemetry/VisualStudioLoggingOptionsMetadata.cs +++ b/src/VisualStudio/Core/Def/Telemetry/VisualStudioLoggingOptionsStorage.cs @@ -6,8 +6,8 @@ namespace Microsoft.CodeAnalysis.Diagnostics { - internal static class VisualStudioLoggingOptionsMetadata + internal static class VisualStudioLoggingOptionsStorage { - public static readonly Option2 EnableFileLoggingForDiagnostics = new("InternalDiagnosticsOptions_EnableFileLoggingForDiagnostics", defaultValue: false); + public static readonly Option2 EnableFileLoggingForDiagnostics = new("visual_studio_enable_file_logging_for_diagnostics", defaultValue: false); } } diff --git a/src/VisualStudio/Core/Def/Workspace/VisualStudioNavigationOptions.cs b/src/VisualStudio/Core/Def/Workspace/VisualStudioNavigationOptionsStorage.cs similarity index 71% rename from src/VisualStudio/Core/Def/Workspace/VisualStudioNavigationOptions.cs rename to src/VisualStudio/Core/Def/Workspace/VisualStudioNavigationOptionsStorage.cs index 83fde90305f30..a024a9e73c118 100644 --- a/src/VisualStudio/Core/Def/Workspace/VisualStudioNavigationOptions.cs +++ b/src/VisualStudio/Core/Def/Workspace/VisualStudioNavigationOptionsStorage.cs @@ -6,8 +6,8 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation { - internal sealed class VisualStudioNavigationOptions + internal sealed class VisualStudioNavigationOptionsStorage { - public static readonly PerLanguageOption2 NavigateToObjectBrowser = new("VisualStudioNavigationOptions_NavigateToObjectBrowser", defaultValue: false); + public static readonly PerLanguageOption2 NavigateToObjectBrowser = new("visual_studio_navigate_to_object_browser", defaultValue: false); } } diff --git a/src/VisualStudio/Core/Def/Workspace/VisualStudioSymbolNavigationService.cs b/src/VisualStudio/Core/Def/Workspace/VisualStudioSymbolNavigationService.cs index aaf018f6fd340..eec3984e51ab7 100644 --- a/src/VisualStudio/Core/Def/Workspace/VisualStudioSymbolNavigationService.cs +++ b/src/VisualStudio/Core/Def/Workspace/VisualStudioSymbolNavigationService.cs @@ -105,7 +105,7 @@ public VisualStudioSymbolNavigationService( } // Should we prefer navigating to the Object Browser over metadata-as-source? - if (_globalOptions.GetOption(VisualStudioNavigationOptions.NavigateToObjectBrowser, project.Language)) + if (_globalOptions.GetOption(VisualStudioNavigationOptionsStorage.NavigateToObjectBrowser, project.Language)) { var libraryService = project.Services.GetService(); if (libraryService == null) diff --git a/src/VisualStudio/Core/Def/Workspace/VisualStudioWorkspaceStatusServiceFactory.cs b/src/VisualStudio/Core/Def/Workspace/VisualStudioWorkspaceStatusServiceFactory.cs index 203dd3cc27c69..fd17d3a85d7bf 100644 --- a/src/VisualStudio/Core/Def/Workspace/VisualStudioWorkspaceStatusServiceFactory.cs +++ b/src/VisualStudio/Core/Def/Workspace/VisualStudioWorkspaceStatusServiceFactory.cs @@ -25,7 +25,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation [ExportWorkspaceServiceFactory(typeof(IWorkspaceStatusService), ServiceLayer.Host), Shared] internal sealed class VisualStudioWorkspaceStatusServiceFactory : IWorkspaceServiceFactory { - private static readonly Option2 s_partialLoadModeFeatureFlag = new("VisualStudioWorkspaceStatusService_PartialLoadModeFeatureFlag", defaultValue: false); + private static readonly Option2 s_partialLoadModeFeatureFlag = new("visual_studio_workspace_partial_load_mode", defaultValue: false); private readonly IAsyncServiceProvider2 _serviceProvider; private readonly IThreadingContext _threadingContext; diff --git a/src/VisualStudio/Core/Test/Completion/CSharpCompletionSnippetNoteTests.vb b/src/VisualStudio/Core/Test/Completion/CSharpCompletionSnippetNoteTests.vb index f76ed6b65c526..73d2e6cb82a04 100644 --- a/src/VisualStudio/Core/Test/Completion/CSharpCompletionSnippetNoteTests.vb +++ b/src/VisualStudio/Core/Test/Completion/CSharpCompletionSnippetNoteTests.vb @@ -119,7 +119,7 @@ class C Dim testSnippetInfoService = DirectCast(state.Workspace.Services.GetLanguageServices(LanguageNames.CSharp).GetService(Of ISnippetInfoService)(), TestCSharpSnippetInfoService) testSnippetInfoService.SetSnippetShortcuts({"for"}) - state.Workspace.GlobalOptions.SetGlobalOption(InternalFeatureOnOffOptions.Snippets, False) + state.Workspace.GlobalOptions.SetGlobalOption(SnippetsOptionsStorage.Snippets, False) state.SendTypeChars("for") Await state.AssertCompletionSession() diff --git a/src/VisualStudio/Core/Test/Snippets/SnippetTestState.vb b/src/VisualStudio/Core/Test/Snippets/SnippetTestState.vb index 0d9233e5bde4e..744ce08193d6f 100644 --- a/src/VisualStudio/Core/Test/Snippets/SnippetTestState.vb +++ b/src/VisualStudio/Core/Test/Snippets/SnippetTestState.vb @@ -17,6 +17,7 @@ Imports Microsoft.CodeAnalysis.Editor.VisualBasic.LineCommit Imports Microsoft.CodeAnalysis.Formatting Imports Microsoft.CodeAnalysis.Host.Mef Imports Microsoft.CodeAnalysis.Options +Imports Microsoft.CodeAnalysis.Snippets Imports Microsoft.VisualStudio.Editor Imports Microsoft.VisualStudio.Language.Intellisense Imports Microsoft.VisualStudio.LanguageServices.Implementation.Snippets @@ -42,7 +43,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Snippets excludedTypes:={GetType(IIntelliSensePresenter(Of ISignatureHelpPresenterSession, ISignatureHelpSession)), GetType(FormatCommandHandler)}.Concat(If(excludedTypes, {})).ToList(), includeFormatCommandHandler:=False) - Workspace.GlobalOptions.SetGlobalOption(InternalFeatureOnOffOptions.Snippets, True) + Workspace.GlobalOptions.SetGlobalOption(SnippetsOptionsStorage.Snippets, True) Dim mockSVsServiceProvider = New Mock(Of SVsServiceProvider)(MockBehavior.Strict) mockSVsServiceProvider.Setup(Function(s) s.GetService(GetType(SVsTextManager))).Returns(Nothing) @@ -103,7 +104,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Snippets Dim state = New SnippetTestState(workspaceXml, languageName, startActiveSession, extraParts, excludedTypes:=Enumerable.Empty(Of Type), WorkspaceKind.Interactive) - state.Workspace.GlobalOptions.SetGlobalOption(InternalFeatureOnOffOptions.Snippets, False) + state.Workspace.GlobalOptions.SetGlobalOption(SnippetsOptionsStorage.Snippets, False) Return state End Function diff --git a/src/VisualStudio/IntegrationTest/New.IntegrationTests/CSharp/CSharpArgumentProvider.cs b/src/VisualStudio/IntegrationTest/New.IntegrationTests/CSharp/CSharpArgumentProvider.cs index 22a836ac4c687..9019bfad5627b 100644 --- a/src/VisualStudio/IntegrationTest/New.IntegrationTests/CSharp/CSharpArgumentProvider.cs +++ b/src/VisualStudio/IntegrationTest/New.IntegrationTests/CSharp/CSharpArgumentProvider.cs @@ -29,8 +29,8 @@ public override async Task InitializeAsync() await base.InitializeAsync().ConfigureAwait(true); var globalOptions = await TestServices.Shell.GetComponentModelServiceAsync(HangMitigatingCancellationToken); - globalOptions.SetGlobalOption(CompletionViewOptions.EnableArgumentCompletionSnippets, LanguageNames.CSharp, true); - globalOptions.SetGlobalOption(CompletionViewOptions.EnableArgumentCompletionSnippets, LanguageNames.VisualBasic, true); + globalOptions.SetGlobalOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, LanguageNames.CSharp, true); + globalOptions.SetGlobalOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, LanguageNames.VisualBasic, true); } [IdeFact] diff --git a/src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/StateResetInProcess.cs b/src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/StateResetInProcess.cs index 7dc837ba02312..fa47925a67142 100644 --- a/src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/StateResetInProcess.cs +++ b/src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/StateResetInProcess.cs @@ -47,10 +47,10 @@ public async Task ResetGlobalOptionsAsync(CancellationToken cancellationToken) ResetOption(globalOptions, MetadataAsSourceOptionsStorage.NavigateToDecompiledSources); ResetOption(globalOptions, WorkspaceConfigurationOptionsStorage.EnableOpeningSourceGeneratedFilesInWorkspace); ResetPerLanguageOption(globalOptions, NavigationBarViewOptionsStorage.ShowNavigationBar); - ResetPerLanguageOption(globalOptions, VisualStudioNavigationOptions.NavigateToObjectBrowser); + ResetPerLanguageOption(globalOptions, VisualStudioNavigationOptionsStorage.NavigateToObjectBrowser); ResetPerLanguageOption(globalOptions, AddImportOnPasteOptionsStorage.AddImportsOnPaste); ResetPerLanguageOption(globalOptions, LineCommitOptionsStorage.PrettyListing); - ResetPerLanguageOption(globalOptions, CompletionViewOptions.EnableArgumentCompletionSnippets); + ResetPerLanguageOption(globalOptions, CompletionViewOptionsStorage.EnableArgumentCompletionSnippets); static void ResetOption(IGlobalOptionService globalOptions, Option2 option) { diff --git a/src/VisualStudio/IntegrationTest/New.IntegrationTests/VisualBasic/BasicArgumentProvider.cs b/src/VisualStudio/IntegrationTest/New.IntegrationTests/VisualBasic/BasicArgumentProvider.cs index 0afebe77b9e46..5678ca2388589 100644 --- a/src/VisualStudio/IntegrationTest/New.IntegrationTests/VisualBasic/BasicArgumentProvider.cs +++ b/src/VisualStudio/IntegrationTest/New.IntegrationTests/VisualBasic/BasicArgumentProvider.cs @@ -28,8 +28,8 @@ public override async Task InitializeAsync() await base.InitializeAsync().ConfigureAwait(true); var globalOptions = await TestServices.Shell.GetComponentModelServiceAsync(HangMitigatingCancellationToken); - globalOptions.SetGlobalOption(CompletionViewOptions.EnableArgumentCompletionSnippets, LanguageNames.CSharp, true); - globalOptions.SetGlobalOption(CompletionViewOptions.EnableArgumentCompletionSnippets, LanguageNames.VisualBasic, true); + globalOptions.SetGlobalOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, LanguageNames.CSharp, true); + globalOptions.SetGlobalOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, LanguageNames.VisualBasic, true); } [IdeFact] diff --git a/src/VisualStudio/IntegrationTest/New.IntegrationTests/VisualBasic/BasicGoToDefinition.cs b/src/VisualStudio/IntegrationTest/New.IntegrationTests/VisualBasic/BasicGoToDefinition.cs index 884459c6d047f..d84da6a12ec1b 100644 --- a/src/VisualStudio/IntegrationTest/New.IntegrationTests/VisualBasic/BasicGoToDefinition.cs +++ b/src/VisualStudio/IntegrationTest/New.IntegrationTests/VisualBasic/BasicGoToDefinition.cs @@ -56,12 +56,12 @@ await SetUpEditorAsync( @"Class C Dim i As Integer$$ End Class", HangMitigatingCancellationToken); - globalOptions.SetGlobalOption(VisualStudioNavigationOptions.NavigateToObjectBrowser, LanguageNames.VisualBasic, true); + globalOptions.SetGlobalOption(VisualStudioNavigationOptionsStorage.NavigateToObjectBrowser, LanguageNames.VisualBasic, true); await TestServices.Editor.GoToDefinitionAsync(HangMitigatingCancellationToken); Assert.Equal("Object Browser", await TestServices.Shell.GetActiveWindowCaptionAsync(HangMitigatingCancellationToken)); - globalOptions.SetGlobalOption(VisualStudioNavigationOptions.NavigateToObjectBrowser, LanguageNames.VisualBasic, false); + globalOptions.SetGlobalOption(VisualStudioNavigationOptionsStorage.NavigateToObjectBrowser, LanguageNames.VisualBasic, false); globalOptions.SetGlobalOption(MetadataAsSourceOptionsStorage.NavigateToDecompiledSources, false); await TestServices.SolutionExplorer.OpenFileAsync(ProjectName, "Class1.vb", HangMitigatingCancellationToken); diff --git a/src/VisualStudio/IntegrationTest/TestUtilities/InProcess/VisualStudioWorkspace_InProc.cs b/src/VisualStudio/IntegrationTest/TestUtilities/InProcess/VisualStudioWorkspace_InProc.cs index 05a67dfbebbe4..6edc50cf682dc 100644 --- a/src/VisualStudio/IntegrationTest/TestUtilities/InProcess/VisualStudioWorkspace_InProc.cs +++ b/src/VisualStudio/IntegrationTest/TestUtilities/InProcess/VisualStudioWorkspace_InProc.cs @@ -123,7 +123,7 @@ public void ResetOptions() { SetFileScopedNamespaces(false); - ResetOption(CompletionViewOptions.EnableArgumentCompletionSnippets); + ResetOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets); ResetOption(MetadataAsSourceOptionsStorage.NavigateToDecompiledSources); return; diff --git a/src/VisualStudio/IntegrationTest/TestUtilities/WellKnownGlobalOptions.cs b/src/VisualStudio/IntegrationTest/TestUtilities/WellKnownGlobalOptions.cs index 239ebc0865ee7..ce40f88099de3 100644 --- a/src/VisualStudio/IntegrationTest/TestUtilities/WellKnownGlobalOptions.cs +++ b/src/VisualStudio/IntegrationTest/TestUtilities/WellKnownGlobalOptions.cs @@ -45,7 +45,7 @@ public static IOption2 GetOption(this WellKnownGlobalOption option) { WellKnownGlobalOption.CompletionOptions_ShowItemsFromUnimportedNamespaces => CompletionOptionsStorage.ShowItemsFromUnimportedNamespaces, WellKnownGlobalOption.CompletionOptions_TriggerInArgumentLists => CompletionOptionsStorage.TriggerInArgumentLists, - WellKnownGlobalOption.CompletionViewOptions_EnableArgumentCompletionSnippets => CompletionViewOptions.EnableArgumentCompletionSnippets, + WellKnownGlobalOption.CompletionViewOptions_EnableArgumentCompletionSnippets => CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, WellKnownGlobalOption.InlineRenameSessionOptions_RenameInComments => InlineRenameSessionOptionsStorage.RenameInComments, WellKnownGlobalOption.InlineRenameSessionOptions_RenameInStrings => InlineRenameSessionOptionsStorage.RenameInStrings, WellKnownGlobalOption.InlineRenameSessionOptions_RenameOverloads => InlineRenameSessionOptionsStorage.RenameOverloads, @@ -55,7 +55,7 @@ public static IOption2 GetOption(this WellKnownGlobalOption option) WellKnownGlobalOption.WorkspaceConfigurationOptions_EnableOpeningSourceGeneratedFilesInWorkspace => WorkspaceConfigurationOptionsStorage.EnableOpeningSourceGeneratedFilesInWorkspace, WellKnownGlobalOption.SolutionCrawlerOptions_BackgroundAnalysisScopeOption => SolutionCrawlerOptionsStorage.BackgroundAnalysisScopeOption, WellKnownGlobalOption.SolutionCrawlerOptions_CompilerDiagnosticsScopeOption => SolutionCrawlerOptionsStorage.CompilerDiagnosticsScopeOption, - WellKnownGlobalOption.InlineRenameSessionOptions_UseNewUI => InlineRenameUIOptions.UseInlineAdornment, + WellKnownGlobalOption.InlineRenameSessionOptions_UseNewUI => InlineRenameUIOptionsStorage.UseInlineAdornment, _ => throw ExceptionUtilities.Unreachable() }; diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb index 2f4bf5978f667..0c27ed990cc9c 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb +++ b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb @@ -13,6 +13,7 @@ Imports Microsoft.CodeAnalysis.Diagnostics Imports Microsoft.CodeAnalysis.DocumentationComments Imports Microsoft.CodeAnalysis.DocumentHighlighting Imports Microsoft.CodeAnalysis.Editing +Imports Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking Imports Microsoft.CodeAnalysis.Editor.Implementation.SplitComment Imports Microsoft.CodeAnalysis.Editor.Implementation.Suggestions Imports Microsoft.CodeAnalysis.Editor.InlineDiagnostics @@ -33,7 +34,6 @@ Imports Microsoft.CodeAnalysis.LineSeparators Imports Microsoft.CodeAnalysis.QuickInfo Imports Microsoft.CodeAnalysis.ReferenceHighlighting Imports Microsoft.CodeAnalysis.Remote -Imports Microsoft.CodeAnalysis.RenameTracking Imports Microsoft.CodeAnalysis.SolutionCrawler Imports Microsoft.CodeAnalysis.Structure Imports Microsoft.CodeAnalysis.SymbolSearch @@ -66,11 +66,11 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options End Function) BindToOption(Show_compiler_errors_and_warnings_for, SolutionCrawlerOptionsStorage.CompilerDiagnosticsScopeOption, LanguageNames.VisualBasic) - BindToOption(DisplayDiagnosticsInline, InlineDiagnosticsOptions.EnableInlineDiagnostics, LanguageNames.VisualBasic) - BindToOption(at_the_end_of_the_line_of_code, InlineDiagnosticsOptions.Location, InlineDiagnosticsLocations.PlacedAtEndOfCode, LanguageNames.VisualBasic) - BindToOption(on_the_right_edge_of_the_editor_window, InlineDiagnosticsOptions.Location, InlineDiagnosticsLocations.PlacedAtEndOfEditor, LanguageNames.VisualBasic) - BindToOption(Run_code_analysis_in_separate_process, RemoteHostOptions.OOP64Bit) - BindToOption(Enable_file_logging_for_diagnostics, VisualStudioLoggingOptionsMetadata.EnableFileLoggingForDiagnostics) + BindToOption(DisplayDiagnosticsInline, InlineDiagnosticsOptionsStorage.EnableInlineDiagnostics, LanguageNames.VisualBasic) + BindToOption(at_the_end_of_the_line_of_code, InlineDiagnosticsOptionsStorage.Location, InlineDiagnosticsLocations.PlacedAtEndOfCode, LanguageNames.VisualBasic) + BindToOption(on_the_right_edge_of_the_editor_window, InlineDiagnosticsOptionsStorage.Location, InlineDiagnosticsLocations.PlacedAtEndOfEditor, LanguageNames.VisualBasic) + BindToOption(Run_code_analysis_in_separate_process, RemoteHostOptionsStorage.OOP64Bit) + BindToOption(Enable_file_logging_for_diagnostics, VisualStudioLoggingOptionsStorage.EnableFileLoggingForDiagnostics) BindToOption(Skip_analyzers_for_implicitly_triggered_builds, FeatureOnOffOptions.SkipAnalyzersForImplicitlyTriggeredBuilds) BindToOption(Show_Remove_Unused_References_command_in_Solution_Explorer_experimental, FeatureOnOffOptions.OfferRemoveUnusedReferences, Function() @@ -83,7 +83,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options ' Rename BindToOption(Rename_asynchronously_exerimental, InlineRenameSessionOptionsStorage.RenameAsynchronously) - BindToOption(Rename_UI_setting, InlineRenameUIOptions.UseInlineAdornment, label:=Rename_UI_setting_label) + BindToOption(Rename_UI_setting, InlineRenameUIOptionsStorage.UseInlineAdornment, label:=Rename_UI_setting_label) ' Import directives BindToOption(PlaceSystemNamespaceFirst, GenerationOptions.PlaceSystemNamespaceFirst, LanguageNames.VisualBasic) @@ -93,10 +93,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options BindToOption(AddMissingImportsOnPaste, AddImportOnPasteOptionsStorage.AddImportsOnPaste, LanguageNames.VisualBasic) ' Quick Actions - BindToOption(ComputeQuickActionsAsynchronouslyExperimental, SuggestionsOptions.Asynchronous, + BindToOption(ComputeQuickActionsAsynchronouslyExperimental, SuggestionsOptionsStorage.Asynchronous, Function() ' If the option has Not been set by the user, check if the option is disabled from experimentation. - Return Not optionStore.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag) + Return Not optionStore.GetOption(SuggestionsOptionsStorage.AsynchronousQuickActionsDisableFeatureFlag) End Function) ' Highlighting @@ -124,7 +124,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options ' Comments BindToOption(GenerateXmlDocCommentsForTripleApostrophes, DocumentationCommentOptionsStorage.AutoXmlDocCommentGeneration, LanguageNames.VisualBasic) - BindToOption(InsertApostropheAtTheStartOfNewLinesWhenWritingApostropheComments, SplitCommentOptions.Enabled, LanguageNames.VisualBasic) + BindToOption(InsertApostropheAtTheStartOfNewLinesWhenWritingApostropheComments, SplitCommentOptionsStorage.Enabled, LanguageNames.VisualBasic) ' Editor help BindToOption(EnableEndConstruct, EndConstructGenerationOptionsStorage.EndConstruct, LanguageNames.VisualBasic) @@ -136,7 +136,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options BindToOption(Underline_reassigned_variables, ClassificationOptionsStorage.ClassifyReassignedVariables, LanguageNames.VisualBasic) ' Go To Definition - BindToOption(NavigateToObjectBrowser, VisualStudioNavigationOptions.NavigateToObjectBrowser, LanguageNames.VisualBasic) + BindToOption(NavigateToObjectBrowser, VisualStudioNavigationOptionsStorage.NavigateToObjectBrowser, LanguageNames.VisualBasic) BindToOption(Enable_all_features_in_opened_files_from_source_generators, WorkspaceConfigurationOptionsStorage.EnableOpeningSourceGeneratedFilesInWorkspace, Function() ' If the option has Not been set by the user, check if the option is enabled from experimentation. @@ -154,7 +154,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options BindToOption(Highlight_related_JSON_components_under_cursor, HighlightingOptionsStorage.HighlightRelatedJsonComponentsUnderCursor, LanguageNames.VisualBasic) ' Editor color scheme - BindToOption(Editor_color_scheme, ColorSchemeOptions.ColorScheme) + BindToOption(Editor_color_scheme, ColorSchemeOptionsStorage.ColorScheme) ' Extract method BindToOption(DontPutOutOrRefOnStruct, ExtractMethodOptionsStorage.DontPutOutOrRefOnStruct, LanguageNames.VisualBasic) @@ -167,8 +167,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options BindToOption(prefer_auto_properties, ImplementTypeOptionsStorage.PropertyGenerationBehavior, ImplementTypePropertyGenerationBehavior.PreferAutoProperties, LanguageNames.VisualBasic) ' Inline hints - BindToOption(DisplayAllHintsWhilePressingAltF1, InlineHintsViewOptions.DisplayAllHintsWhilePressingAltF1) - BindToOption(ColorHints, InlineHintsViewOptions.ColorHints, LanguageNames.VisualBasic) + BindToOption(DisplayAllHintsWhilePressingAltF1, InlineHintsViewOptionsStorage.DisplayAllHintsWhilePressingAltF1) + BindToOption(ColorHints, InlineHintsViewOptionsStorage.ColorHints, LanguageNames.VisualBasic) BindToOption(DisplayInlineParameterNameHints, InlineHintsOptionsStorage.EnabledForParameters, LanguageNames.VisualBasic) BindToOption(ShowHintsForLiterals, InlineHintsOptionsStorage.ForLiteralParameters, LanguageNames.VisualBasic) diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.Completion.vb b/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.Completion.vb index b7fce019f89aa..7f522fe63fceb 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.Completion.vb +++ b/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.Completion.vb @@ -17,10 +17,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Public Property Option_HighlightMatchingPortionsOfCompletionListItems As Boolean Get - Return GetBooleanOption(CompletionViewOptions.HighlightMatchingPortionsOfCompletionListItems) + Return GetBooleanOption(CompletionViewOptionsStorage.HighlightMatchingPortionsOfCompletionListItems) End Get Set(value As Boolean) - SetBooleanOption(CompletionViewOptions.HighlightMatchingPortionsOfCompletionListItems, value) + SetBooleanOption(CompletionViewOptionsStorage.HighlightMatchingPortionsOfCompletionListItems, value) End Set End Property @@ -62,10 +62,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Public Property Option_EnableArgumentCompletionSnippets As Integer Get - Return GetBooleanOption(CompletionViewOptions.EnableArgumentCompletionSnippets) + Return GetBooleanOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets) End Get Set(value As Integer) - SetBooleanOption(CompletionViewOptions.EnableArgumentCompletionSnippets, value) + SetBooleanOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, value) End Set End Property End Class diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.Formatting.vb b/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.Formatting.vb index 35d2a68d59acd..9751ccf635f0f 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.Formatting.vb +++ b/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.Formatting.vb @@ -9,10 +9,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Public Property FormatOnPaste As Boolean Get - Return GetBooleanOption(FormattingOptionsMetadata.FormatOnPaste) + Return GetBooleanOption(FormattingOptionsStorage.FormatOnPaste) End Get Set(value As Boolean) - SetBooleanOption(FormattingOptionsMetadata.FormatOnPaste, value) + SetBooleanOption(FormattingOptionsStorage.FormatOnPaste, value) End Set End Property diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.OnOff.vb b/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.OnOff.vb index a23d183d9520e..f493fd71683ab 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.OnOff.vb +++ b/src/VisualStudio/VisualBasic/Impl/Options/AutomationObject/AutomationObject.OnOff.vb @@ -3,6 +3,7 @@ ' See the LICENSE file in the project root for more information. Imports Microsoft.CodeAnalysis.AddImportOnPaste +Imports Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking Imports Microsoft.CodeAnalysis.Editor.Shared.Options Imports Microsoft.CodeAnalysis.Editor.VisualBasic.EndConstructGeneration Imports Microsoft.CodeAnalysis.Editor.VisualBasic.LineCommit @@ -10,7 +11,6 @@ Imports Microsoft.CodeAnalysis.KeywordHighlighting Imports Microsoft.CodeAnalysis.LineSeparators Imports Microsoft.CodeAnalysis.MetadataAsSource Imports Microsoft.CodeAnalysis.ReferenceHighlighting -Imports Microsoft.CodeAnalysis.RenameTracking Imports Microsoft.CodeAnalysis.Structure Imports Microsoft.CodeAnalysis.VisualBasic.AutomaticInsertionOfAbstractOrInterfaceMembers diff --git a/src/VisualStudio/VisualBasic/Impl/Options/IntelliSenseOptionPageControl.xaml.vb b/src/VisualStudio/VisualBasic/Impl/Options/IntelliSenseOptionPageControl.xaml.vb index 2847cb14a5bd9..9f1f977b86099 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/IntelliSenseOptionPageControl.xaml.vb +++ b/src/VisualStudio/VisualBasic/Impl/Options/IntelliSenseOptionPageControl.xaml.vb @@ -19,8 +19,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Show_completion_list_after_a_character_is_deleted.IsChecked = Me.OptionStore.GetOption( CompletionOptionsStorage.TriggerOnDeletion, LanguageNames.VisualBasic) <> False - BindToOption(Show_completion_item_filters, CompletionViewOptions.ShowCompletionItemFilters, LanguageNames.VisualBasic) - BindToOption(Highlight_matching_portions_of_completion_list_items, CompletionViewOptions.HighlightMatchingPortionsOfCompletionListItems, LanguageNames.VisualBasic) + BindToOption(Show_completion_item_filters, CompletionViewOptionsStorage.ShowCompletionItemFilters, LanguageNames.VisualBasic) + BindToOption(Highlight_matching_portions_of_completion_list_items, CompletionViewOptionsStorage.HighlightMatchingPortionsOfCompletionListItems, LanguageNames.VisualBasic) BindToOption(Never_include_snippets, CompletionOptionsStorage.SnippetsBehavior, SnippetsRule.NeverInclude, LanguageNames.VisualBasic) BindToOption(Always_include_snippets, CompletionOptionsStorage.SnippetsBehavior, SnippetsRule.AlwaysInclude, LanguageNames.VisualBasic) @@ -31,7 +31,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options BindToOption(Always_add_new_line_on_enter, CompletionOptionsStorage.EnterKeyBehavior, EnterKeyRule.Always, LanguageNames.VisualBasic) Show_items_from_unimported_namespaces.IsChecked = Me.OptionStore.GetOption(CompletionOptionsStorage.ShowItemsFromUnimportedNamespaces, LanguageNames.VisualBasic) - Tab_twice_to_insert_arguments.IsChecked = Me.OptionStore.GetOption(CompletionViewOptions.EnableArgumentCompletionSnippets, LanguageNames.VisualBasic) + Tab_twice_to_insert_arguments.IsChecked = Me.OptionStore.GetOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, LanguageNames.VisualBasic) End Sub Private Sub Show_completion_list_after_a_character_is_deleted_Checked(sender As Object, e As RoutedEventArgs) @@ -49,7 +49,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Private Sub Tab_twice_to_insert_arguments_CheckedChanged(sender As Object, e As RoutedEventArgs) Tab_twice_to_insert_arguments.IsThreeState = False - Me.OptionStore.SetOption(CompletionViewOptions.EnableArgumentCompletionSnippets, LanguageNames.VisualBasic, Tab_twice_to_insert_arguments.IsChecked) + Me.OptionStore.SetOption(CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, LanguageNames.VisualBasic, Tab_twice_to_insert_arguments.IsChecked) End Sub End Class End Namespace diff --git a/src/VisualStudio/VisualStudioDiagnosticsToolWindow/OptionPages/PerformanceLoggersPage.cs b/src/VisualStudio/VisualStudioDiagnosticsToolWindow/OptionPages/PerformanceLoggersPage.cs index c252e99708934..a7acb9d017b71 100644 --- a/src/VisualStudio/VisualStudioDiagnosticsToolWindow/OptionPages/PerformanceLoggersPage.cs +++ b/src/VisualStudio/VisualStudioDiagnosticsToolWindow/OptionPages/PerformanceLoggersPage.cs @@ -78,17 +78,17 @@ public static void SetLoggers(IGlobalOptionService globalOptions, IThreadingCont private static IEnumerable GetLoggerTypes(IGlobalOptionService globalOptions) { - if (globalOptions.GetOption(LoggerOptions.EtwLoggerKey)) + if (globalOptions.GetOption(LoggerOptionsStorage.EtwLoggerKey)) { yield return nameof(EtwLogger); } - if (globalOptions.GetOption(LoggerOptions.TraceLoggerKey)) + if (globalOptions.GetOption(LoggerOptionsStorage.TraceLoggerKey)) { yield return nameof(TraceLogger); } - if (globalOptions.GetOption(LoggerOptions.OutputWindowLoggerKey)) + if (globalOptions.GetOption(LoggerOptionsStorage.OutputWindowLoggerKey)) { yield return nameof(OutputWindowLogger); } diff --git a/src/Workspaces/CoreTest/Options/OptionSerializerTests.cs b/src/Workspaces/CoreTest/Options/OptionSerializerTests.cs index f80d430597ecc..6c9b46356e93f 100644 --- a/src/Workspaces/CoreTest/Options/OptionSerializerTests.cs +++ b/src/Workspaces/CoreTest/Options/OptionSerializerTests.cs @@ -26,10 +26,10 @@ public void SerializationAndDeserializationForNullableBool([CombinatorialValues( { var options = new IOption2[] { - CompletionViewOptions.EnableArgumentCompletionSnippets, + CompletionViewOptionsStorage.EnableArgumentCompletionSnippets, FeatureOnOffOptions.OfferRemoveUnusedReferences, InheritanceMarginOptionsStorage.ShowInheritanceMargin, - SuggestionsOptions.Asynchronous, + SuggestionsOptionsStorage.Asynchronous, WorkspaceConfigurationOptionsStorage.EnableOpeningSourceGeneratedFilesInWorkspace, SolutionCrawlerOptionsStorage.EnableDiagnosticsInSourceGeneratedFiles, CompletionOptionsStorage.ShowItemsFromUnimportedNamespaces, @@ -70,7 +70,7 @@ public void SerializationAndDeserializationForEnum() { var options = new IOption2[] { - InlineDiagnosticsOptions.Location, + InlineDiagnosticsOptionsStorage.Location, WorkspaceConfigurationOptionsStorage.Database, SolutionCrawlerOptionsStorage.BackgroundAnalysisScopeOption, SolutionCrawlerOptionsStorage.CompilerDiagnosticsScopeOption, @@ -78,9 +78,9 @@ public void SerializationAndDeserializationForEnum() ImplementTypeOptionsStorage.PropertyGenerationBehavior, CompletionOptionsStorage.EnterKeyBehavior, CompletionOptionsStorage.SnippetsBehavior, - InternalDiagnosticsOptions.RazorDiagnosticMode, - InternalDiagnosticsOptions.LiveShareDiagnosticMode, - InternalDiagnosticsOptions.NormalDiagnosticMode, + InternalDiagnosticsOptionsStorage.RazorDiagnosticMode, + InternalDiagnosticsOptionsStorage.LiveShareDiagnosticMode, + InternalDiagnosticsOptionsStorage.NormalDiagnosticMode, }; foreach (var option in options) diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/CodeStyleOptions2.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/CodeStyleOptions2.cs index 13a36f3f64bfd..89619d120ac00 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/CodeStyleOptions2.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/CodeStyleOptions2.cs @@ -314,7 +314,7 @@ private static PerLanguageOption2> Creat })); internal static readonly PerLanguageOption2> PreferSystemHashCode = new( - "CodeStyleOptions_PreferSystemHashCode", + "dotnet_prefer_system_hash_code", IdeAnalyzerOptions.CommonDefault.PreferSystemHashCode, group: CodeStyleOptionGroups.ExpressionLevelPreferences); diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/FadingOptions.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/FadingOptions.cs index 27f3f8c819801..18464ad7f335c 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/FadingOptions.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CodeStyle/FadingOptions.cs @@ -9,7 +9,7 @@ namespace Microsoft.CodeAnalysis.CodeStyle { internal static class FadingOptions { - public static readonly PerLanguageOption2 FadeOutUnusedImports = new("FadingOptions_FadeOutUnusedImports", defaultValue: true); - public static readonly PerLanguageOption2 FadeOutUnreachableCode = new("FadingOptions_FadeOutUnreachableCode", defaultValue: true); + public static readonly PerLanguageOption2 FadeOutUnusedImports = new("dotnet_fade_out_unused_imports", defaultValue: true); + public static readonly PerLanguageOption2 FadeOutUnreachableCode = new("dotnet_fade_out_unreachable_code", defaultValue: true); } } diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Formatting/FormattingOptions2.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Formatting/FormattingOptions2.cs index f512d87e74e70..fbeefc3652992 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Formatting/FormattingOptions2.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Formatting/FormattingOptions2.cs @@ -59,7 +59,7 @@ internal sealed partial class FormattingOptions2 "insert_final_newline", DocumentFormattingOptions.Default.InsertFinalNewLine, FormattingOptionGroups.NewLine, isEditorConfigOption: true); public static PerLanguageOption2 SmartIndent = new PerLanguageOption2( - "FormattingOptions_SmartIndent", + "smart_indent", defaultValue: IndentationOptions.DefaultIndentStyle, group: FormattingOptionGroups.IndentationAndSpacing) .WithPublicOption(PublicFeatureName, "SmartIndent", static value => (PublicIndentStyle)value, static value => (IndentStyle)value); diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/NamingStyles/NamingStyleOptions.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/NamingStyles/NamingStyleOptions.cs index a683e30c8b46b..86017206eacfc 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/NamingStyles/NamingStyleOptions.cs +++ b/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/NamingStyles/NamingStyleOptions.cs @@ -15,7 +15,7 @@ namespace Microsoft.CodeAnalysis.CodeStyle { internal static class NamingStyleOptions { - public const string NamingPreferencesOptionName = "SimplificationOptions_NamingPreferences"; + public const string NamingPreferencesOptionName = "dotnet_naming_preferences"; /// /// This option describes the naming rules that should be applied to specified categories of symbols,