tuned Command.toString -- preserving uniqueness allows the Scala toplevel to print Linear_Set[Command] results without crashing;
authorwenzelm
Sun, 13 Jun 2010 22:33:18 +0200
changeset 37373 25078ba44436
parent 37372 babe498016e8
child 37374 d66e6cc47fab
tuned Command.toString -- preserving uniqueness allows the Scala toplevel to print Linear_Set[Command] results without crashing;
src/Pure/PIDE/command.scala
--- a/src/Pure/PIDE/command.scala	Fri Jun 11 21:58:40 2010 +0200
+++ b/src/Pure/PIDE/command.scala	Sun Jun 13 22:33:18 2010 +0200
@@ -48,8 +48,7 @@
 
   def name: String = if (is_command) span.head.content else ""
   override def toString =
-    if (is_command) name + "(" + id + ")"
-    else if (is_ignored) "<ignored>" else "<malformed>"
+    id + "/" + (if (is_command) name else if (is_ignored) "IGNORED" else "MALFORMED")
 
 
   /* source text */