Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove user facing option around async-lightbulbs (17.1 and up only) #56858

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -90,11 +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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ internal static class SuggestionsOptions
{
private const string FeatureName = "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"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public SuggestionsOptionsProvider()
}

public ImmutableArray<IOption> Options { get; } = ImmutableArray.Create<IOption>(
SuggestionsOptions.Asynchronous,
SuggestionsOptions.AsynchronousQuickActionsDisableFeatureFlag);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,6 @@
Content="{x:Static local:AdvancedOptionPageStrings.Option_Add_missing_using_directives_on_paste}" />
</StackPanel>
</GroupBox>
<GroupBox x:Uid="QuickActionsBox"
Header="{x:Static local:AdvancedOptionPageStrings.Option_Quick_Actions}">
<StackPanel>
<CheckBox x:Name="ComputeQuickActionsAsynchronouslyExperimental"
Content="{x:Static local:AdvancedOptionPageStrings.Option_Compute_Quick_Actions_asynchronously_experimental}" />
</StackPanel>
</GroupBox>
<GroupBox x:Uid="HighlightingGroupBox"
Header="{x:Static local:AdvancedOptionPageStrings.Option_Highlighting}">
<StackPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 0 additions & 6 deletions src/VisualStudio/Core/Def/ServicesVSResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1802,12 +1802,6 @@ Additional information: {1}</value>
<data name="Run_code_analysis_in_separate_process_requires_restart" xml:space="preserve">
<value>Run code analysis in separate process (requires restart)</value>
</data>
<data name="Compute_Quick_Actions_asynchronously_experimental" xml:space="preserve">
<value>Compute Quick Actions asynchronously (experimental, requires restart)</value>
</data>
<data name="Quick_Actions" xml:space="preserve">
<value>Quick Actions</value>
</data>
<data name="Combine_inheritance_margin_with_indicator_margin" xml:space="preserve">
<value>Combine inheritance margin with indicator margin</value>
</data>
Expand Down
10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading