more default imports;
authorwenzelm
Tue Jul 22 12:05:53 2014 +0200 (2014-07-22)
changeset 576030f58af858813
parent 57602 0f708666eb7c
child 57604 30885e25c6de
more default imports;
src/Doc/JEdit/JEdit.thy
src/Tools/jEdit/src/scala_console.scala
     1.1 --- a/src/Doc/JEdit/JEdit.thy	Tue Jul 22 11:46:34 2014 +0200
     1.2 +++ b/src/Doc/JEdit/JEdit.thy	Tue Jul 22 12:05:53 2014 +0200
     1.3 @@ -553,17 +553,20 @@
     1.4    The \emph{Console} plugin manages various shells (command interpreters),
     1.5    e.g.\ \emph{BeanShell}, which is the official jEdit scripting language, and
     1.6    the cross-platform \emph{System} shell. Thus the console provides similar
     1.7 -  functionality than the special Emacs buffers @{verbatim "*scratch*"} and
     1.8 +  functionality than the Emacs buffers @{verbatim "*scratch*"} and
     1.9    @{verbatim "*shell*"}.
    1.10  
    1.11    Isabelle/jEdit extends the repertoire of the console by \emph{Scala}, which
    1.12    is the regular Scala toplevel loop running inside the same JVM process as
    1.13    Isabelle/jEdit itself. This means the Scala command interpreter has access
    1.14 -  to the JVM name space and state of the running Prover IDE application: the
    1.15 -  main entry points are @{verbatim view} (the current editor view of jEdit)
    1.16 -  and @{verbatim PIDE} (the Isabelle/jEdit plugin object). For example, the
    1.17 -  Scala expression @{verbatim "PIDE.snapshot(view)"} makes a PIDE document
    1.18 -  snapshot of the current buffer within the current editor view.
    1.19 +  to the JVM name space and state of the running Prover IDE application. The
    1.20 +  default environment imports the full content of packages @{verbatim
    1.21 +  "isabelle"} and @{verbatim "isabelle.jedit"}.
    1.22 +
    1.23 +  For example, @{verbatim PIDE} refers to the Isabelle/jEdit plugin object,
    1.24 +  and @{verbatim view} to the current editor view of jEdit. The Scala
    1.25 +  expression @{verbatim "PIDE.snapshot(view)"} makes a PIDE document snapshot
    1.26 +  of the current buffer within the current editor view.
    1.27  
    1.28    This helps to explore Isabelle/Scala functionality interactively. Some care
    1.29    is required to avoid interference with the internals of the running
     2.1 --- a/src/Tools/jEdit/src/scala_console.scala	Tue Jul 22 11:46:34 2014 +0200
     2.2 +++ b/src/Tools/jEdit/src/scala_console.scala	Tue Jul 22 12:05:53 2014 +0200
     2.3 @@ -153,7 +153,7 @@
     2.4        case Start(console) =>
     2.5          interp.bind("view", "org.gjt.sp.jedit.View", console.getView)
     2.6          interp.bind("console", "console.Console", console)
     2.7 -        interp.interpret("import isabelle.jedit.PIDE")
     2.8 +        interp.interpret("import isabelle._; import isabelle.jedit._")
     2.9          true
    2.10  
    2.11        case Execute(console, out, err, command) =>