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 23 matching lines...) Expand all Loading... |
34 NavBarElement.tag, | 34 NavBarElement.tag, |
35 NavClassMenuElement.tag, | 35 NavClassMenuElement.tag, |
36 NavLibraryMenuElement.tag, | 36 NavLibraryMenuElement.tag, |
37 NavTopMenuElement.tag, | 37 NavTopMenuElement.tag, |
38 NavVMMenuElement.tag, | 38 NavVMMenuElement.tag, |
39 NavIsolateMenuElement.tag, | 39 NavIsolateMenuElement.tag, |
40 NavMenuElement.tag, | 40 NavMenuElement.tag, |
41 NavRefreshElement.tag, | 41 NavRefreshElement.tag, |
42 NavNotifyElement.tag, | 42 NavNotifyElement.tag, |
43 ObjectCommonElement.tag, | 43 ObjectCommonElement.tag, |
| 44 ScriptInsetElement.tag, |
44 SourceLinkElement.tag, | 45 SourceLinkElement.tag, |
45 ViewFooterElement.tag | 46 ViewFooterElement.tag |
46 ]); | 47 ]); |
47 | 48 |
48 RenderingScheduler<FieldViewElement> _r; | 49 RenderingScheduler<FieldViewElement> _r; |
49 | 50 |
50 Stream<RenderedEvent<FieldViewElement>> get onRendered => _r.onRendered; | 51 Stream<RenderedEvent<FieldViewElement>> get onRendered => _r.onRendered; |
51 | 52 |
52 M.VM _vm; | 53 M.VM _vm; |
53 M.IsolateRef _isolate; | 54 M.IsolateRef _isolate; |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 break; | 277 break; |
277 } | 278 } |
278 guard.add(new SpanElement() | 279 guard.add(new SpanElement() |
279 ..text = _field.guardNullable ? '— null observed' : '— null not observed' | 280 ..text = _field.guardNullable ? '— null observed' : '— null not observed' |
280 ); | 281 ); |
281 return guard; | 282 return guard; |
282 } | 283 } |
283 | 284 |
284 Future _refresh() async { | 285 Future _refresh() async { |
285 _field = await _fields.get(_isolate, _field.id); | 286 _field = await _fields.get(_isolate, _field.id); |
286 if (field.dartOwner is M.LibraryRef) { | 287 if (_field.dartOwner is M.LibraryRef) { |
287 _library = field.dartOwner; | 288 _library = _field.dartOwner; |
288 } else if (field.dartOwner is M.ClassRef) { | 289 } else if (_field.dartOwner is M.ClassRef) { |
289 _library = (await _classes.get(_isolate, field.dartOwner.id)).library; | 290 _library = (await _classes.get(_isolate, _field.dartOwner.id)).library; |
290 } | 291 } |
291 _r.dirty(); | 292 _r.dirty(); |
292 } | 293 } |
293 } | 294 } |
OLD | NEW |