Example #1
0
        public void Initialize()
        {
            const int windowMenuId    = 30009;
            var       menuBarControls = IDE.CommandBars[1].Controls;
            var       beforeIndex     = FindMenuInsertionIndex(menuBarControls, windowMenuId);

            _menu = menuBarControls.Add(MsoControlType.msoControlPopup, Before: beforeIndex, Temporary: true) as CommandBarPopup;

            _menu.Caption = RubberduckUI.RubberduckMenu;

            _testMenu.Initialize(_menu.Controls);
            _codeExplorerMenu.Initialize(_menu);
            _refactorMenu.Initialize(_menu.Controls);
            _todoItemsMenu.Initialize(_menu);
            _codeInspectionsMenu.Initialize(_menu);

            _sourceControl = AddButton(_menu, RubberduckUI.RubberduckMenu_SourceControl, false, OnSourceControlClick);
            _settings      = AddButton(_menu, RubberduckUI.RubberduckMenu_Options, true, OnOptionsClick);
            _about         = AddButton(_menu, RubberduckUI.RubberduckMenu_About, true, OnAboutClick);

            _projectExplorerContextMenu = new ProjectExplorerContextMenu(IDE, _addIn, _parser);
            _projectExplorerContextMenu.Initialize();
            _projectExplorerContextMenu.RunInspections      += codePresenter_RunInspections;
            _projectExplorerContextMenu.FindReferences      += codePresenter_FindAllReferences;
            _projectExplorerContextMenu.FindImplementations += codePresenter_FindAllImplementations;
            _projectExplorerContextMenu.RunAllTests         += CodePresenterRunAllAllTests;
        }
Example #2
0
        public void Initialize()
        {
            var menuBarControls = _vbe.CommandBars[1].Controls;
            var beforeIndex     = FindMenuInsertionIndex(menuBarControls);
            var menu            = menuBarControls.Add(MsoControlType.msoControlPopup, Before: beforeIndex, Temporary: true) as CommandBarPopup;

            Debug.Assert(menu != null, "menu != null");

            menu.Caption = "Ru&bberduck";

            _testMenu.Initialize(menu.Controls);
            _codeExplorerMenu.Initialize(menu.Controls);
            //_refactorMenu.Initialize(menu.Controls);
            _todoItemsMenu.Initialize(menu.Controls);
            _codeInspectionsMenu.Initialize(menu.Controls);

            _settings = AddButton(menu, "&Options", true, new CommandBarButtonClickEvent(OnOptionsClick));
            _about    = AddButton(menu, "&About...", true, new CommandBarButtonClickEvent(OnAboutClick));
        }
Example #3
0
        public void Initialize()
        {
            const int windowMenuId    = 30009;
            var       menuBarControls = IDE.CommandBars[1].Controls;
            var       beforeIndex     = FindMenuInsertionIndex(menuBarControls, windowMenuId);
            var       menu            = menuBarControls.Add(MsoControlType.msoControlPopup, Before: beforeIndex, Temporary: true) as CommandBarPopup;

            Debug.Assert(menu != null, "menu != null");

            menu.Caption = "Ru&bberduck";

            _testMenu.Initialize(menu.Controls);
            _codeExplorerMenu.Initialize(menu);
            _refactorMenu.Initialize(menu.Controls);
            _todoItemsMenu.Initialize(menu);
            _codeInspectionsMenu.Initialize(menu);

            // note: disabled for 1.21 release (RepositoryNotFoundException on click)
            //_sourceControl = AddButton(menu, "Source Control", false, OnSourceControlClick);
            _settings = AddButton(menu, "&Options", true, OnOptionsClick);
            _about    = AddButton(menu, "&About...", true, OnAboutClick);
        }