| 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 } | 630 } |
| 631 | 631 |
| 632 // Set ignore patterns. | 632 // Set ignore patterns. |
| 633 YamlList exclude = analyzer[AnalyzerOptions.exclude]; | 633 YamlList exclude = analyzer[AnalyzerOptions.exclude]; |
| 634 if (exclude != null) { | 634 if (exclude != null) { |
| 635 setIgnorePatternsForContext(info, exclude); | 635 setIgnorePatternsForContext(info, exclude); |
| 636 } | 636 } |
| 637 } | 637 } |
| 638 | 638 |
| 639 /** | 639 /** |
| 640 * Return the options from the analysis options file in the given [folder], or | 640 * Return the options from the analysis options file in the given [folder] |
| 641 * `null` if there is no file in the folder or if the contents of the file are | 641 * if exists, or in one of the parent folders, or `null` if no analysis |
| 642 * not valid YAML. | 642 * options file is found or if the contents of the file are not valid YAML. |
| 643 */ | 643 */ |
| 644 Map<String, Object> readOptions(Folder folder) { | 644 Map<String, Object> readOptions(Folder folder) { |
| 645 try { | 645 try { |
| 646 return analysisOptionsProvider.getOptions(folder); | 646 return analysisOptionsProvider.getOptions(folder, crawlUp: true); |
| 647 } catch (_) { | 647 } catch (_) { |
| 648 // Parse errors are reported by GenerateOptionsErrorsTask. | 648 // Parse errors are reported by GenerateOptionsErrorsTask. |
| 649 } | 649 } |
| 650 return null; | 650 return null; |
| 651 } | 651 } |
| 652 | 652 |
| 653 @override | 653 @override |
| 654 void refresh(List<Resource> roots) { | 654 void refresh(List<Resource> roots) { |
| 655 // Destroy old contexts | 655 // Destroy old contexts |
| 656 List<ContextInfo> contextInfos = rootInfo.descendants.toList(); | 656 List<ContextInfo> contextInfos = rootInfo.descendants.toList(); |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1759 ResourceProvider resourceProvider) { | 1759 ResourceProvider resourceProvider) { |
| 1760 if (packages != null) { | 1760 if (packages != null) { |
| 1761 // Construct package map for the SdkExtUriResolver. | 1761 // Construct package map for the SdkExtUriResolver. |
| 1762 Map<String, List<Folder>> packageMap = buildPackageMap(resourceProvider); | 1762 Map<String, List<Folder>> packageMap = buildPackageMap(resourceProvider); |
| 1763 return <UriResolver>[new SdkExtUriResolver(packageMap)]; | 1763 return <UriResolver>[new SdkExtUriResolver(packageMap)]; |
| 1764 } else { | 1764 } else { |
| 1765 return const <UriResolver>[]; | 1765 return const <UriResolver>[]; |
| 1766 } | 1766 } |
| 1767 } | 1767 } |
| 1768 } | 1768 } |
| OLD | NEW |