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

Issue 2526373002: Add AnalysisDriver.getIndex(). (Closed)

Created:
4 years ago by scheglov
Modified:
4 years ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add AnalysisDriver.getIndex(). AnalysisResult.index is not quite enough. While the index can be used to find where an element is used in the file, we need to know also the enclosing Element, which we can find from the full CompilationUnitElement. R=paulberry@google.com, brianwilkerson@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/a69b7f3fb0079124e647932b4fcf8f91ea335276

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -47 lines) Patch
M pkg/analyzer/lib/src/dart/analysis/driver.dart View 14 chunks +110 lines, -7 lines 3 comments Download
M pkg/analyzer/test/src/dart/analysis/driver_test.dart View 4 chunks +45 lines, -40 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
scheglov
4 years ago (2016-11-24 19:57:03 UTC) #1
Paul Berry
lgtm https://codereview.chromium.org/2526373002/diff/1/pkg/analyzer/lib/src/dart/analysis/driver.dart File pkg/analyzer/lib/src/dart/analysis/driver.dart (right): https://codereview.chromium.org/2526373002/diff/1/pkg/analyzer/lib/src/dart/analysis/driver.dart#newcode586 pkg/analyzer/lib/src/dart/analysis/driver.dart:586: * TODO(scheglov) document Would you mind adding documentation ...
4 years ago (2016-11-25 15:08:51 UTC) #2
scheglov
https://codereview.chromium.org/2526373002/diff/1/pkg/analyzer/lib/src/dart/analysis/driver.dart File pkg/analyzer/lib/src/dart/analysis/driver.dart (right): https://codereview.chromium.org/2526373002/diff/1/pkg/analyzer/lib/src/dart/analysis/driver.dart#newcode586 pkg/analyzer/lib/src/dart/analysis/driver.dart:586: * TODO(scheglov) document On 2016/11/25 15:08:51, Paul Berry wrote: ...
4 years ago (2016-11-25 17:48:15 UTC) #3
scheglov
Committed patchset #1 (id:1) manually as a69b7f3fb0079124e647932b4fcf8f91ea335276 (presubmit successful).
4 years ago (2016-11-25 17:51:12 UTC) #5
Brian Wilkerson
4 years ago (2016-11-28 16:59:21 UTC) #6
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/2526373002/diff/1/pkg/analyzer/lib/src/dart/a...
File pkg/analyzer/lib/src/dart/analysis/driver.dart (right):

https://codereview.chromium.org/2526373002/diff/1/pkg/analyzer/lib/src/dart/a...
pkg/analyzer/lib/src/dart/analysis/driver.dart:162: * [getIndex] to the
[Completer] to report the result.
"which index" --> "which an index" or "which the index"

"to the [Completer]"

It appears that it actually maps to a list of completers (which I guess means
that we could have multiple invocations of getIndex prior to the index actually
being computed). The comment should be updated to reflect that.

Powered by Google App Engine
This is Rietveld 408576698