src/Pure/System/session.scala
changeset 52760 8517172b9626
parent 52649 f45ab3e8211b
child 52766 36c3c051b355
equal deleted inserted replaced
52759:a20631db9c8a 52760:8517172b9626
   236 
   236 
   237 
   237 
   238   /* actor messages */
   238   /* actor messages */
   239 
   239 
   240   private case class Start(args: List[String])
   240   private case class Start(args: List[String])
   241   private case object Cancel_Execution
       
   242   private case class Change(
   241   private case class Change(
   243     doc_edits: List[Document.Edit_Command],
   242     doc_edits: List[Document.Edit_Command],
   244     previous: Document.Version,
   243     previous: Document.Version,
   245     version: Document.Version)
   244     version: Document.Version)
   246   private case class Messages(msgs: List[Isabelle_Process.Message])
   245   private case class Messages(msgs: List[Isabelle_Process.Message])
   502             handle_raw_edits(Nil)
   501             handle_raw_edits(Nil)
   503           }
   502           }
   504           global_options.event(Session.Global_Options(options))
   503           global_options.event(Session.Global_Options(options))
   505           reply(())
   504           reply(())
   506 
   505 
   507         case Cancel_Execution if prover.isDefined =>
       
   508           prover.get.cancel_execution()
       
   509 
       
   510         case Session.Raw_Edits(edits) if prover.isDefined =>
   506         case Session.Raw_Edits(edits) if prover.isDefined =>
   511           handle_raw_edits(edits)
   507           handle_raw_edits(edits)
   512           reply(())
   508           reply(())
   513 
   509 
   514         case Session.Dialog_Result(id, serial, result) if prover.isDefined =>
   510         case Session.Dialog_Result(id, serial, result) if prover.isDefined =>
   551     commands_changed_buffer !? Stop
   547     commands_changed_buffer !? Stop
   552     change_parser !? Stop
   548     change_parser !? Stop
   553     session_actor !? Stop
   549     session_actor !? Stop
   554   }
   550   }
   555 
   551 
   556   def cancel_execution() { session_actor ! Cancel_Execution }
       
   557 
       
   558   def update(edits: List[Document.Edit_Text])
   552   def update(edits: List[Document.Edit_Text])
   559   { if (!edits.isEmpty) session_actor !? Session.Raw_Edits(edits) }
   553   { if (!edits.isEmpty) session_actor !? Session.Raw_Edits(edits) }
   560 
   554 
   561   def update_options(options: Options)
   555   def update_options(options: Options)
   562   { session_actor !? Update_Options(options) }
   556   { session_actor !? Update_Options(options) }