Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1002)

Side by Side Diff: runtime/observatory/lib/src/elements/function_ref.dart

Issue 1057333004: Continue improving the documentation for the vm service protocol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 function_ref_element; 5 library function_ref_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:polymer/polymer.dart'; 8 import 'package:polymer/polymer.dart';
9 import 'package:observatory/service.dart'; 9 import 'package:observatory/service.dart';
10 import 'service_ref.dart'; 10 import 'service_ref.dart';
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 ServiceFunction get function => ref; 23 ServiceFunction get function => ref;
24 void _updateShadowDom() { 24 void _updateShadowDom() {
25 clearShadowRoot(); 25 clearShadowRoot();
26 if (ref == null) { 26 if (ref == null) {
27 return; 27 return;
28 } 28 }
29 if (function.isDart) { 29 if (function.isDart) {
30 if (qualified) { 30 if (qualified) {
31 // Add class-name or parent-function-name followed by a dot. 31 if (function.dartOwner is ServiceFunction) {
32 if ((function.parent == null) && (function.owningClass != null)) {
33 var classRef = new Element.tag('class-ref');
34 classRef.ref = function.owningClass;
35 shadowRoot.children.add(classRef);
36 insertTextSpanIntoShadowRoot('.');
37 } else if (function.parent != null) {
38 var functionRef = new Element.tag('function-ref'); 32 var functionRef = new Element.tag('function-ref');
39 functionRef.ref = function.parent; 33 functionRef.ref = function.dartOwner;
40 functionRef.qualified = true; 34 functionRef.qualified = true;
41 shadowRoot.children.add(functionRef); 35 shadowRoot.children.add(functionRef);
42 insertTextSpanIntoShadowRoot('.'); 36 insertTextSpanIntoShadowRoot('.');
37 } else if (function.dartOwner is Class) {
38 var classRef = new Element.tag('class-ref');
39 classRef.ref = function.dartOwner;
40 shadowRoot.children.add(classRef);
41 insertTextSpanIntoShadowRoot('.');
43 } 42 }
44 } 43 }
45 insertLinkIntoShadowRoot(name, url, hoverText); 44 insertLinkIntoShadowRoot(name, url, hoverText);
46 } else { 45 } else {
47 insertTextSpanIntoShadowRoot(name); 46 insertTextSpanIntoShadowRoot(name);
48 } 47 }
49 } 48 }
50 } 49 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/field_view.html ('k') | runtime/observatory/lib/src/elements/function_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698