From d06ccf64f0bc8a0b86da21cd8118d4de02f93c6b Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 10 Jan 2011 05:38:50 +0000 Subject: Fixed a mis-deprecation step where remove was r... Fixed a mis-deprecation step where remove was replaced with filterNot on a mutable collection. Thanks to richard emberson for finding it. I used what git fu I have searching for others, but no dice. No review. --- src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala index 82c09b6501..cdc18ed566 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala @@ -94,7 +94,7 @@ abstract class TreeBrowsers { /** Return the index'th child of parent */ def getChild(parent: Any, index: Int): AnyRef = - packChildren(parent).drop(index).head + packChildren(parent)(index) /** Return the number of children this 'parent' has */ def getChildCount(parent: Any): Int = @@ -102,16 +102,16 @@ abstract class TreeBrowsers { /** Return the index of the given child */ def getIndexOfChild(parent: Any, child: Any): Int = - packChildren(parent).dropWhile(c => c != child).length + packChildren(parent) indexOf child /** Return the root node */ def getRoot(): AnyRef = program /** Test whether the given node is a leaf */ - def isLeaf(node: Any): Boolean = packChildren(node).length == 0 + def isLeaf(node: Any): Boolean = packChildren(node).isEmpty def removeTreeModelListener(l: TreeModelListener): Unit = - listeners filterNot (_ == l) + listeners = listeners filterNot (_ == l) /** we ignore this message for now */ def valueForPathChanged(path: TreePath, newValue: Any) = () -- cgit v1.2.3