src/Pure/Isar/isar.scala
author wenzelm
Tue, 01 Sep 2009 21:03:04 +0200
changeset 32474 0818e6b1c8a6
parent 32448 a89f876731c5
permissions -rw-r--r--
Isabelle_Process: receiver as Actor, not EventBus; removed misleading Isabelle_Process.parse_message method -- use plain function instead;

/*  Title:      Pure/Isar/isar.scala
    Author:     Makarius

Isar document model.
*/

package isabelle

import scala.actors.Actor


class Isar(isabelle_system: Isabelle_System, receiver: Actor, args: String*)
  extends Isabelle_Process(isabelle_system, receiver, args: _*)
{
  /* basic editor commands */

  def create_command(id: String, text: String) =
    output_sync("Isar.command " + Isabelle_Syntax.encode_string(id) + " " +
      Isabelle_Syntax.encode_string(text))

  def insert_command(prev: String, id: String) =
    output_sync("Isar.insert " + Isabelle_Syntax.encode_string(prev) + " " +
      Isabelle_Syntax.encode_string(id))

  def remove_command(id: String) =
    output_sync("Isar.remove " + Isabelle_Syntax.encode_string(id))
}