Skip to content

Commit

Permalink
Fix testPromiseResolution_terminateProcess [feenkcom/gtoolkit#3942]
Browse files Browse the repository at this point in the history
  • Loading branch information
chisandrei committed Sep 2, 2024
1 parent 2dfa8e8 commit b611f36
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,6 @@ GtGemStoneAsyncEvaluationElement >> buildStartTimeRow [
yourself)
]

{ #category : #'building widgets' }
GtGemStoneAsyncEvaluationElement >> buildToolbar [
^ BrToolbar new
aptitude: BrGlamorousToolbarAptitude new;
alignCenterLeft;
fitContent.
]

{ #category : #'building widgets' }
GtGemStoneAsyncEvaluationElement >> buildToolLabel [
^(BrLabel new)
Expand All @@ -154,6 +146,14 @@ GtGemStoneAsyncEvaluationElement >> buildToolLabel [
background: Color white
]

{ #category : #'building widgets' }
GtGemStoneAsyncEvaluationElement >> buildToolbar [
^ BrToolbar new
aptitude: BrGlamorousToolbarAptitude new;
alignCenterLeft;
fitContent.
]

{ #category : #'building widgets' }
GtGemStoneAsyncEvaluationElement >> buildUnknownValueLabel [
^ (BrLabel new)
Expand Down Expand Up @@ -187,7 +187,7 @@ GtGemStoneAsyncEvaluationElement >> createTitleNotifier [
GtGemStoneAsyncEvaluationElement >> gtActionCancelExecutionFor: anAction [
<gtExecutionAction>

promiseResolution canStopExecution ifFalse: [ ^ anAction empty ].
promiseResolution isResolvingRunning ifFalse: [ ^ anAction empty ].

^ anAction button
label: 'Cancel';
Expand All @@ -202,7 +202,7 @@ GtGemStoneAsyncEvaluationElement >> gtActionCancelExecutionFor: anAction [
GtGemStoneAsyncEvaluationElement >> gtActionDebugExecutionFor: anAction [
<gtExecutionAction>

promiseResolution canStopExecution ifFalse: [ ^ anAction empty ].
promiseResolution isResolvingRunning ifFalse: [ ^ anAction empty ].

^ anAction button
label: 'Debug';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ GtGemStoneAsyncPromiseResolution >> announcer [
{ #category : #testing }
GtGemStoneAsyncPromiseResolution >> canStopExecution [
"For now allow the execution to be stopped even if we do not have an evaluation context"
^ self isResolvingRunning "and: [
snippetPromise canStopExecution ]"
^ self isResolvingRunning and: [
snippetPromise canStopExecution ]
]

{ #category : #accessing }
Expand Down
12 changes: 6 additions & 6 deletions src/GToolkit-GemStone-Pharo/GtGemStoneDebugger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ Class {
#category : #'GToolkit-GemStone-Pharo-Debugger'
}

{ #category : #announcer }
GtGemStoneDebugger >> announcer [
<return: #Announcer>
^ announcer
]

{ #category : #private }
GtGemStoneDebugger >> announceStateChange [
"Announce that the receiver's state has changed"

self announcer announce: (GtGemStoneDebuggerStateChanged new debugger: self)
]

{ #category : #announcer }
GtGemStoneDebugger >> announcer [
<return: #Announcer>
^ announcer
]

{ #category : #accessing }
GtGemStoneDebugger >> debuggerProxy [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ GtGemStoneExpandableDebuggerElement class >> sessionClass [
^ GtGemStoneDebuggerSession
]

{ #category : #callbacks }
GtGemStoneExpandableDebuggerElement >> actOnDebuggerStateChanged [

self debugSession synchronizeCallStack.
self currentCallFrame resetState.
self scheduleUpdateUI.
]

{ #category : #callbacks }
GtGemStoneExpandableDebuggerElement >> actOnDebugSessionChanged [

Expand All @@ -75,6 +67,14 @@ GtGemStoneExpandableDebuggerElement >> actOnDebugSessionChanged [
self scheduleUpdateUI.
]

{ #category : #callbacks }
GtGemStoneExpandableDebuggerElement >> actOnDebuggerStateChanged [

self debugSession synchronizeCallStack.
self currentCallFrame resetState.
self scheduleUpdateUI.
]

{ #category : #callbacks }
GtGemStoneExpandableDebuggerElement >> actOnSelectedContextChangedFor: aContext [
self updateVariables.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Class {
#category : #'GToolkit-GemStone-Pharo-Notifications'
}

{ #category : #accessing }
GtGemStoneKeepAliveNotificationElement >> actOnElementDetached [
self clearNotification.
self clearContent.
]

{ #category : #'private - accessing' }
GtGemStoneKeepAliveNotificationElement >> activeMark [

Expand All @@ -22,12 +28,6 @@ GtGemStoneKeepAliveNotificationElement >> activeMark [
addChild: (BrGlamorousVectorIcons accept asElement)
]

{ #category : #accessing }
GtGemStoneKeepAliveNotificationElement >> actOnElementDetached [
self clearNotification.
self clearContent.
]

{ #category : #'private - accessing' }
GtGemStoneKeepAliveNotificationElement >> borderElement [
<return: #GtNotificationBorderElement>
Expand Down
12 changes: 6 additions & 6 deletions src/GToolkit-GemStone-Pharo/GtGemStoneSessionRegistry.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,6 @@ GtGemStoneSessionRegistry >> sessionNamed: aString ifAbsent: absentBlock [
^ sessions at: aString ifAbsent: absentBlock
]

{ #category : #private }
GtGemStoneSessionRegistry >> sessions [

^ sessions
]

{ #category : #accessing }
GtGemStoneSessionRegistry >> sessionWithConnection: aRsrConnection [
<return: #GtGemStoneSession>
Expand Down Expand Up @@ -771,6 +765,12 @@ GtGemStoneSessionRegistry >> sessionWithConnectorNamed: aString ifAbsent: absent
(sessionCollection sorted: #sessionId ascending) first ].
]

{ #category : #private }
GtGemStoneSessionRegistry >> sessions [

^ sessions
]

{ #category : #initialization }
GtGemStoneSessionRegistry >> shutdown [

Expand Down
20 changes: 10 additions & 10 deletions src/GToolkit-GemStone-Pharo/GtRsrEvaluationException.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ GtRsrEvaluationException >> currentDebuggerState [
^ debuggerState
]

{ #category : #accessing }
GtRsrEvaluationException >> debugResult [
^ debugResult
]

{ #category : #accessing }
GtRsrEvaluationException >> debugResult: anObject [
debugResult := anObject
]

{ #category : #accessing }
GtRsrEvaluationException >> debuggerClient [

Expand All @@ -43,16 +53,6 @@ GtRsrEvaluationException >> debuggerState [
debuggerState := self getDebuggerState ]
]

{ #category : #accessing }
GtRsrEvaluationException >> debugResult [
^ debugResult
]

{ #category : #accessing }
GtRsrEvaluationException >> debugResult: anObject [
debugResult := anObject
]

{ #category : #accessing }
GtRsrEvaluationException >> evaluator [

Expand Down
14 changes: 7 additions & 7 deletions src/GToolkit-GemStone-Pharo/GtRsrEvaluatorAsyncPromise.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,20 @@ GtRsrEvaluatorAsyncPromise >> isResolved [
^self isFulfilled or: [self isBroken]
]

{ #category : #accessing }
GtRsrEvaluatorAsyncPromise >> resolvedValue [
self assert: [ value ~~ self ].

^ value
]

{ #category : #resolving }
GtRsrEvaluatorAsyncPromise >> resolveWithEvaluationResult: evaluationResult [
evaluationResult isEvaluationCancelledResult
ifTrue: [ self breakWithEvaluationResult: evaluationResult ]
ifFalse: [ self fulfillWithEvaluationResult: evaluationResult ]
]

{ #category : #accessing }
GtRsrEvaluatorAsyncPromise >> resolvedValue [
self assert: [ value ~~ self ].

^ value
]

{ #category : #actions }
GtRsrEvaluatorAsyncPromise >> resumeEvaluation [
| resumedEvaluationResultData |
Expand Down
18 changes: 9 additions & 9 deletions src/GToolkit-GemStone-Pharo/GtRsrProxyServiceClient.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ GtRsrProxyServiceClient class >> subclassForRemoteClass: aSymbol [

]

{ #category : #private }
GtRsrProxyServiceClient >> _id: id connection: connection remoteSelf: anObject remoteClass: aString [

_id := id.
_connection := connection.
remoteSelf := anObject.
remoteClass := aString.
]

{ #category : #converting }
GtRsrProxyServiceClient >> asGtpoLocalObject [
"Answer a local copy of the receiver"
Expand Down Expand Up @@ -689,12 +698,3 @@ GtRsrProxyServiceClient >> scriptEvaluation [
receiver: self;
gtSession: self gtSession
]

{ #category : #private }
GtRsrProxyServiceClient >> _id: id connection: connection remoteSelf: anObject remoteClass: aString [

_id := id.
_connection := connection.
remoteSelf := anObject.
remoteClass := aString.
]
14 changes: 7 additions & 7 deletions src/GToolkit-GemStone-Pharo/GtpoMetaclass3.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ GtpoMetaclass3 class >> remoteClassName [
^ #Metaclass3
]

{ #category : #accessing }
GtpoMetaclass3 >> compiledMethodAt: selector [

^ self proxyPerform: #compiledMethodAt:
withArguments: { selector }.
]

{ #category : #private }
GtpoMetaclass3 >> compileFromTab: aTab [
"Update the receiver's definition based on the current editor contents"
Expand All @@ -67,6 +60,13 @@ GtpoMetaclass3 >> compileFromTab: aTab [
GtpoMetaclass3 >> compileMethod: source category: categoryName [
]

{ #category : #accessing }
GtpoMetaclass3 >> compiledMethodAt: selector [

^ self proxyPerform: #compiledMethodAt:
withArguments: { selector }.
]

{ #category : #accessing }
GtpoMetaclass3 >> definitionString [
^ definitionString ifNil: [ definitionString := self proxyPerform: #definition ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ Trait {
#category : 'GToolkit-GemStone-Pharo-Support'
}

{ #category : #'api - activated session view model' }
TGtWithActivatedSessionViewModel >> activatedSessionViewModel [
<return: #GtGemStoneSessionViewModel>
<propertyGetter: #activatedSessionViewModel>
<generatedFrom: #'TGtRobocoderWithPropertyTraitTemplate>>#propertyGetterTemplate'>

^ activatedSessionViewModel
]

{ #category : #'api - activated session view model' }
TGtWithActivatedSessionViewModel >> activateSessionViewModel: aNewActivatedSessionViewModel [
<propertySetter: #activatedSessionViewModel>
Expand All @@ -35,6 +26,15 @@ TGtWithActivatedSessionViewModel >> activateSessionViewModel: aNewActivatedSessi
self notifyActivatedSessionViewModelChanged
]

{ #category : #'api - activated session view model' }
TGtWithActivatedSessionViewModel >> activatedSessionViewModel [
<return: #GtGemStoneSessionViewModel>
<propertyGetter: #activatedSessionViewModel>
<generatedFrom: #'TGtRobocoderWithPropertyTraitTemplate>>#propertyGetterTemplate'>

^ activatedSessionViewModel
]

{ #category : #'api - activated session view model' }
TGtWithActivatedSessionViewModel >> deactivateSessionViewModel [
<propertyUnsetter: #activatedSessionViewModel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ TGtWithSelectedSessionViewModel >> onPreviousSelectedSessionViewModelUnset: aPre
<generatedFrom: #'TGtRobocoderWithPropertyTraitTemplate>>#onPreviousPropertyUnsetHookTemplate'>
]

{ #category : #'api - selected session view model' }
TGtWithSelectedSessionViewModel >> selectedSessionViewModel [
<return: #GtGemStoneSessionViewModel>
<propertyGetter: #selectedSessionViewModel>
<generatedFrom: #'TGtRobocoderWithPropertyTraitTemplate>>#propertyGetterTemplate'>

^ selectedSessionViewModel
]

{ #category : #'api - selected session view model' }
TGtWithSelectedSessionViewModel >> selectSessionViewModel: aNewSelectedSessionViewModel [
<propertySetter: #selectedSessionViewModel>
Expand All @@ -79,3 +70,12 @@ TGtWithSelectedSessionViewModel >> selectSessionViewModel: aNewSelectedSessionVi
self onNewSelectedSessionViewModelSet: aNewSelectedSessionViewModel.
self notifySelectedSessionViewModelChanged
]

{ #category : #'api - selected session view model' }
TGtWithSelectedSessionViewModel >> selectedSessionViewModel [
<return: #GtGemStoneSessionViewModel>
<propertyGetter: #selectedSessionViewModel>
<generatedFrom: #'TGtRobocoderWithPropertyTraitTemplate>>#propertyGetterTemplate'>

^ selectedSessionViewModel
]

0 comments on commit b611f36

Please sign in to comment.