28305
|
1 |
/* Title: Pure/Isar/isar.scala
|
|
2 |
Author: Makarius
|
|
3 |
|
|
4 |
Isar toplevel editor model.
|
|
5 |
*/
|
|
6 |
|
|
7 |
package isabelle
|
|
8 |
|
|
9 |
import java.util.Properties
|
|
10 |
|
|
11 |
|
|
12 |
class Isar(args: String*) extends IsabelleProcess(args: _*) {
|
|
13 |
|
|
14 |
/* basic editor commands */
|
|
15 |
|
|
16 |
def create_command(props: Properties, text: String) =
|
|
17 |
output_sync("Isar.command " + IsabelleSyntax.encode_properties(props) + " " +
|
|
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 |
|
|
27 |
}
|