tuned signature;
authorwenzelm
Sun, 15 Jan 2012 14:55:30 +0100
changeset 46224 9cb98d34f593
parent 46223 cf91e1944229
child 46226 e88e980ed735
tuned signature;
src/Tools/jEdit/src/isabelle_rendering.scala
src/Tools/jEdit/src/text_area_painter.scala
--- a/src/Tools/jEdit/src/isabelle_rendering.scala	Sun Jan 15 14:22:54 2012 +0100
+++ b/src/Tools/jEdit/src/isabelle_rendering.scala	Sun Jan 15 14:55:30 2012 +0100
@@ -78,15 +78,6 @@
 
   /* markup selectors */
 
-  def message_color(snapshot: Document.Snapshot, range: Text.Range): Stream[Text.Info[Color]] =
-    snapshot.select_markup(range,
-      Some(Set(Isabelle_Markup.WRITELN, Isabelle_Markup.WARNING, Isabelle_Markup.ERROR)),
-      {
-        case Text.Info(_, XML.Elem(Markup(Isabelle_Markup.WRITELN, _), _)) => regular_color
-        case Text.Info(_, XML.Elem(Markup(Isabelle_Markup.WARNING, _), _)) => warning_color
-        case Text.Info(_, XML.Elem(Markup(Isabelle_Markup.ERROR, _), _)) => error_color
-      })
-
   def tooltip_message(snapshot: Document.Snapshot, range: Text.Range): Option[String] =
   {
     val msgs =
@@ -115,6 +106,15 @@
         case Text.Info(_, XML.Elem(Markup(Isabelle_Markup.ERROR, _), _)) => error_icon
       }).map(_.info).toList.sortWith(_ >= _).headOption
 
+  def squiggly_underline(snapshot: Document.Snapshot, range: Text.Range): Stream[Text.Info[Color]] =
+    snapshot.select_markup(range,
+      Some(Set(Isabelle_Markup.WRITELN, Isabelle_Markup.WARNING, Isabelle_Markup.ERROR)),
+      {
+        case Text.Info(_, XML.Elem(Markup(Isabelle_Markup.WRITELN, _), _)) => regular_color
+        case Text.Info(_, XML.Elem(Markup(Isabelle_Markup.WARNING, _), _)) => warning_color
+        case Text.Info(_, XML.Elem(Markup(Isabelle_Markup.ERROR, _), _)) => error_color
+      })
+
   def background1(snapshot: Document.Snapshot, range: Text.Range): Stream[Text.Info[Color]] =
     for {
       Text.Info(r, result) <-
--- a/src/Tools/jEdit/src/text_area_painter.scala	Sun Jan 15 14:22:54 2012 +0100
+++ b/src/Tools/jEdit/src/text_area_painter.scala	Sun Jan 15 14:55:30 2012 +0100
@@ -16,7 +16,7 @@
 
 import org.gjt.sp.jedit.Debug
 import org.gjt.sp.jedit.syntax.{DisplayTokenHandler, Chunk}
-import org.gjt.sp.jedit.textarea.{TextAreaExtension, TextAreaPainter, JEditTextArea}
+import org.gjt.sp.jedit.textarea.{TextAreaExtension, TextAreaPainter}
 
 
 class Text_Area_Painter(doc_view: Document_View)
@@ -123,7 +123,7 @@
 
             // squiggly underline
             for {
-              Text.Info(range, color) <- Isabelle_Rendering.message_color(snapshot, line_range)
+              Text.Info(range, color) <- Isabelle_Rendering.squiggly_underline(snapshot, line_range)
               r <- gfx_range(range)
             } {
               gfx.setColor(color)
@@ -143,7 +143,7 @@
 
   /* text */
 
-  def char_width(): Int =
+  private def char_width(): Int =
   {
     val painter = text_area.getPainter
     val font = painter.getFont