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

Issue 2662973007: suggest catch and finally keywords (Closed)

Created:
3 years, 10 months ago by danrubel
Modified:
3 years, 10 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

suggest catch and finally keywords After a try block that does not have a "catch" block, suggest the "catch" keyword and nothing else. After a "catch" block, suggest the "finally" keyword. Fix https://github.com/dart-lang/sdk/issues/27560 R=brianwilkerson@google.com Committed: https://github.com/dart-lang/sdk/commit/02adcc961451f5c90760a41a7293c44f3784baf4

Patch Set 1 #

Total comments: 6

Patch Set 2 : merge #

Patch Set 3 : update try statement keyword suggestions #

Patch Set 4 : merge duplicate getPreviousStatement method #

Patch Set 5 : fix suggestions after try/finally statement #

Patch Set 6 : suggest keywords between try/finally parts of try statement #

Patch Set 7 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+429 lines, -7 lines) Patch
M pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart View 1 2 3 4 5 4 chunks +28 lines, -2 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/optype.dart View 1 2 3 4 3 chunks +23 lines, -2 lines 0 comments Download
M pkg/analysis_server/test/completion_test.dart View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M pkg/analysis_server/test/domain_completion_test.dart View 1 2 3 4 5 1 chunk +70 lines, -0 lines 0 comments Download
M pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart View 1 2 3 4 5 1 chunk +191 lines, -2 lines 0 comments Download
M pkg/analysis_server/test/services/completion/dart/optype_test.dart View 1 2 3 4 5 1 chunk +116 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
danrubel
3 years, 10 months ago (2017-02-01 21:44:53 UTC) #2
Brian Wilkerson
https://codereview.chromium.org/2662973007/diff/1/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart File pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart (right): https://codereview.chromium.org/2662973007/diff/1/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart#newcode102 pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart:102: } Hm. This logic seems slightly wrong. try { ...
3 years, 10 months ago (2017-02-01 22:02:19 UTC) #3
danrubel
Updated to suggest on/catch/finally keywords as appropriate. PTAL. https://codereview.chromium.org/2662973007/diff/1/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart File pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart (right): https://codereview.chromium.org/2662973007/diff/1/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart#newcode102 pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart:102: } ...
3 years, 10 months ago (2017-02-04 20:13:42 UTC) #4
Brian Wilkerson
lgtm
3 years, 10 months ago (2017-02-04 21:39:19 UTC) #5
danrubel
3 years, 10 months ago (2017-02-06 17:57:58 UTC) #7
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as
02adcc961451f5c90760a41a7293c44f3784baf4 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698