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

Issue 1908703002: Code completion improvement, use type information when suggesting constructors, part 2. (Closed)

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

Description

Code completion improvement, use type information when suggesting constructors, part 2. This finishes the work started with https://codereview.chromium.org/1892823003/, by also adding the filter into the local_library_contributor.dart. BUG=https://github.com/dart-lang/sdk/issues/26254 R=danrubel@google.com Committed: https://github.com/dart-lang/sdk/commit/cc065a3ad098d4811e12d8567c06ce38dc740da6

Patch Set 1 #

Total comments: 5

Patch Set 2 : Rebase with master, comments from danrubel #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -1 line) Patch
M pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart View 1 3 chunks +19 lines, -1 line 0 comments Download
M pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart View 1 chunk +108 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
jwren
4 years, 8 months ago (2016-04-20 21:55:49 UTC) #2
danrubel
LGTM https://codereview.chromium.org/1908703002/diff/1/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart File pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart (right): https://codereview.chromium.org/1908703002/diff/1/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart#newcode56 pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart:56: int filter = optype.constructorSuggestionsFilter(element.type); Should we pass in ...
4 years, 8 months ago (2016-04-21 12:56:09 UTC) #3
jwren
https://codereview.chromium.org/1908703002/diff/1/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart File pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart (right): https://codereview.chromium.org/1908703002/diff/1/pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart#newcode56 pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart:56: int filter = optype.constructorSuggestionsFilter(element.type); On 2016/04/21 12:56:09, danrubel wrote: ...
4 years, 8 months ago (2016-04-21 17:15:43 UTC) #4
jwren
Committed patchset #2 (id:20001) manually as cc065a3ad098d4811e12d8567c06ce38dc740da6 (presubmit successful).
4 years, 8 months ago (2016-04-21 17:16:11 UTC) #6
danrubel
4 years, 8 months ago (2016-04-21 17:18:54 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/1908703002/diff/1/pkg/analysis_server/lib/src...
File
pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart
(right):

https://codereview.chromium.org/1908703002/diff/1/pkg/analysis_server/lib/src...
pkg/analysis_server/lib/src/services/completion/dart/local_library_contributor.dart:56:
int filter = optype.constructorSuggestionsFilter(element.type);
On 2016/04/21 17:15:43, jwren wrote:
> On 2016/04/21 12:56:09, danrubel wrote:
> > Should we pass in relevance, return relevance, and add the suggestion only
if
> > returned relevance != null? Would that help cut down on the boilerplate
code?
> 
> Like this, right:
> 
> int relevance = optype.constructorSuggestionsFilter(element.type,
> DART_RELEVANCE_DEFAULT);
> if(relevance != null) {
>   addConstructorSuggestions(element, relevance);
> }
> 
> I will follow up with another CL, I want have all such filters that return an
> int to work the same way, and I believe that there is another one.

Yes.

Powered by Google App Engine
This is Rietveld 408576698