OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 class_tree_element; | 5 library class_tree_element; |
6 | 6 |
7 import 'observatory_element.dart'; | 7 import 'observatory_element.dart'; |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 import 'package:logging/logging.dart'; | 9 import 'package:logging/logging.dart'; |
10 import 'package:observatory/app.dart'; | 10 import 'package:observatory/app.dart'; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 | 44 |
45 @CustomTag('class-tree') | 45 @CustomTag('class-tree') |
46 class ClassTreeElement extends ObservatoryElement { | 46 class ClassTreeElement extends ObservatoryElement { |
47 @observable Isolate isolate; | 47 @observable Isolate isolate; |
48 | 48 |
49 TableTree tree; | 49 TableTree tree; |
50 | 50 |
51 ClassTreeElement.created() : super.created(); | 51 ClassTreeElement.created() : super.created(); |
52 | 52 |
53 void enteredView() { | 53 @override |
| 54 void attached() { |
| 55 super.attached(); |
54 tree = new TableTree(); | 56 tree = new TableTree(); |
55 if (isolate != null) { | 57 if (isolate != null) { |
56 _update(isolate.objectClass); | 58 _update(isolate.objectClass); |
57 } | 59 } |
58 } | 60 } |
59 | 61 |
60 isolateChanged(oldValue) { | 62 isolateChanged(oldValue) { |
61 isolate.getClassHierarchy().then((objectClass) { | 63 isolate.getClassHierarchy().then((objectClass) { |
62 _update(objectClass); | 64 _update(objectClass); |
63 }); | 65 }); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 try { | 106 try { |
105 // Subtract 1 to get 0 based indexing. | 107 // Subtract 1 to get 0 based indexing. |
106 tree.toggle(row.rowIndex - 1); | 108 tree.toggle(row.rowIndex - 1); |
107 } catch (e, stackTrace) { | 109 } catch (e, stackTrace) { |
108 Logger.root.warning('toggleExpanded', e, stackTrace); | 110 Logger.root.warning('toggleExpanded', e, stackTrace); |
109 } | 111 } |
110 } | 112 } |
111 } | 113 } |
112 | 114 |
113 } | 115 } |
OLD | NEW |