提交 1c43467e 编写于 作者: M Manish Vasani

Revert "Switch the error list scope combo box to match the newly selected...

Revert "Switch the error list scope combo box to match the newly selected background analysis scope in Tools Options."

This reverts commit be5bd275.
上级 be5bd275
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.ComponentModel;
using System.Composition;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.SolutionCrawler;
using Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem;
using Microsoft.VisualStudio.LanguageServices.Implementation.TaskList;
using Microsoft.VisualStudio.OLE.Interop;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Shell.TableManager;
......@@ -90,42 +84,6 @@ internal partial class VisualStudioDiagnosticListTable : VisualStudioBaseDiagnos
ConnectWorkspaceEvents();
_errorList.PropertyChanged += OnErrorListPropertyChanged;
var optionsService = workspace.Services.GetService<IOptionService>();
optionsService.OptionChanged += OnOptionChanged;
}
private void OnOptionChanged(object sender, OptionChangedEventArgs e)
{
if (e.Option == SolutionCrawlerOptions.BackgroundAnalysisScopeOption &&
_errorList is IOleCommandTarget target)
{
// Change the error list scope combo box to match the new background analysis scope.
string filterString;
var analysisScope = SolutionCrawlerOptions.GetBackgroundAnalysisScope(Workspace.Options);
switch (analysisScope)
{
case BackgroundAnalysisScope.ActiveFile:
filterString = ServicesVSResources.Current_Document;
break;
case BackgroundAnalysisScope.OpenFilesAndProjects:
filterString = ServicesVSResources.Open_Documents;
break;
case BackgroundAnalysisScope.FullSolution:
filterString = ServicesVSResources.Entire_Solution;
break;
default:
Debug.Fail($"Unhandled BackgroundAnalysisScope: {analysisScope}");
return;
}
IntPtr filterStringPtr = Marshal.AllocCoTaskMem(16);
Marshal.GetNativeVariantForObject(filterString, filterStringPtr);
target.Exec(VSConstants.VsStd14, (int)VSConstants.VSStd14CmdID.ErrorContextComboList, 0, pvaIn: filterStringPtr, pvaOut: IntPtr.Zero);
}
}
private ITableDataSource GetCurrentDataSource()
......
......@@ -2091,15 +2091,6 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Open Documents.
/// </summary>
internal static string Open_Documents {
get {
return ResourceManager.GetString("Open_Documents", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Open Documents and Projects.
/// </summary>
......
......@@ -1353,7 +1353,4 @@ I agree to all of the foregoing:</value>
<data name="Entire_Solution" xml:space="preserve">
<value>Entire Solution</value>
</data>
<data name="Open_Documents" xml:space="preserve">
<value>Open Documents</value>
</data>
</root>
\ No newline at end of file
......@@ -362,11 +362,6 @@
<target state="translated">Neveřejné metody</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">Nicht öffentliche Methoden</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">Miembros no públicos</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">Méthodes non publiques</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">Metodi non pubblici</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">パブリックでないメソッド</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">public이 아닌 메서드</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">Metody niepubliczne</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">Métodos não públicos</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">Методы, не являющиеся открытыми</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">Ortak olmayan yöntemler</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">非公共成员</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
......@@ -362,11 +362,6 @@
<target state="translated">非公用方法</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents">
<source>Open Documents</source>
<target state="new">Open Documents</target>
<note />
</trans-unit>
<trans-unit id="Open_Documents_and_Projects">
<source>Open Documents and Projects</source>
<target state="new">Open Documents and Projects</target>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册