Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 257ca47

Browse files
committed
Add expand all tests
1 parent 74400d6 commit 257ca47

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

src/AddIns/Analysis/UnitTesting/Commands/PadCommands.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,21 @@ public override void Run()
5454
}
5555
}
5656

57+
public class ExpandAllTestsCommand : AbstractMenuCommand
58+
{
59+
public override void Run()
60+
{
61+
if (!(this.Owner is SharpTreeView))
62+
return;
63+
64+
var treeView = (SharpTreeView)this.Owner;
65+
if (treeView.Root != null) {
66+
foreach (var n in treeView.Root.Descendants())
67+
n.IsExpanded = true;
68+
}
69+
}
70+
}
71+
5772
public class CollapseAllTestsCommand : AbstractMenuCommand
5873
{
5974
public override void Run()

src/AddIns/Analysis/UnitTesting/UnitTesting.addin

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
tooltip="${res:NUnitPad.NUnitPadContent.ReferenceItem}"
101101
class="ICSharpCode.UnitTesting.AddNUnitReferenceCommand"/>
102102
<ToolbarItem id = "CollapseSeparator" type = "Separator"/>
103+
<ToolbarItem id = "ExpandAll"
104+
icon = "Icons.16x16.OpenCollection"
105+
tooltip = "${res:MainWindow.Windows.SearchResultPanel.ExpandAll.ToolTip}"
106+
class = "ICSharpCode.UnitTesting.ExpandAllTestsCommand"/>
103107
<ToolbarItem id = "Collapse"
104108
icon = "Icons.16x16.Collection"
105109
tooltip = "${res:MainWindow.Windows.SearchResultPanel.CollapseAll.ToolTip}"

0 commit comments

Comments
 (0)