public AsmDocMouseHandler( IWpfTextView view, IBufferTagAggregatorFactoryService aggregatorFactory, CtrlKeyState state, AsmDudeTools asmDudeTools) { AsmDudeToolsStatic.Output_INFO(string.Format("{0}:constructor: file={1}", this.ToString(), AsmDudeToolsStatic.GetFilename(view.TextBuffer))); this._view = view; this._state = state; this._aggregator2 = AsmDudeToolsStatic.GetOrCreate_Aggregator(view.TextBuffer, aggregatorFactory); this._asmDudeTools = asmDudeTools; this._state.CtrlKeyStateChanged += (sender, args) => { if (Settings.Default.AsmDoc_On) { if (this._state.Enabled) { this.TryHighlightItemUnderMouse(this.RelativeToView(Mouse.PrimaryDevice.GetPosition(this._view.VisualElement))); } else { this.Set_Highlight_Span(null); } } }; // Some other points to clear the highlight span: this._view.LostAggregateFocus += (sender, args) => this.Set_Highlight_Span(null); this._view.VisualElement.MouseLeave += (sender, args) => this.Set_Highlight_Span(null); }
public AsmDocMouseHandler( IWpfTextView view, IClassifier aggregator, ITextStructureNavigator navigator, CtrlKeyState state, AsmDudeTools asmDudeTools) { //AsmDudeToolsStatic.Output_INFO("AsmDocMouseHandler:constructor: file=" + AsmDudeToolsStatic.GetFileName(view.TextBuffer)); this._view = view; this._state = state; this._aggregator = aggregator; this._navigator = navigator; this._asmDudeTools = asmDudeTools; this._state.CtrlKeyStateChanged += (sender, args) => { if (Settings.Default.AsmDoc_On) { if (this._state.Enabled) { this.TryHighlightItemUnderMouse(this.RelativeToView(Mouse.PrimaryDevice.GetPosition(this._view.VisualElement))); } else { this.Set_Highlight_Span(null); } } }; // Some other points to clear the highlight span: this._view.LostAggregateFocus += (sender, args) => this.Set_Highlight_Span(null); this._view.VisualElement.MouseLeave += (sender, args) => this.Set_Highlight_Span(null); }
public AsmDocMouseHandler(IWpfTextView view, IOleCommandTarget commandTarget, IClassifier aggregator, ITextStructureNavigator navigator, CtrlKeyState state) { _view = view; _commandTarget = commandTarget; _state = state; _aggregator = aggregator; _navigator = navigator; _state.CtrlKeyStateChanged += (sender, args) => { if (_state.Enabled) { this.TryHighlightItemUnderMouse(RelativeToView(Mouse.PrimaryDevice.GetPosition(_view.VisualElement))); } else { this.SetHighlightSpan(null); } }; // resolve _asmDudeTools AsmDudeToolsStatic.getCompositionContainer().SatisfyImportsOnce(this); // Some other points to clear the highlight span: _view.LostAggregateFocus += (sender, args) => this.SetHighlightSpan(null); _view.VisualElement.MouseLeave += (sender, args) => this.SetHighlightSpan(null); }
public IMouseProcessor GetAssociatedProcessor(IWpfTextView view) { return(new AsmDocMouseHandler( view, this._aggregatorFactory, CtrlKeyState.GetStateForView(view), AsmDudeTools.Instance)); }
public IMouseProcessor GetAssociatedProcessor(IWpfTextView view) { return(new AsmDocMouseHandler( view, this._aggregatorFactory.GetClassifier(view.TextBuffer), this._navigatorService.GetTextStructureNavigator(view.TextBuffer), CtrlKeyState.GetStateForView(view), AsmDudeTools.Instance)); }
public KeyProcessor GetAssociatedProcessor(IWpfTextView view) { //AsmDudeToolsStatic.Output_INFO("AsmDocKeyProcessorProvider:GetAssociatedProcessor: file=" + AsmDudeToolsStatic.GetFileName(view.TextBuffer)); AsmDocKeyProcessor sc() { return(new AsmDocKeyProcessor(CtrlKeyState.GetStateForView(view))); } return(view.Properties.GetOrCreateSingletonProperty(typeof(AsmDocKeyProcessor), sc)); }
public IMouseProcessor GetAssociatedProcessor(IWpfTextView view) { var buffer = view.TextBuffer; IOleCommandTarget shellCommandDispatcher = GetShellCommandDispatcher(view); if (shellCommandDispatcher == null) { return(null); } return(new AsmDocMouseHandler( view, shellCommandDispatcher, AggregatorFactory.GetClassifier(buffer), NavigatorService.GetTextStructureNavigator(buffer), CtrlKeyState.GetStateForView(view))); }
public IMouseProcessor GetAssociatedProcessor(IWpfTextView view) { //AsmDudeToolsStatic.Output("INFO: AsmDocMouseHandlerProvider:GetAssociatedProcessor: file=" + AsmDudeToolsStatic.GetFileName(view.TextBuffer)); var buffer = view.TextBuffer; IOleCommandTarget shellCommandDispatcher = GetShellCommandDispatcher(view); if (shellCommandDispatcher == null) { return(null); } return(new AsmDocMouseHandler( view, shellCommandDispatcher, this.AggregatorFactory.GetClassifier(buffer), this.NavigatorService.GetTextStructureNavigator(buffer), CtrlKeyState.GetStateForView(view), AsmDudeTools.Instance)); }
public AsmDocMouseHandler( IWpfTextView view, IBufferTagAggregatorFactoryService aggregatorFactory, CtrlKeyState state, AsmDudeTools asmDudeTools) { AsmDudeToolsStatic.Output_INFO(string.Format(AsmDudeToolsStatic.CultureUI, "{0}:constructor: file={1}", this.ToString(), AsmDudeToolsStatic.GetFilename(view.TextBuffer))); this.view_ = view ?? throw new ArgumentNullException(nameof(view)); this.state_ = state ?? throw new ArgumentNullException(nameof(state)); this.aggregator2_ = AsmDudeToolsStatic.GetOrCreate_Aggregator(view.TextBuffer, aggregatorFactory); this.asmDudeTools_ = asmDudeTools ?? throw new ArgumentNullException(nameof(asmDudeTools)); this.state_.CtrlKeyStateChanged += (sender, args) => { if (Settings.Default.AsmDoc_On) { if (this.state_.Enabled) { this.TryHighlightItemUnderMouse(this.RelativeToView(Mouse.PrimaryDevice.GetPosition(this.view_.VisualElement))); } else { this.Set_Highlight_Span(null); } } }; // Some other points to clear the highlight span: this.view_.LostAggregateFocus += (sender, args) => { AsmDudeToolsStatic.Output_INFO(string.Format(AsmDudeToolsStatic.CultureUI, "{0}:event: LostAggregateFocus", this.ToString())); this.Set_Highlight_Span(null); }; this.view_.VisualElement.MouseLeave += (sender, args) => { AsmDudeToolsStatic.Output_INFO(string.Format(AsmDudeToolsStatic.CultureUI, "{0}:event: MouseLeave", this.ToString())); this.Set_Highlight_Span(null); }; }
public IMouseProcessor GetAssociatedProcessor(IWpfTextView view) { //AsmDudeToolsStatic.Output_INFO("AsmDocMouseHandlerProvider:GetAssociatedProcessor: file=" + AsmDudeToolsStatic.GetFileName(view.TextBuffer)); IOleCommandTarget shellCommandDispatcher = this._globalServiceProvider.GetService(typeof(SUIHostCommandDispatcher)) as IOleCommandTarget; if (shellCommandDispatcher == null) { return(null); } else { var buffer = view.TextBuffer; return(new AsmDocMouseHandler( view, shellCommandDispatcher, this._aggregatorFactory.GetClassifier(buffer), this._navigatorService.GetTextStructureNavigator(buffer), CtrlKeyState.GetStateForView(view), AsmDudeTools.Instance)); } }
public AsmDocKeyProcessor(CtrlKeyState state) { this.state_ = state; }
public AsmDocKeyProcessor(CtrlKeyState state) { _state = state; }
public KeyProcessor GetAssociatedProcessor(IWpfTextView view) { return(view.Properties.GetOrCreateSingletonProperty(typeof(AsmDocKeyProcessor), () => new AsmDocKeyProcessor(CtrlKeyState.GetStateForView(view)))); }