| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 observe.src.path_observer; | 5 library observe.src.path_observer; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:math' show min; | 9 import 'dart:math' show min; |
| 10 | 10 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 } | 321 } |
| 322 | 322 |
| 323 if (_logger.isLoggable(Level.FINER)) { | 323 if (_logger.isLoggable(Level.FINER)) { |
| 324 _logger.finer("can't set $property in $object"); | 324 _logger.finer("can't set $property in $object"); |
| 325 } | 325 } |
| 326 return false; | 326 return false; |
| 327 } | 327 } |
| 328 | 328 |
| 329 // From: https://github.com/rafaelw/ChangeSummary/blob/master/change_summary.js | 329 // From: https://github.com/rafaelw/ChangeSummary/blob/master/change_summary.js |
| 330 | 330 |
| 331 final _identRegExp = () { | 331 final RegExp _identRegExp = () { |
| 332 const identStart = '[\$_a-zA-Z]'; | 332 const identStart = '[\$_a-zA-Z]'; |
| 333 const identPart = '[\$_a-zA-Z0-9]'; | 333 const identPart = '[\$_a-zA-Z0-9]'; |
| 334 return new RegExp('^$identStart+$identPart*\$'); | 334 return new RegExp('^$identStart+$identPart*\$'); |
| 335 }(); | 335 }(); |
| 336 | 336 |
| 337 _isIdent(s) => _identRegExp.hasMatch(s); | 337 _isIdent(s) => _identRegExp.hasMatch(s); |
| 338 | 338 |
| 339 // Dart note: refactored to convert to codepoints once and operate on codepoints | 339 // Dart note: refactored to convert to codepoints once and operate on codepoints |
| 340 // rather than characters. | 340 // rather than characters. |
| 341 class _PathParser { | 341 class _PathParser { |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 if (observer._isOpen) observer._iterateObjects(observe); | 911 if (observer._isOpen) observer._iterateObjects(observe); |
| 912 } | 912 } |
| 913 | 913 |
| 914 for (var observer in _observers.toList(growable: false)) { | 914 for (var observer in _observers.toList(growable: false)) { |
| 915 if (observer._isOpen) observer._check(); | 915 if (observer._isOpen) observer._check(); |
| 916 } | 916 } |
| 917 } | 917 } |
| 918 } | 918 } |
| 919 | 919 |
| 920 const int _MAX_DIRTY_CHECK_CYCLES = 1000; | 920 const int _MAX_DIRTY_CHECK_CYCLES = 1000; |
| OLD | NEW |