Skip to content

Commit

Permalink
Merge pull request #57379 from dotnet/merges/release/dev17.0-to-relea…
Browse files Browse the repository at this point in the history
…se/dev17.0-vs-deps

Merge release/dev17.0 to release/dev17.0-vs-deps
  • Loading branch information
RikkiGibson authored Oct 26, 2021
2 parents dd3f5ca + 4e8625f commit fe503c4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ 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.AsynchronousQuickActionsEnableFeatureFlag);

return asyncEnabled
? new AsyncSuggestedActionsSource(_threadingContext, _globalOptions, this, textView, textBuffer, _suggestedActionCategoryRegistry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal static class SuggestionsOptions
public static readonly Option2<bool?> Asynchronous = new(FeatureName, nameof(Asynchronous), defaultValue: null,
new RoamingProfileStorageLocation("TextEditor.Specific.Suggestions.Asynchronous2"));

public static readonly Option2<bool> AsynchronousQuickActionsDisableFeatureFlag = new(FeatureName, nameof(AsynchronousQuickActionsDisableFeatureFlag), defaultValue: false,
new FeatureFlagStorageLocation("Roslyn.AsynchronousQuickActionsDisable"));
public static readonly Option2<bool> AsynchronousQuickActionsEnableFeatureFlag = new(FeatureName, nameof(AsynchronousQuickActionsEnableFeatureFlag), defaultValue: false,
new FeatureFlagStorageLocation("Roslyn.AsynchronousQuickActionsEnable2"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public SuggestionsOptionsProvider()

public ImmutableArray<IOption> Options { get; } = ImmutableArray.Create<IOption>(
SuggestionsOptions.Asynchronous,
SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag);
SuggestionsOptions.AsynchronousQuickActionsEnableFeatureFlag);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel compon
// 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);
// If the option has not been set by the user, check if the option is enabled from experimentation.
return optionStore.GetOption(SuggestionsOptions.AsynchronousQuickActionsEnableFeatureFlag);
});

// Highlighting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options
' 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)
' If the option has Not been set by the user, check if the option is enabled from experimentation.
Return optionStore.GetOption(SuggestionsOptions.AsynchronousQuickActionsEnableFeatureFlag)
End Function)

' Highlighting
Expand Down

0 comments on commit fe503c4

Please sign in to comment.