changed: #selectorMenuMoveToProtocol
authorClaus Gittinger <cg@exept.de>
Thu, 31 Mar 2011 13:22:19 +0200
changeset 9808 00f7f07bd789
parent 9807 6ad85e2e00b3
child 9809 fa5280b1259f
changed: #selectorMenuMoveToProtocol
NewSystemBrowser.st
Tools__NewSystemBrowser.st
--- a/NewSystemBrowser.st	Fri Mar 25 20:06:32 2011 +0100
+++ b/NewSystemBrowser.st	Thu Mar 31 13:22:19 2011 +0200
@@ -33314,10 +33314,18 @@
     ].
 
     "/ for isXXX methods, add 'testing'
-    (methodSelection conform:[:method | method selector = ('is',method mclass name) ]) ifTrue:[
+    (methodSelection contains:[:method | method selector = ('is',method mclass name) ]) ifTrue:[
         someCategories add:'testing'.
         goodCandidates add:'testing'.
     ].
+    "/ for hasXXX, canXXX methods, add 'queries'
+    (methodSelection contains:[:method | |sel|
+                                sel := method selector.
+                                ((sel startsWith:'has') and:[sel size > 3 and:[ (sel at:4) isUppercase ]])
+                                or:[ ((sel startsWith:'can') and:[sel size > 3 and:[ (sel at:4) isUppercase ]]) ]]) ifTrue:[
+        someCategories add:'queries'.
+        goodCandidates add:'queries'.
+    ].
 
     someCategories := someCategories asOrderedCollection sort.
     goodCandidates size == 1 ifTrue:[
@@ -33346,7 +33354,7 @@
 
     self moveMethods:methodSelection toProtocol:newCategory
 
-    "Modified: / 22-12-2010 / 11:45:59 / cg"
+    "Modified: / 31-03-2011 / 11:25:55 / cg"
 !
 
 selectorMenuNewImageSpec
@@ -45142,11 +45150,11 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1520 2011-03-01 18:47:46 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1521 2011-03-31 11:22:19 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1520 2011-03-01 18:47:46 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1521 2011-03-31 11:22:19 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!
--- a/Tools__NewSystemBrowser.st	Fri Mar 25 20:06:32 2011 +0100
+++ b/Tools__NewSystemBrowser.st	Thu Mar 31 13:22:19 2011 +0200
@@ -33314,10 +33314,18 @@
     ].
 
     "/ for isXXX methods, add 'testing'
-    (methodSelection conform:[:method | method selector = ('is',method mclass name) ]) ifTrue:[
+    (methodSelection contains:[:method | method selector = ('is',method mclass name) ]) ifTrue:[
         someCategories add:'testing'.
         goodCandidates add:'testing'.
     ].
+    "/ for hasXXX, canXXX methods, add 'queries'
+    (methodSelection contains:[:method | |sel|
+                                sel := method selector.
+                                ((sel startsWith:'has') and:[sel size > 3 and:[ (sel at:4) isUppercase ]])
+                                or:[ ((sel startsWith:'can') and:[sel size > 3 and:[ (sel at:4) isUppercase ]]) ]]) ifTrue:[
+        someCategories add:'queries'.
+        goodCandidates add:'queries'.
+    ].
 
     someCategories := someCategories asOrderedCollection sort.
     goodCandidates size == 1 ifTrue:[
@@ -33346,7 +33354,7 @@
 
     self moveMethods:methodSelection toProtocol:newCategory
 
-    "Modified: / 22-12-2010 / 11:45:59 / cg"
+    "Modified: / 31-03-2011 / 11:25:55 / cg"
 !
 
 selectorMenuNewImageSpec
@@ -45142,11 +45150,11 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1520 2011-03-01 18:47:46 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1521 2011-03-31 11:22:19 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1520 2011-03-01 18:47:46 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1521 2011-03-31 11:22:19 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!