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'; | 10 import 'dart:core'; |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
878 _addSourceFiles(changeSet, child, info); | 878 _addSourceFiles(changeSet, child, info); |
879 } | 879 } |
880 } | 880 } |
881 } | 881 } |
882 | 882 |
883 void _checkForAnalysisOptionsUpdate( | 883 void _checkForAnalysisOptionsUpdate( |
884 String path, ContextInfo info, ChangeType changeType) { | 884 String path, ContextInfo info, ChangeType changeType) { |
885 if (AnalysisEngine.isAnalysisOptionsFileName(path, pathContext)) { | 885 if (AnalysisEngine.isAnalysisOptionsFileName(path, pathContext)) { |
886 var analysisContext = info.context; | 886 var analysisContext = info.context; |
887 if (analysisContext is context.AnalysisContextImpl) { | 887 if (analysisContext is context.AnalysisContextImpl) { |
888 // TODO(brianwilkerson) This doesn't correctly update the source factory | 888 // TODO(brianwilkerson) This doesn't correctly update the source factory |
Brian Wilkerson
2016/09/23 13:56:54
This comment should either be removed or updated.
| |
889 // if the changes necessitate it (such as by changing the setting of the | 889 // if the changes necessitate it (such as by changing the setting of the |
890 // strong-mode option). | 890 // strong-mode option). |
891 Map<String, Object> options = readOptions(info.folder); | 891 Map<String, Object> options = readOptions(info.folder); |
892 processOptionsForContext(info, options, | 892 processOptionsForContext(info, options, |
893 optionsRemoved: changeType == ChangeType.REMOVE); | 893 optionsRemoved: changeType == ChangeType.REMOVE); |
894 analysisContext.invalidateCachedResults(); | 894 analysisContext.sourceFactory = _createSourceFactory( |
895 analysisContext, analysisContext.analysisOptions, info.folder); | |
895 callbacks.applyChangesToContext(info.folder, new ChangeSet()); | 896 callbacks.applyChangesToContext(info.folder, new ChangeSet()); |
896 } | 897 } |
897 } | 898 } |
898 } | 899 } |
899 | 900 |
900 void _checkForPackagespecUpdate( | 901 void _checkForPackagespecUpdate( |
901 String path, ContextInfo info, Folder folder) { | 902 String path, ContextInfo info, Folder folder) { |
902 // Check to see if this is the .packages file for this context and if so, | 903 // Check to see if this is the .packages file for this context and if so, |
903 // update the context's source factory. | 904 // update the context's source factory. |
904 if (absolutePathContext.basename(path) == PACKAGE_SPEC_NAME) { | 905 if (absolutePathContext.basename(path) == PACKAGE_SPEC_NAME) { |
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1817 } | 1818 } |
1818 return _embedderLocator; | 1819 return _embedderLocator; |
1819 } | 1820 } |
1820 | 1821 |
1821 @override | 1822 @override |
1822 SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider) { | 1823 SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider) { |
1823 return _sdkExtensionFinder ??= | 1824 return _sdkExtensionFinder ??= |
1824 new SdkExtensionFinder(buildPackageMap(resourceProvider)); | 1825 new SdkExtensionFinder(buildPackageMap(resourceProvider)); |
1825 } | 1826 } |
1826 } | 1827 } |
OLD | NEW |