Browse Source

Analyzers: Show number of results next to title of AnalyzerSearchTreeNode

pull/1213/head
Siegfried Pammer 8 years ago
parent
commit
8388fa1495
  1. 2
      ILSpy/Analyzers/AnalyzerSearchTreeNode.cs
  2. 1
      ILSpy/TreeNodes/ThreadingSupport.cs

2
ILSpy/Analyzers/AnalyzerSearchTreeNode.cs

@ -39,7 +39,7 @@ namespace ICSharpCode.ILSpy.Analyzers @@ -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;

1
ILSpy/TreeNodes/ThreadingSupport.cs

@ -82,6 +82,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -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) {

Loading…
Cancel
Save