src/Pure/Isar/isar.scala
changeset 28305 5097b8c0f59f
child 29140 e7ac5bb20aed
equal deleted inserted replaced
28304:4b0477452943 28305:5097b8c0f59f
       
     1 /*  Title:      Pure/Isar/isar.scala
       
     2     ID:         $Id$
       
     3     Author:     Makarius
       
     4     Options:    :folding=explicit:collapseFolds=1:
       
     5 
       
     6 Isar toplevel editor model.
       
     7 */
       
     8 
       
     9 package isabelle
       
    10 
       
    11 import java.util.Properties
       
    12 
       
    13 
       
    14 class Isar(args: String*) extends IsabelleProcess(args: _*) {
       
    15 
       
    16   /* basic editor commands */
       
    17 
       
    18   def create_command(props: Properties, text: String) =
       
    19     output_sync("Isar.command " + IsabelleSyntax.encode_properties(props) + " " +
       
    20       IsabelleSyntax.encode_string(text))
       
    21 
       
    22   def insert_command(prev: String, id: String) =
       
    23     output_sync("Isar.insert " + IsabelleSyntax.encode_string(prev) + " " +
       
    24       IsabelleSyntax.encode_string(id))
       
    25 
       
    26   def remove_command(id: String) =
       
    27     output_sync("Isar.remove " + IsabelleSyntax.encode_string(id))
       
    28 
       
    29 }