[Monodevelop-patches-list] r1114 - in trunk/MonoDevelop/src: AddIns/DisplayBindings/SourceEditor/Gui Main/Base/Gui/Workbench Main/Base/Services
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Thu Mar 4 22:04:10 EST 2004
Author: tberman
Date: 2004-03-04 22:04:10 -0500 (Thu, 04 Mar 2004)
New Revision: 1114
Modified:
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorWidget.cs
trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs
trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
Log:
gui fixups, proper event loving.
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs 2004-03-05 02:37:15 UTC (rev 1113)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs 2004-03-05 03:04:10 UTC (rev 1114)
@@ -74,6 +74,16 @@
end_line.ForwardToLineEnd ();
ApplyTag (markup, begin_line, end_line);
}
+
+ public void UnMarkupLine (int line)
+ {
+ TextIter begin_line = GetIterAtLine (line);
+ TextIter end_line = begin_line;
+ begin_line.LineOffset = 0;
+ end_line.ForwardToLineEnd ();
+ RemoveTag (markup, begin_line, end_line);
+ }
+
public void LoadFile (string file, string mime)
{
LoadText (File.OpenText (file).ReadToEnd (), mime);
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2004-03-05 02:37:15 UTC (rev 1113)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2004-03-05 03:04:10 UTC (rev 1114)
@@ -91,6 +91,11 @@
{
se.ExecutingAt (line);
}
+
+ public void ClearExecutingAt (int line)
+ {
+ se.ClearExecutingAt (line);
+ }
public override Gtk.Widget Control {
get {
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2004-03-05 02:37:15 UTC (rev 1113)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2004-03-05 03:04:10 UTC (rev 1114)
@@ -100,11 +100,16 @@
public void ExecutingAt (int linenumber)
{
- buf.ClearMarks (SourceMarkerType.ExecutionMark);
buf.ToggleMark (linenumber, SourceMarkerType.ExecutionMark);
buf.MarkupLine (linenumber);
}
+ public void ClearExecutingAt (int linenumber)
+ {
+ buf.ToggleMark (linenumber, SourceMarkerType.ExecutionMark);
+ buf.UnMarkupLine (linenumber);
+ }
+
public void SimulateKeyPress (ref Gdk.EventKey evnt)
{
Gtk.Global.PropagateEvent (this, evnt);
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorWidget.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorWidget.cs 2004-03-05 02:37:15 UTC (rev 1113)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorWidget.cs 2004-03-05 03:04:10 UTC (rev 1114)
@@ -34,8 +34,13 @@
public void ExecutingAt (int linenumber)
{
View.ExecutingAt (linenumber);
- }
+ }
+ public void ClearExecutingAt (int linenumber)
+ {
+ View.ClearExecutingAt (linenumber);
+ }
+
public string Text {
get { return Buffer.Text; }
set { Buffer.Text = value; }
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs 2004-03-05 02:37:15 UTC (rev 1113)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs 2004-03-05 03:04:10 UTC (rev 1114)
@@ -22,6 +22,8 @@
using ICSharpCode.SharpDevelop.Gui.Components;
using ICSharpCode.SharpDevelop.Services;
+using MonoDevelop.Services;
+
namespace ICSharpCode.SharpDevelop.Gui
{
/// <summary>
@@ -36,6 +38,9 @@
ViewContentCollection workbenchContentCollection = new ViewContentCollection();
bool closeAll = false;
+
+ string cur_dbgFilename;
+ int cur_dbgLineNumber;
bool fullscreen;
#if !GTK
@@ -148,7 +153,33 @@
DeleteEvent += new Gtk.DeleteEventHandler (OnClosing);
this.Icon = resourceService.GetBitmap ("Icons.SharpDevelopIcon");
this.WindowPosition = Gtk.WindowPosition.None;
+
+ DebuggingService dbgr = (DebuggingService)ServiceManager.Services.GetService (typeof (DebuggingService));
+ dbgr.PausedEvent += new EventHandler (onDebuggerPaused);
+ dbgr.ResumedEvent += new EventHandler (onDebuggerResumed);
}
+
+ void onDebuggerPaused (object o, EventArgs e)
+ {
+ DebuggingService dbgr = (DebuggingService)ServiceManager.Services.GetService (typeof (DebuggingService));
+ cur_dbgFilename = dbgr.CurrentFilename;
+ cur_dbgLineNumber = dbgr.CurrentLineNumber - 1;
+
+ IFileService fs = (IFileService)ServiceManager.Services.GetService (typeof (IFileService));
+ fs.OpenFile (cur_dbgFilename);
+ if (ActiveWorkbenchWindow.ViewContent is IDebuggableEditor)
+ ((IDebuggableEditor)ActiveWorkbenchWindow.ViewContent).ExecutingAt (cur_dbgLineNumber);
+ }
+
+ void onDebuggerResumed (object o, EventArgs e)
+ {
+ foreach (IViewContent content in ViewContentCollection) {
+ if (content.ContentName != null && content.ContentName == cur_dbgFilename) {
+ ((IDebuggableEditor)content).ClearExecutingAt (cur_dbgLineNumber);
+ break;
+ }
+ }
+ }
public void InitializeWorkspace()
{
Modified: trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs 2004-03-05 02:37:15 UTC (rev 1113)
+++ trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs 2004-03-05 03:04:10 UTC (rev 1114)
@@ -20,6 +20,7 @@
public interface IDebuggableEditor {
void ExecutingAt (int lineNumber);
+ void ClearExecutingAt (int lineNumber);
}
public class DebuggingService : AbstractService
More information about the Monodevelop-patches-list
mailing list