Example #1
0
        private void Setup()
        {
            _parser = new RubberduckParser();
            _parser.ParseStarted += _parser_ParseStarted;
            _parser.ParserError  += _parser_ParserError;

            _inspector = new Inspector(_parser, _configService);

            _parserErrorsPresenter = new ParserErrorsPresenter(_vbe, _addIn);

            _menu = new RubberduckMenu(_vbe, _addIn, _configService, _parser, _editor, _inspector);
            _menu.Initialize();

            _formContextMenu = new FormContextMenu(_vbe, _parser);
            _formContextMenu.Initialize();

            _codeInspectionsToolbar = new CodeInspectionsToolbar(_vbe, _inspector);
            _codeInspectionsToolbar.Initialize();

            if (toolbarCoords.X != -1 && toolbarCoords.Y != -1)
            {
                _codeInspectionsToolbar.ToolbarCoords = toolbarCoords;
            }
            _codeInspectionsToolbar.ToolbarVisible = displayToolbar;
        }
Example #2
0
        public App(VBE vbe, AddIn addIn)
        {
            _configService = new ConfigurationLoader();
            _inspections   = _configService.GetImplementedCodeInspections();

            var config = _configService.LoadConfiguration();

            EnableCodeInspections(config);
            var parser = new RubberduckParser();

            var inspector = new Inspector(parser, _inspections);

            _menu = new RubberduckMenu(vbe, addIn, _configService, parser, inspector);
            _codeInspectionsToolbar = new CodeInspectionsToolbar(vbe, inspector);
        }