checkin from browser
authorClaus Gittinger <cg@exept.de>
Thu, 02 Jan 1997 20:17:55 +0100
changeset 2030 94800ed9cdc5
parent 2029 55ddf4c547ab
child 2031 05484e955aaa
checkin from browser
NameSpace.st
Namespace.st
--- a/NameSpace.st	Thu Jan 02 20:13:04 1997 +0100
+++ b/NameSpace.st	Thu Jan 02 20:17:55 1997 +0100
@@ -272,10 +272,28 @@
 
     "Created: 26.10.1996 / 11:13:36 / cg"
     "Modified: 20.12.1996 / 15:11:45 / cg"
+!
+
+listOfAllNamespaces
+    "return a list of all namespaces"
+
+    |set|
+
+    set := IdentitySet with:Smalltalk.
+    Smalltalk allBehaviorsDo:[:aClass |
+        (aClass isNamespace 
+        and:[aClass ~~ Namespace
+        and:[aClass ~~ Smalltalk]]) ifTrue:[
+            set add:aClass
+        ]
+    ].
+    ^ set
+
+    "Created: 2.1.1997 / 20:17:40 / cg"
 ! !
 
 !Namespace class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NameSpace.st,v 1.14 1997-01-02 17:47:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NameSpace.st,v 1.15 1997-01-02 19:17:55 cg Exp $'
 ! !
--- a/Namespace.st	Thu Jan 02 20:13:04 1997 +0100
+++ b/Namespace.st	Thu Jan 02 20:17:55 1997 +0100
@@ -272,10 +272,28 @@
 
     "Created: 26.10.1996 / 11:13:36 / cg"
     "Modified: 20.12.1996 / 15:11:45 / cg"
+!
+
+listOfAllNamespaces
+    "return a list of all namespaces"
+
+    |set|
+
+    set := IdentitySet with:Smalltalk.
+    Smalltalk allBehaviorsDo:[:aClass |
+        (aClass isNamespace 
+        and:[aClass ~~ Namespace
+        and:[aClass ~~ Smalltalk]]) ifTrue:[
+            set add:aClass
+        ]
+    ].
+    ^ set
+
+    "Created: 2.1.1997 / 20:17:40 / cg"
 ! !
 
 !Namespace class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Namespace.st,v 1.14 1997-01-02 17:47:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/Namespace.st,v 1.15 1997-01-02 19:17:55 cg Exp $'
 ! !