| 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 analyzer.src.context.cache; | 5 library analyzer.src.context.cache; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/engine.dart' | 10 import 'package:analyzer/src/generated/engine.dart' |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 // | 458 // |
| 459 data.value = descriptor.defaultValue; | 459 data.value = descriptor.defaultValue; |
| 460 } | 460 } |
| 461 } | 461 } |
| 462 } | 462 } |
| 463 | 463 |
| 464 /** | 464 /** |
| 465 * Set the value of the result represented by the given [descriptor] to the | 465 * Set the value of the result represented by the given [descriptor] to the |
| 466 * given [value]. | 466 * given [value]. |
| 467 */ | 467 */ |
| 468 /*<V>*/ void setValue(ResultDescriptor /*<V>*/ descriptor, dynamic /*V*/ | 468 /*<V>*/ void setValue( |
| 469 value, List<TargetedResult> dependedOn) { | 469 ResultDescriptor /*<V>*/ descriptor, |
| 470 dynamic /*V*/ |
| 471 value, |
| 472 List<TargetedResult> dependedOn) { |
| 470 // { | 473 // { |
| 471 // String valueStr = '$value'; | 474 // String valueStr = '$value'; |
| 472 // if (valueStr.length > 20) { | 475 // if (valueStr.length > 20) { |
| 473 // valueStr = valueStr.substring(0, 20) + '...'; | 476 // valueStr = valueStr.substring(0, 20) + '...'; |
| 474 // } | 477 // } |
| 475 // valueStr = valueStr.replaceAll('\n', '\\n'); | 478 // valueStr = valueStr.replaceAll('\n', '\\n'); |
| 476 // print( | 479 // print( |
| 477 // 'setValue $descriptor for $target value=$valueStr deps=$dependedOn')
; | 480 // 'setValue $descriptor for $target value=$valueStr deps=$dependedOn')
; |
| 478 // } | 481 // } |
| 479 _validateStateChange(descriptor, CacheState.VALID); | 482 _validateStateChange(descriptor, CacheState.VALID); |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 void resultAccessed(TargetedResult result) {} | 1144 void resultAccessed(TargetedResult result) {} |
| 1142 | 1145 |
| 1143 @override | 1146 @override |
| 1144 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { | 1147 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { |
| 1145 return TargetedResult.EMPTY_LIST; | 1148 return TargetedResult.EMPTY_LIST; |
| 1146 } | 1149 } |
| 1147 | 1150 |
| 1148 @override | 1151 @override |
| 1149 void targetRemoved(AnalysisTarget target) {} | 1152 void targetRemoved(AnalysisTarget target) {} |
| 1150 } | 1153 } |
| OLD | NEW |