Skip to content

Commit

Permalink
transcript test method issed command wrong
Browse files Browse the repository at this point in the history
Pushed up #issueCommand: and friends from debugger to super class.
  • Loading branch information
Eric Winger authored and Eric Winger committed Aug 25, 2018
1 parent cbb3e60 commit 96fa689
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 32 deletions.
28 changes: 27 additions & 1 deletion sources/Rowan UI Base.pax
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ package methodNames
add: #JadeSystemBrowserPresenter -> #updateMethod;
add: #JadeSystemBrowserPresenter -> #updateSelector;
add: #JadeTextDocument -> #aboutJadeite;
add: #JadeTextDocument -> #issueCommand:;
add: #JadeTextDocument -> #onPromptToSaveChanges:;
add: #JadeTextDocument -> #update:afterStonReplication:;
add: #JadeTextDocument -> #updateServices:;
add: #JadeToolsToolBarPresenter -> #browseClasses;
add: #JadeTranscript -> #methodsChanged24;
add: #JadeTranscript -> #methodsChangedDays;
Expand Down Expand Up @@ -2381,14 +2384,37 @@ updateSelector
aboutJadeite
JadeLoginShell aboutJadeite!

issueCommand: services
| stonString stonResultString |
services do:[:service | service prepareForReplication].
stonString := STON toString: services.
[stonResultString := self gciSession serverPerform: #updateFromSton: with: stonString]
ensure: [services do: [:service | service clearCommand]].
^self update: services afterStonReplication: stonResultString.!

onPromptToSaveChanges: aBooleanValue
"we were calling #getDocumentData essentially to test for nil.
That uses #asString which some objects don't understand - like booleans."

documentPresenter value ifNil: [self isModified: false].
^super onPromptToSaveChanges: aBooleanValue! !
^super onPromptToSaveChanges: aBooleanValue!

update: services afterStonReplication: stonResults
BrowserUpdate current update: services afterStonReplication: stonResults!

updateServices: services
"copied from RowanProjectsBrowserPresenter>>updateServices:"

| stonString stonResults |
services do: [:service | service prepareForReplication].
stonString := STON toString: services.
stonResults := self gciSession serverPerform: #updateFromSton: with: stonString.
self update: services afterStonReplication: stonResults! !
!JadeTextDocument categoriesFor: #aboutJadeite!private! !
!JadeTextDocument categoriesFor: #issueCommand:!public!services! !
!JadeTextDocument categoriesFor: #onPromptToSaveChanges:!private! !
!JadeTextDocument categoriesFor: #update:afterStonReplication:!public!services! !
!JadeTextDocument categoriesFor: #updateServices:!public!services! !

!JadeToolsToolBarPresenter methodsFor!

Expand Down
23 changes: 0 additions & 23 deletions sources/RowanDebugger.cls
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,6 @@ getProcessList

self updateServices: (Array with: (RowanDebuggerService onProcess: gsProcess)).!

issueCommand: services
| stonString stonResultString |
services do:[:service | service prepareForReplication].
stonString := STON toString: services.
[stonResultString := self gciSession serverPerform: #updateFromSton: with: stonString]
ensure: [services do: [:service | service clearCommand]].
^self update: services afterStonReplication: stonResultString.!

methodListSelection
"really a selection from the frame list"

Expand Down Expand Up @@ -316,22 +308,10 @@ stepOver
self stepInto.
].!

update: services afterStonReplication: stonResults
BrowserUpdate current update: services afterStonReplication: stonResults!

updateMethodSource

self selectedFrame!

updateServices: services
"copied from RowanProjectsBrowserPresenter>>updateServices:"

| stonString stonResults |
services do: [:service | service prepareForReplication].
stonString := STON toString: services.
stonResults := self gciSession serverPerform: #updateFromSton: with: stonString.
self update: services afterStonReplication: stonResults!

variableDataPresenter
^variableDataPresenter!

Expand All @@ -351,7 +331,6 @@ variableListPresenter
!RowanDebugger categoriesFor: #errorMessagePresenter!Accessing!public! !
!RowanDebugger categoriesFor: #frameListPresenter!Accessing!public! !
!RowanDebugger categoriesFor: #getProcessList!public! !
!RowanDebugger categoriesFor: #issueCommand:!public! !
!RowanDebugger categoriesFor: #methodListSelection!Accessing!public! !
!RowanDebugger categoriesFor: #methodSourcePresenter!public! !
!RowanDebugger categoriesFor: #onIdleEntered!public! !
Expand All @@ -366,9 +345,7 @@ variableListPresenter
!RowanDebugger categoriesFor: #stepInto!public! !
!RowanDebugger categoriesFor: #stepOut!public! !
!RowanDebugger categoriesFor: #stepOver!public! !
!RowanDebugger categoriesFor: #update:afterStonReplication:!public! !
!RowanDebugger categoriesFor: #updateMethodSource!public! !
!RowanDebugger categoriesFor: #updateServices:!public! !
!RowanDebugger categoriesFor: #variableDataPresenter!Accessing!public! !
!RowanDebugger categoriesFor: #variableListPresenter!Accessing!public! !

Expand Down
10 changes: 2 additions & 8 deletions sources/RowanTranscript.cls
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,15 @@ flipTranscript
| answeringService |
answeringService := RowanAnsweringService new.
answeringService command: #flipTranscript.
self jadePresenter issueCommand: (Array with: answeringService)!
self issueCommand: (Array with: answeringService)!

isTranscriptInstalled
| answeringService |
answeringService := RowanAnsweringService new.
answeringService command: #transcriptInstalled.
self jadePresenter issueCommand: (Array with: answeringService).
self issueCommand: (Array with: answeringService).
^answeringService answer!

jadePresenter
"toolbarPresenter subclasses from JadePresenter where #issueCommand: lives for now"

^toolbarPresenter!

openJadeiteProjectsBrowser
gciSession hasServer ifTrue: [^JadeiteProjectsSystemBrowser showOnSession: gciSession].
MessageBox warning: 'Cannot open Jadeite Projects browser'
Expand All @@ -51,7 +46,6 @@ queryCommand: query
!RowanTranscript categoriesFor: #flipDebugger!menu handlers!public! !
!RowanTranscript categoriesFor: #flipTranscript!menu handlers!public! !
!RowanTranscript categoriesFor: #isTranscriptInstalled!public! !
!RowanTranscript categoriesFor: #jadePresenter!public! !
!RowanTranscript categoriesFor: #openJadeiteProjectsBrowser!menu handlers!public! !
!RowanTranscript categoriesFor: #queryCommand:!private! !

Expand Down

0 comments on commit 96fa689

Please sign in to comment.