>From 7ec1bc3d03e4c5f6d6b1b4445b718ecd9bba7cb7 Mon Sep 17 00:00:00 2001 From: Gwenael Casaccio Date: Mon, 30 Sep 2013 10:54:29 +0200 Subject: [PATCH] Add shortcuts to debug commands and use a better name Commands in GtkDebugger didn't behave like users expect sometimes it goes into sometimes not. I've renamed the commands to meet the users expectation: - step into the next message - step over the next message - step out the current message - continue The toolbar is also updated to support the new commands naming. --- packages/visualgst/ChangeLog | 9 + .../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 | 25 ++- packages/visualgst/Menus/DebuggerToolbar.st | 2 +- packages/visualgst/package.xml | 250 +-------------------- 8 files changed, 84 insertions(+), 318 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..a705499 100644 --- a/packages/visualgst/ChangeLog +++ b/packages/visualgst/ChangeLog @@ -1,3 +1,12 @@ +2013-09-30 Gwenael Casaccio + + * Commands/DebugMenus/ContinueDebugCommand.st: Use the #continue message. + * Commands/DebugMenus/StepIntoDebugCommand.st: Use the #stepInto message. + * Commands/DebugMenus/StepToDebugCommand.st: Renamed as StepOverDebugCommand. + * Commands/DebugMenus/StepOverDebugCommand.st: Step over the next message. + * Debugger/GtkDebugger.st: Add shortcuts and makes commands name clearer. + * Menus/DebuggerToolbar.st: Rename StepIntoDebugCommand as StepOverDebugCommand. + 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..e683b4a 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,17 +282,17 @@ GtkBrowsingTool subclass: GtkDebugger [ self updateInspectorWidget: contextWidget selectedContext ] ] - step [ + stepInto [ debugger step. self updateContextWidget ] - stepInto [ + stepOver [ - debugger step. + debugger next. self updateContextWidget ] @@ -298,7 +303,7 @@ GtkBrowsingTool subclass: GtkDebugger [ self updateContextWidget ] - run [ + continue [ self close. 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..be847eb 100644 --- a/packages/visualgst/package.xml +++ b/packages/visualgst/package.xml @@ -28,23 +28,6 @@ Tests/GtkCategorizedClassWidgetTest.st Tests/GtkConcreteWidgetTest.st Tests/AddNamespaceUndoCommandTest.st - Tests/GtkMethodWidgetTest.st - Tests/CompiledMethodTest.st - Tests/ExtractLiteralsTest.st - Tests/CategoryTest.st - Tests/GtkScrollTreeWidgetTest.st - Tests/MenuBuilderTest.st - Tests/GtkAssistantTest.st - Tests/GtkSimpleListWidgetTest.st - Tests/EmptyTest.st - Tests/AddClassUndoCommandTest.st - Tests/GtkCategoryWidgetTest.st - Tests/StateTest.st - Tests/FinderTest.st - Tests/PragmaTest.st - Tests/GtkCategorizedNamespaceWidgetTest.st - Tests/GtkCategorizedClassWidgetTest.st - Tests/GtkConcreteWidgetTest.st VisualGST.AddNamespaceUndoCommandTest VisualGST.GtkMethodWidgetTest @@ -136,7 +119,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 @@ -300,237 +283,6 @@ Commands/WorkspaceMenus/DeleteItemCommand.st Commands/WorkspaceMenus/InspectItemCommand.st Commands/WorkspaceMenus/WorkspaceVariableCommand.st - Notification/AbstractEvent.st - Notification/AddedEvent.st - Notification/CommentedEvent.st - Notification/DoItEvent.st - Notification/SystemEventManager.st - Notification/EventMultiplexer.st - Notification/EventDispatcher.st - Notification/ModifiedEvent.st - Notification/ModifiedClassDefinitionEvent.st - Notification/RecategorizedEvent.st - Notification/RemovedEvent.st - Notification/RenamedEvent.st - Notification/ReorganizedEvent.st - Notification/SystemChangeNotifier.st - GtkAnnouncer.st - GtkNamespaceSelectionChanged.st - GtkClassSelectionChanged.st - Commands/Command.st - Commands/SmalltalkMenus/DoItCommand.st - Commands/SmalltalkMenus/DebugItCommand.st - Commands/SmalltalkMenus/PrintItCommand.st - Commands/SmalltalkMenus/InspectItCommand.st - Commands/SmalltalkMenus/AcceptItCommand.st - Commands/SmalltalkMenus/CancelCommand.st - Commands/HistoryCommands/HistoryBackCommand.st - Commands/HistoryCommands/HistoryDisplayCommand.st - Commands/HistoryCommands/HistoryForwardCommand.st - Commands/TabsMenus/CloseTabCommand.st - Commands/TabsMenus/NextTabCommand.st - Commands/TabsMenus/PreviousTabCommand.st - Commands/NamespaceMenus/NamespaceCommand.st - Commands/NamespaceMenus/InspectNamespaceCommand.st - Commands/NamespaceMenus/FileoutNamespaceCommand.st - Commands/NamespaceMenus/AddNamespaceCommand.st - Commands/NamespaceMenus/DeleteNamespaceCommand.st - Commands/NamespaceMenus/RenameNamespaceCommand.st - Commands/ClassMenus/ClassCommand.st - Commands/ClassMenus/InspectClassCommand.st - Commands/ClassMenus/FileoutClassCommand.st - Commands/ClassMenus/AddClassCommand.st - Commands/ClassMenus/DeleteClassCommand.st - Commands/ClassMenus/RenameClassCommand.st - Commands/CategoryMenus/CategoryCommand.st - Commands/CategoryMenus/FileoutCategoryCommand.st - Commands/CategoryMenus/AddCategoryCommand.st - Commands/CategoryMenus/RenameCategoryCommand.st - Commands/MethodMenus/MethodCommand.st - Commands/MethodMenus/FileoutMethodCommand.st - Commands/MethodMenus/InspectMethodCommand.st - Commands/MethodMenus/DeleteMethodCommand.st - Commands/MethodMenus/DebugTestCommand.st - Commands/ToolsMenus/OpenAssistantCommand.st - Commands/ToolsMenus/OpenWebBrowserCommand.st - Commands/EditMenus/CancelEditCommand.st - Commands/EditMenus/UndoEditCommand.st - Commands/EditMenus/RedoEditCommand.st - Commands/EditMenus/CutEditCommand.st - Commands/EditMenus/CopyEditCommand.st - Commands/EditMenus/PasteEditCommand.st - Commands/EditMenus/SelectAllEditCommand.st - Commands/EditMenus/FindEditCommand.st - Commands/EditMenus/ReplaceEditCommand.st - Commands/DebugMenus/DebugCommand.st - Commands/DebugMenus/ContinueDebugCommand.st - Commands/DebugMenus/StepIntoDebugCommand.st - Commands/DebugMenus/StepToDebugCommand.st - Menus/MenuBuilder.st - Menus/MenuSeparator.st - Menus/ToolbarSeparator.st - Menus/LauncherToolbar.st - Menus/DebuggerToolbar.st - Menus/NamespaceMenus.st - Menus/ClassMenus.st - Menus/CategoryMenus.st - Menus/ContextMenus.st - Menus/MethodMenus.st - Menus/EditMenus.st - Menus/SmalltalkMenus.st - Menus/ToolsMenus.st - Menus/HistoryMenus.st - Menus/TabsMenus.st - Menus/InspectorMenus.st - Menus/TextMenus.st - Menus/WorkspaceVariableMenus.st - Menus/SimpleWorkspaceMenus.st - Menus/WorkspaceMenus.st - FakeNamespace.st - Category/ClassCategory.st - Category/AbstractNamespace.st - Category/Class.st - GtkAbstractConcreteWidget.st - GtkConcreteWidget.st - GtkScrollTreeWidget.st - GtkSimpleListWidget.st - GtkEntryWidget.st - GtkSidebarWidget.st - GtkHSidebarWidget.st - GtkVSidebarWidget.st - Model/GtkColumnType.st - Model/GtkColumnTextType.st - Model/GtkColumnPixbufType.st - Model/GtkColumnOOPType.st - GtkListModel.st - GtkTreeModel.st - Text/GtkTextWidget.st - GtkPackageBuilderWidget.st - GtkMainWindow.st - GtkVisualGSTTool.st - GtkBrowsingTool.st - GtkLauncher.st - Text/GtkTextPluginWidget.st - Text/GtkFindWidget.st - Text/GtkReplaceWidget.st - Text/GtkSaveTextWidget.st - GtkNotebookWidget.st - Image/GtkImageModel.st - Image/GtkImageWidget.st - Debugger/Extensions.st - Debugger/GtkContextWidget.st - Debugger/GtkDebugger.st - State/BrowserState.st - State/NamespaceState.st - State/ClassState.st - State/CategoryState.st - State/MethodState.st - GtkWorkspaceWidget.st - GtkTranscriptWidget.st - StBrowser/GtkCategorizedNamespaceWidget.st - StBrowser/GtkCategorizedClassWidget.st - StBrowser/GtkCategoryWidget.st - StBrowser/GtkMethodWidget.st - Text/GtkSourceCodeWidget.st - StBrowser/GtkClassHierarchyWidget.st - GtkHistoryWidget.st - Inspector/GtkInspector.st - StBrowser/GtkClassBrowserWidget.st - GtkEntryDialog.st - HistoryStack.st - Undo/UndoStack.st - Undo/UndoCommand.st - Commands/System/AddNamespaceCommand.st - Commands/System/RenameNamespaceCommand.st - Commands/System/DeleteNamespaceCommand.st - Source/SourceFormatter.st - Source/NamespaceHeaderSource.st - Source/NamespaceSource.st - Source/ClassHeaderSource.st - Source/ClassSource.st - Source/CategorySource.st - Source/MethodSource.st - Source/PackageSource.st - Source/BrowserMethodSource.st - Commands/System/AddClassCommand.st - Commands/System/RenameClassCommand.st - Commands/System/DeleteClassCommand.st - AbstractFinder.st - NamespaceFinder.st - ClassFinder.st - MethodFinder.st - GtkWebBrowser.st - GtkWebView.st - Gtk/GtkEntry.st - Gtk/GtkEntryBuffer.st - Extensions.st - GtkAssistant.st - Commands/System/RenameCategoryCommand.st - Commands/System/AddMethodCommand.st - Commands/System/DeleteMethodCommand.st - WorkspaceVariableTracker.st - GtkVariableTrackerWidget.st - SyntaxHighlighter.st - Undo/Text/InsertTextCommand.st - Undo/Text/DeleteTextCommand.st - Undo/Text/ReplaceTextCommand.st - Clock/GtkClock.st - Inspector/Extensions.st - Inspector/GtkInspectorSourceWidget.st - Inspector/GtkInspectorBrowserWidget.st - Inspector/GtkInspectorWidget.st - Inspector/GtkObjectInspectorView.st - Inspector/GtkCompiledMethodInspectorView.st - Inspector/GtkCompiledBlockInspectorView.st - Inspector/GtkSequenceableCollectionInspectorView.st - Inspector/GtkSetInspectorView.st - Inspector/GtkDictionaryInspectorView.st - Inspector/GtkCharacterInspectorView.st - Inspector/GtkIntegerInspectorView.st - Inspector/GtkFloatInspectorView.st - Implementors/GtkImageResultsWidget.st - Implementors/GtkImplementorResultsWidget.st - Implementors/GtkSenderResultsWidget.st - Notification/Kernel/AbstractNamespace.st - Notification/Kernel/Metaclass.st - Notification/Kernel/Class.st - Notification/Kernel/MethodDictionary.st - Debugger/GtkStackInspectorView.st - Debugger/GtkStackInspector.st - Tetris/HighScores.st - Tetris/Score.st - Tetris/TetrisPieceWidget.st - Tetris/BlockWidget.st - Tetris/TetrisField.st - Tetris/TetrisPiece.st - Tetris/TetrisPieceI.st - Tetris/TetrisPieceJ.st - Tetris/TetrisPieceL.st - Tetris/TetrisPieceO.st - Tetris/TetrisPieceS.st - Tetris/TetrisPieceT.st - Tetris/TetrisPieceZ.st - Tetris/Tetris.st - SUnit/TestBacktraceLog.st - SUnit/GtkSUnitResultWidget.st - GtkClassSUnitWidget.st - GtkMethodSUnitWidget.st - SUnit/GtkSUnit.st - Commands/OpenBrowserCommand.st - Commands/OpenTabbedBrowserCommand.st - Commands/ToolsMenus/OpenSUnitCommand.st - Commands/ToolsMenus/OpenBottomPaneCommand.st - Commands/OpenWorkspaceCommand.st - Commands/ToolsMenus/OpenImplementorCommand.st - Commands/ToolsMenus/OpenSenderCommand.st - Commands/ToolsMenus/OpenPackageBuilderCommand.st - Commands/SaveImageCommand.st - Commands/SaveImageAsCommand.st - Commands/InspectorMenus/InspectorBackCommand.st - Commands/InspectorMenus/InspectorDiveCommand.st - Commands/WorkspaceMenus/DeleteItemCommand.st - Commands/WorkspaceMenus/InspectItemCommand.st - Commands/WorkspaceMenus/WorkspaceVariableCommand.st Icons/category.gif Icons/namespace.gif Icons/go-bottom.png -- 1.8.1.2