public IMouseProcessor GetAssociatedProcessor(IWpfTextView view) { var buffer = view.TextBuffer; IOleCommandTarget shellCommandDispatcher = GetShellCommandDispatcher(view); if (shellCommandDispatcher == null) { return(null); } ITelemetrySession telemetrySession = TelemetrySessionForPPT.Create(typeof(GoToDefMouseHandler).Assembly); IVsExtensionManager manager = _globalServiceProvider.GetService(typeof(SVsExtensionManager)) as IVsExtensionManager; if (manager == null) { return(null); } IInstalledExtension extension; manager.TryGetInstalledExtension("GoToDef", out extension); if (extension != null) { return(null); } return(new GoToDefMouseHandler(view, shellCommandDispatcher, telemetrySession, _aggregatorFactory.GetClassifier(buffer), _navigatorService.GetTextStructureNavigator(buffer), CtrlKeyState.GetStateForView(view))); }
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)); }
public KeyProcessor GetAssociatedProcessor(IWpfTextView view) { IVsExtensionManager manager = _serviceProvider.GetService(typeof(SVsExtensionManager)) as IVsExtensionManager; if (manager == null) { return(null); } IInstalledExtension extension; manager.TryGetInstalledExtension("GoToDef", out extension); if (extension != null) { return(null); } return(view.Properties.GetOrCreateSingletonProperty(typeof(GoToDefKeyProcessor), () => new GoToDefKeyProcessor(CtrlKeyState.GetStateForView(view)))); }
public KeyProcessor GetAssociatedProcessor(IWpfTextView view) { return(view.Properties.GetOrCreateSingletonProperty(typeof(GoToDefKeyProcessor), () => new GoToDefKeyProcessor(CtrlKeyState.GetStateForView(view)))); }