Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed bomb icon in debugger and put drop down icon instead. #589

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/NewTools-Sindarin-Commands/SindarinCommand.class.st
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
Class {
#name : #SindarinCommand,
#superclass : #CmCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinCommand',
#superclass : 'CmCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #initialization }
{ #category : 'initialization' }
SindarinCommand class >> defaultIconName [
^self subclassResponsibility
]

{ #category : #'instance creation' }
{ #category : 'instance creation' }
SindarinCommand class >> forSpecContext: anObject [
self flag: 'Why is this class needed besides this helper?'.
^ (self forSpecWithIconNamed: self defaultIconName)
context: anObject;
yourself
]

{ #category : #testing }
{ #category : 'testing' }
SindarinCommand class >> isAbstract [

^ self == SindarinCommand
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinCommand >> debuggerPresenter [
^self context
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@ The created command class can be instantiated by the debugger as a custom debugg
The created command class has a pragma that identifies itself as a custom debugging action.
"
Class {
#name : #SindarinCreateCommandFromScriptCommand,
#superclass : #SindarinCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinCreateCommandFromScriptCommand',
#superclass : 'SindarinCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinCreateCommandFromScriptCommand class >> defaultDescription [
^'Create a command from the current debugging script'
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinCreateCommandFromScriptCommand class >> defaultIconName [
^#smallAdd
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinCreateCommandFromScriptCommand class >> defaultName [
^'Create new command from script'
]

{ #category : #executing }
{ #category : 'executing' }
SindarinCreateCommandFromScriptCommand >> execute [
self context createCommandFromScript
]
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,30 @@ When we enter a block, it creates a context for this block that becomes the susp
When you exit a block via MoveToCaret, then the caret should be somewhere in the lexical context and all contexts that are above the context that contains the aimed node are discarded.
"
Class {
#name : #SindarinJumpToCaretCommand,
#superclass : #SindarinCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinJumpToCaretCommand',
#superclass : 'SindarinCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinJumpToCaretCommand class >> defaultDescription [
^ 'Jump to caret so that the next instruction that will be executed is the instruction associated to the node associated to the caret. All necessary arguments are pushed on the stack but everything else is skipped and the program state (e.g : variable bindings) stay the same.'
]

{ #category : #initialization }
{ #category : 'initialization' }
SindarinJumpToCaretCommand class >> defaultIconName [
^ #smallItalic
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinJumpToCaretCommand class >> defaultName [
<toolbarExtensionDebugCommand: 50>
<codeExtensionDebugCommand:1>
^ '[Exp.] Jump to caret'
]

{ #category : #execution }
{ #category : 'execution' }
SindarinJumpToCaretCommand >> execute [

| targetNode |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@
Loads a debugging script that has been saved in a Sindarin script class.
"
Class {
#name : #SindarinLoadScriptCommand,
#superclass : #SindarinCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinLoadScriptCommand',
#superclass : 'SindarinCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinLoadScriptCommand class >> defaultDescription [
^'Load a debugging script'
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinLoadScriptCommand class >> defaultIconName [
^#smallLoadProject
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinLoadScriptCommand class >> defaultName [
^'Load script'
]

{ #category : #executing }
{ #category : 'executing' }
SindarinLoadScriptCommand >> execute [
self context loadScript
]
15 changes: 8 additions & 7 deletions src/NewTools-Sindarin-Commands/SindarinRefreshCommand.class.st
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
Class {
#name : #SindarinRefreshCommand,
#superclass : #SindarinCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinRefreshCommand',
#superclass : 'SindarinCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinRefreshCommand class >> defaultDescription [
^ 'Refresh the UI. Necessary after manual control of Sindarin.'
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinRefreshCommand class >> defaultIconName [
^#refresh
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinRefreshCommand class >> defaultName [
^ 'Refresh'
]

{ #category : #hooks }
{ #category : 'hooks' }
SindarinRefreshCommand >> execute [
self context refresh
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@
Remove the command corresponding to a given script from the list of custom extension commands for the debugger.
"
Class {
#name : #SindarinRemoveCommandCommand,
#superclass : #SindarinCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinRemoveCommandCommand',
#superclass : 'SindarinCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinRemoveCommandCommand class >> defaultDescription [
^'Remove the command corresponding to the current debugging script'
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinRemoveCommandCommand class >> defaultIconName [
^#smallCancel
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinRemoveCommandCommand class >> defaultName [
^'Remove command'
]

{ #category : #executing }
{ #category : 'executing' }
SindarinRemoveCommandCommand >> execute [
self context removeScriptCommand
]
15 changes: 8 additions & 7 deletions src/NewTools-Sindarin-Commands/SindarinRunScriptCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@ Run a given Sindarin script.
Behavior delegated to an instance of Sindarin debugger.
"
Class {
#name : #SindarinRunScriptCommand,
#superclass : #SindarinCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinRunScriptCommand',
#superclass : 'SindarinCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinRunScriptCommand class >> defaultDescription [
^'Run the current debugging script'
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinRunScriptCommand class >> defaultIconName [
^#smallDoIt
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinRunScriptCommand class >> defaultName [
^'Run script'
]

{ #category : #executing }
{ #category : 'executing' }
SindarinRunScriptCommand >> execute [
self context executeScript
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@
Saves a given debugging script to a Sindarin script class.
"
Class {
#name : #SindarinSaveScriptCommand,
#superclass : #SindarinCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinSaveScriptCommand',
#superclass : 'SindarinCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinSaveScriptCommand class >> defaultDescription [
^'Save the current debugging script'
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinSaveScriptCommand class >> defaultIconName [
^#smallSave
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinSaveScriptCommand class >> defaultName [
^'Save script'
]

{ #category : #executing }
{ #category : 'executing' }
SindarinSaveScriptCommand >> execute [
self context saveScript
]
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
Class {
#name : #SindarinSkipAllToSelectionCommand,
#superclass : #SindarinCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinSkipAllToSelectionCommand',
#superclass : 'SindarinCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #accessing }
{ #category : 'accessing' }
SindarinSkipAllToSelectionCommand class >> debuggerExtensionGroup [
"Pragma to find the method. This method should build and return a customize command groups for the debugger"

]

{ #category : #'accesing - defaults' }
{ #category : 'accesing - defaults' }
SindarinSkipAllToSelectionCommand class >> defaultIconName [
^ #glamorousRightSide
]
13 changes: 7 additions & 6 deletions src/NewTools-Sindarin-Commands/SindarinSkipCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,25 @@ Therefore, if you execute again you will write the same values in your stream.
You can use skip to avoid all writings in your stream until you get back to the correct point of the execution where you can start writing again in the stream.
"
Class {
#name : #SindarinSkipCommand,
#superclass : #SindarinSkipAllToSelectionCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinSkipCommand',
#superclass : 'SindarinSkipAllToSelectionCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinSkipCommand class >> defaultDescription [
^ 'Skips execution of the next step, then returns debugger control.'
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinSkipCommand class >> defaultName [
<toolbarExtensionDebugCommand: 1>
<codeExtensionDebugCommand: 1>
^ 'Skip'
]

{ #category : #hooks }
{ #category : 'hooks' }
SindarinSkipCommand >> execute [

self flag:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
Class {
#name : #SindarinSkipThroughSelectionCommand,
#superclass : #SindarinSkipAllToSelectionCommand,
#category : #'NewTools-Sindarin-Commands'
#name : 'SindarinSkipThroughSelectionCommand',
#superclass : 'SindarinSkipAllToSelectionCommand',
#category : 'NewTools-Sindarin-Commands',
#package : 'NewTools-Sindarin-Commands'
}

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinSkipThroughSelectionCommand class >> defaultDescription [
^ 'Skips execution and stops after the selected instruction (or the instruction preceding the cursor), then returns debugger control.'
]

{ #category : #'accessing - defaults' }
{ #category : 'accessing - defaults' }
SindarinSkipThroughSelectionCommand class >> defaultName [
"<toolbarExtensionDebugCommand: 50>
<codeExtensionDebugCommand: 50>"
"^ 'Skip through instruction (will stop after)'"
^ '[Exp.] Skip through (stop after)'
]

{ #category : #hooks }
{ #category : 'hooks' }
SindarinSkipThroughSelectionCommand >> execute [
| targetNode |
self
Expand Down
Loading
Loading