#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Sat, 11 May 2019 12:16:33 +0200
changeset 18760 7b0551a880c2
parent 18759 41e03469a04f
child 18761 a93fa8f9a2a3
#FEATURE by cg class: Tools::MethodList +messages sent filter changed: #isNameFilterMatchingSelector:method: class: Tools::MethodList class changed: #windowSpec
Tools__MethodList.st
--- a/Tools__MethodList.st	Sat May 11 12:16:13 2019 +0200
+++ b/Tools__MethodList.st	Sat May 11 12:16:33 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2000 by eXept Software AG
 	      All Rights Reserved
@@ -212,9 +214,10 @@
                                model: nameFilterTypeHolder
                                comboList: 
                               (Array
-                                 'Ss' 'Tt' '-Ss' '-Tt' '-'
+                                 'Ss' 'Tt' 'Mm' '-Ss' '-Tt' '-'
                                  'S' '-S'
                                  'T' '-T'
+                                 'M'
                                )
                                useIndex: false
                                extent: (Point 45 26)
@@ -260,6 +263,8 @@
         
        )
      )
+
+    "Modified: / 11-05-2019 / 11:22:02 / Claus Gittinger"
 ! !
 
 !MethodList class methodsFor:'plugIn spec'!
@@ -1218,7 +1223,13 @@
 !
 
 isNameFilterMatchingSelector:sel method:mthd
-    "true if the method matches the current nameFilter"
+    "true if the method matches the current nameFilter.
+     The namefilter is one of:
+        S/Ss - show methods where the selector matches / matches case ignoring
+        T/Tt - show methods containing a string with case / case ignoring
+        M/Mm - show methods sending a message with case / case ignoring
+        -xx - negation; which do not match
+    "
     
     |source filterType doesMatch caseSensitive positiveMatch|
     
@@ -1233,7 +1244,7 @@
     caseSensitive := true.
     positiveMatch := true.
     
-    (#('Ss' '-Ss' 'Tt' '-Tt') includes:filterType) ifTrue:[
+    (#('Ss' '-Ss' 'Tt' '-Tt' 'Mm' '-Mm') includes:filterType) ifTrue:[
         caseSensitive := false.
         filterType := filterType copyButLast.
     ].        
@@ -1253,6 +1264,21 @@
         ^ doesMatch
     ].
 
+    (filterType = 'M') ifTrue:[
+        "/ messages-sent filter
+        nameFilter includesMatchCharacters ifTrue:[
+            doesMatch := mthd messagesSent contains:[:sel |
+                                nameFilter match:sel caseSensitive:caseSensitive.
+                         ]                        
+        ] ifFalse:[ 
+            doesMatch := mthd messagesSent contains:[:sel |
+                                sel includesString:nameFilter caseSensitive:caseSensitive
+                         ]                        
+        ].
+        positiveMatch ifFalse:[^ doesMatch not ].
+        ^ doesMatch
+    ].
+
     source := mthd source.
     
     (filterType = 'T') ifTrue:[
@@ -1272,6 +1298,7 @@
 
     "Created: / 25-11-2017 / 12:04:21 / cg"
     "Modified: / 04-12-2017 / 23:42:12 / cg"
+    "Modified: / 11-05-2019 / 12:10:44 / Claus Gittinger"
 !
 
 listOfMethodNames