Tools_NamespaceList.st
changeset 7706 92e3017d36b3
parent 6794 c55a036a249e
child 8631 0178be4a8c65
--- a/Tools_NamespaceList.st	Tue Mar 06 12:48:42 2007 +0100
+++ b/Tools_NamespaceList.st	Tue Mar 06 12:48:47 2007 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libtool' }"
 
 "{ NameSpace: Tools }"
@@ -138,22 +137,23 @@
 
 aspectSelectors
     ^ #( 
-	#(#doubleClickChannel #action )
-	immediateUpdate 
-	selectedNamespaces 
-	menuHolder 
-	inGeneratorHolder 
-	outGeneratorHolder 
-	selectionChangeCondition 
-	updateTrigger
-	forceGeneratorTrigger
-	hideUnloadedClasses
-	organizerMode
-	slaveMode
+        #(#doubleClickChannel #action )
+        immediateUpdate 
+        selectedNamespaces 
+        menuHolder 
+        inGeneratorHolder 
+        outGeneratorHolder 
+        selectionChangeCondition 
+        updateTrigger
+        forceGeneratorTrigger
+        hideUnloadedClasses
+        showAllClassesInNameSpaceOrganisation
+        organizerMode
+        slaveMode
        )
 
-    "Created: / 18.2.2000 / 01:06:27 / cg"
-    "Modified: / 25.2.2000 / 22:32:20 / cg"
+    "Created: / 18-02-2000 / 01:06:27 / cg"
+    "Modified: / 05-03-2007 / 16:47:45 / cg"
 ! !
 
 !NamespaceList methodsFor:'aspects'!
@@ -266,83 +266,95 @@
 makeGenerator
     "return a generator which enumerates the classes from the selected namespace(s)."
 
-    |spaceNames hideUnloadedClasses|
+    |spaceNames hideUnloadedClasses showAllClasses|
 
     spaceNames := self selectedNamespaces value.
     spaceNames size == 0 ifTrue:[
-	^ #()
+        ^ #()
     ].
 
     hideUnloadedClasses := self hideUnloadedClasses value.
+    showAllClasses := self showAllClassesInNameSpaceOrganisation value.
 
