checkin from browser
authorClaus Gittinger <cg@exept.de>
Fri, 08 Nov 1996 21:48:45 +0100
changeset 849 50de8d192d38
parent 848 c7d1ea190693
child 850 b7fab4026db0
checkin from browser
MemUsageV.st
MemoryUsageView.st
--- a/MemUsageV.st	Fri Nov 08 19:54:56 1996 +0100
+++ b/MemUsageV.st	Fri Nov 08 21:48:45 1996 +0100
@@ -86,15 +86,22 @@
 
     list selection notNil ifTrue:[
         class := (info at:(list selection)) at:1.
-        "
-         special kludge
-        "
-        class isSymbol ifTrue:[^self].
-
         self withCursor:(Cursor questionMark) do:[
             |insts|
 
-            insts := class allInstances.
+            "
+             special kludge
+            "
+            class isSymbol ifTrue:[
+                class == #Namespace ifFalse:[
+                    ^ SystemBrowser open
+                ].
+                class := (Smalltalk at:class) class.
+                insts := class allDerivedInstances.
+                insts remove:class soleInstance ifAbsent:nil
+            ] ifFalse:[
+                insts := class allInstances.
+            ].
             insts size > 500 ifTrue:[
                 (self confirm:'there are ' , insts size printString , ' instances.\\Do you really want to see them all ?' withCRs)
                 ifFalse:[^ self]
@@ -280,7 +287,11 @@
                             cls == #ObsoleteClass ifTrue:[
                                 '<all obsolete classes>'
                             ] ifFalse:[
-                                cls displayString "/name
+                                cls == #Namespace ifTrue:[
+                                    '<all namespaces>'
+                                ] ifFalse:[
+                                    cls displayString "/name
+                                ]
                             ]
                         ]
                     ]
@@ -375,7 +386,14 @@
                             o isPrivate ifTrue:[
                                 class := #PrivateClass
                             ] ifFalse:[
-                                class := #Class
+                                (o isNamespace
+                                and:[o ~~ Namespace
+                                and:[o ~~ Smalltalk]])
+                                ifTrue:[
+                                    class := #Namespace
+                                ] ifFalse:[
+                                    class := #Class
+                                ]
                             ]    
                         ]
                     ]
@@ -416,5 +434,5 @@
 !MemoryUsageView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/MemUsageV.st,v 1.18 1996-10-15 21:17:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/MemUsageV.st,v 1.19 1996-11-08 20:48:45 cg Exp $'
 ! !
--- a/MemoryUsageView.st	Fri Nov 08 19:54:56 1996 +0100
+++ b/MemoryUsageView.st	Fri Nov 08 21:48:45 1996 +0100
@@ -86,15 +86,22 @@
 
     list selection notNil ifTrue:[
         class := (info at:(list selection)) at:1.
-        "
-         special kludge
-        "
-        class isSymbol ifTrue:[^self].
-
         self withCursor:(Cursor questionMark) do:[
             |insts|
 
-            insts := class allInstances.
+            "
+             special kludge
+            "
+            class isSymbol ifTrue:[
+                class == #Namespace ifFalse:[
+                    ^ SystemBrowser open
+                ].
+                class := (Smalltalk at:class) class.
+                insts := class allDerivedInstances.
+                insts remove:class soleInstance ifAbsent:nil
+            ] ifFalse:[
+                insts := class allInstances.
+            ].
             insts size > 500 ifTrue:[
                 (self confirm:'there are ' , insts size printString , ' instances.\\Do you really want to see them all ?' withCRs)
                 ifFalse:[^ self]
@@ -280,7 +287,11 @@
                             cls == #ObsoleteClass ifTrue:[
                                 '<all obsolete classes>'
                             ] ifFalse:[
-                                cls displayString "/name
+                                cls == #Namespace ifTrue:[
+                                    '<all namespaces>'
+                                ] ifFalse:[
+                                    cls displayString "/name
+                                ]
                             ]
                         ]
                     ]
@@ -375,7 +386,14 @@
                             o isPrivate ifTrue:[
                                 class := #PrivateClass
                             ] ifFalse:[
-                                class := #Class
+                                (o isNamespace
+                                and:[o ~~ Namespace
+                                and:[o ~~ Smalltalk]])
+                                ifTrue:[
+                                    class := #Namespace
+                                ] ifFalse:[
+                                    class := #Class
+                                ]
                             ]    
                         ]
                     ]
@@ -416,5 +434,5 @@
 !MemoryUsageView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/MemoryUsageView.st,v 1.18 1996-10-15 21:17:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/MemoryUsageView.st,v 1.19 1996-11-08 20:48:45 cg Exp $'
 ! !