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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
617 }); | 617 }); |
618 | 618 |
619 configureContextOptions(info.context, options); | 619 configureContextOptions(info.context, options); |
620 | 620 |
621 // Nothing more to do. | 621 // Nothing more to do. |
622 if (options == null) { | 622 if (options == null) { |
623 return; | 623 return; |
624 } | 624 } |
625 | 625 |
626 var analyzer = options[AnalyzerOptions.analyzer]; | 626 var analyzer = options[AnalyzerOptions.analyzer]; |
627 if (analyzer is! Map) { | 627 if (analyzer is Map) { |
628 // Done. | 628 // Set ignore patterns. |
629 return; | 629 YamlList exclude = analyzer[AnalyzerOptions.exclude]; |
630 } | 630 if (exclude is List<String>) { |
631 | 631 setIgnorePatternsForContext(info, exclude as List<String>); |
scheglov
2016/03/31 00:53:18
We can propagate the type of "exclude", but it is
Brian Wilkerson
2016/03/31 15:27:12
You're right, that does seem like it ought not to
Leaf
2016/03/31 17:59:14
Intellij go to declaration can't seem to find the
Brian Wilkerson
2016/03/31 18:17:06
Then the right solution is probably to change setI
| |
632 // Set ignore patterns. | 632 } |
633 YamlList exclude = analyzer[AnalyzerOptions.exclude]; | |
634 if (exclude != null) { | |
635 setIgnorePatternsForContext(info, exclude); | |
636 } | 633 } |
637 } | 634 } |
638 | 635 |
639 /** | 636 /** |
640 * Return the options from the analysis options file in the given [folder] | 637 * Return the options from the analysis options file in the given [folder] |
641 * if exists, or in one of the parent folders, or `null` if no analysis | 638 * if exists, or in one of the parent folders, or `null` if no analysis |
642 * options file is found or if the contents of the file are not valid YAML. | 639 * options file is found or if the contents of the file are not valid YAML. |
643 */ | 640 */ |
644 Map<String, Object> readOptions(Folder folder) { | 641 Map<String, Object> readOptions(Folder folder) { |
645 try { | 642 try { |
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1759 ResourceProvider resourceProvider) { | 1756 ResourceProvider resourceProvider) { |
1760 if (packages != null) { | 1757 if (packages != null) { |
1761 // Construct package map for the SdkExtUriResolver. | 1758 // Construct package map for the SdkExtUriResolver. |
1762 Map<String, List<Folder>> packageMap = buildPackageMap(resourceProvider); | 1759 Map<String, List<Folder>> packageMap = buildPackageMap(resourceProvider); |
1763 return <UriResolver>[new SdkExtUriResolver(packageMap)]; | 1760 return <UriResolver>[new SdkExtUriResolver(packageMap)]; |
1764 } else { | 1761 } else { |
1765 return const <UriResolver>[]; | 1762 return const <UriResolver>[]; |
1766 } | 1763 } |
1767 } | 1764 } |
1768 } | 1765 } |
OLD | NEW |