Exemple #1
0
        public IMouseProcessor GetAssociatedProcessor(IWpfTextView view)
        {
            var buffer = view.TextBuffer;

            IOleCommandTarget shellCommandDispatcher = GetShellCommandDispatcher(view);

            if (shellCommandDispatcher == null)
            {
                return(null);
            }

            return(new GoToDefMouseHandler(view,
                                           shellCommandDispatcher,
                                           _aggregatorFactory.GetClassifier(buffer),
                                           _navigatorService.GetTextStructureNavigator(buffer),
                                           CtrlKeyState.GetStateForView(view)));
        }
Exemple #2
0
 public KeyProcessor GetAssociatedProcessor(IWpfTextView view)
 {
     return(view.Properties.GetOrCreateSingletonProperty(typeof(GoToDefKeyProcessor),
                                                         () => new GoToDefKeyProcessor(CtrlKeyState.GetStateForView(view))));
 }