simplified implicit convertion Int => Position;
authorwenzelm
Mon, 19 Jan 2009 15:56:58 +0100
changeset 34480 017fae24829f
parent 34479 c787cbe6cdce
child 34481 660c639870a4
simplified implicit convertion Int => Position;
src/Tools/jEdit/src/prover/MarkupNode.scala
--- a/src/Tools/jEdit/src/prover/MarkupNode.scala	Fri Jan 16 23:00:24 2009 +0100
+++ b/src/Tools/jEdit/src/prover/MarkupNode.scala	Mon Jan 19 15:56:58 2009 +0100
@@ -15,13 +15,10 @@
 
   def markup2default_node(node : MarkupNode) : DefaultMutableTreeNode = {
 
-    class MyPos(val o : Int) extends Position {
-      override def getOffset = o
-    }
+    implicit def int2pos(offset: Int): Position =
+      new Position { def getOffset = offset }
 
-    implicit def int2pos(x : Int) : MyPos = new MyPos(x)
-
-    object RelativeAsset extends IAsset{
+    object RelativeAsset extends IAsset {
       override def getIcon : Icon = null
       override def getShortString : String = node.short
       override def getLongString : String = node.long