Skip to content

Commit

Permalink
Do not use streams in the grouped list with variables [feenkcom/gtool…
Browse files Browse the repository at this point in the history
  • Loading branch information
chisandrei committed Nov 5, 2024
1 parent e2351f8 commit bd04cfd
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions src/GToolkit-Debugger/GtAbstractExpandableDebuggerElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ GtAbstractExpandableDebuggerElement >> addDefaultTabsToGroup: aTabGroup [
GtAbstractExpandableDebuggerElement >> buildContextVariablesElement [
| contextVariablesElement |
contextVariablesElement := self buildVariablesListElement.
contextVariablesElement stream: self contextVariables.
contextVariablesElement groups: self contextVariables.
contextVariablesElement containerName: #contextVariablesElement.
^ contextVariablesElement
]
Expand Down Expand Up @@ -217,22 +217,24 @@ GtAbstractExpandableDebuggerElement >> buildVariablesListElement [
list := BrGroupedList new.
list
margin: (BlInsets all: 10);
headerElementStencil:
[(BrLabel new)
margin: (BlInsets top: 5);
aptitude: (BrGlamorousLabelAptitude new foreground: Color gray)
+ (BrStyleCommonAptitude new default:
[:aStyle |
aStyle
geometry: (BlRoundedRectangleGeometry cornerRadius: 4);
border: BlBorder empty])];
headerDataBinder:
[:aLabel :eachItem |
aLabel viewModel model: eachItem domainObject.
aLabel text: eachItem domainObject new variableTag].
list addEventHandler: (GtPhlowListToSelectHandler new
transformation: [:variableNode | variableNode value]).
^list
headerElementStencil: [
BrLabel new
margin: (BlInsets top: 5);
aptitude: (BrGlamorousLabelAptitude new
foreground: Color gray)
+ (BrStyleCommonAptitude new
default: [ :aStyle |
aStyle
geometry: (BlRoundedRectangleGeometry
cornerRadius: 4);
border: BlBorder empty ]) ];
headerDataBinder: [ :aLabel :eachItem |
aLabel viewModel model: eachItem domainObject.
aLabel text: eachItem domainObject ].
list
addEventHandler: (GtPhlowListToSelectHandler new
transformation: [ :variableNode | variableNode value ]).
^ list
]

{ #category : #'building actions' }
Expand Down Expand Up @@ -309,11 +311,11 @@ GtAbstractExpandableDebuggerElement >> collectTargetDebuggingActions [
{ #category : #'building widgets' }
GtAbstractExpandableDebuggerElement >> contextVariableGroupsFor: aListOfVariables [
| groups |
groups := (aListOfVariables groupedBy: #class) associations asAsyncStream
groups := (aListOfVariables groupedBy: #variableTag) associations
collect:
[:each |
(BrGroup new)
stream: each value asAsyncStream;
items: each value;
domainObject: each key;
itemStencil:
[| varLabel valueLabel |
Expand Down Expand Up @@ -358,10 +360,9 @@ GtAbstractExpandableDebuggerElement >> contextVariables [
| activeCoder |
activeCoder := self selectedCoder.
(activeCoder isNil or: [ activeCoder isDead ])
ifTrue: [ ^ #() asAsyncStream ].
ifTrue: [ ^ #() ].

^self contextVariableGroupsFor: activeCoder debuggerVariableNodes

]

{ #category : #'accessing - elements' }
Expand Down Expand Up @@ -610,7 +611,7 @@ GtAbstractExpandableDebuggerElement >> updateVariablesList [
ifNotNil: [ :elem |
| newContextVariables |
newContextVariables := self contextVariables.
elem stream: self contextVariables
elem groups: self contextVariables
"(elem items gtHasIdenticalElements: newContextVariables)
ifFalse: [ elem items: self contextVariables ]" ]
]

0 comments on commit bd04cfd

Please sign in to comment.