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 field_view_element; | 5 library field_view_element; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 import 'package:observatory/models.dart' as M; | 9 import 'package:observatory/models.dart' as M; |
10 import 'package:observatory/src/elements/class_ref.dart'; | 10 import 'package:observatory/src/elements/class_ref.dart'; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 final menu = [ | 184 final menu = [ |
185 new NavTopMenuElement(queue: _r.queue), | 185 new NavTopMenuElement(queue: _r.queue), |
186 new NavVMMenuElement(_vm, _events, queue: _r.queue), | 186 new NavVMMenuElement(_vm, _events, queue: _r.queue), |
187 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue) | 187 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue) |
188 ]; | 188 ]; |
189 if (_library != null) { | 189 if (_library != null) { |
190 menu.add(new NavLibraryMenuElement(_isolate, _field.dartOwner, | 190 menu.add(new NavLibraryMenuElement(_isolate, _field.dartOwner, |
191 queue: _r.queue)); | 191 queue: _r.queue)); |
192 } else if (_field.dartOwner is M.ClassRef) { | 192 } else if (_field.dartOwner is M.ClassRef) { |
193 menu.add( | 193 menu.add( |
194 new NavClassMenuElement(_isolate, _field.dartOwner, queue: _r.queue), | 194 new NavClassMenuElement(_isolate, _field.dartOwner, queue: _r.queue) |
195 ); | 195 ); |
196 } | 196 } |
197 menu.addAll([ | 197 menu.addAll([ |
198 new NavMenuElement(_field.name, last: true, queue: _r.queue), | 198 new NavMenuElement(_field.name, last: true, queue: _r.queue), |
199 new NavRefreshElement(queue: _r.queue) | 199 new NavRefreshElement(queue: _r.queue) |
200 ..onRefresh.listen((e) { | 200 ..onRefresh.listen((e) { |
201 e.element.disabled = true; | 201 e.element.disabled = true; |
202 _refresh(); | 202 _refresh(); |
203 }), | 203 }), |
204 new NavNotifyElement(_notifications, queue: _r.queue) | 204 new NavNotifyElement(_notifications, queue: _r.queue) |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 Future _refresh() async { | 285 Future _refresh() async { |
286 _field = await _fields.get(_isolate, _field.id); | 286 _field = await _fields.get(_isolate, _field.id); |
287 if (_field.dartOwner is M.LibraryRef) { | 287 if (_field.dartOwner is M.LibraryRef) { |
288 _library = _field.dartOwner; | 288 _library = _field.dartOwner; |
289 } else if (_field.dartOwner is M.ClassRef) { | 289 } else if (_field.dartOwner is M.ClassRef) { |
290 _library = (await _classes.get(_isolate, _field.dartOwner.id)).library; | 290 _library = (await _classes.get(_isolate, _field.dartOwner.id)).library; |
291 } | 291 } |
292 _r.dirty(); | 292 _r.dirty(); |
293 } | 293 } |
294 } | 294 } |
OLD | NEW |