Tools__ClassList.st
changeset 16427 7cd55f58c121
parent 16310 431559157925
child 16431 85b661d6c97b
--- a/Tools__ClassList.st	Wed May 04 11:42:35 2016 +0200
+++ b/Tools__ClassList.st	Wed May 04 11:57:17 2016 +0200
@@ -1260,7 +1260,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 +1276,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.
+                                ]                                            
                             ]
                         ]
                     ]