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/element/element.dart'; |
10 import 'package:analyzer/instrumentation/instrumentation.dart'; | 11 import 'package:analyzer/instrumentation/instrumentation.dart'; |
11 import 'package:analyzer/plugin/task.dart'; | 12 import 'package:analyzer/plugin/task.dart'; |
12 import 'package:analyzer/source/embedder.dart'; | 13 import 'package:analyzer/source/embedder.dart'; |
13 import 'package:analyzer/src/cancelable_future.dart'; | 14 import 'package:analyzer/src/cancelable_future.dart'; |
14 import 'package:analyzer/src/context/cache.dart'; | 15 import 'package:analyzer/src/context/cache.dart'; |
| 16 import 'package:analyzer/src/dart/element/element.dart'; |
15 import 'package:analyzer/src/generated/ast.dart'; | 17 import 'package:analyzer/src/generated/ast.dart'; |
16 import 'package:analyzer/src/generated/constant.dart'; | 18 import 'package:analyzer/src/generated/constant.dart'; |
17 import 'package:analyzer/src/generated/element.dart'; | |
18 import 'package:analyzer/src/generated/engine.dart'; | 19 import 'package:analyzer/src/generated/engine.dart'; |
19 import 'package:analyzer/src/generated/error.dart'; | 20 import 'package:analyzer/src/generated/error.dart'; |
20 import 'package:analyzer/src/generated/incremental_resolver.dart'; | 21 import 'package:analyzer/src/generated/incremental_resolver.dart'; |
21 import 'package:analyzer/src/generated/java_core.dart'; | 22 import 'package:analyzer/src/generated/java_core.dart'; |
22 import 'package:analyzer/src/generated/java_engine.dart'; | 23 import 'package:analyzer/src/generated/java_engine.dart'; |
23 import 'package:analyzer/src/generated/resolver.dart'; | 24 import 'package:analyzer/src/generated/resolver.dart'; |
24 import 'package:analyzer/src/generated/sdk.dart' show DartSdk; | 25 import 'package:analyzer/src/generated/sdk.dart' show DartSdk; |
25 import 'package:analyzer/src/generated/source.dart'; | 26 import 'package:analyzer/src/generated/source.dart'; |
26 import 'package:analyzer/src/generated/utilities_collection.dart'; | 27 import 'package:analyzer/src/generated/utilities_collection.dart'; |
27 import 'package:analyzer/src/task/dart.dart'; | 28 import 'package:analyzer/src/task/dart.dart'; |
(...skipping 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2017 } | 2018 } |
2018 DartSdk sdk = factory.dartSdk; | 2019 DartSdk sdk = factory.dartSdk; |
2019 if (sdk == null) { | 2020 if (sdk == null) { |
2020 throw new IllegalArgumentException( | 2021 throw new IllegalArgumentException( |
2021 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2022 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
2022 } | 2023 } |
2023 return new AnalysisCache( | 2024 return new AnalysisCache( |
2024 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2025 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
2025 } | 2026 } |
2026 } | 2027 } |
OLD | NEW |