static void OnLineCountChanged(object ob, LineCountEventArgs a)
 {
     lock (breakpoints) {
         foreach (Breakpoint bp in breakpoints.GetBreakpoints())
         {
             if (bp.FileName == a.TextFile.Name)
             {
                 if (bp.Line > a.LineNumber)
                 {
                     // If the line that has the breakpoint is deleted, delete the breakpoint, otherwise update the line #.
                     if (bp.Line + a.LineCount >= a.LineNumber)
                     {
                         breakpoints.UpdateBreakpointLine(bp, bp.Line + a.LineCount);
                     }
                     else
                     {
                         breakpoints.Remove(bp);
                     }
                 }
                 else if (bp.Line == a.LineNumber && a.LineCount < 0)
                 {
                     breakpoints.Remove(bp);
                 }
             }
         }
     }
 }
Beispiel #2
0
        public void UpdateDisplay()
        {
            if (tree.IsRealized)
            {
                tree.ScrollToPoint(0, 0);
            }

            treeState.Save();

            store.Clear();
            if (breakpoints != null)
            {
                lock (breakpoints) {
                    foreach (Breakpoint bp in breakpoints.GetBreakpoints())
                    {
                        string hitCount = bp.HitCountMode != HitCountMode.None ? bp.CurrentHitCount.ToString() : "";
                        string traceExp = bp.HitAction == HitAction.PrintExpression ? bp.TraceExpression : "";
                        string traceVal = bp.HitAction == HitAction.PrintExpression ? bp.LastTraceValue : "";
                        string name;

                        if (bp is FunctionBreakpoint)
                        {
                            FunctionBreakpoint fb = (FunctionBreakpoint)bp;

                            if (fb.ParamTypes != null)
                            {
                                name = fb.FunctionName + "(" + string.Join(", ", fb.ParamTypes) + ")";
                            }
                            else
                            {
                                name = fb.FunctionName;
                            }
                        }
                        else
                        {
                            name = string.Format("{0}:{1},{2}", ((Breakpoint)bp).FileName, bp.Line, bp.Column);
                        }

                        if (bp.Enabled)
                        {
                            store.AppendValues("md-breakpoint", true, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
                        }
                        else
                        {
                            store.AppendValues("md-breakpoint-disabled", false, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
                        }
                    }
                }
            }

            treeState.Load();
        }
 internal void BindAll(BreakpointStore bps)
 {
     lock (watches) {
         foreach (PinnedWatch w in watches)
         {
             foreach (Breakpoint bp in bps.GetBreakpoints())
             {
                 if (bp.HitAction == HitAction.PrintExpression && bp.TraceExpression == "{" + w.Expression + "}" && bp.FileName == w.File && bp.Line == w.Line)
                 {
                     Bind(w, bp);
                 }
             }
         }
     }
 }
Beispiel #4
0
 internal void BindAll(BreakpointStore bps)
 {
     lock (watches) {
         foreach (var watch in watches)
         {
             foreach (var bp in bps.GetBreakpoints())
             {
                 if ((bp.HitAction & HitAction.PrintExpression) != HitAction.None &&
                     bp.TraceExpression == "{" + watch.Expression + "}" && bp.FileName == watch.File && bp.Line == watch.Line)
                 {
                     Bind(watch, bp);
                 }
             }
         }
     }
 }
        public void UpdateDisplay()
        {
            treeState.Save();

            store.Clear();
            if (bps != null)
            {
                foreach (Breakpoint bp in bps.GetBreakpoints())
                {
                    string traceExp = bp.HitAction == HitAction.PrintExpression ? bp.TraceExpression : "";
                    string traceVal = bp.HitAction == HitAction.PrintExpression ? bp.LastTraceValue : "";
                    string hitCount = bp.HitCount > 0 ? bp.HitCount.ToString() : "";
                    string name;

                    if (bp is FunctionBreakpoint)
                    {
                        FunctionBreakpoint fb = (FunctionBreakpoint)bp;

                        if (fb.ParamTypes != null)
                        {
                            name = fb.FunctionName + "(" + string.Join(", ", fb.ParamTypes) + ")";
                        }
                        else
                        {
                            name = fb.FunctionName;
                        }
                    }
                    else
                    {
                        name = ((Breakpoint)bp).FileName + ":" + bp.Line.ToString();
                    }

                    if (bp.Enabled)
                    {
                        store.AppendValues("md-breakpoint", true, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
                    }
                    else
                    {
                        store.AppendValues("md-breakpoint-disabled", false, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
                    }
                }
            }
            treeState.Load();
        }
Beispiel #6
0
        static void OnLineCountChanged(object ob, LineCountEventArgs a)
        {
            List <Breakpoint> bps = new List <Breakpoint> (breakpoints.GetBreakpoints());

            foreach (Breakpoint bp in bps)
            {
                if (bp.FileName == a.TextFile.Name)
                {
                    if (bp.Line > a.LineNumber)
                    {
                        // If the line that has the breakpoint is deleted, delete the breakpoint
                        breakpoints.Remove(bp);
                        if (bp.Line + a.LineCount >= a.LineNumber)
                        {
                            breakpoints.Add(bp.FileName, bp.Line + a.LineCount);
                        }
                    }
                    else if (bp.Line == a.LineNumber && a.LineCount < 0)
                    {
                        breakpoints.Remove(bp);
                    }
                }
            }
        }
Beispiel #7
0
        public void UpdateDisplay()
        {
            treeState.Save();

            store.Clear();
            if (bps != null)
            {
                foreach (Breakpoint bp in bps.GetBreakpoints())
                {
                    string traceExp = bp.HitAction == HitAction.PrintExpression ? bp.TraceExpression : "";
                    string traceVal = bp.HitAction == HitAction.PrintExpression ? bp.LastTraceValue : "";
                    string hitCount = bp.HitCount > 0 ? bp.HitCount.ToString() : "";
                    if (bp.Enabled)
                    {
                        store.AppendValues("md-breakpoint", true, bp.FileName + ":" + bp.Line.ToString(), bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
                    }
                    else
                    {
                        store.AppendValues("md-breakpoint-disabled", false, bp.FileName + ":" + bp.Line.ToString(), bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
                    }
                }
            }
            treeState.Load();
        }
		internal void BindAll (BreakpointStore bps)
		{
			lock (watches) {
				foreach (PinnedWatch w in watches) {
					foreach (Breakpoint bp in bps.GetBreakpoints ()) {
						if ((bp.HitAction & HitAction.PrintExpression) != HitAction.None &&
							bp.TraceExpression == "{" + w.Expression + "}" && bp.FileName == w.File && bp.Line == w.Line)
							Bind (w, bp);
					}
				}
			}
		}