| Index: runtime/observatory/lib/src/elements/service_ref.dart
|
| diff --git a/runtime/observatory/lib/src/elements/service_ref.dart b/runtime/observatory/lib/src/elements/service_ref.dart
|
| index e9aad6d73d75d0f9d5c1b3ffd1e21000f1299132..7646373d1fa7623767434ff17f9491f9b31f8f3c 100644
|
| --- a/runtime/observatory/lib/src/elements/service_ref.dart
|
| +++ b/runtime/observatory/lib/src/elements/service_ref.dart
|
| @@ -4,14 +4,9 @@
|
|
|
| library service_ref_element;
|
|
|
| -import 'dart:html';
|
| -
|
| -import 'package:logging/logging.dart';
|
| import 'package:observatory/service.dart';
|
| import 'package:polymer/polymer.dart';
|
|
|
| -import 'class_ref.dart';
|
| -import 'library_ref.dart';
|
| import 'observatory_element.dart';
|
|
|
| @CustomTag('service-ref')
|
| @@ -80,87 +75,6 @@ class ServiceRefElement extends ObservatoryElement {
|
| }
|
| }
|
|
|
| -
|
| -@CustomTag('any-service-ref')
|
| -class AnyServiceRefElement extends ObservatoryElement {
|
| - @published ServiceObject ref;
|
| - @published String expandKey;
|
| - @published bool asValue = false;
|
| - AnyServiceRefElement.created() : super.created();
|
| -
|
| - Element _constructElementForRef() {
|
| - var type = ref.type;
|
| - switch (type) {
|
| - case 'Class':
|
| - ClassRefElement element = new Element.tag('class-ref');
|
| - element.ref = ref;
|
| - element.asValue = asValue;
|
| - return element;
|
| - case 'Code':
|
| - ServiceRefElement element = new Element.tag('code-ref');
|
| - element.ref = ref;
|
| - return element;
|
| - case 'Context':
|
| - ServiceRefElement element = new Element.tag('context-ref');
|
| - element.ref = ref;
|
| - return element;
|
| - case 'Error':
|
| - ServiceRefElement element = new Element.tag('error-ref');
|
| - element.ref = ref;
|
| - return element;
|
| - case 'Field':
|
| - ServiceRefElement element = new Element.tag('field-ref');
|
| - element.ref = ref;
|
| - return element;
|
| - case 'Function':
|
| - ServiceRefElement element = new Element.tag('function-ref');
|
| - element.ref = ref;
|
| - return element;
|
| - case 'Library':
|
| - LibraryRefElement element = new Element.tag('library-ref');
|
| - element.ref = ref;
|
| - element.asValue = asValue;
|
| - return element;
|
| - case 'Object':
|
| - ServiceRefElement element = new Element.tag('object-ref');
|
| - element.ref = ref;
|
| - return element;
|
| - case 'Script':
|
| - ServiceRefElement element = new Element.tag('script-ref');
|
| - element.ref = ref;
|
| - return element;
|
| - case 'Instance':
|
| - case 'Sentinel':
|
| - ServiceRefElement element = new Element.tag('instance-ref');
|
| - element.ref = ref;
|
| - if (expandKey != null) {
|
| - element.expandKey = expandKey;
|
| - }
|
| - return element;
|
| - default:
|
| - SpanElement element = new Element.tag('span');
|
| - element.text = "<<Unknown service ref: $ref>>";
|
| - return element;
|
| - }
|
| - }
|
| -
|
| - refChanged(oldValue) {
|
| - // Remove the current view.
|
| - children.clear();
|
| - if (ref == null) {
|
| - Logger.root.info('Viewing null object.');
|
| - return;
|
| - }
|
| - var type = ref.type;
|
| - var element = _constructElementForRef();
|
| - if (element == null) {
|
| - Logger.root.info('Unable to find a ref element for \'${type}\'');
|
| - return;
|
| - }
|
| - children.add(element);
|
| - }
|
| -}
|
| -
|
| @CustomTag('object-ref')
|
| class ObjectRefElement extends ServiceRefElement {
|
| ObjectRefElement.created() : super.created();
|
|
|