| 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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 !AnalysisEngine.isDartFileName(librarySource.shortName)) { | 1009 !AnalysisEngine.isDartFileName(librarySource.shortName)) { |
| 1010 return null; | 1010 return null; |
| 1011 } | 1011 } |
| 1012 return getResult( | 1012 return getResult( |
| 1013 new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT); | 1013 new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT); |
| 1014 } | 1014 } |
| 1015 | 1015 |
| 1016 @override | 1016 @override |
| 1017 Object/*=V*/ getResult/*<V>*/( | 1017 Object/*=V*/ getResult/*<V>*/( |
| 1018 AnalysisTarget target, ResultDescriptor/*<V>*/ result) { | 1018 AnalysisTarget target, ResultDescriptor/*<V>*/ result) { |
| 1019 return _cache.getValue(target, result) as Object/*=V*/; | 1019 return _cache.getValue(target, result); |
| 1020 } | 1020 } |
| 1021 | 1021 |
| 1022 @override | 1022 @override |
| 1023 List<Source> getSourcesWithFullName(String path) { | 1023 List<Source> getSourcesWithFullName(String path) { |
| 1024 return analysisCache.getSourcesWithFullName(path); | 1024 return analysisCache.getSourcesWithFullName(path); |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 @override | 1027 @override |
| 1028 bool handleContentsChanged( | 1028 bool handleContentsChanged( |
| 1029 Source source, String originalContents, String newContents, bool notify) { | 1029 Source source, String originalContents, String newContents, bool notify) { |
| (...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2198 } | 2198 } |
| 2199 DartSdk sdk = factory.dartSdk; | 2199 DartSdk sdk = factory.dartSdk; |
| 2200 if (sdk == null) { | 2200 if (sdk == null) { |
| 2201 throw new IllegalArgumentException( | 2201 throw new IllegalArgumentException( |
| 2202 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2202 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
| 2203 } | 2203 } |
| 2204 return new AnalysisCache( | 2204 return new AnalysisCache( |
| 2205 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2205 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 2206 } | 2206 } |
| 2207 } | 2207 } |
| OLD | NEW |