src/Tools/jEdit/src/raw_output_dockable.scala
changeset 56715 52125652e82a
parent 56385 76acce58aeab
child 57612 990ffb84489b
     1.1 --- a/src/Tools/jEdit/src/raw_output_dockable.scala	Fri Apr 25 12:27:18 2014 +0200
     1.2 +++ b/src/Tools/jEdit/src/raw_output_dockable.scala	Fri Apr 25 12:51:08 2014 +0200
     1.3 @@ -9,7 +9,6 @@
     1.4  
     1.5  import isabelle._
     1.6  
     1.7 -import scala.actors.Actor._
     1.8  import scala.swing.{TextArea, ScrollPane}
     1.9  
    1.10  import org.gjt.sp.jedit.View
    1.11 @@ -21,22 +20,17 @@
    1.12    set_content(new ScrollPane(text_area))
    1.13  
    1.14  
    1.15 -  /* main actor */
    1.16 +  /* main */
    1.17  
    1.18 -  private val main_actor = actor {
    1.19 -    loop {
    1.20 -      react {
    1.21 -        case output: Prover.Output =>
    1.22 -          Swing_Thread.later {
    1.23 -            text_area.append(XML.content(output.message))
    1.24 -            if (!output.is_stdout && !output.is_stderr) text_area.append("\n")
    1.25 -          }
    1.26 +  private val main =
    1.27 +    Session.Consumer[Prover.Output](getClass.getName) {
    1.28 +      case output: Prover.Output =>
    1.29 +        Swing_Thread.later {
    1.30 +          text_area.append(XML.content(output.message))
    1.31 +          if (!output.is_stdout && !output.is_stderr) text_area.append("\n")
    1.32 +        }
    1.33 +    }
    1.34  
    1.35 -        case bad => System.err.println("Raw_Output_Dockable: ignoring bad message " + bad)
    1.36 -      }
    1.37 -    }
    1.38 -  }
    1.39 -
    1.40 -  override def init() { PIDE.session.raw_output_messages += main_actor }
    1.41 -  override def exit() { PIDE.session.raw_output_messages -= main_actor }
    1.42 +  override def init() { PIDE.session.raw_output_messages += main }
    1.43 +  override def exit() { PIDE.session.raw_output_messages -= main }
    1.44  }