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