clarified module dependencies: avoid Properties and Document introding minimal "PIDE";
authorwenzelm
Mon, 29 Apr 2013 15:47:42 +0200
changeset 51818 517f232e867d
parent 51817 6b82042690b5
child 51819 9df935196be9
child 51820 142c69695785
clarified module dependencies: avoid Properties and Document introding minimal "PIDE";
src/Pure/PIDE/markup.scala
src/Pure/PIDE/protocol.scala
src/Pure/System/session.scala
--- a/src/Pure/PIDE/markup.scala	Mon Apr 29 14:07:03 2013 +0200
+++ b/src/Pure/PIDE/markup.scala	Mon Apr 29 15:47:42 2013 +0200
@@ -218,18 +218,7 @@
 
   /* command timing */
 
-  object Command_Timing
-  {
-    def unapply(props: Properties.T): Option[(Document.ID, isabelle.Timing)] =
-      props match {
-        case (FUNCTION, "command_timing") :: args =>
-          (args, args) match {
-            case (Position.Id(id), Timing_Properties(timing)) => Some((id, timing))
-            case _ => None
-          }
-        case _ => None
-      }
-  }
+  val COMMAND_TIMING = "command_timing"
 
 
   /* toplevel */
--- a/src/Pure/PIDE/protocol.scala	Mon Apr 29 14:07:03 2013 +0200
+++ b/src/Pure/PIDE/protocol.scala	Mon Apr 29 15:47:42 2013 +0200
@@ -84,6 +84,22 @@
     (Status.init /: markups)(command_status(_, _))
 
 
+  /* command timing */
+
+  object Command_Timing
+  {
+    def unapply(props: Properties.T): Option[(Document.ID, isabelle.Timing)] =
+      props match {
+        case (Markup.FUNCTION, Markup.COMMAND_TIMING) :: args =>
+          (args, args) match {
+            case (Position.Id(id), Markup.Timing_Properties(timing)) => Some((id, timing))
+            case _ => None
+          }
+        case _ => None
+      }
+  }
+
+
   /* node status */
 
   sealed case class Node_Status(
--- a/src/Pure/System/session.scala	Mon Apr 29 14:07:03 2013 +0200
+++ b/src/Pure/System/session.scala	Mon Apr 29 15:47:42 2013 +0200
@@ -322,7 +322,7 @@
         case Position.Id(state_id) if !output.is_protocol =>
           accumulate(state_id, output.message)
 
-        case Markup.Command_Timing(state_id, timing) if output.is_protocol =>
+        case Protocol.Command_Timing(state_id, timing) if output.is_protocol =>
           val message = XML.elem(Markup.STATUS, List(XML.Elem(Markup.Timing(timing), Nil)))
           accumulate(state_id, prover.get.xml_cache.elem(message))