cheeseng/scala-ide — comment on commit 2c7150b4d1c2437deeb9d4b02066ce6274040024
File: org.scala-ide.sdt.core/src/scala/tools/eclipse/launching/ScalaTestLaunchShortcut.scala line 74
By dragos:

This could be done much more efficiently if you used the position information of the tree you're looking for. Positions have a method `includes` to test if a position is fully included inside another. That would guide your search in this case. Otherwise, you are blindly traversing the whole AST. Have a look at class `Locator`, as I mentioned by email on scala-ide-dev.