dart-lang/spark — pull request #1674 by devoncarew (2014-04-23 00:12:29+00:00)
Title: Devoncarew declaration impl

@umop, @bwilkerson

Implement the backend of `getDeclarationFor` - source code hyperlinking. This moves some of the logic for creating an analysis context, and initial population of the context, to the services layer. This is so the created analysis context is available for us by the hyperlinking code even if the dart builder has not yet run. There is a placeholder in `ace.dart` for handling the declaration results.

Brian, I have one question in `services_impl.dart` related to getting a resolved compilation unit. The method I'm currently using I believe will not compute the unit if it does not already exist. The other method I saw said that it would not work in an sync context. At the time I'm calling this, I can wait until the result is available - I would prefer that over getting a `null` value back for the ast.