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

Issue 1470373002: create new Dart specific completion contributor extension point (Closed)

Created:
5 years ago by danrubel
Modified:
5 years ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

create new Dart specific completion contributor extension point and modify DartCompletionManager to use it R=scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/0168336439221c07ca792f8a461bacd17ba9c4cd

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix error message #

Patch Set 3 : merge #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -133 lines) Patch
M pkg/analysis_server/lib/src/plugin/server_plugin.dart View 1 7 chunks +42 lines, -1 line 0 comments Download
M pkg/analysis_server/lib/src/provisional/completion/completion_core.dart View 2 chunks +12 lines, -0 lines 4 comments Download
D pkg/analysis_server/lib/src/provisional/completion/completion_dart.dart View 1 chunk +0 lines, -70 lines 0 comments Download
A + pkg/analysis_server/lib/src/provisional/completion/dart/completion.dart View 1 chunk +14 lines, -12 lines 8 comments Download
A + pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart View 1 chunk +7 lines, -0 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/completion_core.dart View 2 chunks +18 lines, -18 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/completion_manager.dart View 2 chunks +4 lines, -0 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart View 4 chunks +22 lines, -9 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/inherited_contributor.dart View 1 chunk +1 line, -5 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart View 2 chunks +3 lines, -9 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart View 3 chunks +6 lines, -2 lines 0 comments Download
M pkg/analysis_server/test/services/completion/dart/inherited_contributor_test.dart View 2 chunks +4 lines, -5 lines 0 comments Download
M pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
danrubel
https://codereview.chromium.org/1470373002/diff/1/pkg/analysis_server/lib/src/plugin/server_plugin.dart File pkg/analysis_server/lib/src/plugin/server_plugin.dart (right): https://codereview.chromium.org/1470373002/diff/1/pkg/analysis_server/lib/src/plugin/server_plugin.dart#newcode217 pkg/analysis_server/lib/src/plugin/server_plugin.dart:217: dartCompletionContributorExtensionPoint.extensions; Yes, this is formatted. If you have suggestions ...
5 years ago (2015-11-24 20:40:47 UTC) #2
scheglov
LGTM
5 years ago (2015-11-24 21:00:50 UTC) #3
danrubel
Committed patchset #3 (id:40001) manually as 0168336439221c07ca792f8a461bacd17ba9c4cd (presubmit successful).
5 years ago (2015-11-24 21:12:59 UTC) #4
Brian Wilkerson
https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart File pkg/analysis_server/lib/src/provisional/completion/completion_core.dart (right): https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart#newcode45 pkg/analysis_server/lib/src/provisional/completion/completion_core.dart:45: AnalysisServer get server; Why do we need the server ...
5 years ago (2015-11-24 21:31:25 UTC) #6
danrubel
https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart File pkg/analysis_server/lib/src/provisional/completion/completion_core.dart (right): https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart#newcode45 pkg/analysis_server/lib/src/provisional/completion/completion_core.dart:45: AnalysisServer get server; On 2015/11/24 21:31:25, Brian Wilkerson wrote: ...
5 years ago (2015-11-24 22:24:52 UTC) #7
danrubel
5 years ago (2015-11-30 17:51:31 UTC) #8
Message was sent while issue was closed.
On 2015/11/24 22:24:52, danrubel wrote:
>
https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib...
> File pkg/analysis_server/lib/src/provisional/completion/completion_core.dart
> (right):
> 
>
https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib...
> pkg/analysis_server/lib/src/provisional/completion/completion_core.dart:45:
> AnalysisServer get server;
> On 2015/11/24 21:31:25, Brian Wilkerson wrote:
> > Why do we need the server to be accessible through the request?
> 
> We need the resourceProvider and the serverPlugins, but not server.
> I'll remove this.
> 
>
https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib...
> pkg/analysis_server/lib/src/provisional/completion/completion_core.dart:50:
> ServerPlugin get serverPlugin;
> On 2015/11/24 21:31:25, Brian Wilkerson wrote:
> > I don't think we actually want the server plugin to be made public. I assume
> > you're doing this so that third-party contributors can get their extensions,
> but
> > I think those third-party contributors should define their own plugin if
> they're
> > going to be pluggable.
> 
> The DartCompletionContributor is currently defined in ServerPlugin, but I'll
> look into moving that code into a new DartCompletionPlugin just as if it were
> contributed via a third party.
> 
>
https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib...
> File pkg/analysis_server/lib/src/provisional/completion/dart/completion.dart
> (right):
> 
>
https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib...
> pkg/analysis_server/lib/src/provisional/completion/dart/completion.dart:7: *
> Dart specific completion contributors.
> On 2015/11/24 21:31:25, Brian Wilkerson wrote:
> > "new code Dart specific"? Remove "code"?
> 
> Done.
> 
>
https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib...
> pkg/analysis_server/lib/src/provisional/completion/dart/completion.dart:10: *
> The registered contributor factoriess will be used to instantiate new
> On 2015/11/24 21:31:25, Brian Wilkerson wrote:
> > "factoriess" --> "factories"
> 
> Done.
> 
>
https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib...
> pkg/analysis_server/lib/src/provisional/completion/dart/completion.dart:14: *
If
> a plugin wants to add completions, it should implement the class
> On 2015/11/24 21:31:25, Brian Wilkerson wrote:
> > "implement the class"? DartCompletionContributorFactory is a function type
> > alias, not a class.
> 
> Good eyes. Fixed
> 
>
https://codereview.chromium.org/1470373002/diff/40001/pkg/analysis_server/lib...
> pkg/analysis_server/lib/src/provisional/completion/dart/completion.dart:24: * 
 
>        () => [new MyDartCompletionContributor()]);
> On 2015/11/24 21:31:25, Brian Wilkerson wrote:
> > The documentation below (and the implementation of
> > _validateDartCompletionContributorExtension) says the value should be a
> > DartCompletionContributor. Is this example wrong, or should it be a list of
> > contributors? (Personal preference: make it a single object. Plugins can
> always
> > have more than one call to registerExtension.)
> 
> As currently defined, the factory instantiates a list of contributors, because
> that was most useful for me to define all of the Dart specific completion
> contributors that I provide by default. That said, I'll change it to a single
> contributor.

The above should all be addressed by 
https://codereview.chromium.org/1484853002/

Powered by Google App Engine
This is Rietveld 408576698