Skip to content

Commit 322d6bc

Browse files
authored
Merge pull request #6075 from INOPIAE/window_menu_5505
Add a Windows menu fixes #5505
2 parents 0a43114 + 4e1ec85 commit 322d6bc

14 files changed

+143
-1
lines changed

Rubberduck.Core/UI/Command/MenuItems/CodeExplorerCommandMenuItem.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,14 @@ public CodeExplorerCommandMenuItem(CodeExplorerCommand command)
1616
public override string Key => "RubberduckMenu_CodeExplorer";
1717
public override int DisplayOrder => (int)NavigationMenuItemDisplayOrder.CodeExplorer;
1818
}
19+
20+
public class WindowsCodeExplorerCommandMenuItem : CodeExplorerCommandMenuItem
21+
{
22+
public WindowsCodeExplorerCommandMenuItem(CodeExplorerCommand command)
23+
: base(command)
24+
{ }
25+
26+
public override int DisplayOrder => (int)WindowMenuItemDisplayOrder.CodeExplorer;
27+
}
28+
1929
}

Rubberduck.Core/UI/Command/MenuItems/CodeMetricsCommandMenuItem.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,14 @@ public CodeMetricsCommandMenuItem(CodeMetricsCommand command)
1515
public override string Key => "RubberduckMenu_CodeMetrics";
1616
public override int DisplayOrder => (int)ToolsMenuItemDisplayOrder.CodeMetrics;
1717
}
18+
19+
public class WindowsCodeMetricsCommandMenuItem : CodeMetricsCommandMenuItem
20+
{
21+
public WindowsCodeMetricsCommandMenuItem(CodeMetricsCommand command)
22+
: base(command)
23+
{
24+
}
25+
26+
public override int DisplayOrder => (int)WindowMenuItemDisplayOrder.CodeMetrics;
27+
}
1828
}

Rubberduck.Core/UI/Command/MenuItems/FindAllImplementationsCommandMenuItem.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,13 @@ public ProjectExplorerFindAllImplementationsCommandMenuItem(ProjectExplorerFindA
3535

3636
public override int DisplayOrder => (int)ProjectExplorerContextMenuItemDisplayOrder.FindAllImplementations;
3737
}
38+
39+
public class WindowsFindAllImplementationsCommandMenuItem : FindAllImplementationsCommandMenuItemBase
40+
{
41+
public WindowsFindAllImplementationsCommandMenuItem(ProjectExplorerFindAllImplementationsCommand command)
42+
: base(command)
43+
{ }
44+
45+
public override int DisplayOrder => (int)WindowMenuItemDisplayOrder.FindAllImplementations;
46+
}
3847
}

Rubberduck.Core/UI/Command/MenuItems/FindAllReferencesCommandMenuItem.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,15 @@ public ProjectExplorerFindAllReferencesCommandMenuItem(ProjectExplorerFindAllRef
3737

3838
public override int DisplayOrder => (int)ProjectExplorerContextMenuItemDisplayOrder.FindAllReferences;
3939
}
40+
41+
42+
public class WindowsFindAllReferencesCommandMenuItem : FindAllReferencesCommandMenuItemBase
43+
{
44+
public WindowsFindAllReferencesCommandMenuItem(ProjectExplorerFindAllReferencesCommand command)
45+
: base(command)
46+
{ }
47+
48+
public override int DisplayOrder => (int)WindowMenuItemDisplayOrder.FindAllReferences;
49+
}
50+
4051
}

Rubberduck.Core/UI/Command/MenuItems/FindSymbolCommandMenuItem.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,13 @@ public ProjectExplorerFindSymbolCommandMenuItem(FindSymbolCommand command)
3838

