--- a/Tools__ClassList.st Wed May 04 08:21:04 2016 +0200
+++ b/Tools__ClassList.st Thu May 05 06:48:38 2016 +0200
@@ -1114,6 +1114,9 @@
!
makeGeneratorForMethods
+ "return a generator which enumerates the methods directly from the selected class;
+ that generator generates 4-element elements (includes the class, category, selector and method).
+ Can be used as an in-generator of methodlists"
^ Iterator
on:[:whatToDo |
@@ -1260,7 +1263,7 @@
nameFilter notNil ifTrue:[ lcNameFilter := nameFilter asLowercase].
generator do:[:cls |
- |owner bucket|
+ |owner bucket isAnonymousJavaClass whereToAdd|
"JV@2011-08-07: FIXME: Ugly code, hard to extend!! And duplicated in listOfClassesByInheritance !!!!!!!!"
(hidePrivate not or:[cls isPrivate not])
@@ -1276,29 +1279,21 @@
(nameFilter isNil
or:[ (nameFilterIncludesMatchCharacters not and:[ cls name asLowercase startsWith:lcNameFilter])
or:[ (nameFilterIncludesMatchCharacters and:[nameFilter match:cls name ignoreCase:true]) ]]) ifTrue:[
- ((owner := cls owningClass) notNil and:[self addOwnerClasses value]) ifTrue:[
- bucket := privateClassesPerClass
- at:owner
- ifAbsentPut:[SortedCollection new
- sortBlock:[:a :b | (a name ? '?') < (b name ? '?')] ].
- "Do not show Java anonymous classes"
- cls isJavaClass ifTrue:[
- cls isAnonymous ifFalse:[
- bucket add:cls.
- ]
+ isAnonymousJavaClass := cls isJavaClass and:[cls isAnonymous].
+
+ "Do not show Java anonymous classes"
+ isAnonymousJavaClass ifFalse:[
+ ((owner := cls owningClass) notNil and:[self addOwnerClasses value]) ifTrue:[
+ bucket := privateClassesPerClass
+ at:owner
+ ifAbsentPut:[SortedCollection new
+ sortBlock:[:a :b | (a name ? '?') < (b name ? '?')] ].
+ whereToAdd := bucket.
] ifFalse:[
- bucket add:cls.
+ whereToAdd := classesOrdered.
].
- ] ifFalse:[
- "Do not show Java anonymous classes"
- cls isJavaClass ifTrue:[
- cls isAnonymous ifFalse:[
- classesOrdered add:cls.
- ]
- ] ifFalse:[
- classesOrdered add:cls.
- ]
- ]
+ whereToAdd add:cls.
+ ]
]
]
]