clarified module name;
authorwenzelm
Mon, 21 Mar 2022 11:55:51 +0100
changeset 75291 e4d6b9bd5071
parent 75290 c9ee3028c125
child 75292 4ce0a4d90dfa
clarified module name;
Admin/Windows/launch4j/isabelle.xml
etc/build.props
src/Doc/System/Environment.thy
src/Pure/Admin/build_release.scala
src/Tools/jEdit/lib/Tools/jedit
src/Tools/jEdit/src/jedit_main.scala
src/Tools/jEdit/src/main.scala
--- a/Admin/Windows/launch4j/isabelle.xml	Mon Mar 21 11:40:11 2022 +0100
+++ b/Admin/Windows/launch4j/isabelle.xml	Mon Mar 21 11:55:51 2022 +0100
@@ -15,7 +15,7 @@
   <manifest></manifest>
   <icon>{ICON}</icon>
   <classPath>
-    <mainClass>isabelle.jedit.Main</mainClass>
+    <mainClass>isabelle.jedit.JEdit_Main</mainClass>
 {CLASSPATH}
   </classPath>
   <singleInstance>
--- a/etc/build.props	Mon Mar 21 11:40:11 2022 +0100
+++ b/etc/build.props	Mon Mar 21 11:55:51 2022 +0100
@@ -1,6 +1,6 @@
 title = Isabelle/Scala
 module = $ISABELLE_HOME/lib/classes/isabelle.jar
-main = isabelle.jedit.Main
+main = isabelle.jedit.JEdit_Main
 resources = \
   lib/services/java.nio.charset.spi.CharsetProvider:META-INF/services/ \
   lib/logo/isabelle_transparent-32.gif:isabelle/ \
@@ -246,6 +246,7 @@
   src/Tools/jEdit/src/jedit_bibtex.scala \
   src/Tools/jEdit/src/jedit_editor.scala \
   src/Tools/jEdit/src/jedit_lib.scala \
+  src/Tools/jEdit/src/jedit_main.scala \
   src/Tools/jEdit/src/jedit_options.scala \
   src/Tools/jEdit/src/jedit_plugins.scala \
   src/Tools/jEdit/src/jedit_rendering.scala \
@@ -253,7 +254,6 @@
   src/Tools/jEdit/src/jedit_sessions.scala \
   src/Tools/jEdit/src/jedit_spell_checker.scala \
   src/Tools/jEdit/src/keymap_merge.scala \
-  src/Tools/jEdit/src/main.scala \
   src/Tools/jEdit/src/main_plugin.scala \
   src/Tools/jEdit/src/monitor_dockable.scala \
   src/Tools/jEdit/src/output_dockable.scala \
--- a/src/Doc/System/Environment.thy	Mon Mar 21 11:40:11 2022 +0100
+++ b/src/Doc/System/Environment.thy	Mon Mar 21 11:55:51 2022 +0100
@@ -459,7 +459,7 @@
 text \<open>
   The subsequent example creates a raw Java process on the command-line and
   invokes the main Isabelle application entry point:
-  @{verbatim [display] \<open>isabelle_java -Djava.awt.headless=false isabelle.jedit.Main\<close>}
+  @{verbatim [display] \<open>isabelle_java -Djava.awt.headless=false isabelle.jedit.JEdit_Main\<close>}
 \<close>
 
 
--- a/src/Pure/Admin/build_release.scala	Mon Mar 21 11:40:11 2022 +0100
+++ b/src/Pure/Admin/build_release.scala	Mon Mar 21 11:55:51 2022 +0100
@@ -316,7 +316,7 @@
   -classpath """" + classpath.map(p => "$ISABELLE_HOME/" + p.implode).mkString(":") + """" \
   "-splash:$ISABELLE_HOME/lib/logo/isabelle.gif" \
 """ + (if (dock_icon) """"-Xdock:icon=$ISABELLE_HOME/lib/logo/isabelle_transparent-128.png" \
-""" else "") + """isabelle.jedit.Main "$@"
+""" else "") + """isabelle.jedit.JEdit_Main "$@"
 """
     val script_path = isabelle_target + Path.explode("lib/scripts/Isabelle_app")
     File.write(script_path, script)
--- a/src/Tools/jEdit/lib/Tools/jedit	Mon Mar 21 11:40:11 2022 +0100
+++ b/src/Tools/jEdit/lib/Tools/jedit	Mon Mar 21 11:55:51 2022 +0100
@@ -164,5 +164,5 @@
     JEDIT_INCLUDE_SESSIONS JEDIT_PRINT_MODE JEDIT_NO_BUILD JEDIT_BUILD_MODE
   export JEDIT_ML_PROCESS_POLICY="$ML_PROCESS_POLICY"
   exec isabelle java -splash:"$(platform_path "$ISABELLE_HOME/lib/logo/isabelle.gif")" \
