Skip to content

Commit

Permalink
[feenkcom/gtoolkit#3702] add debugger specific scrolling list worker
Browse files Browse the repository at this point in the history
  • Loading branch information
syrel committed Mar 27, 2024
1 parent ead4071 commit fa20d8f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ GtAbstractExpandableStackElement >> buildStackFramesList [

eachCoderElement id: (GtExpandableContextMethodCoderId indexed: eachIndex).
eachCoderElement coderViewModel: eachCoderUIModel ];
"the list is initialized with an empty stream to reuse the same stream items provider"
stream: AsyncEmptyStream new
]

Expand Down Expand Up @@ -104,7 +105,6 @@ GtAbstractExpandableStackElement >> initializeStackList [
| stackFramesList |
stackFramesList := self buildStackFramesList.
stackFramesList padding: (BlInsets all: 10).
stackFramesList items: OrderedCollection new.
self addChild: stackFramesList as: #expandableFrames
]

Expand Down Expand Up @@ -132,6 +132,7 @@ GtAbstractExpandableStackElement >> openFirstNonFilteredContextFrom: aStream [
| anItemsProvider aPreloadPromise |
anItemsProvider := BrStreamItemsProvider new.
anItemsProvider stream: aStream.
anItemsProvider executionConfiguration: GtMoldableDebugger defaultFutureExecutionConfiguration.
aPreloadPromise := anItemsProvider
itemSuchThat: [ :eachCoder | (self shouldJumpOverCoverViewModel: eachCoder) not ]
do: [ :anIndex :isSynchronous |
Expand Down
7 changes: 7 additions & 0 deletions src/GToolkit-Debugger/GtMoldableDebugger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ GtMoldableDebugger class >> closeAllDebuggers [
self flag: 'Take the new GT debuggers into account'.
]

{ #category : #accessing }
GtMoldableDebugger class >> defaultFutureExecutionConfiguration [
^ AsyncFutureExecutionConfiguration new
highPriority;
customGroup: #DebuggerScrollingList
]

{ #category : #'settings api' }
GtMoldableDebugger class >> defaultLogFileName [
^ 'PharoDebug.log'
Expand Down
10 changes: 8 additions & 2 deletions src/GToolkit-Debugger/GtPharoStackElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@ GtPharoStackElement >> updateIndexes [
GtPharoStackElement >> updateReceiversIndex [
self
enqueueTask: (BlTaskAction new
action: [ receiversIndex stream: (self class receiversStreamFor: stackModel) ])
action: [
receiversIndex
stream: (self class receiversStreamFor: stackModel)
executionConfiguration: GtMoldableDebugger defaultFutureExecutionConfiguration ])
]

{ #category : #updating }
Expand All @@ -333,7 +336,10 @@ GtPharoStackElement >> updateReceiversIndexTo: aContext [
GtPharoStackElement >> updateStackIndex [
self
enqueueTask: (BlTaskAction new
action: [ self stackIndexList stream: stackModel contextStream.
action: [
self stackIndexList
stream: stackModel contextStream
executionConfiguration: GtMoldableDebugger defaultFutureExecutionConfiguration.
self stackIndexList scrollToIndex: 1 ])
]

Expand Down

0 comments on commit fa20d8f

Please sign in to comment.