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

Hi Iulian,

Thanks for reviewing the code! I have rewritten the getParent method using
the method 'includes' that you mentioned, but I have strange compilation
problem (see line 79 of
https://github.com/cheeseng/scala-ide/blob/master/org.scala-ide.sdt.core/src/scala/tools/eclipse/launching/ScalaTestLaunchShortcut.scala),
I am not sure about the cause, may be the compiler is confused about the
type?

Thanks!

Best Regards,
Chee Seng

On Mon, Feb 6, 2012 at 3:46 AM, Iulian Dragos <
reply@reply.github.com
> wrote:

> 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.
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/cheeseng/scala-ide/commit/2c7150b4d1c2437deeb9d4b02066ce6274040024#commitcomment-934642
>