Isabelle component;
authorwenzelm
Sat, 22 Aug 2009 23:17:09 +0200
changeset 34664 8f5fbe4a80ff
parent 34663 73d53ad05b14
child 34665 27243b0128cb
Isabelle component;
src/Tools/jEdit/dist-template/etc/settings
src/Tools/jEdit/dist-template/interface
src/Tools/jEdit/dist-template/lib/Tools/jedit
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Tools/jEdit/dist-template/etc/settings	Sat Aug 22 23:17:09 2009 +0200
@@ -0,0 +1,7 @@
+JEDIT_HOME="$COMPONENT"
+
+JEDIT_JAVA_OPTIONS=""
+#JEDIT_JAVA_OPTIONS="-server -Xms128m -Xmx512m"
+JEDIT_OPTIONS="-reuseview -noserver -nobackground"
+
+ISABELLE_TOOLS="$ISABELLE_TOOLS:$JEDIT_HOME/lib/Tools"
--- a/src/Tools/jEdit/dist-template/interface	Sat Aug 22 22:54:36 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-#!/usr/bin/env bash
-#
-# Isabelle/jEdit interface wrapper
-
-## diagnostics
-
-usage()
-{
-  echo
-  echo "Usage: isabelle jedit [OPTIONS] [FILES ...]"
-  echo
-  echo "  Options are:"
-  echo "    -J OPTION    add JVM runtime option"
-  echo "                 (default JEDIT_JAVA_OPTIONS=$JEDIT_JAVA_OPTIONS)"
-  echo "    -j OPTION    add jEdit runtime option"
-  echo "                 (default JEDIT_OPTIONS=$JEDIT_OPTIONS)"
-  echo "    -l NAME      logic image name (default ISABELLE_LOGIC=$ISABELLE_LOGIC)"
-  echo "    -m MODE      add print mode for output"
-  echo
-  echo "Starts jEdit with Isabelle plugin setup and opens theory FILES"
-  echo "(default ~/Scratch.thy)."
-  echo
-  exit 1
-}
-
-fail()
-{
-  echo "$1" >&2
-  exit 2
-}
-
-
-## process command line
-
-# options
-
-JEDIT_LOGIC="$ISABELLE_LOGIC"
-JEDIT_PRINT_MODE=""
-
-declare -a JAVA_OPTIONS; eval "JAVA_OPTIONS=($JEDIT_JAVA_OPTIONS)"
-declare -a OPTIONS; eval "OPTIONS=($JEDIT_OPTIONS)"
-
-while getopts "J:j:l:m:" OPT
-do
-  case "$OPT" in
-    J)
-      JAVA_OPTIONS["${#JAVA_OPTIONS[@]}"]="$OPTARG"
-      ;;
-    j)
-      OPTIONS["${#OPTIONS[@]}"]="$OPTARG"
-      ;;
-    l)
-      JEDIT_LOGIC="$OPTARG"
-      ;;
-    m)
-      if [ -z "$PRINT_MODE" ]; then
-        PRINT_MODE="$OPTARG"
-      else
-        PRINT_MODE="$PRINT_MODE,$OPTARG"
-      fi
-      ;;
-    \?)
-      usage
-      ;;
-  esac
-done
-
-shift $(($OPTIND - 1))
-
-
-# args
-
-declare -a FILES=()
-
-if [ "$#" -eq 0 ]; then
-  FILES["${#FILES[@]}"]="Scratch.thy"
-else
-  while [ "$#" -gt 0 ]; do
-    FILES["${#FILES[@]}"]="$(jvmpath "$1")"
-    shift
-  done
-fi
-
-
-## main
-
-case "$JEDIT_LOGIC" in
-  /*)
-    ;;
-  */*)
-    JEDIT_LOGIC="$(pwd -P)/$JEDIT_LOGIC"
-    ;;
-esac
-
-export JEDIT_LOGIC JEDIT_PRINT_MODE
-
-exec "$ISABELLE_TOOL" java "${JAVA_OPTIONS[@]}" \
-  -jar "$(jvmpath "$JEDIT_HOME/jedit.jar")" \
-  "-settings=$(jvmpath "$ISABELLE_HOME_USER/jedit")" "${OPTIONS[@]}" "${FILES[@]}"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Tools/jEdit/dist-template/lib/Tools/jedit	Sat Aug 22 23:17:09 2009 +0200
@@ -0,0 +1,104 @@
+#!/usr/bin/env bash
+#
+# Author: Makarius
+#
+# DESCRIPTION: Isabelle/jEdit interface wrapper
+
+
+## diagnostics
+
+PRG="$(basename "$0")"
+
+usage()
+{
+  echo
+  echo "Usage: isabelle $PRG [OPTIONS] [FILES ...]"
+  echo
+  echo "  Options are:"
+  echo "    -J OPTION    add JVM runtime option"
+  echo "                 (default JEDIT_JAVA_OPTIONS=$JEDIT_JAVA_OPTIONS)"
+  echo "    -j OPTION    add jEdit runtime option"
+  echo "                 (default JEDIT_OPTIONS=$JEDIT_OPTIONS)"
+  echo "    -l NAME      logic image name (default ISABELLE_LOGIC=$ISABELLE_LOGIC)"
+  echo "    -m MODE      add print mode for output"
+  echo
+  echo "Start jEdit with Isabelle plugin setup and opens theory FILES"
+  echo "(default ~/Scratch.thy)."
+  echo
+  exit 1
+}
+
+fail()
+{
+  echo "$1" >&2
+  exit 2
+}
+
+
+## process command line
+
+# options
+
+JEDIT_LOGIC="$ISABELLE_LOGIC"
+JEDIT_PRINT_MODE=""
+
+declare -a JAVA_OPTIONS; eval "JAVA_OPTIONS=($JEDIT_JAVA_OPTIONS)"
+declare -a OPTIONS; eval "OPTIONS=($JEDIT_OPTIONS)"
+
+while getopts "J:j:l:m:" OPT
+do
+  case "$OPT" in
+    J)
+      JAVA_OPTIONS["${#JAVA_OPTIONS[@]}"]="$OPTARG"
+      ;;
+    j)
+      OPTIONS["${#OPTIONS[@]}"]="$OPTARG"
+      ;;
+    l)
+      JEDIT_LOGIC="$OPTARG"
+      ;;
+    m)
+      if [ -z "$PRINT_MODE" ]; then
+        PRINT_MODE="$OPTARG"
+      else
+        PRINT_MODE="$PRINT_MODE,$OPTARG"
+      fi
+      ;;
+    \?)
+      usage
+      ;;
+  esac
+done
+
+shift $(($OPTIND - 1))
+
+
+# args
+
+declare -a FILES=()
+
+if [ "$#" -eq 0 ]; then
+  FILES["${#FILES[@]}"]="Scratch.thy"
+else
+  while [ "$#" -gt 0 ]; do
+    FILES["${#FILES[@]}"]="$(jvmpath "$1")"
+    shift
+  done
+fi
+
+
+## main
+
+case "$JEDIT_LOGIC" in
+  /*)
+    ;;
+  */*)
+    JEDIT_LOGIC="$(pwd -P)/$JEDIT_LOGIC"
+    ;;
+esac
+
+export JEDIT_LOGIC JEDIT_PRINT_MODE
+
+exec "$ISABELLE_TOOL" java "${JAVA_OPTIONS[@]}" \
+  -jar "$(jvmpath "$JEDIT_HOME/jedit.jar")" \
+  "-settings=$(jvmpath "$ISABELLE_HOME_USER/jedit")" "${OPTIONS[@]}" "${FILES[@]}"