default Isabelle application wrapper -- JVM entry point for Isabelle.exe;
authorwenzelm
Sun Apr 22 15:50:29 2012 +0200 (2012-04-22)
changeset 4766320e0865ae9e7
parent 47662 206bf8c4860d
child 47664 3f9681ca7040
default Isabelle application wrapper -- JVM entry point for Isabelle.exe;
src/Pure/System/main.scala
src/Pure/build-jars
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/Pure/System/main.scala	Sun Apr 22 15:50:29 2012 +0200
     1.3 @@ -0,0 +1,33 @@
     1.4 +/*  Title:      Pure/System/main.scala
     1.5 +    Author:     Makarius
     1.6 +
     1.7 +Default Isabelle application wrapper.
     1.8 +*/
     1.9 +
    1.10 +package isabelle
    1.11 +
    1.12 +import scala.swing.TextArea
    1.13 +
    1.14 +
    1.15 +object Main
    1.16 +{
    1.17 +  def main(args: Array[String]) =
    1.18 +  {
    1.19 +    val (out, rc) =
    1.20 +      try {
    1.21 +        Platform.init_laf()
    1.22 +        Isabelle_System.init()
    1.23 +        Isabelle_System.isabelle_tool("jedit", args: _*)
    1.24 +      }
    1.25 +      catch { case exn: Throwable => (Exn.message(exn), 2) }
    1.26 +
    1.27 +    if (rc != 0) {
    1.28 +      val text = new TextArea(out)
    1.29 +      text.editable = false
    1.30 +      Library.dialog(null, "Isabelle", "Isabelle output", text)
    1.31 +    }
    1.32 +
    1.33 +    System.exit(rc)
    1.34 +  }
    1.35 +}
    1.36 +
     2.1 --- a/src/Pure/build-jars	Sun Apr 22 15:19:46 2012 +0200
     2.2 +++ b/src/Pure/build-jars	Sun Apr 22 15:50:29 2012 +0200
     2.3 @@ -47,6 +47,7 @@
     2.4    System/isabelle_charset.scala
     2.5    System/isabelle_process.scala
     2.6    System/isabelle_system.scala
     2.7 +  System/main.scala
     2.8    System/platform.scala
     2.9    System/session.scala
    2.10    System/session_manager.scala