src/Tools/jEdit/src/debugger_dockable.scala
changeset 60932 13ee73f57c85
parent 60910 79abcf48c377
child 60936 2751f7f31be2
equal deleted inserted replaced
60931:f4bc0400bd15 60932:13ee73f57c85
   227   tree_pane.verticalScrollBarPolicy = ScrollPane.BarPolicy.Always
   227   tree_pane.verticalScrollBarPolicy = ScrollPane.BarPolicy.Always
   228   tree_pane.minimumSize = new Dimension(200, 100)
   228   tree_pane.minimumSize = new Dimension(200, 100)
   229 
   229 
   230 
   230 
   231   /* controls */
   231   /* controls */
       
   232 
       
   233   private val break_button = new CheckBox("Break") {
       
   234     tooltip = "Break running threads at next possible breakpoint"
       
   235     selected = Debugger.is_break()
       
   236     reactions += { case ButtonClicked(_) => Debugger.set_break(selected) }
       
   237   }
   232 
   238 
   233   private val continue_button = new Button("Continue") {
   239   private val continue_button = new Button("Continue") {
   234     tooltip = "Continue program on current thread, until next breakpoint"
   240     tooltip = "Continue program on current thread, until next breakpoint"
   235     reactions += { case ButtonClicked(_) => thread_selection().map(Debugger.continue(_)) }
   241     reactions += { case ButtonClicked(_) => thread_selection().map(Debugger.continue(_)) }
   236   }
   242   }
   303 
   309 
   304   private val zoom = new Font_Info.Zoom_Box { def changed = handle_resize() }
   310   private val zoom = new Font_Info.Zoom_Box { def changed = handle_resize() }
   305 
   311 
   306   private val controls =
   312   private val controls =
   307     new Wrap_Panel(Wrap_Panel.Alignment.Right)(
   313     new Wrap_Panel(Wrap_Panel.Alignment.Right)(
   308       continue_button, step_button, step_over_button, step_out_button,
   314       break_button, continue_button, step_button, step_over_button, step_out_button,
   309       context_label, Component.wrap(context_field),
   315       context_label, Component.wrap(context_field),
   310       expression_label, Component.wrap(expression_field), eval_button, sml_button,
   316       expression_label, Component.wrap(expression_field), eval_button, sml_button,
   311       pretty_text_area.search_label, pretty_text_area.search_field, zoom)
   317       pretty_text_area.search_label, pretty_text_area.search_field, zoom)
   312   add(controls.peer, BorderLayout.NORTH)
   318   add(controls.peer, BorderLayout.NORTH)
   313 
   319 
   344     Session.Consumer[Any](getClass.getName) {
   350     Session.Consumer[Any](getClass.getName) {
   345       case _: Session.Global_Options =>
   351       case _: Session.Global_Options =>
   346         GUI_Thread.later { handle_resize() }
   352         GUI_Thread.later { handle_resize() }
   347 
   353 
   348       case Debugger.Update =>
   354       case Debugger.Update =>
   349         GUI_Thread.later { handle_update() }
   355         GUI_Thread.later {
       
   356           break_button.selected = Debugger.is_break()
       
   357           handle_update()
       
   358         }
   350     }
   359     }
   351 
   360 
   352   override def init()
   361   override def init()
   353   {
   362   {
   354     PIDE.session.global_options += main
   363     PIDE.session.global_options += main