| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 } | 498 } |
| 499 }); | 499 }); |
| 500 | 500 |
| 501 // In case options files are removed, revert to default options. | 501 // In case options files are removed, revert to default options. |
| 502 if (optionsRemoved) { | 502 if (optionsRemoved) { |
| 503 info.context.analysisOptions = new AnalysisOptionsImpl(); | 503 info.context.analysisOptions = new AnalysisOptionsImpl(); |
| 504 return; | 504 return; |
| 505 } | 505 } |
| 506 | 506 |
| 507 // Analysis options are processed 'in-line'. | 507 // Analysis options are processed 'in-line'. |
| 508 YamlMap analyzer = options[AnalyzerOptions.analyzer]; | 508 YamlNode analyzer = options[AnalyzerOptions.analyzer]; |
| 509 if (analyzer == null) { | 509 if (analyzer is! YamlMap) { |
| 510 // No options for analyzer. | 510 // No options for analyzer. |
| 511 return; | 511 return; |
| 512 } | 512 } |
| 513 | 513 |
| 514 configureContextOptions(info.context, options); | 514 configureContextOptions(info.context, options); |
| 515 | 515 |
| 516 // Set ignore patterns. | 516 // Set ignore patterns. |
| 517 YamlList exclude = analyzer[AnalyzerOptions.exclude]; | 517 YamlList exclude = analyzer[AnalyzerOptions.exclude]; |
| 518 if (exclude != null) { | 518 if (exclude != null) { |
| 519 setIgnorePatternsForContext(info, exclude); | 519 setIgnorePatternsForContext(info, exclude); |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 var path = resourceProvider.pathContext.fromUri(uri); | 1454 var path = resourceProvider.pathContext.fromUri(uri); |
| 1455 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; | 1455 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; |
| 1456 } | 1456 } |
| 1457 }); | 1457 }); |
| 1458 return <UriResolver>[new SdkExtUriResolver(packageMap)]; | 1458 return <UriResolver>[new SdkExtUriResolver(packageMap)]; |
| 1459 } else { | 1459 } else { |
| 1460 return const <UriResolver>[]; | 1460 return const <UriResolver>[]; |
| 1461 } | 1461 } |
| 1462 } | 1462 } |
| 1463 } | 1463 } |
| OLD | NEW |