-    "${JAVA_ARGS[@]}" isabelle.jedit.Main "${ARGS[@]}"
+    "${JAVA_ARGS[@]}" isabelle.jedit.JEdit_Main "${ARGS[@]}"
 fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Tools/jEdit/src/jedit_main.scala	Mon Mar 21 11:55:51 2022 +0100
@@ -0,0 +1,142 @@
+/*  Title:      src/Tools/jEdit/src/jedit_main.scala
+    Author:     Makarius
+
+Main application entry point for Isabelle/jEdit.
+*/
+
+package isabelle.jedit
+
+
+import isabelle._
+
+import org.gjt.sp.jedit.{MiscUtilities, jEdit}
+
+
+object JEdit_Main
+{
+  /* main entry point */
+
+  def main(args: Array[String]): Unit =
+  {
+    if (args.nonEmpty && args(0) == "-init") {
+      Isabelle_System.init()
+    }
+    else {
+      val start =
+      {
+        try {
+          Isabelle_System.init()
+          Isabelle_Fonts.init()
+
+          GUI.init_lafs()
+
+
+          /* ROOTS template */
+
+          {
+            val roots = Path.explode("$ISABELLE_HOME_USER/ROOTS")
+            if (!roots.is_file) File.write(roots, """# Additional session root directories
+#
+#   * each line contains one directory entry in Isabelle path notation, e.g.
+#
+#       $ISABELLE_HOME/../AFP/thys
+#
+#     for a copy of AFP put side-by-side to the Isabelle distribution
+#
+#   * Isabelle/jEdit provides formal markup for C-hover-click and completion
+#
+#   * lines starting with "#" are stripped
+#
+#   * changes require restart of the Isabelle application
+#
+#:mode=text:encoding=UTF-8:
+
+#$ISABELLE_HOME/../AFP/thys
+""")
+          }
+
+
+          /* settings directory */
+
+          val settings_dir = Path.explode("$JEDIT_SETTINGS")
+
+          val properties = settings_dir + Path.explode("properties")
+          if (properties.is_file) {
+            val props1 = split_lines(File.read(properties))
+            val props2 = props1.filterNot(_.startsWith("plugin-blacklist.isabelle_jedit"))
+            if (props1 != props2) File.write(properties, cat_lines(props2))
+          }
+
+          Isabelle_System.make_directory(settings_dir + Path.explode("DockableWindowManager"))
+
+          if (!(settings_dir + Path.explode("perspective.xml")).is_file) {
+            File.write(settings_dir + Path.explode("DockableWindowManager/perspective-view0.xml"),
+              """<DOCKING LEFT="isabelle-documentation" TOP="" RIGHT="isabelle-theories" BOTTOM="" LEFT_POS="250" TOP_POS="0" RIGHT_POS="250" BOTTOM_POS="250" />""")
+            File.write(settings_dir + Path.explode("perspective.xml"),
+              XML.header +
+"""<!DOCTYPE PERSPECTIVE SYSTEM "perspective.dtd">
+<PERSPECTIVE>
+<VIEW PLAIN="FALSE">
+<GEOMETRY X="0" Y="35" WIDTH="1200" HEIGHT="850" EXT_STATE="0" />
+</VIEW>
+</PERSPECTIVE>""")
+          }
+
+          for (plugin <- Scala_Project.plugins) { plugin.context().build() }
+
+
+          /* args */
+
+          val jedit_settings =
+            "-settings=" + File.platform_path(Path.explode("$JEDIT_SETTINGS"))
+
+          val jedit_server =
+            System.getProperty("isabelle.jedit_server") match {
+              case null | "" => "-noserver"
+              case name => "-server=" + name
+            }
+
+          val jedit_options =
+            Isabelle_System.getenv_strict("JEDIT_OPTIONS").split(" +")
+
+          val more_args =
+          {
+            args.toList.dropWhile(arg => arg.startsWith("-") && arg != "--") match {
+              case Nil | List("--") =>
+                args ++ Array(File.platform_path(Path.explode("$USER_HOME/Scratch.thy")))
+              case List(":") => args.slice(0, args.length - 1)
+              case _ => args
+            }
+          }
+
+
+          /* environment */
+
+          for (name <- List("ISABELLE_HOME", "ISABELLE_HOME_USER", "JEDIT_HOME", "JEDIT_SETTINGS")) {
+            MiscUtilities.putenv(name, File.platform_path(Isabelle_System.getenv(name)))
+          }
+          MiscUtilities.putenv("ISABELLE_ROOT", null)
+
+
+          /* properties */
+
+          System.setProperty("jedit.home", File.platform_path(Path.explode("$JEDIT_HOME")))
+          System.setProperty("scala.home", File.platform_path(Path.explode("$SCALA_HOME")))
+          System.setProperty("scala.color", "false")
+
+
+          /* main startup */
+
+          () => jEdit.main(Array(jedit_settings, jedit_server) ++ jedit_options ++ more_args)
+        }
+        catch {
+          case exn: Throwable =>
+            GUI.init_laf()
+            GUI.dialog(null, "Isabelle", GUI.scrollable_text(Exn.message(exn)))
+            sys.exit(Process_Result.RC.failure)
+        }
+      }
+      start()
+    }
+  }
+}
--- a/src/Tools/jEdit/src/main.scala	Mon Mar 21 11:40:11 2022 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*  Title:      src/Tools/jEdit/src/main.scala
-    Author:     Makarius
-
-Main Isabelle application entry point.
-*/
-
-package isabelle.jedit
-
-
-import isabelle._
-
-import org.gjt.sp.jedit.{MiscUtilities, jEdit}
-
-
-object Main
-{
-  /* main entry point */
-
-  def main(args: Array[String]): Unit =
-  {
-    if (args.nonEmpty && args(0) == "-init") {
-      Isabelle_System.init()
-    }
-    else {
-      val start =
-      {
-        try {
-          Isabelle_System.init()
-          Isabelle_Fonts.init()
-
-          GUI.init_lafs()
-
-
-          /* ROOTS template */
-
-          {
-            val roots = Path.explode("$ISABELLE_HOME_USER/ROOTS")
-            if (!roots.is_file) File.write(roots, """# Additional session root directories
-#
-#   * each line contains one directory entry in Isabelle path notation, e.g.
-#
-#       $ISABELLE_HOME/../AFP/thys
-#
-#     for a copy of AFP put side-by-side to the Isabelle distribution
-#
-#   * Isabelle/jEdit provides formal markup for C-hover-click and completion
-#
-#   * lines starting with "#" are stripped
-#
-#   * changes require restart of the Isabelle application
-#
-#:mode=text:encoding=UTF-8:
-
-#$ISABELLE_HOME/../AFP/thys
-""")
-          }
-
-
-          /* settings directory */
-
-          val settings_dir = Path.explode("$JEDIT_SETTINGS")
-
-          val properties = settings_dir + Path.explode("properties")
-          if (properties.is_file) {
-            val props1 = split_lines(File.read(properties))
-            val props2 = props1.filterNot(_.startsWith("plugin-blacklist.isabelle_jedit"))
-            if (props1 != props2) File.write(properties, cat_lines(props2))
-          }
-
-          Isabelle_System.make_directory(settings_dir + Path.explode("DockableWindowManager"))
-
-          if (!(settings_dir + Path.explode("perspective.xml")).is_file) {
-            File.write(settings_dir + Path.explode("DockableWindowManager/perspective-view0.xml"),
-              """<DOCKING LEFT="isabelle-documentation" TOP="" RIGHT="isabelle-theories" BOTTOM="" LEFT_POS="250" TOP_POS="0" RIGHT_POS="250" BOTTOM_POS="250" />""")
-            File.write(settings_dir + Path.explode("perspective.xml"),
-              XML.header +
-"""<!DOCTYPE PERSPECTIVE SYSTEM "perspective.dtd">
-<PERSPECTIVE>
-<VIEW PLAIN="FALSE">
-<GEOMETRY X="0" Y="35" WIDTH="1200" HEIGHT="850" EXT_STATE="0" />
-</VIEW>
-</PERSPECTIVE>""")
-          }
-
-          for (plugin <- Scala_Project.plugins) { plugin.context().build() }
-
-
-          /* args */
-
-          val jedit_settings =
-            "-settings=" + File.platform_path(Path.explode("$JEDIT_SETTINGS"))
-
-          val jedit_server =
-            System.getProperty("isabelle.jedit_server") match {
-              case null | "" => "-noserver"
-              case name => "-server=" + name
-            }
-
-          val jedit_options =
-            Isabelle_System.getenv_strict("JEDIT_OPTIONS").split(" +")
-
-          val more_args =
-          {
-            args.toList.dropWhile(arg => arg.startsWith("-") && arg != "--") match {
-              case Nil | List("--") =>
-                args ++ Array(File.platform_path(Path.explode("$USER_HOME/Scratch.thy")))
-              case List(":") => args.slice(0, args.length - 1)
-              case _ => args
-            }
-          }
-
-
-          /* environment */
-
-          for (name <- List("ISABELLE_HOME", "ISABELLE_HOME_USER", "JEDIT_HOME", "JEDIT_SETTINGS")) {
-            MiscUtilities.putenv(name, File.platform_path(Isabelle_System.getenv(name)))
-          }
-          MiscUtilities.putenv("ISABELLE_ROOT", null)
-
-
-          /* properties */
-
-          System.setProperty("jedit.home", File.platform_path(Path.explode("$JEDIT_HOME")))
-          System.setProperty("scala.home", File.platform_path(Path.explode("$SCALA_HOME")))
-          System.setProperty("scala.color", "false")
-
-
-          /* main startup */
-
-          () => jEdit.main(Array(jedit_settings, jedit_server) ++ jedit_options ++ more_args)
-        }
-        catch {
-          case exn: Throwable =>
-            GUI.init_laf()
-            GUI.dialog(null, "Isabelle", GUI.scrollable_text(Exn.message(exn)))
-            sys.exit(Process_Result.RC.failure)
-        }
-      }
-      start()
-    }
-  }
-}