src/Tools/jEdit/src/find_dockable.scala
changeset 56715 52125652e82a
parent 56662 f373fb77e0a4
child 56751 2080e752ed40
     1.1 --- a/src/Tools/jEdit/src/find_dockable.scala	Fri Apr 25 12:27:18 2014 +0200
     1.2 +++ b/src/Tools/jEdit/src/find_dockable.scala	Fri Apr 25 12:51:08 2014 +0200
     1.3 @@ -9,8 +9,6 @@
     1.4  
     1.5  import isabelle._
     1.6  
     1.7 -import scala.actors.Actor._
     1.8 -
     1.9  import scala.swing.{Button, Component, TextField, CheckBox, Label, ComboBox}
    1.10  import scala.swing.event.ButtonClicked
    1.11  
    1.12 @@ -68,23 +66,16 @@
    1.13    })
    1.14  
    1.15  
    1.16 -  /* main actor */
    1.17 +  /* main */
    1.18  
    1.19 -  private val main_actor = actor {
    1.20 -    loop {
    1.21 -      react {
    1.22 -        case _: Session.Global_Options =>
    1.23 -          Swing_Thread.later { handle_resize() }
    1.24 -
    1.25 -        case bad =>
    1.26 -          System.err.println("Find_Dockable: ignoring bad message " + bad)
    1.27 -      }
    1.28 +  private val main =
    1.29 +    Session.Consumer[Session.Global_Options](getClass.getName) {
    1.30 +      case _: Session.Global_Options => Swing_Thread.later { handle_resize() }
    1.31      }
    1.32 -  }
    1.33  
    1.34    override def init()
    1.35    {
    1.36 -    PIDE.session.global_options += main_actor
    1.37 +    PIDE.session.global_options += main
    1.38      handle_resize()
    1.39      find_theorems.activate()
    1.40    }
    1.41 @@ -92,7 +83,7 @@
    1.42    override def exit()
    1.43    {
    1.44      find_theorems.deactivate()
    1.45 -    PIDE.session.global_options -= main_actor
    1.46 +    PIDE.session.global_options -= main
    1.47      delay_resize.revoke()
    1.48    }
    1.49