3939
public override int DisplayOrder => (int)ProjectExplorerContextMenuItemDisplayOrder.FindSymbol;
4040
}
41+
42+
public class WindowsFindSymbolCommandMenuItem : FindSymbolCommandMenuItemBase
43+
{
44+
public WindowsFindSymbolCommandMenuItem(FindSymbolCommand command)
45+
: base(command)
46+
{ }
47+
48+
public override int DisplayOrder => (int)WindowMenuItemDisplayOrder.FindSymbol;
49+
}
4150
}

Rubberduck.Core/UI/Command/MenuItems/InspectionResultsCommandMenuItem.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,14 @@ public InspectionResultsCommandMenuItem(InspectionResultsCommand command)
1313
public override string Key => "RubberduckMenu_CodeInspections";
1414
public override int DisplayOrder => (int)RubberduckMenuItemDisplayOrder.CodeInspections;
1515
}
16+
17+
18+
public class WindowsInspectionResultsCommandMenuItem : InspectionResultsCommandMenuItem
19+
{
20+
public WindowsInspectionResultsCommandMenuItem(InspectionResultsCommand command)
21+
: base(command)
22+
{ }
23+
24+
public override int DisplayOrder => (int)WindowMenuItemDisplayOrder.CodeInspections;
25+
}
1626
}

Rubberduck.Core/UI/Command/MenuItems/ParentMenus/RubberduckParentMenu.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public enum RubberduckMenuItemDisplayOrder
1818
Refactorings,
1919
Navigate,
2020
Tools,
21+
Windows,
2122
CodeInspections,
2223
Settings,
2324
About,
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System.Collections.Generic;
2+
using Rubberduck.Parsing.UIContext;
3+
4+
namespace Rubberduck.UI.Command.MenuItems.ParentMenus
5+
{
6+
public class WindowParentMenu : ParentMenuItemBase
7+
{
8+
public WindowParentMenu(IEnumerable<IMenuItem> items, IUiDispatcher dispatcher)
9+
: base(dispatcher, "WindowMenu", items)
10+
{
11+
}
12+
13+
public override int DisplayOrder => (int)RubberduckMenuItemDisplayOrder.Windows;
14+
}
15+
16+
public enum WindowMenuItemDisplayOrder
17+
{
18+
CodeExplorer,
19+
CodeInspections,
20+
CodeMetrics,
21+
FindSymbol,
22+
FindAllReferences,
23+
FindAllImplementations ,
24+
TestExplorer,
25+
ToDoExplorer
26+
}
27+
}

Rubberduck.Core/UI/Command/MenuItems/TestExplorerCommandMenuItem.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,14 @@ public TestExplorerCommandMenuItem(TestExplorerCommand command)
1313
public override string Key => "TestMenu_TextExplorer";
1414
public override int DisplayOrder => (int)UnitTestingMenuItemDisplayOrder.TestExplorer;
1515
}
16+
17+
internal class WindowsTestExplorerCommandMenuItem : TestExplorerCommandMenuItem
18+
{
19+
public WindowsTestExplorerCommandMenuItem(TestExplorerCommand command)
20+
: base(command)
21+
{
22+
}
23+
24+
public override int DisplayOrder => (int)WindowMenuItemDisplayOrder.TestExplorer;
25+
}
1626
}

Rubberduck.Core/UI/Command/MenuItems/ToDoExplorerCommandMenuItem.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,14 @@ public ToDoExplorerCommandMenuItem(ToDoExplorerCommand command)
1313
public override string Key => "ToolsMenu_TodoItems";
1414
public override int DisplayOrder => (int)ToolsMenuItemDisplayOrder.ToDoExplorer;
1515
}
16+
17+
public class WindowsToDoExplorerCommandMenuItem : ToDoExplorerCommandMenuItem
18+
{
19+
public WindowsToDoExplorerCommandMenuItem(ToDoExplorerCommand command)
20+
: base(command)
21+
{
22+
}
23+
24+
public override int DisplayOrder => (int)WindowMenuItemDisplayOrder.ToDoExplorer;
25+
}
1626
}

0 commit comments

Comments
 (0)