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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 | 92 |
93 List<Element> _createShowMoreButton() { | 93 List<Element> _createShowMoreButton() { |
94 if (_loadedInstance.count == null) { | 94 if (_loadedInstance.count == null) { |
95 return []; | 95 return []; |
96 } | 96 } |
97 final count = _loadedInstance.count; | 97 final count = _loadedInstance.count; |
98 final button = new ButtonElement()..text = 'show next ${count}'; | 98 final button = new ButtonElement()..text = 'show next ${count}'; |
99 button.onClick.listen((_) async { | 99 button.onClick.listen((_) async { |
100 button.disabled = true; | 100 button.disabled = true; |
101 _loadedInstance = | 101 _loadedInstance = await _objects.get(_isolate, _instance.id); |
102 await _objects.get(_isolate, _instance.id, count: count * 2); | |
103 _r.dirty(); | 102 _r.dirty(); |
104 }); | 103 }); |
105 return [button]; | 104 return [button]; |
106 } | 105 } |
107 | 106 |
108 List<Element> _createLink() { | 107 List<Element> _createLink() { |
109 switch (_instance.kind) { | 108 switch (_instance.kind) { |
110 case M.InstanceKind.vNull: | 109 case M.InstanceKind.vNull: |
111 case M.InstanceKind.bool: | 110 case M.InstanceKind.bool: |
112 case M.InstanceKind.int: | 111 case M.InstanceKind.int: |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 new BRElement(), | 326 new BRElement(), |
328 new SpanElement()..text = '<value> : ', | 327 new SpanElement()..text = '<value> : ', |
329 new InstanceRefElement(_isolate, _loadedInstance.value, _objects, | 328 new InstanceRefElement(_isolate, _loadedInstance.value, _objects, |
330 queue: _r.queue), | 329 queue: _r.queue), |
331 ]; | 330 ]; |
332 default: | 331 default: |
333 return []; | 332 return []; |
334 } | 333 } |
335 } | 334 } |
336 } | 335 } |
OLD | NEW |