tuned;
authorwenzelm
Wed, 07 Aug 2013 11:50:14 +0200
changeset 52888 671421cef590
parent 52887 98eac7b7eec3
child 52889 ea3338812e67
tuned;
src/Pure/General/symbol.scala
src/Pure/Tools/ml_statistics.scala
src/Tools/jEdit/src/timing_dockable.scala
--- a/src/Pure/General/symbol.scala	Wed Aug 07 11:44:17 2013 +0200
+++ b/src/Pure/General/symbol.scala	Wed Aug 07 11:50:14 2013 +0200
@@ -193,7 +193,7 @@
         if (min <= c && c <= max) {
           matcher.region(i, len).lookingAt
           val x = matcher.group
-          result.append(table.get(x) getOrElse x)
+          result.append(table.getOrElse(x, x))
           i = matcher.end
         }
         else { result.append(c); i += 1 }
@@ -255,7 +255,7 @@
     }
 
     val groups: List[(String, List[Symbol])] =
-      symbols.map({ case (sym, props) => (sym, props.get("group") getOrElse "unsorted") })
+      symbols.map({ case (sym, props) => (sym, props.getOrElse("group", "unsorted")) })
         .groupBy(_._2).toList.map({ case (group, list) => (group, list.map(_._1)) })
         .sortBy(_._1)
 
--- a/src/Pure/Tools/ml_statistics.scala	Wed Aug 07 11:44:17 2013 +0200
+++ b/src/Pure/Tools/ml_statistics.scala	Wed Aug 07 11:50:14 2013 +0200
@@ -85,7 +85,7 @@
       // rising edges -- relative speed
       val speeds =
         for ((key, value) <- props; a <- Library.try_unprefix("time", key)) yield {
-          val (x0, y0, s0) = last_edge.get(a) getOrElse (0.0, 0.0, 0.0)
+          val (x0, y0, s0) = last_edge.getOrElse(a, (0.0, 0.0, 0.0))
 
           val x1 = time
           val y1 = java.lang.Double.parseDouble(value)
--- a/src/Tools/jEdit/src/timing_dockable.scala	Wed Aug 07 11:44:17 2013 +0200
+++ b/src/Tools/jEdit/src/timing_dockable.scala	Wed Aug 07 11:50:14 2013 +0200
@@ -167,7 +167,7 @@
         case None => Document.Node.Name.empty
         case Some(doc_view) => doc_view.model.name
       }
-    val timing = nodes_timing.get(name) getOrElse Protocol.empty_node_timing
+    val timing = nodes_timing.getOrElse(name, Protocol.empty_node_timing)
 
     val theories =
       (for ((node_name, node_timing) <- nodes_timing.toList if !node_timing.commands.isEmpty)