>From 067fcac4d91900c22d6e4e47477a095740b15e27 Mon Sep 17 00:00:00 2001 From: Gwenael Casaccio Date: Fri, 18 Oct 2013 11:03:08 +0200 Subject: [PATCH] Better shortcuts commands for the debugger --- packages/visualgst/ChangeLog | 8 ++++ .../Commands/DebugMenus/ContinueDebugCommand.st | 2 +- .../Commands/DebugMenus/StepIntoDebugCommand.st | 2 +- .../Commands/DebugMenus/StepOverDebugCommand.st | 56 ++++++++++++++++++++++ .../Commands/DebugMenus/StepToDebugCommand.st | 56 ---------------------- packages/visualgst/Debugger/GtkDebugger.st | 49 ++++++++++--------- packages/visualgst/Menus/DebuggerToolbar.st | 2 +- packages/visualgst/package.xml | 4 +- 8 files changed, 96 insertions(+), 83 deletions(-) create mode 100644 packages/visualgst/Commands/DebugMenus/StepOverDebugCommand.st delete mode 100644 packages/visualgst/Commands/DebugMenus/StepToDebugCommand.st diff --git a/packages/visualgst/ChangeLog b/packages/visualgst/ChangeLog index 30d9e35..e092284 100644 --- a/packages/visualgst/ChangeLog +++ b/packages/visualgst/ChangeLog @@ -1,3 +1,11 @@ +2013-10-18 Gwenael Casaccio + + * Commands/DebugMenus/ContinueDebugCommand.st : Update command title and target. + * Commands/DebugMenus/StepIntoDebugCommand.st : Update command title and target. + * Commands/DebugMenus/StepOverDebugCommand.st : Support step over command. + * Debugger/GtkDebugger.st : Rename the commands and add shortcuts to them. + * Menus/DebuggerToolbar.st : Update command. + 2013-08-20 Gwenael Casaccio * Extensions.st: Move some extensions to Debugger/Extensions. diff --git a/packages/visualgst/Commands/DebugMenus/ContinueDebugCommand.st b/packages/visualgst/Commands/DebugMenus/ContinueDebugCommand.st index e97294c..7abd626 100644 --- a/packages/visualgst/Commands/DebugMenus/ContinueDebugCommand.st +++ b/packages/visualgst/Commands/DebugMenus/ContinueDebugCommand.st @@ -49,7 +49,7 @@ DebugCommand subclass: ContinueDebugCommand [ execute [ - target run + target continue ] ] diff --git a/packages/visualgst/Commands/DebugMenus/StepIntoDebugCommand.st b/packages/visualgst/Commands/DebugMenus/StepIntoDebugCommand.st index ce53a7d..e7c8442 100644 --- a/packages/visualgst/Commands/DebugMenus/StepIntoDebugCommand.st +++ b/packages/visualgst/Commands/DebugMenus/StepIntoDebugCommand.st @@ -38,7 +38,7 @@ DebugCommand subclass: StepIntoDebugCommand [ item [ - ^ 'Step Into' + ^ 'Step into next message send' ] stockIcon [ diff --git a/packages/visualgst/Commands/DebugMenus/StepOverDebugCommand.st b/packages/visualgst/Commands/DebugMenus/StepOverDebugCommand.st new file mode 100644 index 0000000..36a15a6 --- /dev/null +++ b/packages/visualgst/Commands/DebugMenus/StepOverDebugCommand.st @@ -0,0 +1,56 @@ +"====================================================================== +| +| StepOverDebugCommand class definition +| +======================================================================" + +"====================================================================== +| +| Copyright (c) 2013 +| Gwenael Casaccio , +| +| +| This file is part of VisualGST. +| +| Permission is hereby granted, free of charge, to any person obtaining +| a copy of this software and associated documentation files (the +| 'Software'), to deal in the Software without restriction, including +| without limitation the rights to use, copy, modify, merge, publish, +| distribute, sublicense, and/or sell copies of the Software, and to +| permit persons to whom the Software is furnished to do so, subject to +| the following conditions: +| +| The above copyright notice and this permission notice shall be +| included in all copies or substantial portions of the Software. +| +| THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +| +======================================================================" + +DebugCommand subclass: StepOverDebugCommand [ + + item [ + + + ^ 'Step over next message send' + ] + + stockIcon [ + + ^ 'Icons/go-jump.png' + ] + + execute [ + + + target stepOver + ] + +] + diff --git a/packages/visualgst/Commands/DebugMenus/StepToDebugCommand.st b/packages/visualgst/Commands/DebugMenus/StepToDebugCommand.st deleted file mode 100644 index 0c1c0d6..0000000 --- a/packages/visualgst/Commands/DebugMenus/StepToDebugCommand.st +++ /dev/null @@ -1,56 +0,0 @@ -"====================================================================== -| -| StepToDebugCommand class definition -| -======================================================================" - -"====================================================================== -| -| Copyright (c) 2013 -| Gwenael Casaccio , -| -| -| This file is part of VisualGST. -| -| Permission is hereby granted, free of charge, to any person obtaining -| a copy of this software and associated documentation files (the -| 'Software'), to deal in the Software without restriction, including -| without limitation the rights to use, copy, modify, merge, publish, -| distribute, sublicense, and/or sell copies of the Software, and to -| permit persons to whom the Software is furnished to do so, subject to -| the following conditions: -| -| The above copyright notice and this permission notice shall be -| included in all copies or substantial portions of the Software. -| -| THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -| -======================================================================" - -DebugCommand subclass: StepToDebugCommand [ - - item [ - - - ^ 'Step To Here' - ] - - stockIcon [ - - ^ 'Icons/go-jump.png' - ] - - execute [ - - - target step - ] - -] - diff --git a/packages/visualgst/Debugger/GtkDebugger.st b/packages/visualgst/Debugger/GtkDebugger.st index 3860bc9..3d8169c 100644 --- a/packages/visualgst/Debugger/GtkDebugger.st +++ b/packages/visualgst/Debugger/GtkDebugger.st @@ -67,7 +67,7 @@ GtkBrowsingTool subclass: GtkDebugger [ accelPath [ - ^ '' + ^ '' ] windowTitle [ @@ -141,11 +141,16 @@ GtkBrowsingTool subclass: GtkDebugger [ createExecuteMenus [ - ^{GTK.GtkMenuItem menuItem: 'Step' connectTo: self selector: #step. - GTK.GtkMenuItem menuItem: 'Step into' connectTo: self selector: #stepInto. - GTK.GtkMenuItem menuItem: 'Step over' connectTo: self selector: #stepOver. - GTK.GtkMenuItem new. - GTK.GtkMenuItem menuItem: 'Run' connectTo: self selector: #run} + self accelGroup append: {{'F7'. '/StepInto'}}. + self accelGroup append: {{'F8'. '/StepOver'}}. + self accelGroup append: {{'F8'. '/StepOut'}}. + self accelGroup append: {{'F5'. '/Continue'}}. + + ^{GTK.GtkMenuItem menuItem: 'Step into next message send' accelPath: '/StepInto' connectTo: self selector: #stepInto. + GTK.GtkMenuItem menuItem: 'Step over next message send' accelPath: '/StepOver' connectTo: self selector: #stepOver. + GTK.GtkMenuItem menuItem: 'Step out current message' accelPath: '/StepOut' connectTo: self selector: #stepOut. + GTK.GtkMenuItem new. + GTK.GtkMenuItem menuItem: 'Continue' accelPath: '/Continue' connectTo: self selector: #continue} ] createMenus [ @@ -277,32 +282,32 @@ GtkBrowsingTool subclass: GtkDebugger [ self updateInspectorWidget: contextWidget selectedContext ] ] - step [ - + stepInto [ + - debugger step. - self updateContextWidget + debugger step. + self updateContextWidget ] - stepInto [ - + stepOver [ + - debugger step. - self updateContextWidget + debugger next. + self updateContextWidget ] - stepOver [ - + stepOut [ + - debugger finish. - self updateContextWidget + debugger finish. + self updateContextWidget ] - run [ - + continue [ + - self close. - debugger continue + self close. + debugger continue ] codeSaved [ diff --git a/packages/visualgst/Menus/DebuggerToolbar.st b/packages/visualgst/Menus/DebuggerToolbar.st index fae1304..0eed3f3 100644 --- a/packages/visualgst/Menus/DebuggerToolbar.st +++ b/packages/visualgst/Menus/DebuggerToolbar.st @@ -38,6 +38,6 @@ MenuBuilder subclass: DebuggerToolbar [ ^ {ContinueDebugCommand. StepIntoDebugCommand. - StepToDebugCommand} + StepOverDebugCommand} ] ] diff --git a/packages/visualgst/package.xml b/packages/visualgst/package.xml index c6d2026..d21c5e3 100644 --- a/packages/visualgst/package.xml +++ b/packages/visualgst/package.xml @@ -136,7 +136,7 @@ Commands/DebugMenus/DebugCommand.st Commands/DebugMenus/ContinueDebugCommand.st Commands/DebugMenus/StepIntoDebugCommand.st - Commands/DebugMenus/StepToDebugCommand.st + Commands/DebugMenus/StepOverDebugCommand.st Menus/MenuBuilder.st Menus/MenuSeparator.st Menus/ToolbarSeparator.st @@ -365,7 +365,7 @@ Commands/DebugMenus/DebugCommand.st Commands/DebugMenus/ContinueDebugCommand.st Commands/DebugMenus/StepIntoDebugCommand.st - Commands/DebugMenus/StepToDebugCommand.st + Commands/DebugMenus/StepOverDebugCommand.st Menus/MenuBuilder.st Menus/MenuSeparator.st Menus/ToolbarSeparator.st -- 1.8.1.2