Ejemplo n.º 1
0
        internal void SetBreakPointInfo(string filefullpath, int line, Boolean bDeleted, Boolean bEnabled)
        {
            if (!m_bAccessable)
            {
                return;
            }
            BreakPointInfo cbinfo = m_BreakPointList.Find(delegate(BreakPointInfo info)
            {
                return(info.FileFullPath == filefullpath && info.Line == line);
            });

            if (cbinfo != null)
            {
                bool oldv = !cbinfo.IsDeleted && cbinfo.IsEnabled;
                bool newv = !bDeleted && bEnabled;

                cbinfo.IsDeleted = bDeleted;
                cbinfo.IsEnabled = bEnabled;

                if (oldv != newv)
                {
                    if (PluginMain.debugManager.IsDebuggerStarted)
                    {
                        PluginMain.debugManager.ToggleBreakpoint(filefullpath, (uint)line);
                    }
                }
            }
            else if (!bDeleted)
            {
                m_BreakPointList.Add(new BreakPointInfo(filefullpath, line, bDeleted, bEnabled));

                if (PluginMain.debugManager.IsDebuggerStarted)
                {
                    PluginMain.debugManager.ToggleBreakpoint(filefullpath, (uint)line);
                }
            }

            if (ChangeBreakPointEvent != null)
            {
                ChangeBreakPointEvent(this, new BreakPointArgs(filefullpath, line, bDeleted, bEnabled));
            }
        }
Ejemplo n.º 2
0
 public void InitBreakPoints()
 {
     foreach (PluginCore.ITabbedDocument doc in PluginBase.MainForm.Documents)
     {
         if (Path.GetExtension(doc.SciControl.FileName) == ".lua")
         {
             List <int>     lines  = GetMarkers(doc.SciControl, ScintillaHelper.markerBPEnabled);
             BreakPointInfo cbinfo = m_BreakPointList.Find(delegate(BreakPointInfo info)
             {
                 return(info.FileFullPath == doc.FileName);
             });
             if (cbinfo != null)
             {
                 m_BreakPointList.Remove(cbinfo);
             }
             foreach (int i in lines)
             {
                 m_BreakPointList.Add(new BreakPointInfo(doc.SciControl.FileName, i, false, true));
             }
         }
     }
 }