-    (spaceNames includes:(self class nameListEntryForALL)) ifTrue:[
-	hideUnloadedClasses ifTrue:[
-	    ^ Iterator on:[:whatToDo |
-			       Smalltalk allClassesDo:[:cls |
-				   cls isLoaded ifTrue:[
-				       cls isNameSpace ifFalse:[
-					   whatToDo value:cls
-				       ]
-				   ]
-			       ]
-			  ]
-	].
-	^ Iterator on:[:whatToDo |
-			   Smalltalk allClassesDo:whatToDo
-		      ]
+    (showAllClasses or:[spaceNames includes:(self class nameListEntryForALL)]) ifTrue:[
+        hideUnloadedClasses ifTrue:[
+            ^ Iterator on:[:whatToDo |
+                               Smalltalk allClassesDo:[:cls |
+                                   cls isLoaded ifTrue:[
+                                       cls isNameSpace ifFalse:[
+                                           whatToDo value:cls
+                                       ]
+                                   ]
+                               ]
+                          ]
+        ].
+        ^ Iterator on:[:whatToDo |
+                           Smalltalk allClassesDo:whatToDo
+                      ]
     ].
 
     (spaceNames size == 1 
      and:[spaceNames first = 'Smalltalk']) ifTrue:[
-	"/ somewhat tuned - quick look if classes name
-	"/ includes colons ...
-	^ Iterator on:[:whatToDo |
-		       Smalltalk allClassesDo:[:cls |
-			   |includeIt|
+        "/ somewhat tuned - quick look if classes name
+        "/ includes colons ...
+        ^ Iterator on:[:whatToDo |
+                       Smalltalk allClassesDo:[:cls |
+                           |includeIt|
+
+                           includeIt := (cls name includes:$:) not.
+                           includeIt := includeIt
+                                        or:[(cls isPrivate not 
+                                            and:[(cls nameSpace == Smalltalk)])].
+                           includeIt := includeIt
+                                        or:[(cls isPrivate  
+                                            and:[(cls topOwningClass nameSpace == Smalltalk)])].
+
+                           includeIt := includeIt
+                                        and:[hideUnloadedClasses not or:[cls isLoaded]].
 
-			   includeIt := (cls name includes:$:) not.
-			   includeIt := includeIt
-					or:[(cls isPrivate not 
-					    and:[(cls nameSpace == Smalltalk)])].
-			   includeIt := includeIt
-					or:[(cls isPrivate  
-					    and:[(cls topOwningClass nameSpace == Smalltalk)])].
+                           includeIt := includeIt
+                                        or:[ cls extensions 
+                                                contains:[:mthd | 
+                                                            |sel parts|
+                                                            sel := mthd selector.
+                                                            (sel isNameSpaceSelector
+                                                            and:[ parts := sel nameSpaceSelectorParts.
+                                                                  spaceNames includes:parts first])  
+                                                         ]
+                                           ].
 
-			   includeIt := includeIt
-					and:[hideUnloadedClasses not
-					      or:[cls isLoaded]].
-			   includeIt ifTrue:[
-			       cls isNameSpace ifFalse:[
-				   whatToDo value:cls
-			       ]
-			   ]
-		       ]
-		      ]
+                           includeIt ifTrue:[
+                               cls isNameSpace ifFalse:[
+                                   whatToDo value:cls
+                               ]
+                           ]
+                       ]
+                      ]
     ].
 
     ^ Iterator on:[:whatToDo |
-		       Smalltalk allClassesDo:[:cls |
-			   |spaceOfClass spaceNameOfClass includeIt|
+                       Smalltalk allClassesDo:[:cls |
+                           |spaceOfClass spaceNameOfClass includeIt|
 
-			   spaceOfClass := cls isPrivate ifTrue:[cls topOwningClass nameSpace] ifFalse:[cls nameSpace].
-			   spaceNameOfClass := spaceOfClass name.
+                           spaceOfClass := cls isPrivate ifTrue:[cls topOwningClass nameSpace] ifFalse:[cls nameSpace].
+                           spaceNameOfClass := spaceOfClass name.
 
-			   includeIt := spaceNames contains:[:nm | nm = spaceNameOfClass
-								   or:[spaceNameOfClass startsWith:(nm , '::')]].
+                           includeIt := spaceNames contains:[:nm | nm = spaceNameOfClass
+                                                                   or:[spaceNameOfClass startsWith:(nm , '::')]].
 
-			   hideUnloadedClasses ifTrue:[
-			       includeIt := includeIt and:[cls isLoaded].
-			   ].
-			   includeIt ifTrue:[
-			       cls isNameSpace ifFalse:[
-				   whatToDo value:cls
-			       ]
-			   ]
-		       ]
-		  ]
+                           hideUnloadedClasses ifTrue:[
+                               includeIt := includeIt and:[cls isLoaded].
+                           ].
+                           includeIt ifTrue:[
+                               cls isNameSpace ifFalse:[
+                                   whatToDo value:cls
+                               ]
+                           ]
+                       ]
+                  ]
 
-    "Created: / 18.2.2000 / 01:01:58 / cg"
-    "Modified: / 24.2.2000 / 13:42:58 / cg"
+    "Created: / 18-02-2000 / 01:01:58 / cg"
+    "Modified: / 05-03-2007 / 23:01:21 / cg"
 ! !
 
 !NamespaceList methodsFor:'private'!
@@ -446,5 +458,5 @@
 !NamespaceList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_NamespaceList.st,v 1.9 2006-06-14 18:07:55 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_NamespaceList.st,v 1.10 2007-03-06 11:48:47 cg Exp $'
 ! !