Skip to content

Commit

Permalink
Sort instance variables in the Raw view in GemStone
Browse files Browse the repository at this point in the history
  • Loading branch information
chisandrei authored Oct 31, 2024
1 parent c65c90d commit 7397477
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/GToolkit-RemotePhlow-GemStone/Object.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ Object >> gtGsInspectorIconName [

{ #category : '*GToolkit-RemotePhlow-GemStone' }
Object >> gtRemoteVariableValuePairsWithSelfIf: aBoolean [
| instVarNames bindings indexedVarsSize |
| instVarNames bindings instanceVariables indexedVarsSize |
instVarNames := self class allInstVarNames.
indexedVarsSize := self basicSize - instVarNames size.
bindings := OrderedCollection new: instVarNames size + 1.
instanceVariables := OrderedCollection new: instVarNames size + 1.

aBoolean ifTrue: [ bindings add: 'self' -> self ].

instVarNames doWithIndex: [ :each :index |
bindings add: (each -> (self instVarAt: index))].
instanceVariables add: (each -> (self instVarAt: index))].
bindings addAll: (instanceVariables sort: [ :a :b | a key < b key ]).

1 to: (indexedVarsSize min: 21) do: [ :index |
bindings add: (index asString -> (self _at: index)) ].
Expand Down

0 comments on commit 7397477

Please sign in to comment.