| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 context.directory.manager; | 5 library context.directory.manager; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:convert'; | 9 import 'dart:convert'; |
| 10 import 'dart:core' hide Resource; | 10 import 'dart:core' hide Resource; |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 }); | 524 }); |
| 525 | 525 |
| 526 List<ContextInfo> contextInfos = _rootInfo.descendants.toList(); | 526 List<ContextInfo> contextInfos = _rootInfo.descendants.toList(); |
| 527 // included | 527 // included |
| 528 Set<Folder> includedFolders = new HashSet<Folder>(); | 528 Set<Folder> includedFolders = new HashSet<Folder>(); |
| 529 for (int i = 0; i < includedPaths.length; i++) { | 529 for (int i = 0; i < includedPaths.length; i++) { |
| 530 String path = includedPaths[i]; | 530 String path = includedPaths[i]; |
| 531 Resource resource = resourceProvider.getResource(path); | 531 Resource resource = resourceProvider.getResource(path); |
| 532 if (resource is Folder) { | 532 if (resource is Folder) { |
| 533 includedFolders.add(resource); | 533 includedFolders.add(resource); |
| 534 } else if (!resource.exists) { |
| 535 // Non-existent resources are ignored. TODO(paulberry): we should set |
| 536 // up a watcher to ensure that if the resource appears later, we will |
| 537 // begin analyzing it. |
| 534 } else { | 538 } else { |
| 535 // TODO(scheglov) implemented separate files analysis | 539 // TODO(scheglov) implemented separate files analysis |
| 536 throw new UnimplementedError('$path is not a folder. ' | 540 throw new UnimplementedError('$path is not a folder. ' |
| 537 'Only support for folder analysis is implemented currently.'); | 541 'Only support for folder analysis is implemented currently.'); |
| 538 } | 542 } |
| 539 } | 543 } |
| 540 this.includedPaths = includedPaths; | 544 this.includedPaths = includedPaths; |
| 541 // excluded | 545 // excluded |
| 542 List<String> oldExcludedPaths = this.excludedPaths; | 546 List<String> oldExcludedPaths = this.excludedPaths; |
| 543 this.excludedPaths = excludedPaths; | 547 this.excludedPaths = excludedPaths; |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1381 var path = resourceProvider.pathContext.fromUri(uri); | 1385 var path = resourceProvider.pathContext.fromUri(uri); |
| 1382 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; | 1386 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; |
| 1383 } | 1387 } |
| 1384 }); | 1388 }); |
| 1385 return <UriResolver>[new SdkExtUriResolver(packageMap)]; | 1389 return <UriResolver>[new SdkExtUriResolver(packageMap)]; |
| 1386 } else { | 1390 } else { |
| 1387 return const <UriResolver>[]; | 1391 return const <UriResolver>[]; |
| 1388 } | 1392 } |
| 1389 } | 1393 } |
| 1390 } | 1394 } |
| OLD | NEW |