Skip to content

Commit

Permalink
Merge pull request #597 from adri09070/meta-browser-in-debugger-inpec…
Browse files Browse the repository at this point in the history
…tor-fix

Scrolling to selection when selecting path to the receiver class in the meta browser (Fix for the meta browser in the inspector)
  • Loading branch information
jecisc authored Oct 5, 2023
2 parents a35195e + cf83e87 commit 44c941f
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions src/NewTools-Inspector/StMetaBrowserPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -70,35 +70,41 @@ StMetaBrowserPresenter >> compile: aString [

{ #category : 'initialization' }
StMetaBrowserPresenter >> initializePresenters [

| classHierarchy |

classHierarchy := self model class withAllSuperclasses reversed.

classes := self newTreeTable
addColumn: (SpStringTableColumn title: 'Class hierarchy' evaluated: #name);
roots: { classHierarchy first };
children: [ :aClass | classHierarchy select: [ :subclass | subclass superclass == aClass ] ];
contextMenu: [ self classListMenu ];
yourself.
addColumn:
(SpStringTableColumn
title: 'Class hierarchy'
evaluated: #name);
roots: { classHierarchy first };
children: [ :aClass |
classHierarchy select: [ :subclass |
subclass superclass == aClass ] ];
contextMenu: [ self classListMenu ];
yourself.
methods := (self instantiate: SpFilteringListPresenter)
display: [ :each | each selector ];
contextMenu: [ self methodListMenu ];
yourself.
display: [ :each | each selector ];
contextMenu: [ self methodListMenu ];
yourself.

source := self newCode
lineNumbers: StPharoSettings codeShowLineNumbers;
beForMethod: self selectedMethod;
whenSubmitDo: [ :aString | self compile: aString ];
whenResetDo: [ self updateSourceWith: self selectedMethod ];
yourself.
classes
transmitTo: methods
lineNumbers: StPharoSettings codeShowLineNumbers;
beForMethod: self selectedMethod;
whenSubmitDo: [ :aString | self compile: aString ];
whenResetDo: [ self updateSourceWith: self selectedMethod ];
yourself.

classes
transmitTo: methods
transform: [ :aClass | self methodsOf: aClass ].
methods
transmitDo: [ :aMethod | self updateSourceWith: aMethod ].
methods transmitDo: [ :aMethod | self updateSourceWith: aMethod ].

classes selectPath: (Array new: classHierarchy size withAll: 1)
classes
selectPath: (Array new: classHierarchy size withAll: 1)
scrollToSelection: true
]

{ #category : 'initialization' }
Expand Down

0 comments on commit 44c941f

Please sign in to comment.