| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 } | 367 } |
| 368 } | 368 } |
| 369 return sources; | 369 return sources; |
| 370 } | 370 } |
| 371 | 371 |
| 372 @override | 372 @override |
| 373 List<Source> get launchableServerLibrarySources { | 373 List<Source> get launchableServerLibrarySources { |
| 374 List<Source> sources = <Source>[]; | 374 List<Source> sources = <Source>[]; |
| 375 for (Source source in _cache.sources) { | 375 for (Source source in _cache.sources) { |
| 376 CacheEntry entry = _cache.get(source); | 376 CacheEntry entry = _cache.get(source); |
| 377 if (source is Source && | 377 if (entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY && |
| 378 entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY && | |
| 379 !source.isInSystemLibrary && | 378 !source.isInSystemLibrary && |
| 380 isServerLibrary(source)) { | 379 isServerLibrary(source)) { |
| 381 sources.add(source); | 380 sources.add(source); |
| 382 } | 381 } |
| 383 } | 382 } |
| 384 return sources; | 383 return sources; |
| 385 } | 384 } |
| 386 | 385 |
| 387 @override | 386 @override |
| 388 List<Source> get librarySources => _getSources(SourceKind.LIBRARY); | 387 List<Source> get librarySources => _getSources(SourceKind.LIBRARY); |
| (...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2196 } | 2195 } |
| 2197 DartSdk sdk = factory.dartSdk; | 2196 DartSdk sdk = factory.dartSdk; |
| 2198 if (sdk == null) { | 2197 if (sdk == null) { |
| 2199 throw new IllegalArgumentException( | 2198 throw new IllegalArgumentException( |
| 2200 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2199 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
| 2201 } | 2200 } |
| 2202 return new AnalysisCache( | 2201 return new AnalysisCache( |
| 2203 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2202 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 2204 } | 2203 } |
| 2205 } | 2204 } |
| OLD | NEW |