Index: runtime/observatory/lib/src/elements/isolate_view.dart |
diff --git a/runtime/observatory/lib/src/elements/isolate_view.dart b/runtime/observatory/lib/src/elements/isolate_view.dart |
index 55d9332d2a5738ccfd056eaed4f9c16660d028b3..e3c7dac2952094e284e30061c4dd5afb1cbbdbc2 100644 |
--- a/runtime/observatory/lib/src/elements/isolate_view.dart |
+++ b/runtime/observatory/lib/src/elements/isolate_view.dart |
@@ -29,24 +29,24 @@ import 'package:observatory/src/elements/source_inset.dart'; |
import 'package:observatory/src/elements/view_footer.dart'; |
class IsolateViewElement extends HtmlElement implements Renderable { |
- static const tag = const Tag<IsolateViewElement>('isolate-view', |
- dependencies: const [ |
- CurlyBlockElement.tag, |
- EvalBoxElement.tag, |
- FunctionRefElement.tag, |
- IsolateLocationElement.tag, |
- IsolateRunStateElement.tag, |
- IsolateSharedSummaryElement.tag, |
- LibraryRefElement.tag, |
- NavClassMenuElement.tag, |
- NavTopMenuElement.tag, |
- NavIsolateMenuElement.tag, |
- NavRefreshElement.tag, |
- NavNotifyElement.tag, |
- ScriptInsetElement.tag, |
- SourceInsetElement.tag, |
- ViewFooterElement.tag |
- ]); |
+ static const tag = |
+ const Tag<IsolateViewElement>('isolate-view', dependencies: const [ |
+ CurlyBlockElement.tag, |
+ EvalBoxElement.tag, |
+ FunctionRefElement.tag, |
+ IsolateLocationElement.tag, |
+ IsolateRunStateElement.tag, |
+ IsolateSharedSummaryElement.tag, |
+ LibraryRefElement.tag, |
+ NavClassMenuElement.tag, |
+ NavTopMenuElement.tag, |
+ NavIsolateMenuElement.tag, |
+ NavRefreshElement.tag, |
+ NavNotifyElement.tag, |
+ ScriptInsetElement.tag, |
+ SourceInsetElement.tag, |
+ ViewFooterElement.tag |
+ ]); |
RenderingScheduler<IsolateViewElement> _r; |
@@ -70,16 +70,18 @@ class IsolateViewElement extends HtmlElement implements Renderable { |
M.Isolate get isolate => _isolate; |
M.NotificationRepository get notifications => _notifications; |
- factory IsolateViewElement(M.VM vm, M.Isolate isolate, |
- M.EventRepository events, |
- M.NotificationRepository notifications, |
- M.IsolateRepository isolates, |
- M.ScriptRepository scripts, |
- M.FunctionRepository functions, |
- M.LibraryRepository libraries, |
- M.InstanceRepository instances, |
- M.EvalRepository eval, |
- {RenderingQueue queue}) { |
+ factory IsolateViewElement( |
+ M.VM vm, |
+ M.Isolate isolate, |
+ M.EventRepository events, |
+ M.NotificationRepository notifications, |
+ M.IsolateRepository isolates, |
+ M.ScriptRepository scripts, |
+ M.FunctionRepository functions, |
+ M.LibraryRepository libraries, |
+ M.InstanceRepository instances, |
+ M.EvalRepository eval, |
+ {RenderingQueue queue}) { |
assert(vm != null); |
assert(isolate != null); |
assert(events != null); |
@@ -135,35 +137,37 @@ class IsolateViewElement extends HtmlElement implements Renderable { |
navBar([ |
new NavTopMenuElement(queue: _r.queue), |
new NavVMMenuElement(_vm, _events, queue: _r.queue), |
- new NavIsolateMenuElement(_isolate, _events, |
- queue: _r.queue), |
+ new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), |
new NavRefreshElement(label: 'reload source', queue: _r.queue) |
- ..onRefresh.listen((e) async { |
- e.element.disabled = true; |
- await _isolates.reloadSources(_isolate); |
- _r.dirty(); |
- }), |
+ ..onRefresh.listen((e) async { |
+ e.element.disabled = true; |
+ await _isolates.reloadSources(_isolate); |
+ _r.dirty(); |
+ }), |
new NavRefreshElement(queue: _r.queue) |
- ..onRefresh.listen((e) async { |
- e.element.disabled = true; |
- _isolate = await _isolates.get(_isolate); |
- await _loadExtraData(); |
- _r.dirty(); |
- }), |
+ ..onRefresh.listen((e) async { |
+ e.element.disabled = true; |
+ _isolate = await _isolates.get(_isolate); |
+ await _loadExtraData(); |
+ _r.dirty(); |
+ }), |
new NavNotifyElement(_notifications, queue: _r.queue) |
]), |
- new DivElement()..classes = ['content-centered-big'] |
+ new DivElement() |
+ ..classes = ['content-centered-big'] |
..children = [ |
new HeadingElement.h2()..text = 'Isolate ${_isolate.name}', |
new BRElement(), |
- new DivElement()..classes = ['flex-row'] |
+ new DivElement() |
+ ..classes = ['flex-row'] |
..children = [ |
new DivElement()..style.flex = '1', |
new DivElement() |
..children = [ |
- new IsolateRunStateElement(_isolate, _events, queue: _r.queue), |
+ new IsolateRunStateElement(_isolate, _events, |
+ queue: _r.queue), |
new IsolateLocationElement(_isolate, _events, _scripts, |
- queue: _r.queue), |
+ queue: _r.queue), |
new SpanElement()..text = ' [', |
new AnchorElement(href: Uris.debugger(_isolate)) |
..text = 'debug', |
@@ -172,115 +176,145 @@ class IsolateViewElement extends HtmlElement implements Renderable { |
], |
new DivElement() |
..children = _function != null |
- ? [new BRElement(), |
- new SourceInsetElement(_isolate, _function.location, |
- _scripts, |
- _instances, |
- _events, |
- currentPos: M.topFrame(isolate.pauseEvent).location.tokenPos, |
- queue: _r.queue)..classes = ['header_inset']] |
- : const [], |
+ ? [ |
+ new BRElement(), |
+ new SourceInsetElement(_isolate, _function.location, |
+ _scripts, _instances, _events, |
+ currentPos: |
+ M.topFrame(isolate.pauseEvent).location.tokenPos, |
+ queue: _r.queue)..classes = ['header_inset'] |
+ ] |
+ : const [], |
new HRElement(), |
new IsolateSharedSummaryElement(_isolate, _events, queue: _r.queue), |
new HRElement(), |
- new DivElement()..classes = ['memberList'] |
+ new DivElement() |
+ ..classes = ['memberList'] |
..children = [ |
- new DivElement()..classes = ['memberItem'] |
+ new DivElement() |
+ ..classes = ['memberItem'] |
..children = [ |
- new DivElement()..classes = ['memberName'] |
+ new DivElement() |
+ ..classes = ['memberName'] |
..text = 'started at', |
- new DivElement()..classes = ['memberValue'] |
+ new DivElement() |
+ ..classes = ['memberValue'] |
..text = '${_isolate.startTime}' |
], |
- new DivElement()..classes = ['memberItem'] |
+ new DivElement() |
+ ..classes = ['memberItem'] |
..children = [ |
- new DivElement()..classes = ['memberName'] |
+ new DivElement() |
+ ..classes = ['memberName'] |
..text = 'uptime', |
- new DivElement()..classes = ['memberValue'] |
+ new DivElement() |
+ ..classes = ['memberValue'] |
..text = '$uptime' |
], |
- new DivElement()..classes = ['memberItem'] |
+ new DivElement() |
+ ..classes = ['memberItem'] |
..children = [ |
- new DivElement()..classes = ['memberName'] |
+ new DivElement() |
+ ..classes = ['memberName'] |
..text = 'root library', |
- new DivElement()..classes = ['memberValue'] |
+ new DivElement() |
+ ..classes = ['memberValue'] |
..children = [ |
_isolate.rootLibrary == null |
- ? (new SpanElement()..text = 'loading...') |
- : new LibraryRefElement(_isolate, _isolate.rootLibrary, |
- queue: _r.queue) |
+ ? (new SpanElement()..text = 'loading...') |
+ : new LibraryRefElement( |
+ _isolate, _isolate.rootLibrary, |
+ queue: _r.queue) |
] |
], |
- new DivElement()..classes = ['memberItem'] |
+ new DivElement() |
+ ..classes = ['memberItem'] |
..children = _isolate.entry != null |
- ? [ |
- new DivElement()..classes = ['memberName'] |
- ..text = 'entry', |
- new DivElement()..classes = ['memberValue'] |
- ..children = [ |
- new FunctionRefElement(_isolate, _isolate.entry, |
- queue: _r.queue) |
- ] |
- ] |
- : const [], |
- new DivElement()..classes = ['memberItem'] |
+ ? [ |
+ new DivElement() |
+ ..classes = ['memberName'] |
+ ..text = 'entry', |
+ new DivElement() |
+ ..classes = ['memberValue'] |
+ ..children = [ |
+ new FunctionRefElement(_isolate, _isolate.entry, |
+ queue: _r.queue) |
+ ] |
+ ] |
+ : const [], |
+ new DivElement() |
+ ..classes = ['memberItem'] |
..children = [ |
- new DivElement()..classes = ['memberName'] |
+ new DivElement() |
+ ..classes = ['memberName'] |
..text = 'isolate id', |
- new DivElement()..classes = ['memberValue'] |
+ new DivElement() |
+ ..classes = ['memberValue'] |
..text = '${_isolate.number}' |
], |
- new DivElement()..classes = ['memberItem'] |
+ new DivElement() |
+ ..classes = ['memberItem'] |
..children = [ |
- new DivElement()..classes = ['memberName'] |
+ new DivElement() |
+ ..classes = ['memberName'] |
..text = 'service protocol extensions', |
- new DivElement()..classes = ['memberValue'] |
+ new DivElement() |
+ ..classes = ['memberValue'] |
..text = '${_isolate.extensionRPCs}' |
], |
- new DivElement()..classes = ['memberItem'] |
+ new DivElement() |
+ ..classes = ['memberItem'] |
..children = [ |
- new DivElement()..classes = ['memberName'] |
+ new DivElement() |
+ ..classes = ['memberName'] |
..text = 'object store', |
- new DivElement()..classes = ['memberValue'] |
+ new DivElement() |
+ ..classes = ['memberValue'] |
..children = [ |
new AnchorElement(href: Uris.objectStore(_isolate)) |
..text = 'object store' |
] |
], |
new BRElement(), |
- new DivElement()..classes = ['memberItem'] |
+ new DivElement() |
+ ..classes = ['memberItem'] |
..children = [ |
- new DivElement()..classes = ['memberName'] |
+ new DivElement() |
+ ..classes = ['memberName'] |
..text = 'libraries (${libraries.length})', |
- new DivElement()..classes = ['memberValue'] |
+ new DivElement() |
+ ..classes = ['memberValue'] |
..children = [ |
new CurlyBlockElement(queue: _r.queue) |
- ..content = libraries.map((l) => |
- new DivElement() |
- ..children = [ |
- new LibraryRefElement(_isolate, l, |
- queue: _r.queue) |
- ] |
- ).toList() |
+ ..content = libraries |
+ .map((l) => new DivElement() |
+ ..children = [ |
+ new LibraryRefElement(_isolate, l, |
+ queue: _r.queue) |
+ ]) |
+ .toList() |
] |
] |
], |
new HRElement(), |
new EvalBoxElement(_isolate, _isolate.rootLibrary, _instances, _eval, |
- queue: _r.queue), |
+ queue: _r.queue), |
new DivElement() |
..children = _rootScript != null |
- ? [new HRElement(), |
- new ScriptInsetElement(_isolate, _rootScript, _scripts, |
- _instances, _events, queue: _r.queue)] |
- : const [], |
+ ? [ |
+ new HRElement(), |
+ new ScriptInsetElement( |
+ _isolate, _rootScript, _scripts, _instances, _events, |
+ queue: _r.queue) |
+ ] |
+ : const [], |
new HRElement(), |
new ViewFooterElement(queue: _r.queue) |
] |
]; |
} |
- Future _loadExtraData() async{ |
+ Future _loadExtraData() async { |
_function = null; |
_rootScript = null; |
final frame = M.topFrame(_isolate.pauseEvent); |
@@ -288,8 +322,8 @@ class IsolateViewElement extends HtmlElement implements Renderable { |
_function = await _functions.get(_isolate, frame.function.id); |
} |
if (_isolate.rootLibrary != null) { |
- final rootLibrary = await _libraries.get(_isolate, |
- _isolate.rootLibrary.id); |
+ final rootLibrary = |
+ await _libraries.get(_isolate, _isolate.rootLibrary.id); |
_rootScript = rootLibrary.rootScript; |
} |
_r.dirty(); |