DescriptionReorganize InheritedRefenenceContributor to serve angular completion
Take the parts that I would have simply copied and pasted them into my
own code, and create new public & private methods to serve the new
organization.
Add an option to get the current class's accessors/methods along with
the inherited ones, because that's what I want.
Make opType a public member of DartCompletionRequest
Its used so heavily by so many of the autocomplete targets, it really
doesn't need to be hidden on the Impl.
Besides, I want to use InheritedReferenceContributor, which upcasts the
DartCompletionRequest into the Impl in order to grab this field -- but
for a large number of reasons I can't really use
DartCompletionRequestImpl. Therefore I need my own class to implement
DartCompletionRequest and therefore my code will only work with
InheritedReferenceContributor if it doesn't have to look outside the
interface for this information.
Change to enable the angular analysis project to do autocomplete
We don't have CompilationUnits, but we do have dart ASTs, and we want to
find the completion target with the same algorithm. The CompletionTarget
class's functionality doesn't depend on its member compilationUnit not
being null, so that isn't a problem for us. However, in `forOffset()`,
we cannot pass in a null unit, even though its only used to set the
`compilationUnit` member and otherwise only used as an `AstNode` which
we have.
So rather than using `compilationUnit` as the entry point of the
algorithm, add a new `AstNode` parameter to represent the entry point,
and when its null simply use the value of `compilationUnit`.
BUG=
R=brianwilkerson@google.com
Committed: https://github.com/dart-lang/sdk/commit/d8c9645c260d163679b4193661566df87cfa9515
Patch Set 1 #
Total comments: 4
Patch Set 2 : Fix nits and wrong method after refactor #Patch Set 3 : Fix bad merge. Tests passing. #
Messages
Total messages: 9 (3 generated)
|