[Monodevelop-patches-list] r2215 - trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Mon Jan 31 18:50:13 EST 2005
Author: jluke
Date: 2005-01-31 18:50:13 -0500 (Mon, 31 Jan 2005)
New Revision: 2215
Modified:
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
Log:
fix
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs 2005-01-31 23:17:28 UTC (rev 2214)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs 2005-01-31 23:50:13 UTC (rev 2215)
@@ -86,7 +86,17 @@
public bool UnderlineErrors {
get { return underlineErrors; }
- set { underlineErrors = value; }
+ set {
+ underlineErrors = value;
+ if (underlineErrors) {
+ points = new ArrayList ();
+ ps.ParseInformationChanged += (ParseInformationEventHandler) Runtime.DispatchService.GuiDispatch (new ParseInformationEventHandler (ParseChanged));
+ GLib.Timeout.Add (75, new GLib.TimeoutHandler (DrawErrors));
+ }
+ else {
+ ps.ParseInformationChanged -= (ParseInformationEventHandler) Runtime.DispatchService.GuiDispatch (new ParseInformationEventHandler (ParseChanged));
+ }
+ }
}
public SourceEditorBuffer (SourceEditorView view) : this ()
@@ -109,10 +119,6 @@
highlightLineTag = new TextTag ("highlightLine");
highlightLineTag.Background = "lightgrey";
TagTable.Add (highlightLineTag);
-
- points = new ArrayList ();
- ps.ParseInformationChanged += new ParseInformationEventHandler (ParseChanged);
- GLib.Timeout.Add (50, new GLib.TimeoutHandler (DrawErrors));
}
public void ParseChanged (object o, ParseInformationEventArgs e)
@@ -143,7 +149,7 @@
// FIXME: clear old ones nicer
RemoveTag (compilation_error, StartIter, EndIter);
if (!underlineErrors)
- return true;
+ return false;
foreach (int[] point in points) {
//Console.WriteLine ("Error is line: {0} col: {1}", point[0], point[1]);
@@ -154,6 +160,7 @@
ApplyTag (compilation_error, start, end);
}
+ // keep it running
return true;
}
More information about the Monodevelop-patches-list
mailing list