OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 debugger_page_element; | 5 library debugger_page_element; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:svg'; | |
9 import 'dart:html'; | 8 import 'dart:html'; |
10 import 'dart:math'; | 9 import 'dart:math'; |
11 import 'package:observatory/event.dart'; | 10 import 'dart:svg'; |
12 import 'package:observatory/models.dart' as M; | 11 |
| 12 import 'package:logging/logging.dart'; |
13 import 'package:observatory/app.dart'; | 13 import 'package:observatory/app.dart'; |
14 import 'package:observatory/cli.dart'; | 14 import 'package:observatory/cli.dart'; |
15 import 'package:observatory/debugger.dart'; | 15 import 'package:observatory/debugger.dart'; |
| 16 import 'package:observatory/event.dart'; |
| 17 import 'package:observatory/models.dart' as M; |
| 18 import 'package:observatory/service.dart' as S; |
| 19 import 'package:observatory/service_common.dart'; |
16 import 'package:observatory/src/elements/function_ref.dart'; | 20 import 'package:observatory/src/elements/function_ref.dart'; |
17 import 'package:observatory/src/elements/helpers/any_ref.dart'; | 21 import 'package:observatory/src/elements/helpers/any_ref.dart'; |
18 import 'package:observatory/src/elements/helpers/nav_bar.dart'; | 22 import 'package:observatory/src/elements/helpers/nav_bar.dart'; |
19 import 'package:observatory/src/elements/helpers/nav_menu.dart'; | 23 import 'package:observatory/src/elements/helpers/nav_menu.dart'; |
20 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; | 24 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; |
21 import 'package:observatory/src/elements/helpers/tag.dart'; | 25 import 'package:observatory/src/elements/helpers/tag.dart'; |
22 import 'package:observatory/src/elements/helpers/uris.dart'; | 26 import 'package:observatory/src/elements/helpers/uris.dart'; |
23 import 'package:observatory/src/elements/instance_ref.dart'; | 27 import 'package:observatory/src/elements/instance_ref.dart'; |
24 import 'package:observatory/src/elements/nav/isolate_menu.dart'; | 28 import 'package:observatory/src/elements/nav/isolate_menu.dart'; |
25 import 'package:observatory/src/elements/nav/notify.dart'; | 29 import 'package:observatory/src/elements/nav/notify.dart'; |
26 import 'package:observatory/src/elements/nav/top_menu.dart'; | 30 import 'package:observatory/src/elements/nav/top_menu.dart'; |
27 import 'package:observatory/src/elements/nav/vm_menu.dart'; | 31 import 'package:observatory/src/elements/nav/vm_menu.dart'; |
28 import 'package:observatory/src/elements/source_inset.dart'; | 32 import 'package:observatory/src/elements/source_inset.dart'; |
29 import 'package:observatory/src/elements/source_link.dart'; | 33 import 'package:observatory/src/elements/source_link.dart'; |
30 import 'package:observatory/service.dart' as S; | |
31 import 'package:logging/logging.dart'; | |
32 | 34 |
33 // TODO(turnidge): Move Debugger, DebuggerCommand to debugger library. | 35 // TODO(turnidge): Move Debugger, DebuggerCommand to debugger library. |
34 abstract class DebuggerCommand extends Command { | 36 abstract class DebuggerCommand extends Command { |
35 ObservatoryDebugger debugger; | 37 ObservatoryDebugger debugger; |
36 | 38 |
37 DebuggerCommand(this.debugger, name, children) : super(name, children); | 39 DebuggerCommand(this.debugger, name, children) : super(name, children); |
38 | 40 |
39 String get helpShort; | 41 String get helpShort; |
40 String get helpLong; | 42 String get helpLong; |
41 } | 43 } |
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 console.print('Breakpoint ${bpId} ${verb} at ${locString}'); | 1683 console.print('Breakpoint ${bpId} ${verb} at ${locString}'); |
1682 } else { | 1684 } else { |
1683 console.print('Future breakpoint ${bpId} ${verb} at ${locString}'); | 1685 console.print('Future breakpoint ${bpId} ${verb} at ${locString}'); |
1684 } | 1686 } |
1685 } | 1687 } |
1686 | 1688 |
1687 void onEvent(S.ServiceEvent event) { | 1689 void onEvent(S.ServiceEvent event) { |
1688 switch (event.kind) { | 1690 switch (event.kind) { |
1689 case S.ServiceEvent.kVMUpdate: | 1691 case S.ServiceEvent.kVMUpdate: |
1690 var vm = event.owner; | 1692 var vm = event.owner; |
1691 console.print("VM ${vm.target.networkAddress} renamed to '${vm.name}'"); | 1693 console.print( |
| 1694 "VM ${(vm as CommonWebSocketVM).target.networkAddress} renamed to '$
{vm.name}'"); |
1692 break; | 1695 break; |
1693 | 1696 |
1694 case S.ServiceEvent.kIsolateStart: | 1697 case S.ServiceEvent.kIsolateStart: |
1695 { | 1698 { |
1696 var iso = event.owner; | 1699 var iso = event.owner; |
1697 console.print("Isolate ${iso.number} '${iso.name}' has been created"); | 1700 console.print("Isolate ${iso.number} '${iso.name}' has been created"); |
1698 } | 1701 } |
1699 break; | 1702 break; |
1700 | 1703 |
1701 case S.ServiceEvent.kIsolateExit: | 1704 case S.ServiceEvent.kIsolateExit: |
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3342 ..setAttribute('height', '24') | 3345 ..setAttribute('height', '24') |
3343 ..children = [ | 3346 ..children = [ |
3344 new PathElement() | 3347 new PathElement() |
3345 ..setAttribute( | 3348 ..setAttribute( |
3346 'd', | 3349 'd', |
3347 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 ' | 3350 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 ' |
3348 '10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 ' | 3351 '10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 ' |
3349 '0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 ' | 3352 '0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 ' |
3350 '9h2V7h-2v2z') | 3353 '9h2V7h-2v2z') |
3351 ]; | 3354 ]; |
OLD | NEW |