Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(814)

Issue 2565633002: Reorganize InheritedRefenenceContributor to serve angular completion (Closed)

Created:
4 years ago by mfairhurst
Modified:
4 years ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Reorganize 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)
mfairhurst
Work I did to enable the analyzer to do dart autocomplete. Let me know if ...
4 years ago (2016-12-09 17:01:52 UTC) #3
Brian Wilkerson
lgtm https://codereview.chromium.org/2565633002/diff/1/pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart File pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart (right): https://codereview.chromium.org/2565633002/diff/1/pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart#newcode103 pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart:103: * The OpType which describes which types of ...
4 years ago (2016-12-09 17:15:19 UTC) #4
mfairhurst
https://codereview.chromium.org/2565633002/diff/1/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart File pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart (right): https://codereview.chromium.org/2565633002/diff/1/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart#newcode74 pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart:74: List<CompletionSuggestion> _computeSuggestionsForClass2( On 2016/12/09 17:15:19, Brian Wilkerson wrote: > ...
4 years ago (2016-12-09 17:31:41 UTC) #5
mfairhurst
On 2016/12/09 17:31:41, mfairhurst wrote: > https://codereview.chromium.org/2565633002/diff/1/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart > File > pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart > (right): > > ...
4 years ago (2016-12-09 18:50:17 UTC) #6
Brian Wilkerson
lgtm
4 years ago (2016-12-12 22:26:58 UTC) #7
mfairhurst
4 years ago (2016-12-12 22:29:58 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
d8c9645c260d163679b4193661566df87cfa9515 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698