tuned output;
authorwenzelm
Wed, 28 Dec 2022 12:30:18 +0100
changeset 76798 69d8d16c5612
parent 76795 04af11e6557a
child 76799 6e786a09a4bb
tuned output;
src/HOL/SPARK/Tools/spark.scala
src/Pure/PIDE/command_span.scala
--- a/src/HOL/SPARK/Tools/spark.scala	Tue Dec 27 22:52:28 2022 +0100
+++ b/src/HOL/SPARK/Tools/spark.scala	Wed Dec 28 12:30:18 2022 +0100
@@ -11,10 +11,12 @@
 
 object SPARK {
   class Load_Command1 extends Command_Span.Load_Command("spark_vcg", Scala_Project.here) {
+    override def toString: String = print_extensions
     override val extensions: List[String] = List("vcg", "fdl", "rls")
   }
 
   class Load_Command2 extends Command_Span.Load_Command("spark_siv", Scala_Project.here) {
+    override def toString: String = print_extensions
     override val extensions: List[String] = List("siv", "fdl", "rls")
   }
 }
--- a/src/Pure/PIDE/command_span.scala	Tue Dec 27 22:52:28 2022 +0100
+++ b/src/Pure/PIDE/command_span.scala	Wed Dec 28 12:30:18 2022 +0100
@@ -21,7 +21,15 @@
 
   abstract class Load_Command(val name: String, val here: Scala_Project.Here)
   extends Isabelle_System.Service {
-    override def toString: String = name
+    override def toString: String = print("")
+
+    def print(body: String): String =
+      if (body.nonEmpty) "Load_Command(" + body + ")"
+      else if (name.nonEmpty) print("name = " + quote(name))
+      else "Load_Command"
+
+    def print_extensions: String =
+      print("name = " + quote(name) + ", extensions = " + commas_quote(extensions))
 
     def position: Position.T = here.position