care for nil-category in classes
authorClaus Gittinger <cg@exept.de>
Thu, 14 Oct 2004 11:05:56 +0200
changeset 6067 d95d50b17159
parent 6066 dbc820318498
child 6068 b7426bb73588
care for nil-category in classes
NewSystemBrowser.st
Tools_ClassCategoryList.st
Tools__NewSystemBrowser.st
--- a/NewSystemBrowser.st	Thu Oct 14 10:57:04 2004 +0200
+++ b/NewSystemBrowser.st	Thu Oct 14 11:05:56 2004 +0200
@@ -30067,7 +30067,8 @@
 switchToClass:aClass selector:aSelector
     "switch to some class (by the program)"
 
-    |orgMode cls namespaces nsName cat pkg holder newValue doSwitchMeta mthd answer|
+    |orgMode cls namespaces nsName cat pkg holder newValue doSwitchMeta mthd answer
+     ns|
 
     aClass isNil ifTrue:[
         ^ self
@@ -30160,7 +30161,9 @@
     self immediateUpdate value:true.
 
     namespaces := self selectedNamespaces value ? #().
-    (namespaces includes:aClass topNameSpace name) ifFalse:[
+    ns := aClass topNameSpace.
+    ns notNil ifTrue:[nsName := ns name].
+    (namespaces includes:nsName) ifFalse:[
         (namespaces includes:(NavigatorModel nameListEntryForALL)) ifFalse:[
             self selectedNamespaces value:(OrderedCollection with: NavigatorModel nameListEntryForALL)
         ]
@@ -30172,7 +30175,7 @@
 "/        ]
 "/    ].
     orgMode == #category ifTrue:[
-        cat := aClass category.
+        cat := aClass category ? '* no category *'.
         (self selectedCategoriesValue includes:cat) ifFalse:[
             self selectedCategories value:(OrderedCollection with:cat).
         ]
@@ -36356,7 +36359,7 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.787 2004-10-01 08:34:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.788 2004-10-14 09:05:45 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!
--- a/Tools_ClassCategoryList.st	Thu Oct 14 10:57:04 2004 +0200
+++ b/Tools_ClassCategoryList.st	Thu Oct 14 11:05:56 2004 +0200
@@ -439,7 +439,6 @@
         ^ #()
     ].
     cats := cats collect:[:each | each string].
-    cats := cats collect:[:each | each = '* no category *' ifTrue:[nil] ifFalse:[each]].
 
     allName := self class nameListEntryForALL.
 
@@ -487,11 +486,12 @@
     ].
 
     ^ Iterator on:[:whatToDo | 
-                       Smalltalk allClassesDo:[:cls |
+                       Smalltalk allClassesDo:[:cls | |cat|
                            (hideUnloadedClasses not or:[cls isLoaded]) 
                            ifTrue:[
                                (cls isNameSpace not or:[cls == Smalltalk]) ifTrue:[
-                                   (cats includes:cls category) ifTrue:[
+                                   cat := cls category ? '* no category *'.
+                                   (cats includes:cat) ifTrue:[
                                        (nameSpaceFilter isNil
                                        or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[
                                            (packageFilter isNil
@@ -757,5 +757,5 @@
 !ClassCategoryList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.6 2004-10-14 08:57:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.7 2004-10-14 09:05:56 cg Exp $'
 ! !
--- a/Tools__NewSystemBrowser.st	Thu Oct 14 10:57:04 2004 +0200
+++ b/Tools__NewSystemBrowser.st	Thu Oct 14 11:05:56 2004 +0200
@@ -30067,7 +30067,8 @@
 switchToClass:aClass selector:aSelector
     "switch to some class (by the program)"
 
-    |orgMode cls namespaces nsName cat pkg holder newValue doSwitchMeta mthd answer|
+    |orgMode cls namespaces nsName cat pkg holder newValue doSwitchMeta mthd answer
+     ns|
 
     aClass isNil ifTrue:[
         ^ self
@@ -30160,7 +30161,9 @@
     self immediateUpdate value:true.
 
     namespaces := self selectedNamespaces value ? #().
-    (namespaces includes:aClass topNameSpace name) ifFalse:[
+    ns := aClass topNameSpace.
+    ns notNil ifTrue:[nsName := ns name].
+    (namespaces includes:nsName) ifFalse:[
         (namespaces includes:(NavigatorModel nameListEntryForALL)) ifFalse:[
             self selectedNamespaces value:(OrderedCollection with: NavigatorModel nameListEntryForALL)
         ]
@@ -30172,7 +30175,7 @@
 "/        ]
 "/    ].
     orgMode == #category ifTrue:[
-        cat := aClass category.
+        cat := aClass category ? '* no category *'.
         (self selectedCategoriesValue includes:cat) ifFalse:[
             self selectedCategories value:(OrderedCollection with:cat).
         ]
@@ -36356,7 +36359,7 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.787 2004-10-01 08:34:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.788 2004-10-14 09:05:45 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!