From fed48bbbcfad7f8ba1fc81b755ad7064ec4f3ea8 Mon Sep 17 00:00:00 2001 From: Marcus Denker Date: Tue, 14 Nov 2023 13:05:53 +0100 Subject: [PATCH] Spotter has oddly methods spotterForMessagesFor: on CompiledMethod. - This code is never called. - it makes no sense. We search already the send selectors. --- .../CompiledMethod.extension.st | 12 ---- .../ReflectiveMethod.extension.st | 6 -- .../StSelector.class.st | 61 ------------------- 3 files changed, 79 deletions(-) delete mode 100644 src/NewTools-Spotter-Extensions/StSelector.class.st diff --git a/src/NewTools-Spotter-Extensions/CompiledMethod.extension.st b/src/NewTools-Spotter-Extensions/CompiledMethod.extension.st index 7807ba4e7..f6438f325 100644 --- a/src/NewTools-Spotter-Extensions/CompiledMethod.extension.st +++ b/src/NewTools-Spotter-Extensions/CompiledMethod.extension.st @@ -22,18 +22,6 @@ CompiledMethod >> spotterForImplementorsFor: aStep [ keyBinding: $m command ] -{ #category : '*NewTools-Spotter-Extensions' } -CompiledMethod >> spotterForMessagesFor: aStep [ - - - aStep listProcessor - title: 'Messages'; - allCandidates: [ - self messages asSortedCollection - collect: [:each | StSelector new name: each ] ]; - filter: StFilterSubstring -] - { #category : '*NewTools-Spotter-Extensions' } CompiledMethod >> spotterForSendersFor: aStep [ diff --git a/src/NewTools-Spotter-Extensions/ReflectiveMethod.extension.st b/src/NewTools-Spotter-Extensions/ReflectiveMethod.extension.st index 217c3680c..c25250173 100644 --- a/src/NewTools-Spotter-Extensions/ReflectiveMethod.extension.st +++ b/src/NewTools-Spotter-Extensions/ReflectiveMethod.extension.st @@ -12,12 +12,6 @@ ReflectiveMethod >> spotterForImplementorsFor: aStep [ self compiledMethod spotterForImplementorsFor: aStep ] -{ #category : '*NewTools-Spotter-Extensions' } -ReflectiveMethod >> spotterForMessagesFor: aStep [ - - self compiledMethod spotterForMessagesFor: aStep -] - { #category : '*NewTools-Spotter-Extensions' } ReflectiveMethod >> spotterForSendersFor: aStep [ diff --git a/src/NewTools-Spotter-Extensions/StSelector.class.st b/src/NewTools-Spotter-Extensions/StSelector.class.st deleted file mode 100644 index 61cb3b0a6..000000000 --- a/src/NewTools-Spotter-Extensions/StSelector.class.st +++ /dev/null @@ -1,61 +0,0 @@ -" -A wrapper for selectors to be used in spotter (so they are something more than just symbols). -" -Class { - #name : 'StSelector', - #superclass : 'Object', - #instVars : [ - 'name', - 'methods' - ], - #category : 'NewTools-Spotter-Extensions', - #package : 'NewTools-Spotter-Extensions' -} - -{ #category : 'adding' } -StSelector >> addMethod: aCompiledMethod [ - "this is a private method that can be used by the constructor on the class side - exclusively within the context of Spotter" - methods ifNil: [ methods := OrderedCollection new ]. - methods add: aCompiledMethod -] - -{ #category : 'displaying' } -StSelector >> displayStringOn: stream [ - - stream nextPutAll: self name -] - -{ #category : 'private' } -StSelector >> implementors [ - ^ methods ifNil: [ - methods := (SystemNavigation default allImplementorsOf: self name) - collect: [ :each | each compiledMethod ] ] -] - -{ #category : 'accessing' } -StSelector >> name [ - ^ name -] - -{ #category : 'accessing' } -StSelector >> name: anObject [ - name := anObject -] - -{ #category : 'private' } -StSelector >> senders [ - ^ SystemNavigation default allSendersOf: self name -] - -{ #category : 'spotter' } -StSelector >> spotterUsersFor: aStep [ - - - ^ aStep listProcessor - title: 'Senders'; - filter: StFilterSubstring item: [ :filter :context | - self senders do: [ :sender | - filter value: sender compiledMethod ] ]; - keyBinding: $n meta -]