From e995b75bf7f9b477d838a7cd49efcffd9060501c Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Wed, 29 Sep 2021 13:02:06 -0700 Subject: [PATCH 1/3] Remove user facing option around async-lightbulbs (17.1 and up only) --- .../Suggestions/SuggestedActionsSourceProvider.cs | 3 ++- .../Implementation/Suggestions/SuggestionsOptions.cs | 2 +- .../CSharp/Impl/Options/AdvancedOptionPageControl.xaml | 7 ------- .../Impl/Options/AdvancedOptionPageControl.xaml.cs | 7 ------- .../CSharp/Impl/Options/AdvancedOptionPageStrings.cs | 6 ------ src/VisualStudio/Core/Def/ServicesVSResources.resx | 6 ------ .../Core/Def/xlf/ServicesVSResources.cs.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.de.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.es.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.fr.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.it.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.ja.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.ko.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.pl.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.pt-BR.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.ru.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.tr.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.zh-Hans.xlf | 10 ---------- .../Core/Def/xlf/ServicesVSResources.zh-Hant.xlf | 10 ---------- .../Impl/Options/AdvancedOptionPageControl.xaml | 7 ------- .../Impl/Options/AdvancedOptionPageControl.xaml.vb | 7 ------- .../Impl/Options/AdvancedOptionPageStrings.vb | 6 ------ 22 files changed, 3 insertions(+), 178 deletions(-) diff --git a/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs b/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs index e1d066f566f5c..0cf0245355202 100644 --- a/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs +++ b/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs @@ -90,7 +90,8 @@ public SuggestedActionsSourceProvider( if (textBuffer.IsInLspEditorContext()) return null; - var asyncEnabled = _globalOptions.GetOption(SuggestionsOptions.Asynchronous) ?? !_globalOptions.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag); + var asyncEnabled = _globalOptions.GetOption(SuggestionsOptions.Asynchronous) && + !_globalOptions.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag); return asyncEnabled ? new AsyncSuggestedActionsSource(_threadingContext, _globalOptions, this, textView, textBuffer, _suggestedActionCategoryRegistry) diff --git a/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs b/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs index bd89869f71eeb..9cdb4f646f82a 100644 --- a/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs +++ b/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs @@ -10,7 +10,7 @@ internal static class SuggestionsOptions { private const string FeatureName = "SuggestionsOptions"; - public static readonly Option2 Asynchronous = new(FeatureName, nameof(Asynchronous), defaultValue: null, + public static readonly Option2 Asynchronous = new(FeatureName, nameof(Asynchronous), defaultValue: true, new RoamingProfileStorageLocation("TextEditor.Specific.Suggestions.Asynchronous2")); public static readonly Option2 AsynchronousQuickActionsDisableFeatureFlag = new(FeatureName, nameof(AsynchronousQuickActionsDisableFeatureFlag), defaultValue: false, diff --git a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml index 9c02ff52e8d29..2d729d3f15e84 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml +++ b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml @@ -87,13 +87,6 @@ Content="{x:Static local:AdvancedOptionPageStrings.Option_Add_missing_using_directives_on_paste}" /> - - - - - diff --git a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs index 17d2d0f427317..d1aacf0991f26 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs +++ b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs @@ -93,13 +93,6 @@ public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel compon BindToOption(ShowRemarksInQuickInfo, QuickInfoOptions.ShowRemarksInQuickInfo, LanguageNames.CSharp); BindToOption(DisplayLineSeparators, FeatureOnOffOptions.LineSeparator, LanguageNames.CSharp); - // Quick Actions - BindToOption(ComputeQuickActionsAsynchronouslyExperimental, SuggestionsOptions.Asynchronous, () => - { - // If the option has not been set by the user, check if the option is disabled from experimentation. - return !optionStore.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag); - }); - // Highlighting BindToOption(EnableHighlightReferences, FeatureOnOffOptions.ReferenceHighlighting, LanguageNames.CSharp); BindToOption(EnableHighlightKeywords, FeatureOnOffOptions.KeywordHighlighting, LanguageNames.CSharp); diff --git a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageStrings.cs b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageStrings.cs index d54710449a7f7..a4f4b73fc8348 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageStrings.cs +++ b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageStrings.cs @@ -177,12 +177,6 @@ public static string Option_OptimizeForSolutionSize_Regular public static string Option_OptimizeForSolutionSize_Small => CSharpVSResources.Small; - public static string Option_Quick_Actions - => ServicesVSResources.Quick_Actions; - - public static string Option_Compute_Quick_Actions_asynchronously_experimental - => ServicesVSResources.Compute_Quick_Actions_asynchronously_experimental; - public static string Option_Outlining => ServicesVSResources.Outlining; diff --git a/src/VisualStudio/Core/Def/ServicesVSResources.resx b/src/VisualStudio/Core/Def/ServicesVSResources.resx index 167e4ad8d5716..17e6aafbb4262 100644 --- a/src/VisualStudio/Core/Def/ServicesVSResources.resx +++ b/src/VisualStudio/Core/Def/ServicesVSResources.resx @@ -1802,12 +1802,6 @@ Additional information: {1} Run code analysis in separate process (requires restart) - - Compute Quick Actions asynchronously (experimental, requires restart) - - - Quick Actions - Combine inheritance margin with indicator margin diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf index 05afc5fdc4fa4..0b7d2c21802c5 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf @@ -242,11 +242,6 @@ Komentáře - - Compute Quick Actions asynchronously (experimental, requires restart) - Asynchronní výpočet rychlých akcí (experimentální, vyžaduje restartování) - - Containing Member Obsahující člen @@ -1012,11 +1007,6 @@ Stáhnout členy - - Quick Actions - Rychlé akce - - Refactoring Only Pouze refaktoring diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf index ad7fa927351b0..8639333303f49 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf @@ -242,11 +242,6 @@ Kommentare - - Compute Quick Actions asynchronously (experimental, requires restart) - Schnelle Aktionen asynchron berechnen (experimentell, Neustart erforderlich) - - Containing Member Enthaltender Member @@ -1012,11 +1007,6 @@ Member nach oben ziehen - - Quick Actions - Schnelle Aktionen - - Refactoring Only Nur Refactoring diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf index 9010f3eef2eca..7d96a4facf661 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf @@ -242,11 +242,6 @@ Comentarios - - Compute Quick Actions asynchronously (experimental, requires restart) - Procesar acciones rápidas de forma asincrónica (experimental, requiere reinicio) - - Containing Member Miembro contenedor @@ -1012,11 +1007,6 @@ Extraer miembros - - Quick Actions - Acciones rápidas - - Refactoring Only Solo refactorización diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf index 72beb04196af1..db234da6458ca 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf @@ -242,11 +242,6 @@ Commentaires - - Compute Quick Actions asynchronously (experimental, requires restart) - Calculer les actions rapides de manière asynchrone (expérimental, requiert un redémarrage) - - Containing Member Membre conteneur @@ -1012,11 +1007,6 @@ Élever les membres - - Quick Actions - Actions rapides - - Refactoring Only Refactoring Only diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf index b9f23a95a9aa6..1f39314e44247 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf @@ -242,11 +242,6 @@ Commenti - - Compute Quick Actions asynchronously (experimental, requires restart) - Calcola Azioni rapide in modo asincrono (sperimentale, richiede il riavvio) - - Containing Member Membro contenitore @@ -1012,11 +1007,6 @@ Recupera membri - - Quick Actions - Azioni rapide - - Refactoring Only Refactoring Only diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf index cc31b7bd73f7c..8e930bc9371f3 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf @@ -242,11 +242,6 @@ コメント - - Compute Quick Actions asynchronously (experimental, requires restart) - クイック アクションを非同期で計算する (試験的、再起動が必要) - - Containing Member 含んでいるメンバー @@ -1012,11 +1007,6 @@ メンバーをプルアップ - - Quick Actions - クイック アクション - - Refactoring Only リファクタリングのみ diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf index fbc076242a976..8241def614484 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf @@ -242,11 +242,6 @@ 설명 - - Compute Quick Actions asynchronously (experimental, requires restart) - 빠른 작업을 비동기적으로 컴퓨팅(실험적, 다시 시작해야 함) - - Containing Member 포함하는 멤버 @@ -1012,11 +1007,6 @@ 멤버 풀하기 - - Quick Actions - 빠른 작업 - - Refactoring Only 리팩터링만 diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf index eca694b1a054f..5843db463ea6b 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf @@ -242,11 +242,6 @@ Komentarze - - Compute Quick Actions asynchronously (experimental, requires restart) - Asynchroniczne szybkie akcje środowiska obliczeniowego (eksperymentalne, wymaga ponownego uruchomienia) - - Containing Member Zawierająca składowa @@ -1012,11 +1007,6 @@ Podciągnij składowe w górę - - Quick Actions - Szybkie akcje - - Refactoring Only Tylko refaktoryzacja diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf index 55f6a06b4b6ae..46ad030279b39 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf @@ -242,11 +242,6 @@ Comentários - - Compute Quick Actions asynchronously (experimental, requires restart) - Calcular Ações Rápidas de forma assíncrona (experimental, requer reinicialização) - - Containing Member Contendo Membro @@ -1012,11 +1007,6 @@ Levantar os membros - - Quick Actions - Ações Rápidas - - Refactoring Only Somente Refatoração diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf index fad8b75ad0b99..032dcfca0e1c1 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf @@ -242,11 +242,6 @@ Комментарии - - Compute Quick Actions asynchronously (experimental, requires restart) - Асинхронное вычисление быстрых действий (экспериментальная функция, требуется перезапуск) - - Containing Member Содержащий член @@ -1012,11 +1007,6 @@ Повышение элементов - - Quick Actions - Быстрые действия - - Refactoring Only Только рефакторинг diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf index 36f24b05eaa66..d3c5561366fcd 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf @@ -242,11 +242,6 @@ Açıklamalar - - Compute Quick Actions asynchronously (experimental, requires restart) - Hızlı Eylemleri zaman uyumsuz şekilde hesapla (deneysel, yeniden başlatma gerektirir) - - Containing Member Kapsayan Üye @@ -1012,11 +1007,6 @@ Üyeleri Yukarı Çek - - Quick Actions - Hızlı Eylemler - - Refactoring Only Sadece Yeniden Düzenlenme diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf index 6bafcc77b83a5..82e314131b647 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf @@ -242,11 +242,6 @@ 备注 - - Compute Quick Actions asynchronously (experimental, requires restart) - 异步计算快速操作(实验性,需要重启) - - Containing Member 包含成员 @@ -1012,11 +1007,6 @@ 拉取成员 - - Quick Actions - 快速操作 - - Refactoring Only 仅重构 diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf index fbcfc0213969b..447d607a1fb27 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf @@ -242,11 +242,6 @@ 註解 - - Compute Quick Actions asynchronously (experimental, requires restart) - 非同步計算快速動作 (實驗性,需要重新開機) - - Containing Member 包含的成員 @@ -1012,11 +1007,6 @@ 提升成員 - - Quick Actions - 快速動作 - - Refactoring Only 僅重構 diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml index 0ba8b5a329422..1533226ecfcd0 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml +++ b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml @@ -71,13 +71,6 @@ Content="{x:Static local:AdvancedOptionPageStrings.Option_Add_missing_imports_on_paste}" /> - - - - - diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb index 93a0d7e12d4fc..4818c5ab37c42 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb +++ b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb @@ -71,13 +71,6 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Return False End Function) - ' Quick Actions - BindToOption(ComputeQuickActionsAsynchronouslyExperimental, SuggestionsOptions.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) - End Function) - ' Highlighting BindToOption(EnableHighlightReferences, FeatureOnOffOptions.ReferenceHighlighting, LanguageNames.VisualBasic) BindToOption(EnableHighlightKeywords, FeatureOnOffOptions.KeywordHighlighting, LanguageNames.VisualBasic) diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageStrings.vb b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageStrings.vb index 5f1a4eb86ab6c..dc761bb82f674 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageStrings.vb +++ b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageStrings.vb @@ -93,12 +93,6 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Public ReadOnly Property Option_EnableHighlightReferences As String = BasicVSResources.Highlight_references_to_symbol_under_cursor - Public ReadOnly Property Option_Quick_Actions As String = - ServicesVSResources.Quick_Actions - - Public ReadOnly Property Option_Compute_Quick_Actions_asynchronously_experimental As String = - ServicesVSResources.Compute_Quick_Actions_asynchronously_experimental - Public ReadOnly Property Option_EnableLineCommit As String Get Return BasicVSResources.Pretty_listing_reformatting_of_code From 0fe1a91cac01c81d737f60fd7ac57d5eb1dc7774 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Wed, 29 Sep 2021 13:04:04 -0700 Subject: [PATCH 2/3] Add new option so anyone who set the option value in 17.0 doesn't forever disable async lightbulbs in 17.1 and onwards --- .../Core/Implementation/Suggestions/SuggestionsOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs b/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs index 9cdb4f646f82a..15d189c892015 100644 --- a/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs +++ b/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs @@ -11,7 +11,7 @@ internal static class SuggestionsOptions private const string FeatureName = "SuggestionsOptions"; public static readonly Option2 Asynchronous = new(FeatureName, nameof(Asynchronous), defaultValue: true, - new RoamingProfileStorageLocation("TextEditor.Specific.Suggestions.Asynchronous2")); + new RoamingProfileStorageLocation("TextEditor.Specific.Suggestions.Asynchronous3")); public static readonly Option2 AsynchronousQuickActionsDisableFeatureFlag = new(FeatureName, nameof(AsynchronousQuickActionsDisableFeatureFlag), defaultValue: false, new FeatureFlagStorageLocation("Roslyn.AsynchronousQuickActionsDisable")); From 5d0106b66b28feab8b23fba0ca319ba498de416b Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Wed, 29 Sep 2021 13:14:15 -0700 Subject: [PATCH 3/3] Remove flag --- .../Suggestions/SuggestedActionsSourceProvider.cs | 9 +++------ .../Implementation/Suggestions/SuggestionsOptions.cs | 3 --- .../Suggestions/SuggestionsOptionsProvider.cs | 1 - 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs b/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs index 0cf0245355202..e8a5212b44ca4 100644 --- a/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs +++ b/src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs @@ -90,12 +90,9 @@ public SuggestedActionsSourceProvider( if (textBuffer.IsInLspEditorContext()) return null; - var asyncEnabled = _globalOptions.GetOption(SuggestionsOptions.Asynchronous) && - !_globalOptions.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag); - - return asyncEnabled - ? new AsyncSuggestedActionsSource(_threadingContext, _globalOptions, this, textView, textBuffer, _suggestedActionCategoryRegistry) - : new SyncSuggestedActionsSource(_threadingContext, _globalOptions, this, textView, textBuffer, _suggestedActionCategoryRegistry); + return _globalOptions.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag) + ? new SyncSuggestedActionsSource(_threadingContext, _globalOptions, this, textView, textBuffer, _suggestedActionCategoryRegistry) + : new AsyncSuggestedActionsSource(_threadingContext, _globalOptions, this, textView, textBuffer, _suggestedActionCategoryRegistry); } } } diff --git a/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs b/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs index 15d189c892015..e3cfd77d0edd6 100644 --- a/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs +++ b/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs @@ -10,9 +10,6 @@ internal static class SuggestionsOptions { private const string FeatureName = "SuggestionsOptions"; - public static readonly Option2 Asynchronous = new(FeatureName, nameof(Asynchronous), defaultValue: true, - new RoamingProfileStorageLocation("TextEditor.Specific.Suggestions.Asynchronous3")); - public static readonly Option2 AsynchronousQuickActionsDisableFeatureFlag = new(FeatureName, nameof(AsynchronousQuickActionsDisableFeatureFlag), defaultValue: false, new FeatureFlagStorageLocation("Roslyn.AsynchronousQuickActionsDisable")); } diff --git a/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptionsProvider.cs b/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptionsProvider.cs index 88d1cdf54ddb2..268b00dd38064 100644 --- a/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptionsProvider.cs +++ b/src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptionsProvider.cs @@ -21,7 +21,6 @@ public SuggestionsOptionsProvider() } public ImmutableArray Options { get; } = ImmutableArray.Create( - SuggestionsOptions.Asynchronous, SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag); } }