| Index: pkg/analyzer/lib/src/dart/analysis/driver.dart
|
| diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
|
| index da2436d23b5d0b430474827a8d6d7a3ae07b7245..4324c150a76bd8928aa94f3b92b4f440785bb4fc 100644
|
| --- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
|
| +++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
|
| @@ -620,6 +620,23 @@ class AnalysisDriver implements AnalysisDriverGeneric {
|
| }
|
|
|
| /**
|
| + * Return the cached [AnalysisDriverResolvedUnit] for the file with the given
|
| + * [file], or `null` if the cache does not contain this information.
|
| + */
|
| + AnalysisDriverResolvedUnit getResolvedUnitObject(FileState file) {
|
| + FileState library = file.isPart ? file.library : file;
|
| + if (library != null) {
|
| + String signature = _getResolvedUnitSignature(library, file);
|
| + String key = _getResolvedUnitKey(signature);
|
| + List<int> bytes = _byteStore.get(key);
|
| + if (bytes != null) {
|
| + return new AnalysisDriverResolvedUnit.fromBuffer(bytes);
|
| + }
|
| + }
|
| + return null;
|
| + }
|
| +
|
| + /**
|
| * Return a [Future] that completes with a [AnalysisResult] for the Dart
|
| * file with the given [path]. If the file is not a Dart file or cannot
|
| * be analyzed, the [Future] completes with `null`.
|
|
|