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);
                 }
             }
         }
     }
 }
 protected void OnLineCountEvent(LineCountEventArgs e)
 {
     try
     {
         LineCountEvent(this, e);
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #3
0
 void TextEditorService_LineCountChanged(object sender, LineCountEventArgs args)
 {
     Runtime.AssertMainThread();
     if (args.TextFile == null || args.TextFile.Name.IsNullOrEmpty)
     {
         return;
     }
     TaskListEntry [] ctasks = GetFileTasks(args.TextFile.Name.FullPath);
     foreach (TaskListEntry task in ctasks)
     {
         if (task.Line > args.LineNumber || (task.Line == args.LineNumber && task.Column >= args.Column))
         {
             if (task.SavedLine == -1)
             {
                 task.SavedLine = task.Line;
             }
             task.Line += args.LineCount;
         }
     }
     NotifyTasksChanged(ctasks);
 }
Beispiel #4
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);
                    }
                }
            }
        }
        static void LineCountChanged(object sender, LineCountEventArgs args)
        {
//			MonoDevelop.Projects.Text.ITextFile textFile = (MonoDevelop.Projects.Text.ITextFile) sender;
        }