Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
0f9e7b3
Change block structure options to editorconfig-like name
Cosifne Feb 14, 2023
7fd3a55
Move brace completion/classification/prefer hashcode/color scheme to …
Cosifne Feb 14, 2023
6c3d515
Move completion options to new names
Cosifne Feb 14, 2023
c5108ef
Move provide date and time completion to new name
Cosifne Feb 14, 2023
060ecf1
Move diagnostic options to new names
Cosifne Feb 14, 2023
e172a3b
Move documentation and documentOutline to new name
Cosifne Feb 14, 2023
8f64a2a
Move editor component options to new name
Cosifne Feb 14, 2023
87d75f2
Move extract method option to new name
Cosifne Feb 14, 2023
ffac819
Move fading options to new name
Cosifne Feb 14, 2023
830b462
Move database storage to new name
Cosifne Feb 14, 2023
1f15f9d
Move find usage options to new name
Cosifne Feb 14, 2023
54f7ab7
Move formatting options to new name
Cosifne Feb 14, 2023
8196f44
Move generate code option to new name
Cosifne Feb 14, 2023
bf7d429
Move implement type options to new name
Cosifne Feb 14, 2023
d084033
Move all the inline hints options to new name
Cosifne Feb 14, 2023
af83c50
Move inline rename options to new name
Cosifne Feb 14, 2023
62845cb
Move Json features option to new name
Cosifne Feb 14, 2023
d8c637f
Move key binding reset options to new name
Cosifne Feb 14, 2023
e068f4d
Move logger option and lsp options to new name
Cosifne Feb 14, 2023
8482fc6
Move quick info options to new name
Cosifne Feb 14, 2023
96d7aee
Move regular expression options to new name:
Cosifne Feb 14, 2023
378e932
Move solution crawler options to new name
Cosifne Feb 14, 2023
3ae9178
Move spilit comment/string options to new name
Cosifne Feb 14, 2023
37dc368
Move stacktrace explorer to new name
Cosifne Feb 14, 2023
1b250bb
Move suggestion option async to new name
Cosifne Feb 14, 2023
b0fcb84
Move symbol search option to new name
Cosifne Feb 14, 2023
ecc8c1f
Move task list options to new name
Cosifne Feb 14, 2023
d0bc005
Move format string option to new name
Cosifne Feb 14, 2023
fab99e2
Move workspace configuration to new name
Cosifne Feb 14, 2023
11275cb
Move xaml options to new name
Cosifne Feb 14, 2023
6387f83
Move internal diagnostics options to new name
Cosifne Feb 15, 2023
c4bb040
Move internal feature on off options to new name
Cosifne Feb 15, 2023
b24f94f
Move solution crawler options to new name
Cosifne Feb 15, 2023
81bfa6c
Move service feature on off options to new name
Cosifne Feb 15, 2023
012b54b
Fix the wrongly upcase OOP
Cosifne Feb 16, 2023
bf9f566
Change csharp_split_string_literal_options_enabled to csharp_split_st…
Cosifne Feb 17, 2023
ac89af6
Rename Inline hints view options
Cosifne Feb 17, 2023
91a1694
Rename diagnostic tagging options
Cosifne Feb 17, 2023
e4e26c6
Change FormattingOptonsMetadata
Cosifne Feb 17, 2023
9ecfee7
Rename block structure options
Cosifne Feb 17, 2023
dfd3d8c
Rename format on close brace
Cosifne Feb 17, 2023
d0b1133
Rename classsify
Cosifne Feb 17, 2023
da6d4bd
Rename prefer hashcode
Cosifne Feb 17, 2023
df91b5a
Rename color scheme
Cosifne Feb 17, 2023
44515da
Rename completion options
Cosifne Feb 17, 2023
840be2c
Revisit block structure options
Cosifne Feb 17, 2023
f98c254
Rename date and time completion, pull diagnostic, comment generation,…
Cosifne Feb 17, 2023
d7478fb
Rename format, constructor generation, hashcode and equals generation…
Cosifne Feb 17, 2023
32434fa
Rename inline hints options
Cosifne Feb 17, 2023
dbb92fa
Rename rename options
Cosifne Feb 17, 2023
b61e68a
Rename diagnostics options
Cosifne Feb 17, 2023
9efb645
Rename InternalFeatureOnOff options'
Cosifne Feb 17, 2023
68fd4be
Rename Json options
Cosifne Feb 17, 2023
48953d0
Rename keybidingResetOptions
Cosifne Feb 17, 2023
26dd998
Rename logger options
Cosifne Feb 17, 2023
3466132
Rename lsp options
Cosifne Feb 17, 2023
b970ab5
Rename navigator bar and regex options
Cosifne Feb 17, 2023
faa1d7a
Rename show signature, naming, solution crawler split comment, stackt…
Cosifne Feb 17, 2023
bbae4f2
Rename task list item, wrap line length, and report invalid string do…
Cosifne Feb 17, 2023
a00f1c7
Rename workspace and xaml options
Cosifne Feb 17, 2023
bbdbeb1
rename hide in advanced members
Cosifne Feb 21, 2023
016886c
Rename semantic_colorizer and syntactic colorizer
Cosifne Feb 21, 2023
d9b3954
Fully qualified lsp
Cosifne Feb 21, 2023
0ad6a3a
Fully qualified lsp in xaml options
Cosifne Feb 21, 2023
9ffb487
Unify the enable word
Cosifne Feb 21, 2023
4eb7fb7
Unify the disable word
Cosifne Feb 21, 2023
5bd624a
Remove 'all' from display_inline_hints_while_pressing_alt_f1
Cosifne Feb 22, 2023
84353d2
Rename dotnet_inline_hints_colorize to dotnet_colorize_inline_hints
Cosifne Feb 22, 2023
0832a8e
Rename dotnet_tagging_pull_diagnostic to dotnet_pull_diagnostic_tagging
Cosifne Feb 22, 2023
74445ce
Change extracting to extract in dotnet_allow_best_effort_when_extract…
Cosifne Feb 22, 2023
32f623c
Rename dotnet_select_all_when_generate_overrides
Cosifne Feb 22, 2023
9a07336
Rename dotnet_generate_equals_and_get_hash_code_from_members_when_gen…
Cosifne Feb 22, 2023
067f01c
Rename dotnet_generate_equals_and_get_hash_code_from_members_when_imp…
Cosifne Feb 22, 2023
c970514
Rename dotnet_add_null_checks_when_generate_constructor_from_members
Cosifne Feb 22, 2023
7a4e834
Remove the duplicate AddNullChecksToConstructorsGeneratedFromMembers
Cosifne Feb 22, 2023
4ef8993
Rename dotnet_enable_oop_64_bit
Cosifne Feb 22, 2023
dd89fee
Rename dotnet_enable_oop_server_gc
Cosifne Feb 22, 2023
4e8f249
Rename dotnet_enable_oop_core_clr
Cosifne Feb 22, 2023
f8aad97
Rename dotnet_split_comment
Cosifne Feb 22, 2023
278c321
Rename dotnet_completion_enter_key_behavior
Cosifne Feb 22, 2023
2a6ef05
Rename dotnet_don't_put_out_or_ref_on_struct_when_extract_method
Cosifne Feb 22, 2023
2eb6d7c
Rename dotnet_insertion_behavior_when_implement_type
Cosifne Feb 22, 2023
950d889
Rename dotnet_property_generation_behavior_when_implement_type
Cosifne Feb 22, 2023
fcfffbf
Rename dotnet_suggest_for_types_in_reference_assemblies
Cosifne Feb 22, 2023
894f980
Rename SymbolSearchOptions
Cosifne Feb 22, 2023
7bd365a
Rename intellicode options
Cosifne Feb 22, 2023
9cc0b88
Rename FindUsagesOptions
Cosifne Feb 22, 2023
0024250
Rename xaml options
Cosifne Feb 22, 2023
82509c2
Rename dotnet_visual_studio_workspace_partial_load_mode
Cosifne Feb 22, 2023
2fdaa5e
Rename dotnet_code_style_prefer_system_hash_code
Cosifne Feb 22, 2023
b7b04f5
Rename dotnet_smart_indent
Cosifne Feb 22, 2023
744532c
Fix the missing xaml options
Cosifne Feb 22, 2023
3d086d3
Change to dotent for csharp_show_new_snippet_experience_feature_flag,…
Cosifne Feb 22, 2023
a62150a
Rename SplitStringLiteralOptions
Cosifne Feb 22, 2023
6e586b7
Rename InlineHintsViewOptions
Cosifne Feb 22, 2023
a94ceac
Rename DiagnosticsTaggingOptions
Cosifne Feb 22, 2023
a72ef5a
Rename InlineDiagnosticsOptions
Cosifne Feb 22, 2023
7b31457
Rename FormattingOptions
Cosifne Feb 22, 2023
cacf4dc
Rename InlineRenameUIOptionsStorage
Cosifne Feb 22, 2023
5871ff5
Rename CompletionViewOptions
Cosifne Feb 22, 2023
c93a76d
Rename RemoteHostOptions
Cosifne Feb 22, 2023
4504d54
Rename SplitCommentOptions
Cosifne Feb 22, 2023
bb4487f
Rename SuggestionsOptions
Cosifne Feb 22, 2023
604e8a8
Rename InternalDiagnosticsOptions
Cosifne Feb 22, 2023
ee70754
Rename LspOptions
Cosifne Feb 22, 2023
2caf550
Rename DocumentOutlineOptions
Cosifne Feb 22, 2023
b9c5a0a
Rename ColorSchemeOptions
Cosifne Feb 22, 2023
2bce380
Rename KeybindingResetOptions
Cosifne Feb 22, 2023
7cf4fe6
Rename LoggerOptions
Cosifne Feb 22, 2023
cac0a4b
Rename StackTraceExplorer options
Cosifne Feb 22, 2023
1c71405
Rename SymbolSearchGlobalOptions
Cosifne Feb 22, 2023
488b976
Rename VisualStudioLoggingOptionsMetadata
Cosifne Feb 22, 2023
1f04902
VisualStudioNavigationOptions
Cosifne Feb 22, 2023
09fb3ce
Rename FadingOptions
Cosifne Feb 22, 2023
09b9dbc
Revert "Rename FadingOptions"
Cosifne Feb 22, 2023
81d2484
Move BranceMatcingOptions to seperate file
Cosifne Feb 22, 2023
bae8d7e
Move DiagnosticsClassificationOptions to seperate file
Cosifne Feb 22, 2023
8b6929d
Move SemanticsColorizer to seperate file
Cosifne Feb 22, 2023
ab5111b
Move AutomaticLineEnder and SyntacticColorizer options to seperate files
Cosifne Feb 22, 2023
b7dc777
Move smart indenter options to seperate file
Cosifne Feb 22, 2023
5270c7d
Move dotnet_squiggles to seperate file
Cosifne Feb 22, 2023
822a118
Move FormatOnSave to seperate file
Cosifne Feb 22, 2023
c603e52
Move RenameTracking options to seperate file
Cosifne Feb 22, 2023
52ff45f
Move EventHookup to seperate file
Cosifne Feb 22, 2023
965d99b
Move snippets options to seperate file
Cosifne Feb 22, 2023
62c232b
Move VirtualMemoryNotificationListener options to seperate file and r…
Cosifne Feb 22, 2023
c3df210
Fix the namespace of SmartIndent
Cosifne Feb 22, 2023
280d00e
Correct the namespace
Cosifne Feb 22, 2023
2b4e8db
Merge remote-tracking branch 'upstream/main' into dev/shech/RenameOth…
Cosifne Feb 24, 2023
fc28cec
Add enable in rename tracking
Cosifne Feb 24, 2023
15708cd
Merge remote-tracking branch 'upstream/main' into dev/shech/RenameOth…
Cosifne Feb 25, 2023
01fbde8
Remove the features in implement type options
Cosifne Feb 27, 2023
9d48d31
Rename to lsp
Cosifne Feb 27, 2023
5a4b1af
Rename dotnet_navigate_to_object_browser
Cosifne Feb 27, 2023
fadaebf
Rename dotnet_automatic_line_ender
Cosifne Feb 28, 2023
1a2e474
Add enable to brace matching
Cosifne Feb 28, 2023
35450c1
Add enable to classification and squiggles
Cosifne Feb 28, 2023
e5788e4
Add enable to event hookup
Cosifne Feb 28, 2023
65b759a
Add enable to smart indenter
Cosifne Feb 28, 2023
f0075ff
Add enable to async sugguestions
Cosifne Feb 28, 2023
74a7080
Remove under_cursor suffix
Cosifne Feb 28, 2023
c519941
Add visual studio prefix to Color scheme
Cosifne Feb 28, 2023
90e95b0
Add visual_studio to keybinding reset options
Cosifne Feb 28, 2023
b76eb4f
Add visual_studio prefix in logger options storage
Cosifne Feb 28, 2023
61c69d1
Add visual_studio prefix to SymbolSearchGlobalOptionStorage
Cosifne Feb 28, 2023
b593d47
Add visual_studio prefix to VisualStudioLoggingOptionsStorage
Cosifne Feb 28, 2023
18ee0df
Add visual_studio prefix to navigate to object browser
Cosifne Feb 28, 2023
bef5eb5
Remove dotnet in color scheme
Cosifne Feb 28, 2023
eafcb66
Replace visual_studio_dotnet to visual_studio
Cosifne Feb 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -39,7 +40,7 @@ internal partial class EventHookupCommandHandler : IChainedCommandHandler<TabKey
public void ExecuteCommand(TabKeyCommandArgs args, Action nextHandler, CommandExecutionContext context)
{
_threadingContext.ThrowIfNotOnUIThread();
if (!_globalOptions.GetOption(InternalFeatureOnOffOptions.EventHookup))
if (!_globalOptions.GetOption(EventHookupOptionsStorage.EventHookup))
{
nextHandler();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
using System;
using System.Threading;
using Microsoft.CodeAnalysis.Editor.Shared.Extensions;
using Microsoft.CodeAnalysis.Editor.Shared.Options;
using Microsoft.CodeAnalysis.EventHookup;
using Microsoft.CodeAnalysis.Internal.Log;
using Microsoft.VisualStudio.Commanding;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Editor.Commanding.Commands;
using Roslyn.Utilities;

namespace Microsoft.CodeAnalysis.Editor.CSharp.EventHookup
{
Expand All @@ -24,7 +23,7 @@ public void ExecuteCommand(TypeCharCommandArgs args, Action nextHandler, Command
_threadingContext.ThrowIfNotOnUIThread();
nextHandler();

if (!_globalOptions.GetOption(InternalFeatureOnOffOptions.EventHookup))
if (!_globalOptions.GetOption(EventHookupOptionsStorage.EventHookup))
{
EventHookupSessionManager.CancelAndDismissExistingSessions();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ public bool ExecuteCommand(ReturnKeyCommandArgs args, CommandExecutionContext co

public bool ExecuteCommandWorker(ReturnKeyCommandArgs args, CancellationToken cancellationToken)
{
if (!_editorOptionsService.GlobalOptions.GetOption(SplitStringLiteralOptions.Enabled))
if (!_editorOptionsService.GlobalOptions.GetOption(SplitStringLiteralOptionsStorage.Enabled))
{
return false;
}

var textView = args.TextView;
var subjectBuffer = args.SubjectBuffer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.CodeAnalysis.Editor.CSharp.SplitStringLiteral;

internal sealed class SplitStringLiteralOptions
internal sealed class SplitStringLiteralOptionsStorage
{
public static Option2<bool> Enabled = new("SplitStringLiteralOptions_Enabled", defaultValue: true);
public static Option2<bool> Enabled = new("csharp_split_string_literal_on_return", defaultValue: true);
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static async Task<ImmutableArray<ITagSpan<InlineDiagnosticsTag>>> GetTag

private static async Task<ImmutableArray<ITagSpan<InlineDiagnosticsTag>>> GetTagSpansAsync(TestWorkspace workspace)
{
workspace.GlobalOptions.SetGlobalOption(InlineDiagnosticsOptions.EnableInlineDiagnostics, LanguageNames.CSharp, true);
workspace.GlobalOptions.SetGlobalOption(InlineDiagnosticsOptionsStorage.EnableInlineDiagnostics, LanguageNames.CSharp, true);
return (await TestDiagnosticTagProducer<InlineDiagnosticsTaggerProvider, InlineDiagnosticsTag>.GetDiagnosticsAndErrorSpans(workspace)).Item2;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void Test()
</Workspace>";

using var workspace = TestWorkspace.Create(workspaceXml);
workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull);
workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull);

var spans = (await TestDiagnosticTagProducer<DiagnosticsSquiggleTaggerProvider, IErrorTag>.GetDiagnosticsAndErrorSpans(workspace)).Item2;

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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<DiagnosticsSquiggleTaggerProvider, IErrorTag>.GetDiagnosticsAndErrorSpans(workspace);

Expand All @@ -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<DiagnosticsSquiggleTaggerProvider, IErrorTag>(workspace);

Expand Down Expand Up @@ -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<DiagnosticsSquiggleTaggerProvider, IErrorTag>(workspace);

Expand Down Expand Up @@ -313,7 +313,7 @@ class Test
</Workspace>";

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();

Expand Down Expand Up @@ -357,7 +357,7 @@ class Test
</Workspace>";

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();

Expand Down Expand Up @@ -401,7 +401,7 @@ private static async Task<ImmutableArray<ITagSpan<IErrorTag>>> GetTagSpansInSour

private static async Task<ImmutableArray<ITagSpan<IErrorTag>>> GetTagSpansAsync(TestWorkspace workspace, bool pull)
{
workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptions.PullDiagnosticTagging, pull);
workspace.GlobalOptions.SetGlobalOption(DiagnosticTaggingOptionsStorage.PullDiagnosticTagging, pull);

return (await TestDiagnosticTagProducer<DiagnosticsSquiggleTaggerProvider, IErrorTag>.GetDiagnosticsAndErrorSpans(workspace)).Item2;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, ImmutableArray<DiagnosticAnalyzer>>()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,22 @@ public string GetName(string? language)
/// </summary>
public static readonly IReadOnlyDictionary<string, PropertyName> PersistedOptionsWithLegacyPropertyNames = new Dictionary<string, PropertyName>()
{
{"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")},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ internal sealed class InlineDiagnosticsTaggerProvider : AbstractDiagnosticsAdorn
private readonly IClassificationFormatMapService _classificationFormatMapService;
private readonly IClassificationTypeRegistryService _classificationTypeRegistryService;

protected sealed override ImmutableArray<IOption2> Options { get; } = ImmutableArray.Create<IOption2>(InlineDiagnosticsOptions.EnableInlineDiagnostics);
protected sealed override ImmutableArray<IOption2> FeatureOptions { get; } = ImmutableArray.Create<IOption2>(InlineDiagnosticsOptions.Location);
protected sealed override ImmutableArray<IOption2> Options { get; } = ImmutableArray.Create<IOption2>(InlineDiagnosticsOptionsStorage.EnableInlineDiagnostics);
protected sealed override ImmutableArray<IOption2> FeatureOptions { get; } = ImmutableArray.Create<IOption2>(InlineDiagnosticsOptionsStorage.Location);

[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
Expand Down Expand Up @@ -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<INavigateToLinkService>();
return new InlineDiagnosticsTag(errorType, diagnostic, _editorFormatMap, _classificationFormatMapService,
_classificationTypeRegistryService, locationOption, navigateService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public IEnumerable<ITagSpan<IntraTextAdornmentTag>> 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<ITagSpan<IntraTextAdornmentTag>>();
for (var i = 0; i < _cache.Count; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

namespace Microsoft.CodeAnalysis.Editor.InlineHints
{
internal sealed class InlineHintsViewOptions
internal sealed class InlineHintsViewOptionsStorage
{
public static readonly Option2<bool> DisplayAllHintsWhilePressingAltF1 = new(
"InlineHintsOptions_DisplayAllHintsWhilePressingAltF1", defaultValue: true);
"dotnet_display_inline_hints_while_pressing_alt_f1", defaultValue: true);

public static readonly PerLanguageOption2<bool> ColorHints = new(
"InlineHintsOptions_ColorHints", defaultValue: true);
"dotnet_colorize_inline_hints", defaultValue: true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading