Tools_ClassList.st
changeset 6318 9a3fc13f86be
parent 6208 6f5ff41b55ae
child 6468 8047fc185bd8
--- a/Tools_ClassList.st	Tue Jun 07 18:28:48 2005 +0200
+++ b/Tools_ClassList.st	Wed Jun 15 14:50:40 2005 +0200
@@ -1442,60 +1442,61 @@
 
     (newList ~= oldList
     or:[self classNameList value isNil and:[newList size > 0]]) ifTrue:[
-	prevSelection := lastSelectedClasses ? #().
-	prevSelection := prevSelection select:[:each | each notNil].
+        prevSelection := lastSelectedClasses ? #().
+        prevSelection := prevSelection select:[:each | each notNil].
 
-	(newList collect:[:each | each name]) = (oldList collect:[:each | each name]) ifTrue:[
-	    "/ no need to tell anybody
-	    classList setValue:newList.
-	] ifFalse:[
-	    classList value:newList.
-	].
-	self reconstructNameList.
+        (newList collect:[:each | each name]) = (oldList collect:[:each | each name]) ifTrue:[
+            "/ no need to tell anybody
+            classList setValue:newList.
+        ] ifFalse:[
+            classList value:newList.
+        ].
+        self reconstructNameList.
 
-	(prevSelection size == 0 
-	and:[self selectedClasses value size ~~ 0]) ifTrue:[
-	    "/ this happens during early startup time,
-	    "/ when the selection is already (pre-)set,
-	    "/ and the classList is generated the first time
-	    "/ (i.e. when opened with preset selection)
+        (prevSelection size == 0 
+        and:[self selectedClasses value size ~~ 0]) ifTrue:[
+            "/ this happens during early startup time,
+            "/ when the selection is already (pre-)set,
+            "/ and the classList is generated the first time
+            "/ (i.e. when opened with preset selection)
 
-	    "/ do not clobber the selection in this case.
-	    prevSelection := self selectedClasses value.
-	    "/ simulate a change, to force selection update in listView
-	    forceSelectionChange := true.
-	].
+            "/ do not clobber the selection in this case.
+            prevSelection := self selectedClasses value.
+            prevSelection := prevSelection select:[:cls | cls notNil].
+            "/ simulate a change, to force selection update in listView
+            forceSelectionChange := true.
+        ].
 
-	newSelectionIndices := prevSelection 
-			    collect:[:item | |cls|
-					     cls := Smalltalk at:item theNonMetaclass name.   
-					     newList identityIndexOf:cls]
-			    thenSelect:[:index | index ~~ 0].
+        newSelectionIndices := prevSelection 
+                            collect:[:item | |cls|
+                                             cls := Smalltalk at:item theNonMetaclass name.   
+                                             newList identityIndexOf:cls]
+                            thenSelect:[:index | index ~~ 0].
 
-	selectedClassNameIndicesHolder := self selectedClassNameIndices.
-	((selectedClassNameIndicesHolder value size ~~ self selectedClasses value size)
-	or:[newSelectionIndices ~= selectedClassNameIndicesHolder value])
-	ifTrue:[
-	    newSelectionIndices notEmpty ifTrue:[
-		"/ force change (for dependents)
-		"/ selectedClassNameIndicesHolder value:newSelectionIndices.
-	    ] ifFalse:[
-		prevSelection := self selectedClasses value.
-		newSelectionIndices := #().
-	    ].
-	    selectedClassNameIndicesHolder value:newSelectionIndices.
+        selectedClassNameIndicesHolder := self selectedClassNameIndices.
+        ((selectedClassNameIndicesHolder value size ~~ self selectedClasses value size)
+        or:[newSelectionIndices ~= selectedClassNameIndicesHolder value])
+        ifTrue:[
+            newSelectionIndices notEmpty ifTrue:[
+                "/ force change (for dependents)
+                "/ selectedClassNameIndicesHolder value:newSelectionIndices.
+            ] ifFalse:[
+                prevSelection := self selectedClasses value.
+                newSelectionIndices := #().
+            ].
+            selectedClassNameIndicesHolder value:newSelectionIndices.
 
-	    prevSelection notNil ifTrue:[
-		lastSelectedClasses := prevSelection.
-	    ].
-	    self updateOutputGenerator.
-	].
+            prevSelection notNil ifTrue:[
+                lastSelectedClasses := prevSelection.
+            ].
+            self updateOutputGenerator.
+        ].
 
     ] ifFalse:[
-	"/ same classes - but name(s) could be differnet
-	newList size > 0 ifTrue:[
-	    self reconstructNameList
-	]
+        "/ same classes - but name(s) could be differnet
+        newList size > 0 ifTrue:[
+            self reconstructNameList
+        ]
     ].
     listValid := true.
 
@@ -1596,5 +1597,5 @@
 !ClassList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.7 2005-02-25 16:42:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.8 2005-06-15 12:50:40 cg Exp $'
 ! !