Index: runtime/observatory/lib/src/elements/nav/library_menu.dart |
diff --git a/runtime/observatory/lib/src/elements/nav/class_menu.dart b/runtime/observatory/lib/src/elements/nav/library_menu.dart |
similarity index 57% |
copy from runtime/observatory/lib/src/elements/nav/class_menu.dart |
copy to runtime/observatory/lib/src/elements/nav/library_menu.dart |
index d8ed510a8675655b54e80d9a4d9f2f0d45512fee..0403ac3cf5ee1675e411c3f5833c8aa7dbf5bb87 100644 |
--- a/runtime/observatory/lib/src/elements/nav/class_menu.dart |
+++ b/runtime/observatory/lib/src/elements/nav/library_menu.dart |
@@ -4,60 +4,56 @@ |
import 'dart:html'; |
import 'dart:async'; |
-import 'package:observatory/models.dart' as M show IsolateRef, ClassRef; |
+import 'package:observatory/models.dart' as M show IsolateRef, LibraryRef; |
import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; |
import 'package:observatory/src/elements/helpers/tag.dart'; |
import 'package:observatory/src/elements/helpers/uris.dart'; |
import 'package:observatory/src/elements/nav/menu.dart'; |
-class NavClassMenuElement extends HtmlElement implements Renderable { |
- static const tag = const Tag<NavClassMenuElement>('nav-class-menu', |
+class NavLibraryMenuElement extends HtmlElement implements Renderable { |
+ static const tag = const Tag<NavLibraryMenuElement>('nav-library-menu', |
dependencies: const [NavMenuElement.tag]); |
RenderingScheduler _r; |
- Stream<RenderedEvent<NavClassMenuElement>> get onRendered => _r.onRendered; |
+ Stream<RenderedEvent<NavLibraryMenuElement>> get onRendered => _r.onRendered; |
bool _last; |
M.IsolateRef _isolate; |
- M.ClassRef _cls; |
+ M.LibraryRef _library; |
bool get last => _last; |
M.IsolateRef get isolate => _isolate; |
- M.ClassRef get cls => _cls; |
+ M.LibraryRef get library => _library; |
set last(bool value) => _last = _r.checkAndReact(_last, value); |
- factory NavClassMenuElement(M.IsolateRef isolate, M.ClassRef cls, |
+ factory NavLibraryMenuElement(M.IsolateRef isolate, M.LibraryRef library, |
{bool last: false, RenderingQueue queue}) { |
assert(isolate != null); |
- assert(cls != null); |
+ assert(library != null); |
assert(last != null); |
- NavClassMenuElement e = document.createElement(tag.name); |
+ NavLibraryMenuElement e = document.createElement(tag.name); |
e._r = new RenderingScheduler(e, queue: queue); |
e._isolate = isolate; |
- e._cls = cls; |
+ e._library = library; |
e._last = last; |
return e; |
} |
- NavClassMenuElement.created() : super.created() { createShadowRoot(); } |
+ NavLibraryMenuElement.created() : super.created() { createShadowRoot(); } |
@override |
- void attached() { |
- super.attached(); |
- _r.enable(); |
- } |
+ void attached() { super.attached(); _r.enable(); } |
@override |
void detached() { |
- super.detached(); |
- _r.disable(notify: true); |
+ super.detached(); _r.disable(notify: true); |
shadowRoot.children = []; |
} |
void render() { |
shadowRoot.children = [ |
- new NavMenuElement(cls.name, last: last, queue: _r.queue, |
- link: Uris.inspect(isolate, object: cls)) |
+ new NavMenuElement(library.name, last: last, queue: _r.queue, |
+ link: Uris.inspect(isolate, object: library).toString()) |
..children = [new ContentElement()] |
]; |
} |