Skip to content

Commit 4e8625f

Browse files
Disable async lightbulbs for 17.0 (#57169)
* Disable async lightbulbs in 17.0 * Flip option * Update src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs
1 parent 92a5218 commit 4e8625f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/EditorFeatures/Core.Wpf/Suggestions/SuggestedActionsSourceProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public SuggestedActionsSourceProvider(
9090
if (textBuffer.IsInLspEditorContext())
9191
return null;
9292

93-
var asyncEnabled = _globalOptions.GetOption(SuggestionsOptions.Asynchronous) ?? !_globalOptions.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag);
93+
var asyncEnabled = _globalOptions.GetOption(SuggestionsOptions.Asynchronous) ?? _globalOptions.GetOption(SuggestionsOptions.AsynchronousQuickActionsEnableFeatureFlag);
9494

9595
return asyncEnabled
9696
? new AsyncSuggestedActionsSource(_threadingContext, _globalOptions, this, textView, textBuffer, _suggestedActionCategoryRegistry)

src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal static class SuggestionsOptions
1313
public static readonly Option2<bool?> Asynchronous = new(FeatureName, nameof(Asynchronous), defaultValue: null,
1414
new RoamingProfileStorageLocation("TextEditor.Specific.Suggestions.Asynchronous2"));
1515

16-
public static readonly Option2<bool> AsynchronousQuickActionsDisableFeatureFlag = new(FeatureName, nameof(AsynchronousQuickActionsDisableFeatureFlag), defaultValue: false,
17-
new FeatureFlagStorageLocation("Roslyn.AsynchronousQuickActionsDisable"));
16+
public static readonly Option2<bool> AsynchronousQuickActionsEnableFeatureFlag = new(FeatureName, nameof(AsynchronousQuickActionsEnableFeatureFlag), defaultValue: false,
17+
new FeatureFlagStorageLocation("Roslyn.AsynchronousQuickActionsEnable2"));
1818
}
1919
}

src/EditorFeatures/Core/Implementation/Suggestions/SuggestionsOptionsProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public SuggestionsOptionsProvider()
2222

2323
public ImmutableArray<IOption> Options { get; } = ImmutableArray.Create<IOption>(
2424
SuggestionsOptions.Asynchronous,
25-
SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag);
25+
SuggestionsOptions.AsynchronousQuickActionsEnableFeatureFlag);
2626
}
2727
}

src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel compon
9292
// Quick Actions
9393
BindToOption(ComputeQuickActionsAsynchronouslyExperimental, SuggestionsOptions.Asynchronous, () =>
9494
{
95-
// If the option has not been set by the user, check if the option is disabled from experimentation.
96-
return !optionStore.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag);
95+
// If the option has not been set by the user, check if the option is enabled from experimentation.
96+
return optionStore.GetOption(SuggestionsOptions.AsynchronousQuickActionsEnableFeatureFlag);
9797
});
9898

9999
// Highlighting

src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options
7070
' Quick Actions
7171
BindToOption(ComputeQuickActionsAsynchronouslyExperimental, SuggestionsOptions.Asynchronous,
7272
Function()
73-
' If the option has Not been set by the user, check if the option is disabled from experimentation.
74-
Return Not optionStore.GetOption(SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag)
73+
' If the option has Not been set by the user, check if the option is enabled from experimentation.
74+
Return optionStore.GetOption(SuggestionsOptions.AsynchronousQuickActionsEnableFeatureFlag)
7575
End Function)
7676

7777
' Highlighting

0 commit comments

Comments
 (0)