| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 */ | 328 */ |
| 329 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet); | 329 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet); |
| 330 | 330 |
| 331 /** | 331 /** |
| 332 * Signals that the context manager has started to compute a package map (if | 332 * Signals that the context manager has started to compute a package map (if |
| 333 * [computing] is `true`) or has finished (if [computing] is `false`). | 333 * [computing] is `true`) or has finished (if [computing] is `false`). |
| 334 */ | 334 */ |
| 335 void computingPackageMap(bool computing); | 335 void computingPackageMap(bool computing); |
| 336 | 336 |
| 337 /** | 337 /** |
| 338 * Called when the context manager changes the folder with which a context is |
| 339 * associated. Currently this is mostly FYI, and used only in tests. |
| 340 */ |
| 341 void moveContext(Folder from, Folder to); |
| 342 |
| 343 /** |
| 338 * Remove the context associated with the given [folder]. [flushedFiles] is | 344 * Remove the context associated with the given [folder]. [flushedFiles] is |
| 339 * a list of the files which will be "orphaned" by removing this context | 345 * a list of the files which will be "orphaned" by removing this context |
| 340 * (they will no longer be analyzed by any context). | 346 * (they will no longer be analyzed by any context). |
| 341 */ | 347 */ |
| 342 void removeContext(Folder folder, List<String> flushedFiles); | 348 void removeContext(Folder folder, List<String> flushedFiles); |
| 343 | 349 |
| 344 /** | 350 /** |
| 345 * Called when the package resolution for the given [context] has changed. | 351 * Called when the package resolution for the given [context] has changed. |
| 346 */ | 352 */ |
| 347 void updateContextPackageUriResolver(AnalysisContext context); | 353 void updateContextPackageUriResolver(AnalysisContext context); |
| (...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1788 ResourceProvider resourceProvider) { | 1794 ResourceProvider resourceProvider) { |
| 1789 if (packages != null) { | 1795 if (packages != null) { |
| 1790 // Construct package map for the SdkExtUriResolver. | 1796 // Construct package map for the SdkExtUriResolver. |
| 1791 Map<String, List<Folder>> packageMap = buildPackageMap(resourceProvider); | 1797 Map<String, List<Folder>> packageMap = buildPackageMap(resourceProvider); |
| 1792 return <UriResolver>[new SdkExtUriResolver(packageMap)]; | 1798 return <UriResolver>[new SdkExtUriResolver(packageMap)]; |
| 1793 } else { | 1799 } else { |
| 1794 return const <UriResolver>[]; | 1800 return const <UriResolver>[]; |
| 1795 } | 1801 } |
| 1796 } | 1802 } |
| 1797 } | 1803 } |
| OLD | NEW |