diff --git a/src/VisualStudio/Core/Def/Implementation/TableDataSource/Suppression/SuppressionStateColumnDefinition.cs b/src/VisualStudio/Core/Def/Implementation/TableDataSource/Suppression/SuppressionStateColumnDefinition.cs index beb0c9005b9c383c47bba13a8eafcd12507aef81..55812c6066a4d7356e9ba96d38bca05d97110555 100644 --- a/src/VisualStudio/Core/Def/Implementation/TableDataSource/Suppression/SuppressionStateColumnDefinition.cs +++ b/src/VisualStudio/Core/Def/Implementation/TableDataSource/Suppression/SuppressionStateColumnDefinition.cs @@ -18,8 +18,8 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.TableDataSource internal class SuppressionStateColumnDefinition : TableColumnDefinitionBase { public const string ColumnName = "suppressionstate"; - private static readonly string[] s_defaultFilters = new[] { ServicesVSResources.Active, ServicesVSResources.Suppressed }; - private static readonly string[] s_defaultCheckedFilters = new[] { ServicesVSResources.Active }; + private static readonly string[] s_defaultFilters = new[] { ServicesVSResources.Active, ServicesVSResources.NotApplicable, ServicesVSResources.Suppressed }; + private static readonly string[] s_defaultCheckedFilters = new[] { ServicesVSResources.Active, ServicesVSResources.NotApplicable }; public override string Name => ColumnName; public override string DisplayName => ServicesVSResources.Suppression_State; @@ -38,6 +38,20 @@ public static void SetDefaultFilter(IWpfTableControl tableControl) tableControl.SetFilter(ColumnName, new ColumnHashSetFilter(suppressionStateColumn, excluded: ServicesVSResources.Suppressed)); } } + + public override bool TryCreateToolTip(ITableEntryHandle entry, out object toolTip) + { + object content; + if (entry.TryGetValue(ColumnName, out content) && + content as string == ServicesVSResources.NotApplicable) + { + toolTip = ServicesVSResources.SuppressionNotSupportedToolTip; + return true; + } + + toolTip = null; + return false; + } } } diff --git a/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioDiagnosticListTable.BuildTableDataSource.cs b/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioDiagnosticListTable.BuildTableDataSource.cs index 658d3399a758d6a5b8a88cddcd01602f92c519a3..35beec719c28f5835d1b47b56152a3bbc14edeaa 100644 --- a/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioDiagnosticListTable.BuildTableDataSource.cs +++ b/src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioDiagnosticListTable.BuildTableDataSource.cs @@ -233,9 +233,9 @@ public override bool TryGetValue(int index, string columnName, out object conten content = item.ProjectGuids; return ((Guid[])content).Length > 0; case SuppressionStateColumnDefinition.ColumnName: - // Build doesn't report suppressed diagnostics. + // Build doesn't support suppression. Contract.ThrowIfTrue(data.IsSuppressed); - content = ServicesVSResources.Active; + content = ServicesVSResources.NotApplicable; return true; default: content = null; diff --git a/src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs b/src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs index 44531dd134095ec582e827f0316fd4882bf70276..1614b635016f0a16ebc4fbe14ceea898289feee8 100644 --- a/src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs +++ b/src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs @@ -1158,6 +1158,15 @@ internal class ServicesVSResources { } } + /// + /// Looks up a localized string similar to N/A. + /// + internal static string NotApplicable { + get { + return ResourceManager.GetString("NotApplicable", resourceCulture); + } + } + /// /// Looks up a localized string similar to OK. /// @@ -1560,6 +1569,15 @@ internal class ServicesVSResources { } } + /// + /// Looks up a localized string similar to Suppression state is supported only for intellisense diagnostics, which are for the current solution snapshot. Switch to 'Intellisense' diagnostics for suppression.. + /// + internal static string SuppressionNotSupportedToolTip { + get { + return ResourceManager.GetString("SuppressionNotSupportedToolTip", resourceCulture); + } + } + /// /// Looks up a localized string similar to Symbol Kinds (can match any). /// diff --git a/src/VisualStudio/Core/Def/ServicesVSResources.resx b/src/VisualStudio/Core/Def/ServicesVSResources.resx index a5753f3b360760d737f3cf7f153da5518c2809d7..f941f62bb41baf1869d0627db51f632a6238b9f2 100644 --- a/src/VisualStudio/Core/Def/ServicesVSResources.resx +++ b/src/VisualStudio/Core/Def/ServicesVSResources.resx @@ -480,6 +480,12 @@ Use the dropdown to view and switch to other projects this file may belong to. Suppressed + + N/A + + + Suppression state is supported only for intellisense diagnostics, which are for the current solution snapshot. Switch to 'Intellisense' diagnostics for suppression. + Suppress diagnostics