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'; |
11 import 'package:analyzer/dart/element/element.dart'; | 11 import 'package:analyzer/dart/element/element.dart'; |
12 import 'package:analyzer/dart/element/type.dart'; | 12 import 'package:analyzer/dart/element/type.dart'; |
| 13 import 'package:analyzer/exception/exception.dart'; |
13 import 'package:analyzer/instrumentation/instrumentation.dart'; | 14 import 'package:analyzer/instrumentation/instrumentation.dart'; |
14 import 'package:analyzer/plugin/resolver_provider.dart'; | 15 import 'package:analyzer/plugin/resolver_provider.dart'; |
15 import 'package:analyzer/plugin/task.dart'; | 16 import 'package:analyzer/plugin/task.dart'; |
16 import 'package:analyzer/src/cancelable_future.dart'; | 17 import 'package:analyzer/src/cancelable_future.dart'; |
17 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator; | 18 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator; |
18 import 'package:analyzer/src/context/cache.dart'; | 19 import 'package:analyzer/src/context/cache.dart'; |
19 import 'package:analyzer/src/dart/element/element.dart'; | 20 import 'package:analyzer/src/dart/element/element.dart'; |
20 import 'package:analyzer/src/dart/element/type.dart'; | 21 import 'package:analyzer/src/dart/element/type.dart'; |
21 import 'package:analyzer/src/generated/constant.dart'; | 22 import 'package:analyzer/src/generated/constant.dart'; |
22 import 'package:analyzer/src/generated/engine.dart'; | 23 import 'package:analyzer/src/generated/engine.dart'; |
23 import 'package:analyzer/src/generated/error.dart'; | 24 import 'package:analyzer/src/generated/error.dart'; |
24 import 'package:analyzer/src/generated/incremental_resolver.dart'; | 25 import 'package:analyzer/src/generated/incremental_resolver.dart'; |
25 import 'package:analyzer/src/generated/java_engine.dart'; | |
26 import 'package:analyzer/src/generated/resolver.dart'; | 26 import 'package:analyzer/src/generated/resolver.dart'; |
27 import 'package:analyzer/src/generated/sdk.dart' show DartSdk; | 27 import 'package:analyzer/src/generated/sdk.dart' show DartSdk; |
28 import 'package:analyzer/src/generated/source.dart'; | 28 import 'package:analyzer/src/generated/source.dart'; |
29 import 'package:analyzer/src/generated/testing/ast_factory.dart'; | 29 import 'package:analyzer/src/generated/testing/ast_factory.dart'; |
30 import 'package:analyzer/src/generated/utilities_collection.dart'; | 30 import 'package:analyzer/src/generated/utilities_collection.dart'; |
31 import 'package:analyzer/src/task/dart.dart'; | 31 import 'package:analyzer/src/task/dart.dart'; |
32 import 'package:analyzer/src/task/dart_work_manager.dart'; | 32 import 'package:analyzer/src/task/dart_work_manager.dart'; |
33 import 'package:analyzer/src/task/driver.dart'; | 33 import 'package:analyzer/src/task/driver.dart'; |
34 import 'package:analyzer/src/task/incremental_element_builder.dart'; | 34 import 'package:analyzer/src/task/incremental_element_builder.dart'; |
35 import 'package:analyzer/src/task/manager.dart'; | 35 import 'package:analyzer/src/task/manager.dart'; |
(...skipping 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2306 } | 2306 } |
2307 DartSdk sdk = factory.dartSdk; | 2307 DartSdk sdk = factory.dartSdk; |
2308 if (sdk == null) { | 2308 if (sdk == null) { |
2309 throw new ArgumentError( | 2309 throw new ArgumentError( |
2310 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2310 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
2311 } | 2311 } |
2312 return new AnalysisCache( | 2312 return new AnalysisCache( |
2313 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2313 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
2314 } | 2314 } |
2315 } | 2315 } |
OLD | NEW |