changed:
#listOfMethodCategories
#makeGenerator
fixes to allow viewing all vs extensions in a
project-filtered setup (spawn single or multiple projects)
--- a/Tools_MethodCategoryList.st Tue Oct 23 19:41:08 2012 +0200
+++ b/Tools_MethodCategoryList.st Tue Oct 23 20:20:05 2012 +0200
@@ -934,7 +934,7 @@
(packages isNil
or:[ mPkg = noPackage
or:[ (packages includes:mPkg)
- or:[ (extensionProtocols and:[ mthd isExtension ])
+ or:[ allProtocols "(extensionProtocols and:[ mthd isExtension ])"
]]]
) ifTrue:[
"/ used to be a more readable or, but to reuse info, I've splitted it.
@@ -1222,7 +1222,7 @@
numAnnotated := 0.
generator do:[:clsIn :catIn |
- |emptyProtocols clsName doHighLight doHighLightRed suppress includedCats|
+ |emptyProtocols clsName doHighLight doHighLightRed includedCats|
includedCats := Set new.
@@ -1237,7 +1237,9 @@
] ifFalse:[
cats := Array with:catIn.
].
- cats do:[:cat |
+ cats do:[:cat |
+ |suppress|
+
cat notNil ifTrue:[
suppress := packageFilterOnInput notNil
and:[ (self class:cls protocol:cat includesMethodsInAnyPackage:packageFilterOnInput) not ].
@@ -1283,31 +1285,34 @@
cats := cats asSet.
cls selectorsAndMethodsDo:[:sel :mthd |
- |info cat|
+ |info cat suppress|
(includedCats includes:(cat := mthd category)) ifTrue:[
- categoryBag add:cat.
- lazyPseudoProtocols ifFalse:[
- info := self methodInfoFor:mthd in:cls selector:sel lazy:lazyPseudoProtocols.
- info notNil ifTrue:[
- info isObsolete ifTrue:[ numObsolete := numObsolete + 1 ].
- info sendsSuper ifTrue:[ numSuper := numSuper + 1 ].
- info isUncommented ifTrue:[ numUncommented := numUncommented + 1 ].
- info isDocumentationMethod ifTrue:[ numDocumentation := numDocumentation + 1 ].
- info isLongMethod ifTrue:[ numLong := numLong + 1 ].
- info isExtensionMethod ifTrue:[ numExtension := numExtension + 1 ].
- info isOverride ifTrue:[ numOverride := numOverride + 1 ].
- info isRedefine ifTrue:[ numRedefine := numRedefine + 1 ].
- info isRedefined ifTrue:[ numRedefined := numRedefined + 1 ].
- info isSubclassResponsibility ifTrue:[ numSubclassResponsibility := numSubclassResponsibility + 1].
- info isAnnotated ifTrue:[ numAnnotated := numAnnotated + 1].
- ].
- (Timestamp now deltaFrom:startTime) > 5 seconds ifTrue:[
- lazyPseudoProtocols := true.
- "/ because we already computed for 10seconds, more and more will be found in
- "/ the cache, and eventually, pseudo protocols will be shown anyway
- masterApplication showInfo:'suppress pseudo protocols - parsing took too long'.
- ].
+ suppress := packageFilter notNil and:[ (packageFilter includes:mthd package) not ].
+ suppress ifFalse:[
+ categoryBag add:cat.
+ lazyPseudoProtocols ifFalse:[
+ info := self methodInfoFor:mthd in:cls selector:sel lazy:lazyPseudoProtocols.
+ info notNil ifTrue:[
+ info isObsolete ifTrue:[ numObsolete := numObsolete + 1 ].
+ info sendsSuper ifTrue:[ numSuper := numSuper + 1 ].
+ info isUncommented ifTrue:[ numUncommented := numUncommented + 1 ].
+ info isDocumentationMethod ifTrue:[ numDocumentation := numDocumentation + 1 ].
+ info isLongMethod ifTrue:[ numLong := numLong + 1 ].
+ info isExtensionMethod ifTrue:[ numExtension := numExtension + 1 ].
+ info isOverride ifTrue:[ numOverride := numOverride + 1 ].
+ info isRedefine ifTrue:[ numRedefine := numRedefine + 1 ].
+ info isRedefined ifTrue:[ numRedefined := numRedefined + 1 ].
+ info isSubclassResponsibility ifTrue:[ numSubclassResponsibility := numSubclassResponsibility + 1].
+ info isAnnotated ifTrue:[ numAnnotated := numAnnotated + 1].
+ ].
+ (Timestamp now deltaFrom:startTime) > 5 seconds ifTrue:[
+ lazyPseudoProtocols := true.
+ "/ because we already computed for 10seconds, more and more will be found in
+ "/ the cache, and eventually, pseudo protocols will be shown anyway
+ masterApplication showInfo:'suppress pseudo protocols - parsing took too long'.
+ ].
+ ]
]
].
].
@@ -1376,10 +1381,13 @@
].
].
].
- (lazyPseudoProtocols not and:[showPseudoProtocols value]) ifTrue:[
- "/ see if there is a subclassResponsibility in a superclass
- required := SmalltalkCodeGeneratorTool missingRequiredProtocolFor:eachClass.
- numMissingRequired := numMissingRequired + required size.
+
+ (packageFilter isNil or:[ packageFilter includes:eachClass package ]) ifTrue:[
+ (lazyPseudoProtocols not and:[showPseudoProtocols value]) ifTrue:[
+ "/ see if there is a subclassResponsibility in a superclass
+ required := SmalltalkCodeGeneratorTool missingRequiredProtocolFor:eachClass.
+ numMissingRequired := numMissingRequired + required size.
+ ].
].
numAll := numAll + (eachClass methodDictionary size)
].
@@ -2057,11 +2065,11 @@
!MethodCategoryList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.84 2012-10-20 19:38:11 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.85 2012-10-23 18:20:05 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.84 2012-10-20 19:38:11 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.85 2012-10-23 18:20:05 cg Exp $'
! !
MethodCategoryList initialize!