Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrolling to selection when selecting path to the receiver class in the meta browser (Fix for the meta browser in the inspector) #597

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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