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/elements.dart'; | 10 import 'package:observatory/elements.dart'; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 case 'Instance': | 59 case 'Instance': |
60 case 'Smi': | 60 case 'Smi': |
61 case 'String': | 61 case 'String': |
62 InstanceViewElement element = new Element.tag('instance-view'); | 62 InstanceViewElement element = new Element.tag('instance-view'); |
63 element.instance = object; | 63 element.instance = object; |
64 return element; | 64 return element; |
65 case 'Isolate': | 65 case 'Isolate': |
66 IsolateViewElement element = new Element.tag('isolate-view'); | 66 IsolateViewElement element = new Element.tag('isolate-view'); |
67 element.isolate = object; | 67 element.isolate = object; |
68 return element; | 68 return element; |
69 case 'IsolateList': | |
70 IsolateListElement element = new Element.tag('isolate-list'); | |
71 element.isolates = object; | |
72 return element; | |
73 case 'Library': | 69 case 'Library': |
74 LibraryViewElement element = new Element.tag('library-view'); | 70 LibraryViewElement element = new Element.tag('library-view'); |
75 element.library = object; | 71 element.library = object; |
76 return element; | 72 return element; |
77 case 'Profile': | 73 case 'Profile': |
78 IsolateProfileElement element = new Element.tag('isolate-profile'); | 74 IsolateProfileElement element = new Element.tag('isolate-profile'); |
79 element.profile = object; | 75 element.profile = object; |
80 return element; | 76 return element; |
81 case 'Script': | 77 case 'Script': |
82 ScriptViewElement element = new Element.tag('script-view'); | 78 ScriptViewElement element = new Element.tag('script-view'); |
83 element.script = object; | 79 element.script = object; |
84 return element; | 80 return element; |
85 case 'StackTrace': | 81 case 'StackTrace': |
86 StackTraceElement element = new Element.tag('stack-trace'); | 82 StackTraceElement element = new Element.tag('stack-trace'); |
87 element.trace = object; | 83 element.trace = object; |
88 return element; | 84 return element; |
| 85 case 'VM': |
| 86 VMViewElement element = new Element.tag('vm-view'); |
| 87 element.vm = object; |
| 88 return element; |
89 default: | 89 default: |
90 return null; | 90 return null; |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
94 objectChanged(oldValue) { | 94 objectChanged(oldValue) { |
95 // Remove the current view. | 95 // Remove the current view. |
96 children.clear(); | 96 children.clear(); |
97 if (object == null) { | 97 if (object == null) { |
98 Logger.root.info('Viewing null object.'); | 98 Logger.root.info('Viewing null object.'); |
99 return; | 99 return; |
100 } | 100 } |
101 var type = object.serviceType; | 101 var type = object.serviceType; |
102 var element = _constructElementForObject(); | 102 var element = _constructElementForObject(); |
103 if (element == null) { | 103 if (element == null) { |
104 Logger.root.info('Unable to find a view element for \'${type}\''); | 104 Logger.root.info('Unable to find a view element for \'${type}\''); |
105 return; | 105 return; |
106 } | 106 } |
107 children.add(element); | 107 children.add(element); |
108 Logger.root.info('Viewing object of \'${type}\''); | 108 Logger.root.info('Viewing object of \'${type}\''); |
109 } | 109 } |
110 } | 110 } |
OLD | NEW |