Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,6 @@ ClyShowLocalImplementorsCommand >> createQueryScope [
^scope
]

{ #category : 'execution' }
ClyShowLocalImplementorsCommand >> execute [

| selectors query |
selectors := methods collect: [ :each | each selector].

query := ClyMessageImplementorsQuery ofAny: selectors from: self createQueryScope.
browser spawnQueryBrowserOn: query withState: [:queryBrowser |
self selectMethodsIn: queryBrowser ]
]

{ #category : 'execution' }
ClyShowLocalImplementorsCommand >> prepareFullExecutionInContext: aToolContext [
super prepareFullExecutionInContext: aToolContext.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ ClyShowMethodInheritanceCommand >> description [
^ 'Show all method implementors in full hierarchy of selected method classes.'
]

{ #category : 'execution' }
ClyShowMethodInheritanceCommand >> execute [

(Smalltalk tools toolNamed: #messageList)
browseOverridenAndOverridingMethodsFrom: methods first
inScope: browser defaultNavigationScope asRBEnvironment

]

{ #category : 'execution' }
ClyShowMethodInheritanceCommand >> selectMethodsIn: aQueryBrowser [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ ClyShowOverriddenMethodsCommand >> defaultMenuItemName [
^'Overridden methods'
]

{ #category : 'execution' }
ClyShowOverriddenMethodsCommand >> execute [

(Smalltalk tools toolNamed: #messageList)
browseOverridenMethodsFrom: methods first
inScope: browser defaultNavigationScope asRBEnvironment

]

{ #category : 'execution' }
ClyShowOverriddenMethodsCommand >> selectMethodsIn: aQueryBrowser [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ ClyShowOverridingMethodsCommand >> defaultMenuIconName [
ClyShowOverridingMethodsCommand >> defaultMenuItemName [
^'Overriding methods'
]

{ #category : 'execution' }
ClyShowOverridingMethodsCommand >> execute [

(Smalltalk tools toolNamed: #messageList)
browseOverridingMethodsFrom: methods first
inScope: browser defaultNavigationScope asRBEnvironment

]
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ ClyOldMessageBrowserAdapter class >> on: aNavigationEnvironment systemScope: aSy
{ #category : 'tools registration' }
ClyOldMessageBrowserAdapter class >> registerToolsOn: registry [

registry register: self as: #messageList
"registry register: self as: #messageList"
]

{ #category : 'accessing' }
Expand Down
45 changes: 20 additions & 25 deletions src/Calypso-SystemTools-QueryBrowser/ClyBrowserMorph.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ ClyBrowserMorph >> browseImplementorsOf: aSymbol inNameResolver: aNameResolver [
browser selectClass: classToBrowse].
^ #NormalBrowseClass ] ] ].

self spawnQueryBrowserOn: (ClyMessageImplementorsQuery of: aSymbol).
((Smalltalk tools toolNamed: #messageList)
browseImplementorsOf: aSymbol
inScope: self defaultNavigationScope asRBEnvironment ).
^ #NormalImplementorBrowse
]

Expand All @@ -41,9 +43,15 @@ ClyBrowserMorph >> browseReferencesTo: aSymbol [
ClyBrowserMorph >> browseReferencesTo: aSymbol inNameResolver: anEnvironment [

aSymbol isSymbol and: [
^ aSymbol first isUppercase
ifTrue: [ self browseUppercasedReferencesTo: aSymbol inNameRespolver: anEnvironment ]
ifFalse: [ self browseLowercasedReferencesTo: aSymbol inNameResolver: anEnvironment ] ]
^ aSymbol first isUppercase
ifTrue: [
self
browseUppercasedReferencesTo: aSymbol
inNameRespolver: anEnvironment ]
ifFalse: [
(Smalltalk tools toolNamed: #messageList)
browseSendersOf: aSymbol
inScope: self defaultNavigationScope asRBEnvironment ] ]
]

{ #category : '*Calypso-SystemTools-QueryBrowser' }
Expand All @@ -55,31 +63,18 @@ ClyBrowserMorph >> browseSendersOf: aSymbol [
{ #category : '*Calypso-SystemTools-QueryBrowser' }
ClyBrowserMorph >> browseUppercasedReferencesTo: aSymbol inNameRespolver: anEnvironment [

anEnvironment
ifNil: [
^ {
(self spawnQueryBrowserOn: (ClyClassReferencesQuery of: (self class environment at: aSymbol))) .
#SendersWithouEnvironment
} ].

(anEnvironment bindingOf: aSymbol)
ifNotNil: [ : envBinding |
^ (envBinding value isClass and: [envBinding value isPool])
ifTrue: [
{
(self spawnQueryBrowserOn: (ClySharedPoolReferencesQuery of: envBinding)) .
#SendersWithEnvironment
} ]
ifFalse: [
{
(self spawnQueryBrowserOn: (ClyClassReferencesQuery of: envBinding)).
#SendersWithEnvironment
} ] ].
| aClassOrTrait returnedSymbol |

aClassOrTrait := anEnvironment
ifNil: [ returnedSymbol := #SendersWithouEnvironment. self class environment at: aSymbol ]
ifNotNil: [ returnedSymbol := #SendersWithEnvironment. (anEnvironment bindingOf: aSymbol) value ].

^ { SystemNavigation default browseAllUsersOfClassOrTrait: aClassOrTrait. returnedSymbol }
]

{ #category : '*Calypso-SystemTools-QueryBrowser' }
ClyBrowserMorph >> spawnQueryBrowserOn: aQuery [

self spawnQueryBrowserOn: aQuery withState: []
]

Expand Down
11 changes: 11 additions & 0 deletions src/Refactoring-Environment/RBClassHierarchyEnvironment.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ RBClassHierarchyEnvironment >> includesClass: aClass [
[ aClass inheritsFrom: class ] ]) and: [super includesClass: aClass]
]

{ #category : 'printing' }
RBClassHierarchyEnvironment >> printOn: aStream [

aStream
nextPutAll: self class name;
nextPutAll: ' for: ';
print: class;
nextPutAll: ' in: ';
print: environment
]

{ #category : 'printing' }
RBClassHierarchyEnvironment >> storeOn: aStream [
aStream nextPut: $(.
Expand Down
2 changes: 1 addition & 1 deletion src/Tool-Base/SystemNavigation.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ SystemNavigation >> browseMessageList: messageList name: labelString autoSelect:
^ (self tools toolNamed: #messageList) new
messages: methods;
title: labelString;
autoSelect: autoSelectString;
highlight: autoSelectString;
refreshingBlock: aBlock;
open
]
Expand Down