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;
wenzelm@28305
     1
/*  Title:      Pure/Isar/isar.scala
wenzelm@28305
     2
    Author:     Makarius
wenzelm@28305
     3
wenzelm@29313
     4
Isar document model.
wenzelm@28305
     5
*/
wenzelm@28305
     6
wenzelm@28305
     7
package isabelle
wenzelm@28305
     8
wenzelm@28305
     9
wenzelm@31797
    10
class Isar(isabelle_system: Isabelle_System,
wenzelm@31797
    11
    results: EventBus[Isabelle_Process.Result], args: String*)
wenzelm@31797
    12
  extends Isabelle_Process(isabelle_system, results, args: _*)
wenzelm@29192
    13
{
wenzelm@28305
    14
  /* basic editor commands */
wenzelm@28305
    15
wenzelm@29313
    16
  def create_command(id: String, text: String) =
wenzelm@29313
    17
    output_sync("Isar.command " + IsabelleSyntax.encode_string(id) + " " +
wenzelm@28305
    18
      IsabelleSyntax.encode_string(text))
wenzelm@28305
    19
wenzelm@28305
    20
  def insert_command(prev: String, id: String) =
wenzelm@28305
    21
    output_sync("Isar.insert " + IsabelleSyntax.encode_string(prev) + " " +
wenzelm@28305
    22
      IsabelleSyntax.encode_string(id))
wenzelm@28305
    23
wenzelm@28305
    24
  def remove_command(id: String) =
wenzelm@28305
    25
    output_sync("Isar.remove " + IsabelleSyntax.encode_string(id))
wenzelm@28305
    26
}