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 script_inset_element; | 5 library script_inset_element; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 import 'dart:math'; | 9 import 'dart:math'; |
10 import 'observatory_element.dart'; | 10 import 'observatory_element.dart'; |
11 import 'service_ref.dart'; | 11 import 'service_ref.dart'; |
| 12 import 'package:observatory/models.dart' as M; |
12 import 'package:observatory/service.dart'; | 13 import 'package:observatory/service.dart'; |
13 import 'package:observatory/utils.dart'; | 14 import 'package:observatory/utils.dart'; |
14 import 'package:polymer/polymer.dart'; | 15 import 'package:polymer/polymer.dart'; |
15 import 'package:logging/logging.dart'; | 16 import 'package:logging/logging.dart'; |
16 | 17 |
17 const nbsp = "\u00A0"; | 18 const nbsp = "\u00A0"; |
18 | 19 |
19 void addInfoBox(Element content, Function infoBoxGenerator) { | 20 void addInfoBox(Element content, Function infoBoxGenerator) { |
20 var infoBox; | 21 var infoBox; |
21 var show = false; | 22 var show = false; |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 annotations.add(a); | 923 annotations.add(a); |
923 } | 924 } |
924 } | 925 } |
925 } | 926 } |
926 } | 927 } |
927 | 928 |
928 void addFunctionAnnotations() { | 929 void addFunctionAnnotations() { |
929 for (var func in script.library.functions) { | 930 for (var func in script.library.functions) { |
930 if ((func.location != null) && | 931 if ((func.location != null) && |
931 (func.location.script == script) && | 932 (func.location.script == script) && |
932 (func.kind != FunctionKind.kImplicitGetterFunction) && | 933 (func.kind != M.FunctionKind.implicitGetter) && |
933 (func.kind != FunctionKind.kImplicitSetterFunction)) { | 934 (func.kind != M.FunctionKind.implicitSetter)) { |
934 // We annotate a field declaration with the field instead of the | 935 // We annotate a field declaration with the field instead of the |
935 // implicit getter or setter. | 936 // implicit getter or setter. |
936 var a = new FunctionDeclarationAnnotation(func, inspectLink(func)); | 937 var a = new FunctionDeclarationAnnotation(func, inspectLink(func)); |
937 annotations.add(a); | 938 annotations.add(a); |
938 } | 939 } |
939 } | 940 } |
940 for (var cls in script.library.classes) { | 941 for (var cls in script.library.classes) { |
941 for (var func in cls.functions) { | 942 for (var func in cls.functions) { |
942 if ((func.location != null) && | 943 if ((func.location != null) && |
943 (func.location.script == script) && | 944 (func.location.script == script) && |
944 (func.kind != FunctionKind.kImplicitGetterFunction) && | 945 (func.kind != M.FunctionKind.implicitGetter) && |
945 (func.kind != FunctionKind.kImplicitSetterFunction)) { | 946 (func.kind != M.FunctionKind.implicitSetter)) { |
946 // We annotate a field declaration with the field instead of the | 947 // We annotate a field declaration with the field instead of the |
947 // implicit getter or setter. | 948 // implicit getter or setter. |
948 var a = new FunctionDeclarationAnnotation(func, inspectLink(func)); | 949 var a = new FunctionDeclarationAnnotation(func, inspectLink(func)); |
949 annotations.add(a); | 950 annotations.add(a); |
950 } | 951 } |
951 } | 952 } |
952 } | 953 } |
953 } | 954 } |
954 | 955 |
955 void addCallSiteAnnotations() { | 956 void addCallSiteAnnotations() { |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 class SourceInsetElement extends PolymerElement { | 1370 class SourceInsetElement extends PolymerElement { |
1370 SourceInsetElement.created() : super.created(); | 1371 SourceInsetElement.created() : super.created(); |
1371 | 1372 |
1372 @published SourceLocation location; | 1373 @published SourceLocation location; |
1373 @published String height = null; | 1374 @published String height = null; |
1374 @published int currentPos; | 1375 @published int currentPos; |
1375 @published bool inDebuggerContext = false; | 1376 @published bool inDebuggerContext = false; |
1376 @published ObservableList variables; | 1377 @published ObservableList variables; |
1377 @published Element scroller; | 1378 @published Element scroller; |
1378 } | 1379 } |
OLD | NEW |