Browse Source

Add expand all tests

pull/430/head
Linquize 11 years ago
parent
commit
257ca47ad7
  1. 15
      src/AddIns/Analysis/UnitTesting/Commands/PadCommands.cs
  2. 4
      src/AddIns/Analysis/UnitTesting/UnitTesting.addin

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

@ -54,6 +54,21 @@ namespace ICSharpCode.UnitTesting @@ -54,6 +54,21 @@ namespace ICSharpCode.UnitTesting
}
}
public class ExpandAllTestsCommand : AbstractMenuCommand
{
public override void Run()
{
if (!(this.Owner is SharpTreeView))
return;
var treeView = (SharpTreeView)this.Owner;
if (treeView.Root != null) {
foreach (var n in treeView.Root.Descendants())
n.IsExpanded = true;
}
}
}
public class CollapseAllTestsCommand : AbstractMenuCommand
{
public override void Run()

4
src/AddIns/Analysis/UnitTesting/UnitTesting.addin

@ -100,6 +100,10 @@ @@ -100,6 +100,10 @@
tooltip="${res:NUnitPad.NUnitPadContent.ReferenceItem}"
class="ICSharpCode.UnitTesting.AddNUnitReferenceCommand"/>
<ToolbarItem id = "CollapseSeparator" type = "Separator"/>
<ToolbarItem id = "ExpandAll"
icon = "Icons.16x16.OpenCollection"
tooltip = "${res:MainWindow.Windows.SearchResultPanel.ExpandAll.ToolTip}"
class = "ICSharpCode.UnitTesting.ExpandAllTestsCommand"/>
<ToolbarItem id = "Collapse"
icon = "Icons.16x16.Collection"
tooltip = "${res:MainWindow.Windows.SearchResultPanel.CollapseAll.ToolTip}"

Loading…
Cancel
Save