Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Unified Diff: runtime/observatory/lib/src/elements/instance_ref.dart

Issue 1977873003: Allow users to see more elements of a list/map in Observatory. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix problems found during testing Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/instance_ref.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/instance_ref.dart
diff --git a/runtime/observatory/lib/src/elements/instance_ref.dart b/runtime/observatory/lib/src/elements/instance_ref.dart
index 86727ae8d36b07448cf08caa438fe8b4bec83b47..cbf5eae1e83c03c7bed1108b34a91eda07aa208b 100644
--- a/runtime/observatory/lib/src/elements/instance_ref.dart
+++ b/runtime/observatory/lib/src/elements/instance_ref.dart
@@ -4,6 +4,7 @@
library instance_ref_element;
+import 'dart:async';
import 'package:polymer/polymer.dart';
import 'package:observatory/service.dart';
import 'service_ref.dart';
@@ -58,4 +59,15 @@ class InstanceRefElement extends ServiceRefElement {
String makeExpandKey(String key) {
return '${expandKey}/${key}';
}
+
+ Future showMore() async {
+ Instance instance = ref;
+ if (instance.isList) {
+ await instance.reload(count: instance.elements.length * 2);
+ } else if (instance.isMap) {
+ await instance.reload(count: instance.associations.length * 2);
+ } else if (instance.isTypedData) {
+ await instance.reload(count: instance.typedElements.length * 2);
+ }
+ }
}
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/instance_ref.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698