# HG changeset patch
# User wenzelm
# Date 1378480848 -7200
# Node ID b99d006afbfe926c007afc9129f5e57340a9180a
# Parent 5bef05f5ed5848bd0681594c097cdb3453cf6fd0
prefer Isabelle/Scala over bash;
diff -r 5bef05f5ed58 -r b99d006afbfe src/Tools/jEdit/lib/Tools/jedit
--- a/src/Tools/jEdit/lib/Tools/jedit Fri Sep 06 17:01:49 2013 +0200
+++ b/src/Tools/jEdit/lib/Tools/jedit Fri Sep 06 17:20:48 2013 +0200
@@ -330,23 +330,6 @@
## main
if [ "$BUILD_ONLY" = false ]; then
- mkdir -p "$JEDIT_SETTINGS/DockableWindowManager"
-
- if [ ! -e "$JEDIT_SETTINGS/perspective.xml" ]; then
- cat > "$JEDIT_SETTINGS/DockableWindowManager/perspective-view0.xml" <
-EOF
- cat > "$JEDIT_SETTINGS/perspective.xml" <
-
-
-
-
-
-
-EOF
- fi
-
if [ "$NO_BUILD" = false ]; then
"$ISABELLE_TOOL" build_dialog "${BUILD_DIALOG_OPTIONS[@]}"
RC="$?"
diff -r 5bef05f5ed58 -r b99d006afbfe src/Tools/jEdit/src/jedit_main.scala
--- a/src/Tools/jEdit/src/jedit_main.scala Fri Sep 06 17:01:49 2013 +0200
+++ b/src/Tools/jEdit/src/jedit_main.scala Fri Sep 06 17:20:48 2013 +0200
@@ -20,10 +20,27 @@
GUI.init_laf()
Isabelle_System.init()
- val file_args =
- if (args.isEmpty)
- Array(Isabelle_System.platform_path(Path.explode("$USER_HOME/Scratch.thy")))
- else args
+
+ /* settings directory */
+
+ val settings_dir = Path.explode("$JEDIT_SETTINGS")
+ Isabelle_System.mkdirs(settings_dir + Path.explode("DockableWindowManager"))
+
+ if (!(settings_dir + Path.explode("perspective.xml")).is_file) {
+ File.write(settings_dir + Path.explode("DockableWindowManager/perspective-view0.xml"),
+ """""")
+ File.write(settings_dir + Path.explode("perspective.xml"),
+ """
+
+
+
+
+
+""")
+ }
+
+
+ /* args */
val jedit_options =
Isabelle_System.getenv_strict("JEDIT_OPTIONS").split(" +")
@@ -31,10 +48,18 @@
val jedit_settings =
Array("-settings=" + Isabelle_System.platform_path(Path.explode("$JEDIT_SETTINGS")))
+ val more_args =
+ if (args.isEmpty)
+ Array(Isabelle_System.platform_path(Path.explode("$USER_HOME/Scratch.thy")))
+ else args
+
+
+ /* startup */
+
System.setProperty("jedit.home",
Isabelle_System.platform_path(Path.explode("$JEDIT_HOME/dist")))
- jEdit.main(jedit_options ++ jedit_settings ++ file_args)
+ jEdit.main(jedit_options ++ jedit_settings ++ more_args)
}
}