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 library service_object_view_element; | 5 library service_object_view_element; |
6 | 6 |
7 import 'dart:html'; | 7 import 'dart:html'; |
8 import 'package:logging/logging.dart'; | 8 import 'package:logging/logging.dart'; |
9 import 'package:observatory/service.dart'; | 9 import 'package:observatory/service.dart'; |
10 import 'package:observatory/tracer.dart'; | 10 import 'package:observatory/tracer.dart'; |
(...skipping 12 matching lines...) Expand all Loading... |
23 var type = object.type; | 23 var type = object.type; |
24 switch (type) { | 24 switch (type) { |
25 case 'Class': | 25 case 'Class': |
26 ClassViewElement element = new Element.tag('class-view'); | 26 ClassViewElement element = new Element.tag('class-view'); |
27 element.cls = object; | 27 element.cls = object; |
28 return element; | 28 return element; |
29 case 'Code': | 29 case 'Code': |
30 CodeViewElement element = new Element.tag('code-view'); | 30 CodeViewElement element = new Element.tag('code-view'); |
31 element.code = object; | 31 element.code = object; |
32 return element; | 32 return element; |
33 case 'Context': | |
34 ContextViewElement element = new Element.tag('context-view'); | |
35 element.context = object; | |
36 return element; | |
37 case 'Error': | 33 case 'Error': |
38 ErrorViewElement element = new Element.tag('error-view'); | 34 ErrorViewElement element = new Element.tag('error-view'); |
39 element.error = object; | 35 element.error = object; |
40 return element; | 36 return element; |
41 case 'Field': | 37 case 'Field': |
42 FieldViewElement element = new Element.tag('field-view'); | 38 FieldViewElement element = new Element.tag('field-view'); |
43 element.field = object; | 39 element.field = object; |
44 return element; | 40 return element; |
45 case 'Function': | 41 case 'Function': |
46 FunctionViewElement element = new Element.tag('function-view'); | 42 FunctionViewElement element = new Element.tag('function-view'); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 161 |
166 dynamic expander() { | 162 dynamic expander() { |
167 return expandEvent; | 163 return expandEvent; |
168 } | 164 } |
169 | 165 |
170 void expandEvent(bool exp, var done) { | 166 void expandEvent(bool exp, var done) { |
171 expand = exp; | 167 expand = exp; |
172 done(); | 168 done(); |
173 } | 169 } |
174 } | 170 } |
OLD | NEW |