| 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/instrumentation/instrumentation.dart'; | 13 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| 14 import 'package:analyzer/plugin/resolver_provider.dart'; |
| 14 import 'package:analyzer/plugin/task.dart'; | 15 import 'package:analyzer/plugin/task.dart'; |
| 15 import 'package:analyzer/source/embedder.dart'; | 16 import 'package:analyzer/source/embedder.dart'; |
| 16 import 'package:analyzer/src/cancelable_future.dart'; | 17 import 'package:analyzer/src/cancelable_future.dart'; |
| 17 import 'package:analyzer/src/context/cache.dart'; | 18 import 'package:analyzer/src/context/cache.dart'; |
| 18 import 'package:analyzer/src/dart/element/element.dart'; | 19 import 'package:analyzer/src/dart/element/element.dart'; |
| 19 import 'package:analyzer/src/dart/element/type.dart'; | 20 import 'package:analyzer/src/dart/element/type.dart'; |
| 20 import 'package:analyzer/src/generated/constant.dart'; | 21 import 'package:analyzer/src/generated/constant.dart'; |
| 21 import 'package:analyzer/src/generated/engine.dart'; | 22 import 'package:analyzer/src/generated/engine.dart'; |
| 22 import 'package:analyzer/src/generated/error.dart'; | 23 import 'package:analyzer/src/generated/error.dart'; |
| 23 import 'package:analyzer/src/generated/incremental_resolver.dart'; | 24 import 'package:analyzer/src/generated/incremental_resolver.dart'; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 * resolved. | 219 * resolved. |
| 219 */ | 220 */ |
| 220 Source incrementalResolutionValidation_lastLibrarySource; | 221 Source incrementalResolutionValidation_lastLibrarySource; |
| 221 | 222 |
| 222 /** | 223 /** |
| 223 * The result of incremental resolution result of | 224 * The result of incremental resolution result of |
| 224 * [incrementalResolutionValidation_lastUnitSource]. | 225 * [incrementalResolutionValidation_lastUnitSource]. |
| 225 */ | 226 */ |
| 226 CompilationUnit incrementalResolutionValidation_lastUnit; | 227 CompilationUnit incrementalResolutionValidation_lastUnit; |
| 227 | 228 |
| 229 @override |
| 230 ResolverProvider fileResolverProvider; |
| 231 |
| 228 /** | 232 /** |
| 229 * Initialize a newly created analysis context. | 233 * Initialize a newly created analysis context. |
| 230 */ | 234 */ |
| 231 AnalysisContextImpl() { | 235 AnalysisContextImpl() { |
| 232 _privatePartition = new UniversalCachePartition(this); | 236 _privatePartition = new UniversalCachePartition(this); |
| 233 _cache = createCacheFromSourceFactory(null); | 237 _cache = createCacheFromSourceFactory(null); |
| 234 _taskManager = AnalysisEngine.instance.taskManager; | 238 _taskManager = AnalysisEngine.instance.taskManager; |
| 235 for (WorkManagerFactory factory | 239 for (WorkManagerFactory factory |
| 236 in AnalysisEngine.instance.enginePlugin.workManagerFactories) { | 240 in AnalysisEngine.instance.enginePlugin.workManagerFactories) { |
| 237 WorkManager workManager = factory(this); | 241 WorkManager workManager = factory(this); |
| (...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2228 } | 2232 } |
| 2229 DartSdk sdk = factory.dartSdk; | 2233 DartSdk sdk = factory.dartSdk; |
| 2230 if (sdk == null) { | 2234 if (sdk == null) { |
| 2231 throw new IllegalArgumentException( | 2235 throw new IllegalArgumentException( |
| 2232 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2236 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
| 2233 } | 2237 } |
| 2234 return new AnalysisCache( | 2238 return new AnalysisCache( |
| 2235 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2239 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 2236 } | 2240 } |
| 2237 } | 2241 } |
| OLD | NEW |