Isar toplevel editor model.
authorwenzelm
Fri, 19 Sep 2008 22:11:50 +0200
changeset 28305 5097b8c0f59f
parent 28304 4b0477452943
child 28306 e2f091391865
Isar toplevel editor model.
src/Pure/Isar/isar.scala
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Pure/Isar/isar.scala	Fri Sep 19 22:11:50 2008 +0200
@@ -0,0 +1,29 @@
+/*  Title:      Pure/Isar/isar.scala
+    ID:         $Id$
+    Author:     Makarius
+    Options:    :folding=explicit:collapseFolds=1:
+
+Isar toplevel editor model.
+*/
+
+package isabelle
+
+import java.util.Properties
+
+
+class Isar(args: String*) extends IsabelleProcess(args: _*) {
+
+  /* basic editor commands */
+
+  def create_command(props: Properties, text: String) =
+    output_sync("Isar.command " + IsabelleSyntax.encode_properties(props) + " " +
+      IsabelleSyntax.encode_string(text))
+
+  def insert_command(prev: String, id: String) =
+    output_sync("Isar.insert " + IsabelleSyntax.encode_string(prev) + " " +
+      IsabelleSyntax.encode_string(id))
+
+  def remove_command(id: String) =
+    output_sync("Isar.remove " + IsabelleSyntax.encode_string(id))
+
+}