Skip to content
Permalink
Browse files

Merge pull request #719 from juliendelplanque/716-Allows-one-to-chang…

…e-the-default-context-set-on-commands-when-their-context-is-nil

716-Allows-one-to-change-the-default-context-set-on-commands-when-their-context-is-nil
  • Loading branch information...
jecisc committed Aug 12, 2019
2 parents 822db0c + f75aa4b commit 152af5e2fd1cce07b45cbcc89f6fe8b4b27124f8
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/Spec2-Commander2/SpPresenter.extension.st
@@ -25,7 +25,15 @@ SpPresenter class >> buildRootCommandsGroupFor: presenterInstance [
^ rootCommandGroup
]

{ #category : #'*Spec2-Commander2' }
SpPresenter >> defaultCommandsContext [
"The default context set to commands is the presenter itself.
This method might be overriden to change this behaviour.
"
^ self
]

{ #category : #'*Spec2-Commander2' }
SpPresenter >> rootCommandsGroup [
^ SpRecursiveContextSetter visit: (self class buildRootCommandsGroupFor: self) toSetContext: self
^ SpRecursiveContextSetter visit: (self class buildRootCommandsGroupFor: self defaultCommandsContext) toSetContext: self defaultCommandsContext
]

0 comments on commit 152af5e

Please sign in to comment.
You can’t perform that action at this time.