| 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/src/cancelable_future.dart'; | 10 import 'package:analyzer/src/cancelable_future.dart'; |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 !target.isInSystemLibrary && | 269 !target.isInSystemLibrary && |
| 270 isClientLibrary(target)) { | 270 isClientLibrary(target)) { |
| 271 sources.add(target); | 271 sources.add(target); |
| 272 } | 272 } |
| 273 } | 273 } |
| 274 return sources; | 274 return sources; |
| 275 } | 275 } |
| 276 | 276 |
| 277 @override | 277 @override |
| 278 List<Source> get launchableServerLibrarySources { | 278 List<Source> get launchableServerLibrarySources { |
| 279 // TODO(brianwilkerson) This needs to filter out libraries that reference | |
| 280 // dart:html, either directly or indirectly. | |
| 281 List<Source> sources = new List<Source>(); | 279 List<Source> sources = new List<Source>(); |
| 282 MapIterator<AnalysisTarget, cache.CacheEntry> iterator = _cache.iterator(); | 280 MapIterator<AnalysisTarget, cache.CacheEntry> iterator = _cache.iterator(); |
| 283 while (iterator.moveNext()) { | 281 while (iterator.moveNext()) { |
| 284 AnalysisTarget target = iterator.key; | 282 AnalysisTarget target = iterator.key; |
| 285 cache.CacheEntry entry = iterator.value; | 283 cache.CacheEntry entry = iterator.value; |
| 286 if (target is Source && | 284 if (target is Source && |
| 287 entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY && | 285 entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY && |
| 288 !target.isInSystemLibrary) { | 286 !target.isInSystemLibrary && |
| 289 // DartEntry dartEntry = (DartEntry) sourceEntry; | 287 isServerLibrary(target)) { |
| 290 // if (dartEntry.getValue(DartEntry.IS_LAUNCHABLE) && !dartEntry.getVal
ue(DartEntry.IS_CLIENT)) { | |
| 291 sources.add(target); | 288 sources.add(target); |
| 292 // } | |
| 293 } | 289 } |
| 294 } | 290 } |
| 295 return sources; | 291 return sources; |
| 296 } | 292 } |
| 297 | 293 |
| 298 @override | 294 @override |
| 299 List<Source> get librarySources => _getSources(SourceKind.LIBRARY); | 295 List<Source> get librarySources => _getSources(SourceKind.LIBRARY); |
| 300 | 296 |
| 301 @override | 297 @override |
| 302 Stream<SourcesChangedEvent> get onSourcesChanged => | 298 Stream<SourcesChangedEvent> get onSourcesChanged => |
| (...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1973 // Check cache for an existing partition. | 1969 // Check cache for an existing partition. |
| 1974 cache.SdkCachePartition partition = _sdkPartitions[sdk]; | 1970 cache.SdkCachePartition partition = _sdkPartitions[sdk]; |
| 1975 if (partition == null) { | 1971 if (partition == null) { |
| 1976 partition = | 1972 partition = |
| 1977 new cache.SdkCachePartition(sdkContext, _DEFAULT_SDK_CACHE_SIZE); | 1973 new cache.SdkCachePartition(sdkContext, _DEFAULT_SDK_CACHE_SIZE); |
| 1978 _sdkPartitions[sdk] = partition; | 1974 _sdkPartitions[sdk] = partition; |
| 1979 } | 1975 } |
| 1980 return partition; | 1976 return partition; |
| 1981 } | 1977 } |
| 1982 } | 1978 } |
| OLD | NEW |