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

Issue 1303233008: improve keyword suggestions - fixes #24016 (Closed)

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

Description

Patch Set 1 #

Total comments: 6

Patch Set 2 : address comments #

Patch Set 3 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -18 lines) Patch
M pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart View 1 6 chunks +53 lines, -6 lines 0 comments Download
M pkg/analysis_server/test/completion_test.dart View 3 chunks +3 lines, -5 lines 0 comments Download
M pkg/analysis_server/test/services/completion/completion_test_util.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M pkg/analysis_server/test/services/completion/keyword_contributor_test.dart View 1 11 chunks +98 lines, -6 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
danrubel
5 years, 3 months ago (2015-08-26 20:26:20 UTC) #2
Brian Wilkerson
LGTM https://codereview.chromium.org/1303233008/diff/1/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart File pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart (right): https://codereview.chromium.org/1303233008/diff/1/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart#newcode428 pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart:428: Keyword.NEW, If we suggest 'new', shouldn't we also ...
5 years, 3 months ago (2015-08-26 20:33:20 UTC) #3
danrubel
Committed patchset #3 (id:40001) manually as bd95b13b90ded36c17de394a2fef42b75ec6e6c7 (presubmit successful).
5 years, 3 months ago (2015-08-26 21:35:00 UTC) #4
danrubel
5 years, 3 months ago (2015-08-26 21:39:29 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/1303233008/diff/1/pkg/analysis_server/lib/src...
File pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
(right):

https://codereview.chromium.org/1303233008/diff/1/pkg/analysis_server/lib/src...
pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart:428:
Keyword.NEW,
On 2015/08/26 20:33:20, Brian Wilkerson wrote:
> If we suggest 'new', shouldn't we also suggest 'const'?

Good suggestion. Done.

https://codereview.chromium.org/1303233008/diff/1/pkg/analysis_server/lib/src...
pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart:437:
_addSuggestion(Keyword.RETHROW, DART_RELEVANCE_KEYWORD - 1);
On 2015/08/26 20:33:20, Brian Wilkerson wrote:
> Seems like we should only suggest this if we're inside a catch block, in which
> case the relevance should be as high as any other keyword.

Good point. I'll address this in a subsequent CL.
https://github.com/dart-lang/sdk/issues/24214

https://codereview.chromium.org/1303233008/diff/1/pkg/analysis_server/lib/src...
pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart:480:
return true;
On 2015/08/26 20:33:20, Brian Wilkerson wrote:
> If we're inside a method declaration, given that this is used for 'this' and
> 'super', we should check that it doesn't have a 'super' modifier.

Not sure what you mean here. Isn't this valid thus we should suggest super?

class A {
  var x;
}
class B extends A {
  B() : super() {super.x = 7;}
}

Powered by Google App Engine
This is Rietveld 408576698