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

Issue 2803313002: Statement completion framework with a few examples (Closed)

Created:
3 years, 8 months ago by messick
Modified:
3 years, 8 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 13

Patch Set 2 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+855 lines, -0 lines) Patch
M pkg/analysis_server/lib/src/constants.dart View 1 1 chunk +1 line, -0 lines 0 comments Download
M pkg/analysis_server/lib/src/edit/edit_domain.dart View 1 3 chunks +36 lines, -0 lines 0 comments Download
A pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart View 1 1 chunk +410 lines, -0 lines 0 comments Download
A pkg/analysis_server/test/edit/statement_completion_test.dart View 1 chunk +130 lines, -0 lines 0 comments Download
M pkg/analysis_server/test/edit/test_all.dart View 2 chunks +2 lines, -0 lines 0 comments Download
A pkg/analysis_server/test/services/completion/statement/statement_completion_test.dart View 1 1 chunk +274 lines, -0 lines 0 comments Download
M pkg/analysis_server/test/services/completion/test_all.dart View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
messick
Here is the framework for statement completion. It handles only a few kinds of statements ...
3 years, 8 months ago (2017-04-07 18:28:45 UTC) #2
Brian Wilkerson
lgtm, assuming none of my questions uncovered an actual problem. https://codereview.chromium.org/2803313002/diff/1/pkg/analysis_server/lib/src/constants.dart File pkg/analysis_server/lib/src/constants.dart (right): https://codereview.chromium.org/2803313002/diff/1/pkg/analysis_server/lib/src/constants.dart#newcode81 ...
3 years, 8 months ago (2017-04-07 19:17:14 UTC) #3
scheglov
LGTM https://codereview.chromium.org/2803313002/diff/1/pkg/analysis_server/lib/src/edit/edit_domain.dart File pkg/analysis_server/lib/src/edit/edit_domain.dart (right): https://codereview.chromium.org/2803313002/diff/1/pkg/analysis_server/lib/src/edit/edit_domain.dart#newcode258 pkg/analysis_server/lib/src/edit/edit_domain.dart:258: server.contextManager.getDriverFor(params.file); On 2017/04/07 19:17:14, Brian Wilkerson wrote: > ...
3 years, 8 months ago (2017-04-07 19:36:07 UTC) #4
messick
Still working on some changes, but here are answers to questions asked in review. https://codereview.chromium.org/2803313002/diff/1/pkg/analysis_server/lib/src/constants.dart ...
3 years, 8 months ago (2017-04-07 20:10:09 UTC) #5
messick
PTAL I answered some question in a previous message. This patch should address all the ...
3 years, 8 months ago (2017-04-07 20:46:03 UTC) #6
scheglov
LGTM
3 years, 8 months ago (2017-04-07 20:49:47 UTC) #7
messick
Committed patchset #2 (id:20001) manually as eadc6af22638e756178bfba1884c92c19ec4e770 (presubmit successful).
3 years, 8 months ago (2017-04-07 20:56:05 UTC) #9
Brian Wilkerson
3 years, 8 months ago (2017-04-07 21:23:37 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/2803313002/diff/1/pkg/analysis_server/lib/src...
File
pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
(right):

https://codereview.chromium.org/2803313002/diff/1/pkg/analysis_server/lib/src...
pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart:266:
IfStatement ifNode = node.getAncestor((n) => n is IfStatement);
If you know it's contained in a statement (as opposed to a field initializer,
for example) then `n is Statement` would work. You just need to guard against
something like

if (cond1) {
  while (cond2) ^
}

finding the 'if' statement when there's a closer statement.

If you do just look for the nearest enclosing statement, you might want to
compute it once and pass it in to the appropriate _complete methods.

Powered by Google App Engine
This is Rietveld 408576698