Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tmat committed Nov 1, 2021
1 parent 997e914 commit 40f6533
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2608,13 +2608,13 @@ public async Task TestCreateWithBufferNotInWorkspace()
WpfTestRunner.RequireWpfFact($"Creates an {nameof(IWpfTextView)} explicitly with an unrelated buffer");
using var disposableView = workspace.ExportProvider.GetExportedValue<ITextEditorFactoryService>().CreateDisposableTextView(extraBuffer);
var listenerProvider = workspace.ExportProvider.GetExportedValue<IAsynchronousOperationListenerProvider>();
var globalOptionsService = workspace.ExportProvider.GetExportedValue<IGlobalOptionService>();
var globalOptions = workspace.ExportProvider.GetExportedValue<IGlobalOptionService>();

var provider = new SemanticClassificationViewTaggerProvider(
workspace.GetService<IThreadingContext>(),
workspace.GetService<ClassificationTypeMap>(),
listenerProvider,
globalOptionsService);
globalOptions,
listenerProvider);

using var tagger = (IDisposable)provider.CreateTagger<IClassificationTag>(disposableView.TextView, extraBuffer);
using (var edit = extraBuffer.CreateEdit())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace Microsoft.CodeAnalysis.Editor.Implementation.Classification
internal partial class SemanticClassificationViewTaggerProvider : AsynchronousViewTaggerProvider<IClassificationTag>
{
private readonly ClassificationTypeMap _typeMap;
private readonly IGlobalOptionService _globalOptionsService;
private readonly IGlobalOptionService _globalOptions;

// We want to track text changes so that we can try to only reclassify a method body if
// all edits were contained within one.
Expand All @@ -55,7 +55,7 @@ public SemanticClassificationViewTaggerProvider(
: base(threadingContext, globalOptions, listenerProvider.GetListener(FeatureAttribute.Classification))
{
_typeMap = typeMap;
_globalOptionsService = globalOptionsService;
_globalOptions = globalOptions;
}

protected override TaggerDelay EventChangeDelay => TaggerDelay.Short;
Expand Down Expand Up @@ -120,7 +120,7 @@ protected override Task ProduceTagsAsync(
return Task.CompletedTask;

// If the LSP semantic tokens feature flag is enabled, return nothing to prevent conflicts.
var isLspSemanticTokensEnabled = _globalOptionsService.GetOption(LspOptions.LspSemanticTokensFeatureFlag);
var isLspSemanticTokensEnabled = _globalOptions.GetOption(LspOptions.LspSemanticTokensFeatureFlag);
if (isLspSemanticTokensEnabled)
{
return Task.CompletedTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public PackageInstallerService(
: base(threadingContext,
workspace,
globalOptions,
SymbolSearchOptions.Enabled,
SymbolSearchGlobalOptions.Enabled,
SymbolSearchOptions.SuggestForTypesInReferenceAssemblies,
SymbolSearchOptions.SuggestForTypesInNuGetPackages)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public VisualStudioSymbolSearchService(
VisualStudioWorkspaceImpl workspace,
IGlobalOptionService globalOptions,
VSShell.SVsServiceProvider serviceProvider)
: base(threadingContext, workspace, globalOptions, SymbolSearchOptions.Enabled,
: base(threadingContext, workspace, globalOptions, SymbolSearchGlobalOptions.Enabled,
SymbolSearchOptions.SuggestForTypesInReferenceAssemblies, SymbolSearchOptions.SuggestForTypesInNuGetPackages)
{
_workspace = workspace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public void TestChangedTodoCommentOptions()
using var workspace = new AdhocWorkspace(hostServices);
var option = TodoCommentOptions.TokenList;

var provider = ((IMefHostExportProvider)hostServices).GetExportedValues<IOptionProvider>().OfType<TodoCommentOptionsProvider>().FirstOrDefault();
var provider = ((IMefHostExportProvider)hostServices).GetExportedValues<IOptionProvider>().OfType<TodoCommentOptions>().FirstOrDefault();
var optionService = TestOptionService.GetService(workspace, provider);
var optionSet = optionService.GetOptions();
var optionKey = new OptionKey(option);
Expand Down Expand Up @@ -349,7 +349,7 @@ public void TestPersistedTodoCommentOptions()
Assert.True(persister.TryFetch(option, out var persistedValue));
Assert.Equal(newOptionValue, persistedValue);

var provider = ((IMefHostExportProvider)hostServices).GetExportedValues<IOptionProvider>().OfType<TodoCommentOptionsProvider>().FirstOrDefault();
var provider = ((IMefHostExportProvider)hostServices).GetExportedValues<IOptionProvider>().OfType<TodoCommentOptions>().FirstOrDefault();
var persisterProvider = new TestOptionService.TestOptionsPersisterProvider(persister);
var optionService = TestOptionService.GetService(workspace, provider, persisterProvider);
var optionSet = optionService.GetOptions();
Expand Down

0 comments on commit 40f6533

Please sign in to comment.