public SelectionChangeService(IVBE vbe, IParseCoordinator parser)
 {
     _parser = parser;
     _vbe    = vbe;
     VbeNativeServices.SelectionChanged  += OnVbeSelectionChanged;
     VbeNativeServices.WindowFocusChange += OnVbeFocusChanged;
 }
Exemplo n.º 2
0
        public AppMenu(IEnumerable <IParentMenuItem> menus, IParseCoordinator parser, ISelectionChangeService selectionService, RubberduckCommandBar stateBar)
        {
            _menus            = menus.ToList();
            _parser           = parser;
            _selectionService = selectionService;
            _stateBar         = stateBar;

            _parser.State.StateChanged += OnParserStateChanged;
            _selectionService.SelectedDeclarationChanged += OnSelectedDeclarationChange;
        }
        public RubberduckCommandBar(IParseCoordinator parser, IEnumerable <ICommandMenuItem> items, IContextFormatter formatter, ISelectionChangeService selectionService, IUiDispatcher uiDispatcher)
            : base("Rubberduck", CommandBarPosition.Top, items, uiDispatcher)
        {
            _parser           = parser;
            _formatter        = formatter;
            _selectionService = selectionService;

            _parser.State.StateChanged         += OnParserStateChanged;
            _parser.State.StatusMessageUpdate  += OnParserStatusMessageUpdate;
            _selectionService.SelectionChanged += OnSelectionChange;
        }
Exemplo n.º 4
0
 public RegexSearchReplace(IVBE vbe, IParseCoordinator parser)
 {
     _vbe    = vbe;
     _parser = parser;
     _search = new Dictionary <RegexSearchReplaceScope, Func <string, IEnumerable <RegexSearchResult> > >
     {
         { RegexSearchReplaceScope.Selection, SearchSelection },
         { RegexSearchReplaceScope.CurrentBlock, SearchCurrentBlock },
         { RegexSearchReplaceScope.CurrentFile, SearchCurrentFile },
         { RegexSearchReplaceScope.AllOpenedFiles, SearchOpenFiles },
         { RegexSearchReplaceScope.CurrentProject, SearchCurrentProject },
         { RegexSearchReplaceScope.AllOpenProjects, SearchOpenProjects },
     };
 }