[Monodevelop-patches-list] r1087 - in trunk/MonoDevelop/src: AddIns/DisplayBindings/SourceEditor/Gui Main/Base/Services
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Wed Mar 3 13:38:00 EST 2004
Author: tberman
Date: 2004-03-03 13:38:00 -0500 (Wed, 03 Mar 2004)
New Revision: 1087
Modified:
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
Log:
Add breakpoints to the debugging service.
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2004-03-03 11:42:42 UTC (rev 1086)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2004-03-03 18:38:00 UTC (rev 1087)
@@ -8,12 +8,15 @@
using ICSharpCode.Core.AddIns.Conditions;
using ICSharpCode.Core.AddIns;
using ICSharpCode.SharpDevelop.Internal.Templates;
+using ICSharpCode.Core.Services;
using MonoDevelop.SourceEditor.CodeCompletion;
using MonoDevelop.SourceEditor.InsightWindow;
using MonoDevelop.EditorBindings.Properties;
using MonoDevelop.EditorBindings.FormattingStrategy;
using MonoDevelop.Gui.Utils;
+using MonoDevelop.Services;
+
namespace MonoDevelop.SourceEditor.Gui {
public class SourceEditorView : SourceView, IFormattableDocument {
@@ -88,7 +91,10 @@
public void breakpointToggled (object o, EventArgs e)
{
if (lineToMark == -1) return;
- buf.ToggleMark (lineToMark, SourceMarkerType.BreakpointMark);
+ DebuggingService dbgr = (DebuggingService)ServiceManager.Services.GetService (typeof (DebuggingService));
+ bool canToggle = dbgr.ToggleBreakpoint (ParentEditor.DisplayBinding.ContentName, lineToMark);
+ if (canToggle)
+ buf.ToggleMark (lineToMark, SourceMarkerType.BreakpointMark);
lineToMark = -1;
}
Modified: trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs 2004-03-03 11:42:42 UTC (rev 1086)
+++ trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs 2004-03-03 18:38:00 UTC (rev 1087)
@@ -69,6 +69,15 @@
breakpoints.Remove (key);
}
+ public bool ToggleBreakpoint (string filename, int linenum)
+ {
+ if (!breakpoints.ContainsKey (filename + ":" + linenum))
+ return AddBreakpoint (filename, linenum);
+ else
+ RemoveBreakpoint (filename, linenum);
+ return true;
+ }
+
public void ToggleRunning ()
{
if (!Debugging)
More information about the Monodevelop-patches-list
mailing list