src/Pure/System/progress.scala
changeset 68410 4e27f5c361d2
parent 68330 d7920eb7de54
child 68770 add44e2b8cb0
     1.1 --- a/src/Pure/System/progress.scala	Sat Jun 09 13:19:57 2018 +0200
     1.2 +++ b/src/Pure/System/progress.scala	Sat Jun 09 21:52:16 2018 +0200
     1.3 @@ -10,6 +10,12 @@
     1.4  import java.io.{File => JFile}
     1.5  
     1.6  
     1.7 +object Progress
     1.8 +{
     1.9 +  def theory_message(session: String, theory: String): String =
    1.10 +    if (session == "") "theory " + theory else session + ": theory " + theory
    1.11 +}
    1.12 +
    1.13  class Progress
    1.14  {
    1.15    def echo(msg: String) {}
    1.16 @@ -51,10 +57,7 @@
    1.17    }
    1.18  
    1.19    override def theory(session: String, theory: String): Unit =
    1.20 -    if (verbose) {
    1.21 -      if (session == "") echo("theory " + theory)
    1.22 -      else echo(session + ": theory " + theory)
    1.23 -    }
    1.24 +    if (verbose) echo(Progress.theory_message(session, theory))
    1.25  
    1.26    @volatile private var is_stopped = false
    1.27    override def interrupt_handler[A](e: => A): A =
    1.28 @@ -72,7 +75,7 @@
    1.29      File.append(path, msg + "\n")
    1.30  
    1.31    override def theory(session: String, theory: String): Unit =
    1.32 -    if (verbose) echo(session + ": theory " + theory)
    1.33 +    if (verbose) echo(Progress.theory_message(session, theory))
    1.34  
    1.35    override def toString: String = path.toString
    1.36  }