diff --git a/src/NewTools-Debugger-Tests/StDebuggerExtensionMechanismTest.class.st b/src/NewTools-Debugger-Tests/StDebuggerExtensionMechanismTest.class.st index ceeb777c4..94eed2a5d 100644 --- a/src/NewTools-Debugger-Tests/StDebuggerExtensionMechanismTest.class.st +++ b/src/NewTools-Debugger-Tests/StDebuggerExtensionMechanismTest.class.st @@ -60,6 +60,7 @@ StDebuggerExtensionMechanismTest >> testInstantiateExtensionToolsPage [ self assert: toolPage class identicalTo: SpNotebookPage. self assert: toolPage presenterProvider value class identicalTo: StDummyDebuggerPresenter. self assert: toolPage title equals: StDummyDebuggerPresenter new debuggerExtensionToolName. + self assert: toolPage presenterProvider value debugger identicalTo: dbg. self assertCollection: dbg extensionTools includesAll: { toolPage presenterProvider value}. ] diff --git a/src/NewTools-Debugger-Tests/StDummyDebuggerPresenter.class.st b/src/NewTools-Debugger-Tests/StDummyDebuggerPresenter.class.st index 94816ca96..dc3147654 100644 --- a/src/NewTools-Debugger-Tests/StDummyDebuggerPresenter.class.st +++ b/src/NewTools-Debugger-Tests/StDummyDebuggerPresenter.class.st @@ -6,6 +6,8 @@ The debugger interface itself is tested in the debugger test class. Class { #name : #StDummyDebuggerPresenter, #superclass : #SpPresenter, + #traits : 'TStDebuggerExtension', + #classTraits : 'TStDebuggerExtension classTrait', #instVars : [ 'tag' ], diff --git a/src/NewTools-Debugger/TStDebuggerExtension.trait.st b/src/NewTools-Debugger/TStDebuggerExtension.trait.st index de95b39ef..92da917d9 100644 --- a/src/NewTools-Debugger/TStDebuggerExtension.trait.st +++ b/src/NewTools-Debugger/TStDebuggerExtension.trait.st @@ -1,5 +1,12 @@ +" +All Spec presenters using me will be recognised as debugger extensions when opening a debugger. + +" Trait { #name : #TStDebuggerExtension, + #instVars : [ + 'debugger' + ], #classInstVars : [ 'showDebuggerExtension', 'debuggerExtensionDisplayOrder' @@ -35,6 +42,11 @@ TStDebuggerExtension classSide >> showInDebugger: aBoolean [ showDebuggerExtension := aBoolean ] +{ #category : #accessing } +TStDebuggerExtension >> debugger [ + ^debugger +] + { #category : #'debugger extension' } TStDebuggerExtension >> debuggerExtensionToolName [ ^self explicitRequirement @@ -44,3 +56,8 @@ TStDebuggerExtension >> debuggerExtensionToolName [ TStDebuggerExtension >> displayOrder [ ^self class displayOrder ] + +{ #category : #initialization } +TStDebuggerExtension >> setModelBeforeInitialization: aDebugger [ + debugger := aDebugger +] diff --git a/src/NewTools-Sindarin-Tools/StSindarinBytecodeDebuggerPresenter.class.st b/src/NewTools-Sindarin-Tools/StSindarinBytecodeDebuggerPresenter.class.st index 3f6714513..8eaf0ccba 100644 --- a/src/NewTools-Sindarin-Tools/StSindarinBytecodeDebuggerPresenter.class.st +++ b/src/NewTools-Sindarin-Tools/StSindarinBytecodeDebuggerPresenter.class.st @@ -8,7 +8,6 @@ Class { 'bcContextInspection', 'toolbar', 'sindarinDebugger', - 'stDebugger', 'bytecodeList', 'currentPC' ], @@ -30,11 +29,6 @@ StSindarinBytecodeDebuggerPresenter class >> defaultLayout [ yourself ] -{ #category : #accessing } -StSindarinBytecodeDebuggerPresenter >> debugger [ - ^stDebugger -] - { #category : #'debugger extension' } StSindarinBytecodeDebuggerPresenter >> debuggerExtensionToolName [ ^ 'Bytecode' @@ -61,7 +55,7 @@ StSindarinBytecodeDebuggerPresenter >> initializeToolbar [ { #category : #accessing } StSindarinBytecodeDebuggerPresenter >> setModelBeforeInitialization: aStDebugger [ "My original model is the debugger presenter that I extend" - stDebugger := aStDebugger. + debugger := aStDebugger. sindarinDebugger := aStDebugger sindarinDebugger ] diff --git a/src/NewTools-Sindarin-Tools/StSindarinDebuggerScriptingPresenter.class.st b/src/NewTools-Sindarin-Tools/StSindarinDebuggerScriptingPresenter.class.st index 6de48c921..8b1abece6 100644 --- a/src/NewTools-Sindarin-Tools/StSindarinDebuggerScriptingPresenter.class.st +++ b/src/NewTools-Sindarin-Tools/StSindarinDebuggerScriptingPresenter.class.st @@ -16,8 +16,7 @@ Class { 'code', 'resultInspection', 'toolbar', - 'sindarinDebugger', - 'stDebugger' + 'sindarinDebugger' ], #category : #'NewTools-Sindarin-Tools' } @@ -40,11 +39,6 @@ StSindarinDebuggerScriptingPresenter >> createCommandFromScript [ self flag: 'todo' ] -{ #category : #accessing } -StSindarinDebuggerScriptingPresenter >> debugger [ - ^stDebugger -] - { #category : #'debugger extension' } StSindarinDebuggerScriptingPresenter >> debuggerExtensionToolName [ @@ -115,7 +109,7 @@ StSindarinDebuggerScriptingPresenter >> saveScript [ { #category : #accessing } StSindarinDebuggerScriptingPresenter >> setModelBeforeInitialization: aStDebugger [ "My original model is the debugger presenter that I extend" - stDebugger := aStDebugger. + debugger := aStDebugger. sindarinDebugger := aStDebugger sindarinDebugger ]