public override void PostprocessMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            var line = GetLine(e);

            if (line == null)
            {
                return;
            }

            var markers = glyphTextViewMarkerService.GetSortedGlyphTextMarkers(line);

            IGlyphTextMarkerHandlerContext glyphTextMarkerHandlerContext = null;

            foreach (var marker in markers)
            {
                if (marker.Handler.MouseProcessor == null)
                {
                    continue;
                }
                if (glyphTextMarkerHandlerContext == null)
                {
                    glyphTextMarkerHandlerContext = new GlyphTextMarkerHandlerContext(wpfTextViewHost, margin, line);
                }
                marker.Handler.MouseProcessor.OnMouseLeftButtonDown(glyphTextMarkerHandlerContext, marker, e);
                if (e.Handled)
                {
                    return;
                }
            }

            if (glyphTextMarkerMouseProcessors.Length != 0)
            {
                var context = new GlyphTextMarkerMouseProcessorContext(wpfTextViewHost, margin, line, markers);
                foreach (var processor in glyphTextMarkerMouseProcessors)
                {
                    processor.OnMouseLeftButtonDown(context, e);
                    if (e.Handled)
                    {
                        return;
                    }
                }
            }
        }
Exemplo n.º 2
0
 public override GlyphTextMarkerToolTip GetToolTipContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker) => null;
Exemplo n.º 3
0
 public override FrameworkElement GetPopupContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker) => null;
Exemplo n.º 4
0
		/// <summary>
		/// Default mouse left button down handler
		/// </summary>
		/// <param name="context">Context</param>
		/// <param name="marker">Marker</param>
		/// <param name="e">Mouse event args</param>
		public virtual void OnMouseLeftButtonDown(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, MouseButtonEventArgs e) { }
        public override FrameworkElement GetPopupContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker)
        {
            var vm = new BreakpointGlyphPopupVM(showCodeBreakpointSettingsService.Value, (DbgCodeBreakpoint)marker.Tag);

            return(new BreakpointGlyphPopupControl(vm, context.Margin.VisualElement));
        }
 public abstract GlyphTextMarkerToolTip GetToolTipContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker);
        public override IEnumerable <GuidObject> GetContextMenuObjects(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, Point marginRelativePoint)
        {
            var bp = (DbgCodeBreakpoint)marker.Tag;

            yield return(new GuidObject(MenuConstants.GUIDOBJ_BREAKPOINT_GUID, bp));
        }
        GlyphTextMarkerToolTip IGlyphTextMarkerHandler.GetToolTipContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker)
        {
            var ilbp = GlyphTextMarkerHelper.ToILCodeBreakpoint(marker);

            return(new GlyphTextMarkerToolTip(GetToolTipContent(ilbp, context.TextView)));
        }
Exemplo n.º 9
0
 FrameworkElement?IGlyphTextMarkerHandler.GetPopupContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker) => null;
Exemplo n.º 10
0
 public override GlyphTextMarkerToolTip GetToolTipContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker) =>
 new GlyphTextMarkerToolTip(GetToolTipContent((object)marker.Tag, context.TextView, context.SpanProvider.GetSpan(marker)));
		IEnumerable<GuidObject> IGlyphTextMarkerHandler.GetContextMenuObjects(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, Point marginRelativePoint) {
			var ilbp = GlyphTextMarkerHelper.ToILCodeBreakpoint(marker);
			yield return new GuidObject(MenuConstants.GUIDOBJ_BREAKPOINT_GUID, ilbp);
		}
		GlyphTextMarkerToolTip IGlyphTextMarkerHandler.GetToolTipContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker) {
			var ilbp = GlyphTextMarkerHelper.ToILCodeBreakpoint(marker);
			return new GlyphTextMarkerToolTip(GetToolTipContent(ilbp, context.TextView));
		}
		FrameworkElement IGlyphTextMarkerHandler.GetPopupContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker) {
			return null;//TODO: Return debugger settings toolbar
		}
Exemplo n.º 14
0
		/// <summary>
		/// Default mouse move handler
		/// </summary>
		/// <param name="context">Context</param>
		/// <param name="marker">Marker</param>
		/// <param name="e">Mouse event args</param>
		public virtual void OnMouseMove(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, MouseEventArgs e) { }
Exemplo n.º 15
0
		/// <summary>
		/// Default mouse right button up handler
		/// </summary>
		/// <param name="context">Context</param>
		/// <param name="marker">Marker</param>
		/// <param name="e">Mouse event args</param>
		public virtual void OnMouseRightButtonUp(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, MouseButtonEventArgs e) { }
Exemplo n.º 16
0
        public override IEnumerable <GuidObject> GetContextMenuObjects(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, Point marginRelativePoint)
        {
            var bm = (Bookmark)marker.Tag;

            yield return(new GuidObject(MenuConstants.GUIDOBJ_BOOKMARK_GUID, bm));
        }
 FrameworkElement IGlyphTextMarkerHandler.GetPopupContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker)
 {
     return(null);           //TODO: Return debugger settings toolbar
 }
Exemplo n.º 18
0
 GlyphTextMarkerToolTip?IGlyphTextMarkerHandler.GetToolTipContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker) => null;
        IEnumerable <GuidObject> IGlyphTextMarkerHandler.GetContextMenuObjects(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, Point marginRelativePoint)
        {
            var ilbp = GlyphTextMarkerHelper.ToILCodeBreakpoint(marker);

            yield return(new GuidObject(MenuConstants.GUIDOBJ_BREAKPOINT_GUID, ilbp));
        }
Exemplo n.º 20
0
 IEnumerable <GuidObject> IGlyphTextMarkerHandler.GetContextMenuObjects(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, Point marginRelativePoint)
 {
     yield break;
 }
 public abstract IEnumerable <GuidObject> GetContextMenuObjects(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, Point marginRelativePoint);
Exemplo n.º 22
0
 /// <summary>
 /// Default mouse left button down handler
 /// </summary>
 /// <param name="context">Context</param>
 /// <param name="marker">Marker</param>
 /// <param name="e">Mouse event args</param>
 public virtual void OnMouseLeftButtonDown(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, MouseButtonEventArgs e)
 {
 }
 public abstract FrameworkElement GetPopupContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker);
Exemplo n.º 24
0
 /// <summary>
 /// Default mouse right button up handler
 /// </summary>
 /// <param name="context">Context</param>
 /// <param name="marker">Marker</param>
 /// <param name="e">Mouse event args</param>
 public virtual void OnMouseRightButtonUp(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, MouseButtonEventArgs e)
 {
 }
        public override GlyphTextMarkerToolTip GetToolTipContent(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker)
        {
            var bp = (DbgCodeBreakpoint)marker.Tag;

            return(new GlyphTextMarkerToolTip(GetToolTipContent(bp, context.TextView, context.SpanProvider.GetSpan(marker))));
        }
Exemplo n.º 26
0
 /// <summary>
 /// Default mouse move handler
 /// </summary>
 /// <param name="context">Context</param>
 /// <param name="marker">Marker</param>
 /// <param name="e">Mouse event args</param>
 public virtual void OnMouseMove(IGlyphTextMarkerHandlerContext context, IGlyphTextMarker marker, MouseEventArgs e)
 {
 }