src/Pure/Isar/isar.scala
author wenzelm
Thu Jun 25 13:25:35 2009 +0200 (2009-06-25 ago)
changeset 31797 203d5e61e3bc
parent 29313 6852248da4b4
child 32448 a89f876731c5
permissions -rw-r--r--
renamed IsabelleProcess to Isabelle_Process;
renamed IsabelleSystem to Isabelle_System;
     1 /*  Title:      Pure/Isar/isar.scala
     2     Author:     Makarius
     3 
     4 Isar document model.
     5 */
     6 
     7 package isabelle
     8 
     9 
    10 class Isar(isabelle_system: Isabelle_System,
    11     results: EventBus[Isabelle_Process.Result], args: String*)
    12   extends Isabelle_Process(isabelle_system, results, args: _*)
    13 {
    14   /* basic editor commands */
    15 
    16   def create_command(id: String, text: String) =
    17     output_sync("Isar.command " + IsabelleSyntax.encode_string(id) + " " +
    18       IsabelleSyntax.encode_string(text))
    19 
    20   def insert_command(prev: String, id: String) =
    21     output_sync("Isar.insert " + IsabelleSyntax.encode_string(prev) + " " +
    22       IsabelleSyntax.encode_string(id))
    23 
    24   def remove_command(id: String) =
    25     output_sync("Isar.remove " + IsabelleSyntax.encode_string(id))
    26 }