Skip to content

Commit 9231936

Browse files
committed
Wired the RegexAssistant as a MenuItem
1 parent 7939b69 commit 9231936

File tree

6 files changed

+57
-1
lines changed

6 files changed

+57
-1
lines changed

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@
433433
<Compile Include="UI\CodeExplorer\Commands\AddClassModuleCommand.cs" />
434434
<Compile Include="UI\CodeExplorer\Commands\AddStdModuleCommand.cs" />
435435
<Compile Include="UI\CodeExplorer\Commands\AddTestModuleCommand.cs" />
436+
<Compile Include="UI\Command\MenuItems\RegexAssistantCommandMenuItem.cs" />
437+
<Compile Include="UI\Command\RegexAssistantCommand.cs" />
436438
<Compile Include="UI\Controls\LinkButton.xaml.cs">
437439
<DependentUpon>LinkButton.xaml</DependentUpon>
438440
</Compile>

RetailCoder.VBE/UI/Command/MenuItems/ParentMenus/RubberduckParentMenu.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public enum RubberduckMenuItemDisplayOrder
1818
CodeInspections,
1919
SourceControl,
2020
Settings,
21-
About
21+
About,
22+
RegexAssistant
2223
}
2324
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using Rubberduck.UI.Command.MenuItems.ParentMenus;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Windows.Input;
8+
9+
namespace Rubberduck.UI.Command.MenuItems
10+
{
11+
class RegexAssistantCommandMenuItem : CommandMenuItemBase
12+
{
13+
public RegexAssistantCommandMenuItem(ICommand command) : base(command)
14+
{
15+
}
16+
17+
public override string Key { get { return "RubberduckMenu_RegexAssistant"; } }
18+
19+
public override int DisplayOrder { get { return (int)RubberduckMenuItemDisplayOrder.RegexAssistant; } }
20+
}
21+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using Rubberduck.UI.RegexAssistant;
2+
using System.Runtime.InteropServices;
3+
4+
namespace Rubberduck.UI.Command
5+
{
6+
/// <summary>
7+
/// A command that displays the RegexAssistantDialog
8+
/// </summary>
9+
[ComVisible(false)]
10+
class RegexAssistantCommand : CommandBase
11+
{
12+
public override void Execute(object parameter)
13+
{
14+
using (var window = new RegexAssistantDialog())
15+
{
16+
window.ShowDialog();
17+
}
18+
}
19+
}
20+
}

RetailCoder.VBE/UI/RubberduckUI.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

RetailCoder.VBE/UI/RubberduckUI.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,4 +1748,7 @@ All our stargazers, likers &amp; followers, for the warm fuzzies
17481748
<data name="RegexAssistant_RegexPatternLabel" xml:space="preserve">
17491749
<value>The RegExp:</value>
17501750
</data>
1751+
<data name="RubberduckMenu_RegexAssistant" xml:space="preserve">
1752+
<value>Regex &amp;Assistant</value>
1753+
</data>
17511754
</root>

0 commit comments

Comments
 (0)