Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
Add support to browse senders and implementors from Examples search m…
Browse files Browse the repository at this point in the history
…ode.
  • Loading branch information
Hernán Morales Durand committed Jan 17, 2024
1 parent a4c74a8 commit 53ebb2b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/NewTools-Finder/CompiledMethod.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : 'CompiledMethod' }

{ #category : '*NewTools-Finder' }
CompiledMethod >> selectorForFinder [
"Answer a <Symbol> with the receiver's selector for the Finder tool"

^ self selector.
]
18 changes: 14 additions & 4 deletions src/NewTools-Finder/StFinderSelectorResult.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ StFinderSelectorResult >> hierarchyAction [
{ #category : 'action' }
StFinderSelectorResult >> implementersAction [

self navigation browseAllImplementorsOf: content
self navigation browseAllImplementorsOf: self selectorToBrowse.
]

{ #category : 'action' }
Expand Down Expand Up @@ -144,13 +144,23 @@ StFinderSelectorResult >> selectItemIn: aSpTreePresenter [
clickAtPath: selectionPathAtItem
]

{ #category : 'action' }
StFinderSelectorResult >> selectorToBrowse [

| selectorToBrowse |

^ selectorToBrowse := content isSymbol
ifFalse: [ content selectorForFinder ]
ifTrue: [ content ].
]

{ #category : 'action' }
StFinderSelectorResult >> sendersAction [

self navigation
browseSendersOf: content
name: 'Senders of ' , content asString
autoSelect: content asString
browseSendersOf: self selectorToBrowse
name: 'Senders of ' , self selectorToBrowse asString
autoSelect: self selectorToBrowse asString
]

{ #category : 'action' }
Expand Down
7 changes: 7 additions & 0 deletions src/NewTools-Finder/StMethodFinderSend.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ StMethodFinderSend >> resultIn: expectedResult timeout: anInteger [
do: [ :depr | ^ false ]
]

{ #category : 'accessing' }
StMethodFinderSend >> selectorForFinder [
"Answer a <Symbol> with the receiver's selector for the Finder tool"

^ self selector
]

{ #category : 'accessing' }
StMethodFinderSend >> sendersAction [

Expand Down

0 comments on commit 53ebb2b

Please sign in to comment.