| Index: runtime/bin/vmservice/client/lib/src/elements/action_link.dart
|
| diff --git a/runtime/bin/vmservice/client/lib/src/elements/eval_link.dart b/runtime/bin/vmservice/client/lib/src/elements/action_link.dart
|
| similarity index 55%
|
| copy from runtime/bin/vmservice/client/lib/src/elements/eval_link.dart
|
| copy to runtime/bin/vmservice/client/lib/src/elements/action_link.dart
|
| index be08b76237e2ea09cad27386b3e241f3225ea821..2a1dc935d67201e98dd422ab60b55aa5ea40bb02 100644
|
| --- a/runtime/bin/vmservice/client/lib/src/elements/eval_link.dart
|
| +++ b/runtime/bin/vmservice/client/lib/src/elements/action_link.dart
|
| @@ -2,30 +2,28 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -library eval_link_element;
|
| +library action_link_element;
|
|
|
| import 'package:observatory/service.dart';
|
| import 'package:polymer/polymer.dart';
|
|
|
| -@CustomTag('eval-link')
|
| -class EvalLinkElement extends PolymerElement {
|
| - EvalLinkElement.created() : super.created();
|
| +@CustomTag('action-link')
|
| +class ActionLinkElement extends PolymerElement {
|
| + ActionLinkElement.created() : super.created();
|
|
|
| @observable bool busy = false;
|
| @published var callback = null;
|
| - @published String expr = '';
|
| - @published ServiceObject result = null;
|
| + @published String label = 'action';
|
|
|
| - void evalNow(var a, var b, var c) {
|
| + void doAction(var a, var b, var c) {
|
| if (busy) {
|
| return;
|
| }
|
| if (callback != null) {
|
| busy = true;
|
| - result = null;
|
| - callback(expr).then((ServiceObject obj) {
|
| - result = obj;
|
| - }).whenComplete(() {
|
| + // TODO(turnidge): Track down why adding a dummy argument makes
|
| + // this work but having a no-argument callback doesn't.
|
| + callback(null).whenComplete(() {
|
| busy = false;
|
| });
|
| }
|
|
|