Skip to content

Commit

Permalink
merge commit
Browse files Browse the repository at this point in the history
  • Loading branch information
retailcoder committed Sep 22, 2015
2 parents 6d6fa63 + 49ae393 commit 86be786
Show file tree
Hide file tree
Showing 24 changed files with 354 additions and 634 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -126,6 +126,9 @@ ClientBin/
*.pfx
*.publishsettings

# Monodevelop detritus
*.userprefs

# RIA/Silverlight projects
Generated_Code/

Expand Down

This file was deleted.

21 changes: 0 additions & 21 deletions RetailCoder.VBE/Navigation/RegexSearchReplace/RegexSearchResult.cs

This file was deleted.

16 changes: 11 additions & 5 deletions RetailCoder.VBE/Root/CommandBarsModule.cs
Expand Up @@ -16,6 +16,12 @@ namespace Rubberduck.Root
{
public class CommandBarsModule : NinjectModule
{
private const int MENU_BAR = 1;
private const int CODE_WINDOW = 9;
private const int PROJECT_WINDOW = 14;
private const int MS_FORMS = 17;
private const int MS_FORMS_CONTROL = 18;

private readonly IKernel _kernel;

public CommandBarsModule(IKernel kernel)
Expand All @@ -37,7 +43,7 @@ public override void Load()
private void ConfigureRubberduckMenu()
{
const int windowMenuId = 30009;
var parent = _kernel.Get<VBE>().CommandBars["Menu Bar"].Controls;
var parent = _kernel.Get<VBE>().CommandBars[MENU_BAR].Controls;
var beforeIndex = FindRubberduckMenuInsertionIndex(parent, windowMenuId);

var items = GetRubberduckMenuItems();
Expand All @@ -47,7 +53,7 @@ private void ConfigureRubberduckMenu()
private void ConfigureCodePaneContextMenu()
{
const int listMembersMenuId = 2529;
var parent = _kernel.Get<VBE>().CommandBars["Code Window"].Controls;
var parent = _kernel.Get<VBE>().CommandBars[CODE_WINDOW].Controls;
var beforeIndex = parent.Cast<CommandBarControl>().First(control => control.Id == listMembersMenuId).Index;

var items = GetCodePaneContextMenuItems();
Expand All @@ -57,7 +63,7 @@ private void ConfigureCodePaneContextMenu()
private void ConfigureFormDesignerContextMenu()
{
const int viewCodeMenuId = 2558;
var parent = _kernel.Get<VBE>().CommandBars["MSForms"].Controls;
var parent = _kernel.Get<VBE>().CommandBars[MS_FORMS].Controls;
var beforeIndex = parent.Cast<CommandBarControl>().First(control => control.Id == viewCodeMenuId).Index;

var items = GetFormDesignerContextMenuItems();
Expand All @@ -67,7 +73,7 @@ private void ConfigureFormDesignerContextMenu()
private void ConfigureFormDesignerControlContextMenu()
{
const int viewCodeMenuId = 2558;
var parent = _kernel.Get<VBE>().CommandBars["MSForms Control"].Controls;
var parent = _kernel.Get<VBE>().CommandBars[MS_FORMS_CONTROL].Controls;
var beforeIndex = parent.Cast<CommandBarControl>().First(control => control.Id == viewCodeMenuId).Index;

var items = GetFormDesignerContextMenuItems();
Expand All @@ -77,7 +83,7 @@ private void ConfigureFormDesignerControlContextMenu()
private void ConfigureProjectExplorerContextMenu()
{
const int projectPropertiesMenuId = 2578;
var parent = _kernel.Get<VBE>().CommandBars["Project Window"].Controls;
var parent = _kernel.Get<VBE>().CommandBars[PROJECT_WINDOW].Controls;
var beforeIndex = parent.Cast<CommandBarControl>().First(control => control.Id == projectPropertiesMenuId).Index;

var items = GetProjectWindowContextMenuItems();
Expand Down

0 comments on commit 86be786

Please sign in to comment.