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/error/error.dart'; |
13 import 'package:analyzer/exception/exception.dart'; | 14 import 'package:analyzer/exception/exception.dart'; |
14 import 'package:analyzer/instrumentation/instrumentation.dart'; | 15 import 'package:analyzer/instrumentation/instrumentation.dart'; |
15 import 'package:analyzer/plugin/resolver_provider.dart'; | 16 import 'package:analyzer/plugin/resolver_provider.dart'; |
16 import 'package:analyzer/plugin/task.dart'; | 17 import 'package:analyzer/plugin/task.dart'; |
17 import 'package:analyzer/src/cancelable_future.dart'; | 18 import 'package:analyzer/src/cancelable_future.dart'; |
18 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator; | 19 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator; |
19 import 'package:analyzer/src/context/cache.dart'; | 20 import 'package:analyzer/src/context/cache.dart'; |
20 import 'package:analyzer/src/dart/element/element.dart'; | 21 import 'package:analyzer/src/dart/element/element.dart'; |
21 import 'package:analyzer/src/dart/element/type.dart'; | 22 import 'package:analyzer/src/dart/element/type.dart'; |
22 import 'package:analyzer/src/generated/constant.dart'; | 23 import 'package:analyzer/src/generated/constant.dart'; |
23 import 'package:analyzer/src/generated/engine.dart'; | 24 import 'package:analyzer/src/generated/engine.dart'; |
24 import 'package:analyzer/src/generated/error.dart'; | |
25 import 'package:analyzer/src/generated/incremental_resolver.dart'; | 25 import 'package:analyzer/src/generated/incremental_resolver.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'; |
(...skipping 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2287 } | 2287 } |
2288 DartSdk sdk = factory.dartSdk; | 2288 DartSdk sdk = factory.dartSdk; |
2289 if (sdk == null) { | 2289 if (sdk == null) { |
2290 throw new ArgumentError( | 2290 throw new ArgumentError( |
2291 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2291 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
2292 } | 2292 } |
2293 return new AnalysisCache( | 2293 return new AnalysisCache( |
2294 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2294 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
2295 } | 2295 } |
2296 } | 2296 } |
OLD | NEW |