From 8388fa1495049bc35f80933f42b2becf40d83264 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 16 Jul 2018 20:49:10 +0200 Subject: [PATCH] Analyzers: Show number of results next to title of AnalyzerSearchTreeNode --- ILSpy/Analyzers/AnalyzerSearchTreeNode.cs | 2 +- ILSpy/TreeNodes/ThreadingSupport.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ILSpy/Analyzers/AnalyzerSearchTreeNode.cs b/ILSpy/Analyzers/AnalyzerSearchTreeNode.cs index 23393e821..8e37d22fb 100644 --- a/ILSpy/Analyzers/AnalyzerSearchTreeNode.cs +++ b/ILSpy/Analyzers/AnalyzerSearchTreeNode.cs @@ -39,7 +39,7 @@ namespace ICSharpCode.ILSpy.Analyzers this.LazyLoading = true; } - public override object Text => analyzer.Text; + public override object Text => analyzer.Text + (Children.Count > 0 ? " (" + Children.Count + ")" : ""); public override object Icon => Images.Search; diff --git a/ILSpy/TreeNodes/ThreadingSupport.cs b/ILSpy/TreeNodes/ThreadingSupport.cs index 6e18da961..ae602b625 100644 --- a/ILSpy/TreeNodes/ThreadingSupport.cs +++ b/ILSpy/TreeNodes/ThreadingSupport.cs @@ -82,6 +82,7 @@ namespace ICSharpCode.ILSpy.TreeNodes delegate { if (loadChildrenTask == thisTask) { node.Children.RemoveAt(node.Children.Count - 1); // remove 'Loading...' + node.RaisePropertyChanged(nameof(node.Text)); } if (continuation.Exception != null) { // observe exception even when task isn't current if (loadChildrenTask == thisTask) {