| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.src.context.context; | 5 library analyzer.src.context.context; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1577 } | 1577 } |
| 1578 | 1578 |
| 1579 /** | 1579 /** |
| 1580 * Return a [CompilationUnit] for the given library and unit sources, which | 1580 * Return a [CompilationUnit] for the given library and unit sources, which |
| 1581 * can be incrementally resolved. | 1581 * can be incrementally resolved. |
| 1582 */ | 1582 */ |
| 1583 CompilationUnit _getIncrementallyResolvableUnit( | 1583 CompilationUnit _getIncrementallyResolvableUnit( |
| 1584 Source librarySource, Source unitSource) { | 1584 Source librarySource, Source unitSource) { |
| 1585 LibrarySpecificUnit target = | 1585 LibrarySpecificUnit target = |
| 1586 new LibrarySpecificUnit(librarySource, unitSource); | 1586 new LibrarySpecificUnit(librarySource, unitSource); |
| 1587 for (ResultDescriptor result in [ | 1587 for (ResultDescriptor<CompilationUnit> result in [ |
| 1588 RESOLVED_UNIT, | 1588 RESOLVED_UNIT, |
| 1589 RESOLVED_UNIT12, | 1589 RESOLVED_UNIT12, |
| 1590 RESOLVED_UNIT11, | 1590 RESOLVED_UNIT11, |
| 1591 RESOLVED_UNIT10, | 1591 RESOLVED_UNIT10, |
| 1592 RESOLVED_UNIT9, | 1592 RESOLVED_UNIT9, |
| 1593 RESOLVED_UNIT8 | 1593 RESOLVED_UNIT8 |
| 1594 ]) { | 1594 ]) { |
| 1595 CompilationUnit unit = getResult(target, result); | 1595 CompilationUnit unit = getResult(target, result); |
| 1596 if (unit != null) { | 1596 if (unit != null) { |
| 1597 return unit; | 1597 return unit; |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2312 } | 2312 } |
| 2313 DartSdk sdk = factory.dartSdk; | 2313 DartSdk sdk = factory.dartSdk; |
| 2314 if (sdk == null) { | 2314 if (sdk == null) { |
| 2315 throw new IllegalArgumentException( | 2315 throw new IllegalArgumentException( |
| 2316 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2316 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
| 2317 } | 2317 } |
| 2318 return new AnalysisCache( | 2318 return new AnalysisCache( |
| 2319 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2319 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 2320 } | 2320 } |
| 2321 } | 2321 } |
| OLD | NEW |