| 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 import 'dart:html'; | 5 import 'dart:html'; |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import 'package:observatory/models.dart' as M; | 7 import 'package:observatory/models.dart' as M; |
| 8 import 'package:observatory/src/elements/curly_block.dart'; | 8 import 'package:observatory/src/elements/curly_block.dart'; |
| 9 import 'package:observatory/src/elements/field_ref.dart'; | 9 import 'package:observatory/src/elements/field_ref.dart'; |
| 10 import 'package:observatory/src/elements/helpers/any_ref.dart'; | 10 import 'package:observatory/src/elements/helpers/any_ref.dart'; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 ]) | 253 ]) |
| 254 .toList(); | 254 .toList(); |
| 255 case M.InstanceKind.list: | 255 case M.InstanceKind.list: |
| 256 var index = 0; | 256 var index = 0; |
| 257 return _loadedInstance.elements | 257 return _loadedInstance.elements |
| 258 .map((element) => new DivElement() | 258 .map((element) => new DivElement() |
| 259 ..children = [ | 259 ..children = [ |
| 260 new SpanElement()..text = '[ ${index++} ] : ', | 260 new SpanElement()..text = '[ ${index++} ] : ', |
| 261 anyRef(_isolate, element, _instances, queue: _r.queue) | 261 anyRef(_isolate, element, _instances, queue: _r.queue) |
| 262 ]) | 262 ]) |
| 263 .toList()..addAll(_createShowMoreButton()); | 263 .toList() |
| 264 ..addAll(_createShowMoreButton()); |
| 264 case M.InstanceKind.map: | 265 case M.InstanceKind.map: |
| 265 return _loadedInstance.associations | 266 return _loadedInstance.associations |
| 266 .map((association) => new DivElement() | 267 .map((association) => new DivElement() |
| 267 ..children = [ | 268 ..children = [ |
| 268 new SpanElement()..text = '[ ', | 269 new SpanElement()..text = '[ ', |
| 269 anyRef(_isolate, association.key, _instances, queue: _r.queue), | 270 anyRef(_isolate, association.key, _instances, queue: _r.queue), |
| 270 new SpanElement()..text = ' ] : ', | 271 new SpanElement()..text = ' ] : ', |
| 271 anyRef(_isolate, association.value, _instances, queue: _r.queue) | 272 anyRef(_isolate, association.value, _instances, queue: _r.queue) |
| 272 ]) | 273 ]) |
| 273 .toList()..addAll(_createShowMoreButton()); | 274 .toList() |
| 275 ..addAll(_createShowMoreButton()); |
| 274 case M.InstanceKind.uint8ClampedList: | 276 case M.InstanceKind.uint8ClampedList: |
| 275 case M.InstanceKind.uint8List: | 277 case M.InstanceKind.uint8List: |
| 276 case M.InstanceKind.uint16List: | 278 case M.InstanceKind.uint16List: |
| 277 case M.InstanceKind.uint32List: | 279 case M.InstanceKind.uint32List: |
| 278 case M.InstanceKind.uint64List: | 280 case M.InstanceKind.uint64List: |
| 279 case M.InstanceKind.int8List: | 281 case M.InstanceKind.int8List: |
| 280 case M.InstanceKind.int16List: | 282 case M.InstanceKind.int16List: |
| 281 case M.InstanceKind.int32List: | 283 case M.InstanceKind.int32List: |
| 282 case M.InstanceKind.int64List: | 284 case M.InstanceKind.int64List: |
| 283 case M.InstanceKind.float32List: | 285 case M.InstanceKind.float32List: |
| 284 case M.InstanceKind.float64List: | 286 case M.InstanceKind.float64List: |
| 285 case M.InstanceKind.int32x4List: | 287 case M.InstanceKind.int32x4List: |
| 286 case M.InstanceKind.float32x4List: | 288 case M.InstanceKind.float32x4List: |
| 287 case M.InstanceKind.float64x2List: | 289 case M.InstanceKind.float64x2List: |
| 288 var index = 0; | 290 var index = 0; |
| 289 return _loadedInstance.typedElements | 291 return _loadedInstance.typedElements |
| 290 .map((e) => new DivElement()..text = '[ ${index++} ] : $e') | 292 .map((e) => new DivElement()..text = '[ ${index++} ] : $e') |
| 291 .toList()..addAll(_createShowMoreButton()); | 293 .toList() |
| 294 ..addAll(_createShowMoreButton()); |
| 292 case M.InstanceKind.mirrorReference: | 295 case M.InstanceKind.mirrorReference: |
| 293 return [ | 296 return [ |
| 294 new SpanElement()..text = '<referent> : ', | 297 new SpanElement()..text = '<referent> : ', |
| 295 new InstanceRefElement(_isolate, _loadedInstance.referent, _instances, | 298 new InstanceRefElement(_isolate, _loadedInstance.referent, _instances, |
| 296 queue: _r.queue) | 299 queue: _r.queue) |
| 297 ]; | 300 ]; |
| 298 case M.InstanceKind.weakProperty: | 301 case M.InstanceKind.weakProperty: |
| 299 return [ | 302 return [ |
| 300 new SpanElement()..text = '<key> : ', | 303 new SpanElement()..text = '<key> : ', |
| 301 new InstanceRefElement(_isolate, _loadedInstance.key, _instances, | 304 new InstanceRefElement(_isolate, _loadedInstance.key, _instances, |
| 302 queue: _r.queue), | 305 queue: _r.queue), |
| 303 new BRElement(), | 306 new BRElement(), |
| 304 new SpanElement()..text = '<value> : ', | 307 new SpanElement()..text = '<value> : ', |
| 305 new InstanceRefElement(_isolate, _loadedInstance.value, _instances, | 308 new InstanceRefElement(_isolate, _loadedInstance.value, _instances, |
| 306 queue: _r.queue), | 309 queue: _r.queue), |
| 307 ]; | 310 ]; |
| 308 default: | 311 default: |
| 309 return []; | 312 return []; |
| 310 } | 313 } |
| 311 } | 314 } |
| 312 } | 315 } |
| OLD | NEW |