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'; | 8 import 'dart:svg'; |
9 import 'dart:html'; | 9 import 'dart:html'; |
10 import 'dart:math'; | 10 import 'dart:math'; |
11 import 'package:observatory/event.dart'; | 11 import 'package:observatory/event.dart'; |
12 import 'package:observatory/models.dart' as M; | 12 import 'package:observatory/models.dart' as M; |
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/src/elements/function_ref.dart'; | 16 import 'package:observatory/src/elements/function_ref.dart'; |
17 import 'package:observatory/src/elements/helpers/any_ref.dart'; | 17 import 'package:observatory/src/elements/helpers/any_ref.dart'; |
| 18 import 'package:observatory/src/elements/helpers/nav_bar.dart'; |
| 19 import 'package:observatory/src/elements/helpers/nav_menu.dart'; |
18 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; | 20 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; |
19 import 'package:observatory/src/elements/helpers/tag.dart'; | 21 import 'package:observatory/src/elements/helpers/tag.dart'; |
20 import 'package:observatory/src/elements/helpers/uris.dart'; | 22 import 'package:observatory/src/elements/helpers/uris.dart'; |
21 import 'package:observatory/src/elements/instance_ref.dart'; | 23 import 'package:observatory/src/elements/instance_ref.dart'; |
22 import 'package:observatory/src/elements/nav/bar.dart'; | |
23 import 'package:observatory/src/elements/nav/isolate_menu.dart'; | 24 import 'package:observatory/src/elements/nav/isolate_menu.dart'; |
24 import 'package:observatory/src/elements/nav/menu.dart'; | |
25 import 'package:observatory/src/elements/nav/notify.dart'; | 25 import 'package:observatory/src/elements/nav/notify.dart'; |
26 import 'package:observatory/src/elements/nav/top_menu.dart'; | 26 import 'package:observatory/src/elements/nav/top_menu.dart'; |
27 import 'package:observatory/src/elements/nav/vm_menu.dart'; | 27 import 'package:observatory/src/elements/nav/vm_menu.dart'; |
28 import 'package:observatory/src/elements/source_inset.dart'; | 28 import 'package:observatory/src/elements/source_inset.dart'; |
29 import 'package:observatory/src/elements/source_link.dart'; | 29 import 'package:observatory/src/elements/source_link.dart'; |
30 import 'package:observatory/service.dart' as S; | 30 import 'package:observatory/service.dart' as S; |
31 import 'package:logging/logging.dart'; | 31 import 'package:logging/logging.dart'; |
32 | 32 |
33 // TODO(turnidge): Move Debugger, DebuggerCommand to debugger library. | 33 // TODO(turnidge): Move Debugger, DebuggerCommand to debugger library. |
34 abstract class DebuggerCommand extends Command { | 34 abstract class DebuggerCommand extends Command { |
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 } else { | 1907 } else { |
1908 console.print('The program is already running'); | 1908 console.print('The program is already running'); |
1909 return new Future.value(null); | 1909 return new Future.value(null); |
1910 } | 1910 } |
1911 } | 1911 } |
1912 } | 1912 } |
1913 | 1913 |
1914 class DebuggerPageElement extends HtmlElement implements Renderable { | 1914 class DebuggerPageElement extends HtmlElement implements Renderable { |
1915 static const tag = const Tag<DebuggerPageElement>('debugger-page', | 1915 static const tag = const Tag<DebuggerPageElement>('debugger-page', |
1916 dependencies: const [ | 1916 dependencies: const [ |
1917 NavBarElement.tag, | |
1918 NavTopMenuElement.tag, | 1917 NavTopMenuElement.tag, |
1919 NavVMMenuElement.tag, | 1918 NavVMMenuElement.tag, |
1920 NavIsolateMenuElement.tag, | 1919 NavIsolateMenuElement.tag, |
1921 NavMenuElement.tag, | |
1922 NavNotifyElement.tag, | 1920 NavNotifyElement.tag, |
1923 ]); | 1921 ]); |
1924 | 1922 |
1925 S.Isolate _isolate; | 1923 S.Isolate _isolate; |
1926 ObservatoryDebugger _debugger; | 1924 ObservatoryDebugger _debugger; |
1927 M.InstanceRepository _instances; | 1925 M.InstanceRepository _instances; |
1928 M.ScriptRepository _scripts; | 1926 M.ScriptRepository _scripts; |
1929 M.EventRepository _events; | 1927 M.EventRepository _events; |
1930 | 1928 |
1931 factory DebuggerPageElement(S.Isolate isolate, | 1929 factory DebuggerPageElement(S.Isolate isolate, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1971 _instances, _scripts, | 1969 _instances, _scripts, |
1972 _events); | 1970 _events); |
1973 stackDiv.children = [stackElement]; | 1971 stackDiv.children = [stackElement]; |
1974 final consoleDiv = new DivElement()..classes = ['console'] | 1972 final consoleDiv = new DivElement()..classes = ['console'] |
1975 ..children = [consoleElement]; | 1973 ..children = [consoleElement]; |
1976 final commandElement = new DebuggerInputElement(_isolate, _debugger); | 1974 final commandElement = new DebuggerInputElement(_isolate, _debugger); |
1977 final commandDiv = new DivElement()..classes = ['commandline'] | 1975 final commandDiv = new DivElement()..classes = ['commandline'] |
1978 ..children = [commandElement]; | 1976 ..children = [commandElement]; |
1979 | 1977 |
1980 children = [ | 1978 children = [ |
1981 new NavBarElement(queue: app.queue) | 1979 navBar([ |
1982 ..children = [ | 1980 new NavTopMenuElement(queue: app.queue), |
1983 new NavTopMenuElement(queue: app.queue), | 1981 new NavVMMenuElement(app.vm, app.events, queue: app.queue), |
1984 new NavVMMenuElement(app.vm, app.events, queue: app.queue), | 1982 new NavIsolateMenuElement(_isolate, app.events, queue: app.queue), |
1985 new NavIsolateMenuElement(_isolate, app.events, queue: app.queue), | 1983 navMenu('debugger'), |
1986 new NavMenuElement('debugger', last: true, queue: app.queue), | 1984 new NavNotifyElement(app.notifications, notifyOnPause: false, |
1987 new NavNotifyElement(app.notifications, notifyOnPause: false, | 1985 queue: app.queue) |
1988 queue: app.queue) | 1986 ]), |
1989 ], | |
1990 new DivElement()..classes = ['variable'] | 1987 new DivElement()..classes = ['variable'] |
1991 ..children = [ | 1988 ..children = [ |
1992 stackDiv, | 1989 stackDiv, |
1993 new DivElement() | 1990 new DivElement() |
1994 ..children = [ | 1991 ..children = [ |
1995 new HRElement()..classes = ['splitter'] | 1992 new HRElement()..classes = ['splitter'] |
1996 ], | 1993 ], |
1997 consoleDiv, | 1994 consoleDiv, |
1998 ], | 1995 ], |
1999 commandDiv | 1996 commandDiv |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3171 final SvgSvgElement iconInfoOutline = new SvgSvgElement() | 3168 final SvgSvgElement iconInfoOutline = new SvgSvgElement() |
3172 ..setAttribute('width', '24') | 3169 ..setAttribute('width', '24') |
3173 ..setAttribute('height', '24') | 3170 ..setAttribute('height', '24') |
3174 ..children = [ | 3171 ..children = [ |
3175 new PathElement() | 3172 new PathElement() |
3176 ..setAttribute('d', 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 ' | 3173 ..setAttribute('d', 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 ' |
3177 '10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 ' | 3174 '10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 ' |
3178 '0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 ' | 3175 '0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 ' |
3179 '9h2V7h-2v2z') | 3176 '9h2V7h-2v2z') |
3180 ]; | 3177 ]; |
OLD | NEW |