--- 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