| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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:core' hide Resource; | 9 import 'dart:core'; |
| 10 | 10 |
| 11 import 'package:analyzer/file_system/file_system.dart'; | 11 import 'package:analyzer/file_system/file_system.dart'; |
| 12 import 'package:watcher/watcher.dart'; | 12 import 'package:watcher/watcher.dart'; |
| 13 | 13 |
| 14 /** | 14 /** |
| 15 * A function called when a watch [event] associated with a watched resource is | 15 * A function called when a watch [event] associated with a watched resource is |
| 16 * received. The list of [tokens] will contain all of the tokens associated with | 16 * received. The list of [tokens] will contain all of the tokens associated with |
| 17 * folders containing (or the same as) the watched resource. | 17 * folders containing (or the same as) the watched resource. |
| 18 */ | 18 */ |
| 19 typedef void HandleWatchEvent<T>(WatchEvent event, List<T> tokens); | 19 typedef void HandleWatchEvent<T>(WatchEvent event, List<T> tokens); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 void _removeChild(WatchNode<T> child) { | 278 void _removeChild(WatchNode<T> child) { |
| 279 _children.remove(child); | 279 _children.remove(child); |
| 280 Iterable<WatchNode<T>> grandchildren = child.children; | 280 Iterable<WatchNode<T>> grandchildren = child.children; |
| 281 for (WatchNode<T> grandchild in grandchildren) { | 281 for (WatchNode<T> grandchild in grandchildren) { |
| 282 grandchild.parent = this; | 282 grandchild.parent = this; |
| 283 _children.add(grandchild); | 283 _children.add(grandchild); |
| 284 } | 284 } |
| 285 child._children.clear(); | 285 child._children.clear(); |
| 286 } | 286 } |
| 287 } | 287 } |
| OLD | NEW |