src/Pure/PIDE/protocol.ML
changeset 47346 cd3ab7625519
parent 47343 b8aeab386414
child 47388 fe4b245af74c
equal deleted inserted replaced
47345:193251980a73 47346:cd3ab7625519
    17     (fn [] => Document.discontinue_execution (Document.state ()));
    17     (fn [] => Document.discontinue_execution (Document.state ()));
    18 
    18 
    19 val _ =
    19 val _ =
    20   Isabelle_Process.protocol_command "Document.cancel_execution"
    20   Isabelle_Process.protocol_command "Document.cancel_execution"
    21     (fn [] => ignore (Document.cancel_execution (Document.state ())));
    21     (fn [] => ignore (Document.cancel_execution (Document.state ())));
    22 
       
    23 val _ =
       
    24   Isabelle_Process.protocol_command "Document.update_perspective"
       
    25     (fn [old_id_string, new_id_string, name, ids_yxml] => Document.change_state (fn state =>
       
    26       let
       
    27         val old_id = Document.parse_id old_id_string;
       
    28         val new_id = Document.parse_id new_id_string;
       
    29         val ids = YXML.parse_body ids_yxml
       
    30           |> let open XML.Decode in list int end;
       
    31 
       
    32         val _ = Future.join_tasks (Document.cancel_execution state);
       
    33       in
       
    34         state
       
    35         |> Document.update_perspective old_id new_id name ids
       
    36         |> Document.execute new_id
       
    37       end));
       
    38 
    22 
    39 val _ =
    23 val _ =
    40   Isabelle_Process.protocol_command "Document.update"
    24   Isabelle_Process.protocol_command "Document.update"
    41     (fn [old_id_string, new_id_string, edits_yxml] => Document.change_state (fn state =>
    25     (fn [old_id_string, new_id_string, edits_yxml] => Document.change_state (fn state =>
    42       let
    26       let