update
authorClaus Gittinger <cg@exept.de>
Wed, 25 Feb 2004 17:15:11 +0100
changeset 5585 b902ecb72796
parent 5584 6f7e25365480
child 5586 aba072239d9a
update
NewSystemBrowser.st
Tools__NewSystemBrowser.st
--- a/NewSystemBrowser.st	Wed Feb 25 12:59:55 2004 +0100
+++ b/NewSystemBrowser.st	Wed Feb 25 17:15:11 2004 +0100
@@ -38273,33 +38273,33 @@
     listValid ifFalse:[^ self].
 
     slaveMode value == true ifTrue:[
-	self invalidateList.
-	^ self.
+        self invalidateList.
+        ^ self.
     ].
     self slaveMode value isNil ifTrue:[
-	self window shown ifFalse:[
-	    self invalidateList.
-	    ^ self
-	].
+        self window shown ifFalse:[
+            self invalidateList.
+            ^ self
+        ].
     ].
 
     aClassOrNil isNil ifTrue:[
-	self halt:'should not happen'.
+        self halt:'should not happen'.
     ].
 
     "/ if that class is in my list ...
     ((self classList value ? #()) contains:[:cls | cls notNil and:[cls theNonMetaclass name = aClassOrNil theNonMetaclass name]])
     ifTrue:[
-	self updateClassListFor:aClassOrNil.
-	"/ force update
-	self selectedClassNameIndices value:(self selectedClassNameIndices value).
-
-	((self selectedClasses value ? #()) contains:[:cls | cls notNil ifTrue:[cls theNonMetaclass name = aClassOrNil theNonMetaclass name] ifFalse:[false]]) 
-	ifTrue:[
-	    self updateOutputGenerator
-	].
-    ] ifFalse:[
-	self invalidateList
+        self updateListsFor:aClassOrNil.
+        "/ force update
+        self selectedClassNameIndices value:(self selectedClassNameIndices value).
+
+        ((self selectedClasses value ? #()) contains:[:cls | cls notNil ifTrue:[cls theNonMetaclass name = aClassOrNil theNonMetaclass name] ifFalse:[false]]) 
+        ifTrue:[
+            self updateOutputGenerator
+        ].
+    ] ifFalse:[
+        self invalidateList
     ]
 
 
@@ -38325,8 +38325,8 @@
     classes := self classList value ? #().
 
     self inSlaveModeOrInvisible ifTrue:[
-	self invalidateList.
-	^ self.
+        self invalidateList.
+        ^ self.
     ].
 
 "/    (self slaveMode value == true) ifTrue:[^ self].
@@ -38338,150 +38338,150 @@
 "/    ].
 
     changedObject == slaveMode ifTrue:[
-	listValid ~~ true ifTrue:[
-	    self enqueueDelayedUpdateList.
-	].
-	self enqueueDelayedClassSelectionChanged.
-	^  self
+        listValid ~~ true ifTrue:[
+            self enqueueDelayedUpdateList.
+        ].
+        self enqueueDelayedClassSelectionChanged.
+        ^  self
     ].
 
     changedObject == Smalltalk ifTrue:[
-	something == #methodInClass ifTrue:[
-	    ^ self "no interest" 
-	].    
-	something == #methodInClassRemoved ifTrue:[
-	    "/ must update the list, if the methods package is different from
-	    "/ the classes package (to undo any has-exension highlighting)
-	    cls := aParameter first.
-	    self updateClassListFor:cls.
-	    ^ self 
-	].    
-	something == #organization ifTrue:[^ self "no interest" ].    
-
-	(something == #classDefinition 
-	or:[something == #classVariables
-	or:[something == #newClass]]) ifTrue:[
-	    "/ update that class in my classList and the selection
-	    listValid ifTrue:[
-		self classDefinitionChanged:aParameter.
-	    ].
-	    ^ self.
-	].
-	(something == #lastTestRunResult) ifTrue:[
-	    "/ update that class in my classList and the selection
-	    listValid ifTrue:[
-		self updateClassListFor:aParameter.
-		"/ self classDefinitionChanged:aParameter.
-	    ].
-	    ^ self.
-	].
-	something == #classRemove ifTrue:[
-	    "/ update my classList and the selection
-	    self classRemoved:aParameter.
-	    ^ self.
-	].
-	something == #classRename ifTrue:[
-	    "/ update that class in my classList and the selection
-	    listValid ifTrue:[
-		aParameter isArray ifTrue:[
-		    cls := aParameter at:1.
-		    self classDefinitionChanged:cls.
-		]
-	    ].
-	    ^ self.
-	].
-
-	something == #projectOrganization ifTrue:[
-	    aParameter isNil ifTrue:[
-		self invalidateList.
-		organizerMode value == #project ifTrue:[
-		    self enqueueDelayedUpdateOutputGenerator.
-		].
-		^ self
-	    ].
-
-	    cls := aParameter at:1.
-	    cls notNil ifTrue:[  "/ should not happen (but does occasionally)
-		((classes includes:cls theMetaclass)
-		or:[(classes includes:cls theNonMetaclass)]) ifTrue:[
-		    self invalidateList.
-		    organizerMode value == #project ifTrue:[
-			self enqueueDelayedUpdateOutputGenerator.
-		    ]
-		].
-	    ].
-	    ^ self
-	].
-	^ self.
+        something == #methodInClass ifTrue:[
+            ^ self "no interest" 
+        ].    
+        something == #methodInClassRemoved ifTrue:[
+            "/ must update the list, if the methods package is different from
+            "/ the classes package (to undo any has-exension highlighting)
+            cls := aParameter first.
+            self updateListsFor:cls.
+            ^ self 
+        ].    
+        something == #organization ifTrue:[^ self "no interest" ].    
+
+        (something == #classDefinition 
+        or:[something == #classVariables
+        or:[something == #newClass]]) ifTrue:[
+            "/ update that class in my classList and the selection
+            listValid ifTrue:[
+                self classDefinitionChanged:aParameter.
+            ].
+            ^ self.
+        ].
+        (something == #lastTestRunResult) ifTrue:[
+            "/ update that class in my classList and the selection
+            listValid ifTrue:[
+                self updateListsFor:aParameter.
+                "/ self classDefinitionChanged:aParameter.
+            ].
+            ^ self.
+        ].
+        something == #classRemove ifTrue:[
+            "/ update my classList and the selection
+            self classRemoved:aParameter.
+            ^ self.
+        ].
+        something == #classRename ifTrue:[
+            "/ update that class in my classList and the selection
+            listValid ifTrue:[
+                aParameter isArray ifTrue:[
+                    cls := aParameter at:1.
+                    self classDefinitionChanged:cls.
+                ]
+            ].
+            ^ self.
+        ].
+
+        something == #projectOrganization ifTrue:[
+            aParameter isNil ifTrue:[
+                self invalidateList.
+                organizerMode value == #project ifTrue:[
+                    self enqueueDelayedUpdateOutputGenerator.
+                ].
+                ^ self
+            ].
+
+            cls := aParameter at:1.
+            cls notNil ifTrue:[  "/ should not happen (but does occasionally)
+                ((classes includes:cls theMetaclass)
+                or:[(classes includes:cls theNonMetaclass)]) ifTrue:[
+                    self invalidateList.
+                    organizerMode value == #project ifTrue:[
+                        self enqueueDelayedUpdateOutputGenerator.
+                    ]
+                ].
+            ].
+            ^ self
+        ].
+        ^ self.
     ].
 
     (something == #lastTestRunResult) ifTrue:[
-	^ self
+        ^ self
     ].
 
     changedObject == ChangeSet ifTrue:[
-	wg := self windowGroup.
-	wg isNil ifTrue:[
-	    changedObject removeDependent:self.
-	] ifFalse:[
-	    "/ react on changes of the changeSet to recolorize items
-	    something == #addChange: ifTrue:[
-		chgClass := aParameter changeClass.
-		chgClass notNil ifTrue:[
-		    ((classes includes:chgClass theNonMetaclass) 
-		    or:[classes includes:chgClass theMetaclass]) ifTrue:[
-			"/ remove all other addChange notifications ...
-			wg sensor 
-			    flushEventsFor:self 
-			    where:[:ev | ev isMessageSendEvent 
-					 and:[ev selector == #delayedUpdate:with:from:
-					 and:[(ev arguments at:3) == ChangeSet]]].
-			self reconstructNameList.
-		    ]
-		]
-	    ] ifFalse:[
-		"/ remove all other ChangeSet notifications ...
-		wg sensor 
-		    flushEventsFor:self 
-		    where:[:ev | ev isMessageSendEvent 
-				 and:[ev selector == #delayedUpdate:with:from:
-				 and:[(ev arguments at:3) == ChangeSet]]].
-		self reconstructNameList.
-	    ].
-	].
-	^ self 
+        wg := self windowGroup.
+        wg isNil ifTrue:[
+            changedObject removeDependent:self.
+        ] ifFalse:[
+            "/ react on changes of the changeSet to recolorize items
+            something == #addChange: ifTrue:[
+                chgClass := aParameter changeClass.
+                chgClass notNil ifTrue:[
+                    ((classes includes:chgClass theNonMetaclass) 
+                    or:[classes includes:chgClass theMetaclass]) ifTrue:[
+                        "/ remove all other addChange notifications ...
+                        wg sensor 
+                            flushEventsFor:self 
+                            where:[:ev | ev isMessageSendEvent 
+                                         and:[ev selector == #delayedUpdate:with:from:
+                                         and:[(ev arguments at:3) == ChangeSet]]].
+                        self reconstructNameList.
+                    ]
+                ]
+            ] ifFalse:[
+                "/ remove all other ChangeSet notifications ...
+                wg sensor 
+                    flushEventsFor:self 
+                    where:[:ev | ev isMessageSendEvent 
+                                 and:[ev selector == #delayedUpdate:with:from:
+                                 and:[(ev arguments at:3) == ChangeSet]]].
+                self reconstructNameList.
+            ].
+        ].
+        ^ self 
     ].
 
     changedObject == self selectedClasses ifTrue:[
-	slaveMode value ~~ true ifTrue:[
-	    listValid == true ifFalse:[
-		self updateList
-	    ].
-	    self selectedClassesChanged.
-	    self updateOutputGenerator.
-	] ifFalse:[
-	    listValid := false.
-	].
-	^ self 
+        slaveMode value ~~ true ifTrue:[
+            listValid == true ifFalse:[
+                self updateList
+            ].
+            self selectedClassesChanged.
+            self updateOutputGenerator.
+        ] ifFalse:[
+            listValid := false.
+        ].
+        ^ self 
     ].
 
     (changedObject == meta 
     or:[changedObject == selectedClassNameIndices]) ifTrue:[
-	self selectionChanged.
-	^ self
+        self selectionChanged.
+        ^ self
     ].
     changedObject == showClassPackages ifTrue:[
-	self classNameList value:nil.
-	self invalidateList.
-	^ self 
+        self classNameList value:nil.
+        self invalidateList.
+        ^ self 
     ].
 
     (changedObject == hideUnloadedClasses
     or:[changedObject == hidePrivateClasses
     or:[changedObject == nameSpaceFilter
     or:[changedObject == packageFilter]]]) ifTrue:[
-	self invalidateList.
-	^ self 
+        self invalidateList.
+        ^ self 
     ].
 
     super delayedUpdate:something with:aParameter from:changedObject
@@ -38680,8 +38680,8 @@
     |cls newMethod oldMethod idx classListValue|
 
     self slaveMode value == true ifTrue:[
-	something == #methodInClass ifTrue:[ ^ self ].
-	something == #addChange:    ifTrue:[ self invalidateList. ^ self ].
+        something == #methodInClass ifTrue:[ ^ self ].
+        something == #addChange:    ifTrue:[ self invalidateList. ^ self ].
     ].
 "/    self window sensor isNil ifTrue:[
 "/        "/ not visible ...
@@ -38692,73 +38692,73 @@
     classListValue := classList value.
 
     changedObject == Smalltalk ifTrue:[
-	something == #classComment ifTrue:[
-	    ^ self.
-	].
-	something == #methodDictionary ifTrue:[
-	    ^ self 
-	].
-	something == #methodTrap ifTrue:[
-	    ^ self
-	].
-	something == #methodInClassRemoved ifTrue:[
-	    cls := aParameter at:1.
-	    cls notNil ifTrue:[
-		classListValue size > 0 ifTrue:[
-		    ((classListValue includesIdentical:cls theNonMetaclass)
-		    or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[
-			self enqueueDelayedUpdateList
-		    ]
-		]
-	    ].
-	    ^ self
-	].
-
-	something == #methodInClass ifTrue:[
-	    cls := aParameter at:1.
-	    cls notNil ifTrue:[
-		classListValue size > 0 ifTrue:[
-		    ((classListValue includesIdentical:cls theNonMetaclass)
-		    or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[
-			newMethod := cls compiledMethodAt:(aParameter at:2).
-			oldMethod := aParameter at:3.
-			((oldMethod isNil
-			    and:[newMethod package ~= cls package])
-			or:[oldMethod notNil
-			    and:[newMethod package ~= oldMethod package]])
-			ifTrue:[
-			    "/ must update the list (for the package-info)
-			    self enqueueDelayedUpdateList
-			]
-		    ]
-		]
-	    ].
-	    ^ self
-	].
-
-	"/ kludge: must be careful if my inGenerator is a constant list.
-	"/ in that case, I have to update it 
-	"/ (sigh - all a consequence of not #becoming the new class)
-	something == #classDefinition ifTrue:[
-	    inGeneratorHolder value isOrderedCollection ifTrue:[
-		idx := inGeneratorHolder value findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name].
-		idx ~~ 0 ifTrue:[
-		    inGeneratorHolder value at:idx put:aParameter.
-		    self updateClassListFor:aParameter.
-		    "/ self enqueueDelayedUpdateList.
-		]
-	    ] ifFalse:[
-		classListValue size > 0 ifTrue:[
-		    idx := classListValue findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name].
-		    idx ~~ 0 ifTrue:[
-			listValid ifTrue:[
-			    self classDefinitionChanged:aParameter.
-			    ^ self.
-			]
-		    ]
-		].
-	    ].
-	].
+        something == #classComment ifTrue:[
+            ^ self.
+        ].
+        something == #methodDictionary ifTrue:[
+            ^ self 
+        ].
+        something == #methodTrap ifTrue:[
+            ^ self
+        ].
+        something == #methodInClassRemoved ifTrue:[
+            cls := aParameter at:1.
+            cls notNil ifTrue:[
+                classListValue size > 0 ifTrue:[
+                    ((classListValue includesIdentical:cls theNonMetaclass)
+                    or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[
+                        self enqueueDelayedUpdateList
+                    ]
+                ]
+            ].
+            ^ self
+        ].
+
+        something == #methodInClass ifTrue:[
+            cls := aParameter at:1.
+            cls notNil ifTrue:[
+                classListValue size > 0 ifTrue:[
+                    ((classListValue includesIdentical:cls theNonMetaclass)
+                    or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[
+                        newMethod := cls compiledMethodAt:(aParameter at:2).
+                        oldMethod := aParameter at:3.
+                        ((oldMethod isNil
+                            and:[newMethod package ~= cls package])
+                        or:[oldMethod notNil
+                            and:[newMethod package ~= oldMethod package]])
+                        ifTrue:[
+                            "/ must update the list (for the package-info)
+                            self enqueueDelayedUpdateList
+                        ]
+                    ]
+                ]
+            ].
+            ^ self
+        ].
+
+        "/ kludge: must be careful if my inGenerator is a constant list.
+        "/ in that case, I have to update it 
+        "/ (sigh - all a consequence of not #becoming the new class)
+        ((something == #classDefinition) or:[something == #newClass]) ifTrue:[
+            inGeneratorHolder value isOrderedCollection ifTrue:[
+                idx := inGeneratorHolder value findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name].
+                idx ~~ 0 ifTrue:[
+                    inGeneratorHolder value at:idx put:aParameter.
+                    self updateListsFor:aParameter.
+                    "/ self enqueueDelayedUpdateList.
+                ]
+            ] ifFalse:[
+                classListValue size > 0 ifTrue:[
+                    idx := classListValue findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name].
+                    idx ~~ 0 ifTrue:[
+                        listValid ifTrue:[
+                            self classDefinitionChanged:aParameter.
+                            ^ self.
+                        ]
+                    ]
+                ].
+            ].
+        ].
     ].
 
     super update:something with:aParameter from:changedObject
@@ -39217,40 +39217,45 @@
     |prevMode listView oldNameList newNameList sav|
 
     self classList value isNil ifTrue:[
-	self updateList
+        self updateList
     ].
 
     newNameList := self nameListForClasses:(classList value ? #()).
     oldNameList := self classNameList value ? #().
-    (newNameList sameContentsAs: oldNameList whenComparedWith:[:a :b | a sameStringAndEmphasisAs: b]) 
+    (newNameList 
+        sameContentsAs: oldNameList 
+        whenComparedWith:[:a :b | (a sameStringAndEmphasisAs: b) 
+                                  and:[ a hasImage == b hasImage
+                                  and:[ a hasIcon == b hasIcon ]]]
+    ) 
     ifTrue:[
-	"/ no need to update
-    ] ifFalse:[
-	listView := builder componentAt:#List.
-	(listView isNil or:[listView scrolledView isNil]) ifTrue:[    
-	    "/ invoked very early during setup
-	    self classNameList value:newNameList
-	] ifFalse:[
-	    "/ avoid flicker and useless redraws
-
-	    prevMode := listView scrollWhenUpdating.
-	    listView scrollWhenUpdating:nil.
-
-	    "/ this will lead to a selectionIndex change (done by the selListView);
-	    "/ however, we dont want this here, since it recurses into
-	    "/ a selectionChange. Therefore, temporarily disconnect the selectionIndexHolder...
-	    [
-		self selectedClassNameIndices removeDependent:self.
-		"/ also, dont want a callback (selectionChangedByClick)
-		sav := listView action.
-		listView action:nil.
-		self classNameList value:newNameList.
-	    ] ensure:[
-		listView action:sav.
-		self selectedClassNameIndices addDependent:self.
-		listView scrollWhenUpdating:prevMode.
-	    ].
-	]
+        "/ no need to update
+    ] ifFalse:[
+        listView := builder componentAt:#List.
+        (listView isNil or:[listView scrolledView isNil]) ifTrue:[    
+            "/ invoked very early during setup
+            self classNameList value:newNameList
+        ] ifFalse:[
+            "/ avoid flicker and useless redraws
+
+            prevMode := listView scrollWhenUpdating.
+            listView scrollWhenUpdating:nil.
+
+            "/ this will lead to a selectionIndex change (done by the selListView);
+            "/ however, we dont want this here, since it recurses into
+            "/ a selectionChange. Therefore, temporarily disconnect the selectionIndexHolder...
+            [
+                self selectedClassNameIndices removeDependent:self.
+                "/ also, dont want a callback (selectionChangedByClick)
+                sav := listView action.
+                listView action:nil.
+                self classNameList value:newNameList.
+            ] ensure:[
+                listView action:sav.
+                self selectedClassNameIndices addDependent:self.
+                listView scrollWhenUpdating:prevMode.
+            ].
+        ]
     ].
 
     "Modified: / 31.10.2001 / 11:33:21 / cg"
@@ -39269,72 +39274,6 @@
     "Created: / 5.2.2000 / 13:42:18 / cg"
 !
 
-updateClassListFor:aClass
-    |classes found foundInSelection|
-
-    found := foundInSelection := false.
-
-    "/ update for a changed class in the classList
-    (classes := classList value) size > 0 ifTrue:[
-	(self updateClassesIn:classes) ifTrue:[
-	    found := true
-	].
-	(classes includes:nil) ifTrue:[
-self halt:'should not happen'.
-	    classList value:(classes := classes select:[:each | each notNil]).
-	].
-    ].
-    "/ possibly in the generator
-    ((classes := inGeneratorHolder value) isOrderedCollection 
-    and:[classes size > 0]) ifTrue:[
-	(self updateClassesIn:classes) ifTrue:[
-	    found := true
-	].
-	(classes includes:nil) ifTrue:[
-self halt:'should not happen'.
-	    inGeneratorHolder value:(classes select:[:each | each notNil]).
-	]
-    ].
-    "/ and in the selection
-    (classes := self selectedClasses value) size > 0 ifTrue:[
-	(self updateClassesIn:classes) ifTrue:[
-	    found := true.
-	    foundInSelection := true.
-	].
-	(classes includes:nil) ifTrue:[
-self halt:'should not happen'.
-	    self selectedClasses value:(classes select:[:each | each notNil]).
-	]
-    ].
-    "/ and in the last selection
-    (classes := lastSelectedClasses) size > 0 ifTrue:[
-	(self updateClassesIn:classes) ifTrue:[
-	    found := true
-	].
-	(classes includes:nil) ifTrue:[
-self halt:'should not happen'.
-	    lastSelectedClasses := (classes select:[:each | each notNil]).
-	]
-    ].
-
-    found ifFalse:[
-	"/ could be a new class.
-	listValid ifTrue:[
-	    self enqueueDelayedUpdateList.
-	].
-	listValid := false.
-    ].
-    foundInSelection ifTrue:[
-	"/ force update of output generator
-	self selectedClasses 
-	    removeDependent:self;
-	    changed;
-	    addDependent:self.
-    ].
-
-    "Modified: / 25.2.2000 / 23:54:19 / cg"
-!
-
 updateClassesIn:aCollection
     "replace any obsolete class in aCollection;
      return true, if any was found"
@@ -39452,6 +39391,72 @@
 
     "Created: / 5.2.2000 / 13:42:18 / cg"
     "Modified: / 31.10.2001 / 11:35:39 / cg"
+!
+
+updateListsFor:aClass
+    |classes found foundInSelection|
+
+    found := foundInSelection := false.
+
+    "/ update for a changed class in the classList
+    (classes := classList value) size > 0 ifTrue:[
+        (self updateClassesIn:classes) ifTrue:[
+            found := true
+        ].
+        (classes includes:nil) ifTrue:[
+self halt:'should not happen'.
+            classList value:(classes := classes select:[:each | each notNil]).
+        ].
+    ].
+    "/ possibly in the generator
+    ((classes := inGeneratorHolder value) isOrderedCollection 
+    and:[classes size > 0]) ifTrue:[
+        (self updateClassesIn:classes) ifTrue:[
+            found := true
+        ].
+        (classes includes:nil) ifTrue:[
+self halt:'should not happen'.
+            inGeneratorHolder value:(classes select:[:each | each notNil]).
+        ]
+    ].
+    "/ and in the selection
+    (classes := self selectedClasses value) size > 0 ifTrue:[
+        (self updateClassesIn:classes) ifTrue:[
+            found := true.
+            foundInSelection := true.
+        ].
+        (classes includes:nil) ifTrue:[
+self halt:'should not happen'.
+            self selectedClasses value:(classes select:[:each | each notNil]).
+        ]
+    ].
+    "/ and in the last selection
+    (classes := lastSelectedClasses) size > 0 ifTrue:[
+        (self updateClassesIn:classes) ifTrue:[
+            found := true
+        ].
+        (classes includes:nil) ifTrue:[
+self halt:'should not happen'.
+            lastSelectedClasses := (classes select:[:each | each notNil]).
+        ]
+    ].
+
+    found ifFalse:[
+        "/ could be a new class (or no-longer autolaoded one).
+        listValid ifTrue:[
+            self enqueueDelayedUpdateList.
+        ].
+        listValid := false.
+    ].
+    foundInSelection ifTrue:[
+        "/ force update of output generator
+        self selectedClasses 
+            removeDependent:self;
+            changed;
+            addDependent:self.
+    ].
+
+    "Modified: / 25.2.2000 / 23:54:19 / cg"
 ! !
 
 !NewSystemBrowser::ClassList methodsFor:'setup'!
@@ -57483,7 +57488,7 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.709 2004-02-18 12:49:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.710 2004-02-25 16:15:11 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!
--- a/Tools__NewSystemBrowser.st	Wed Feb 25 12:59:55 2004 +0100
+++ b/Tools__NewSystemBrowser.st	Wed Feb 25 17:15:11 2004 +0100
@@ -38273,33 +38273,33 @@
     listValid ifFalse:[^ self].
 
     slaveMode value == true ifTrue:[
-	self invalidateList.
-	^ self.
+        self invalidateList.
+        ^ self.
     ].
     self slaveMode value isNil ifTrue:[
-	self window shown ifFalse:[
-	    self invalidateList.
-	    ^ self
-	].
+        self window shown ifFalse:[
+            self invalidateList.
+            ^ self
+        ].
     ].
 
     aClassOrNil isNil ifTrue:[
-	self halt:'should not happen'.
+        self halt:'should not happen'.
     ].
 
     "/ if that class is in my list ...
     ((self classList value ? #()) contains:[:cls | cls notNil and:[cls theNonMetaclass name = aClassOrNil theNonMetaclass name]])
     ifTrue:[
-	self updateClassListFor:aClassOrNil.
-	"/ force update
-	self selectedClassNameIndices value:(self selectedClassNameIndices value).
-
-	((self selectedClasses value ? #()) contains:[:cls | cls notNil ifTrue:[cls theNonMetaclass name = aClassOrNil theNonMetaclass name] ifFalse:[false]]) 
-	ifTrue:[
-	    self updateOutputGenerator
-	].
-    ] ifFalse:[
-	self invalidateList
+        self updateListsFor:aClassOrNil.
+        "/ force update
+        self selectedClassNameIndices value:(self selectedClassNameIndices value).
+
+        ((self selectedClasses value ? #()) contains:[:cls | cls notNil ifTrue:[cls theNonMetaclass name = aClassOrNil theNonMetaclass name] ifFalse:[false]]) 
+        ifTrue:[
+            self updateOutputGenerator
+        ].
+    ] ifFalse:[
+        self invalidateList
     ]
 
 
@@ -38325,8 +38325,8 @@
     classes := self classList value ? #().
 
     self inSlaveModeOrInvisible ifTrue:[
-	self invalidateList.
-	^ self.
+        self invalidateList.
+        ^ self.
     ].
 
 "/    (self slaveMode value == true) ifTrue:[^ self].
@@ -38338,150 +38338,150 @@
 "/    ].
 
     changedObject == slaveMode ifTrue:[
-	listValid ~~ true ifTrue:[
-	    self enqueueDelayedUpdateList.
-	].
-	self enqueueDelayedClassSelectionChanged.
-	^  self
+        listValid ~~ true ifTrue:[
+            self enqueueDelayedUpdateList.
+        ].
+        self enqueueDelayedClassSelectionChanged.
+        ^  self
     ].
 
     changedObject == Smalltalk ifTrue:[
-	something == #methodInClass ifTrue:[
-	    ^ self "no interest" 
-	].    
-	something == #methodInClassRemoved ifTrue:[
-	    "/ must update the list, if the methods package is different from
-	    "/ the classes package (to undo any has-exension highlighting)
-	    cls := aParameter first.
-	    self updateClassListFor:cls.
-	    ^ self 
-	].    
-	something == #organization ifTrue:[^ self "no interest" ].    
-
-	(something == #classDefinition 
-	or:[something == #classVariables
-	or:[something == #newClass]]) ifTrue:[
-	    "/ update that class in my classList and the selection
-	    listValid ifTrue:[
-		self classDefinitionChanged:aParameter.
-	    ].
-	    ^ self.
-	].
-	(something == #lastTestRunResult) ifTrue:[
-	    "/ update that class in my classList and the selection
-	    listValid ifTrue:[
-		self updateClassListFor:aParameter.
-		"/ self classDefinitionChanged:aParameter.
-	    ].
-	    ^ self.
-	].
-	something == #classRemove ifTrue:[
-	    "/ update my classList and the selection
-	    self classRemoved:aParameter.
-	    ^ self.
-	].
-	something == #classRename ifTrue:[
-	    "/ update that class in my classList and the selection
-	    listValid ifTrue:[
-		aParameter isArray ifTrue:[
-		    cls := aParameter at:1.
-		    self classDefinitionChanged:cls.
-		]
-	    ].
-	    ^ self.
-	].
-
-	something == #projectOrganization ifTrue:[
-	    aParameter isNil ifTrue:[
-		self invalidateList.
-		organizerMode value == #project ifTrue:[
-		    self enqueueDelayedUpdateOutputGenerator.
-		].
-		^ self
-	    ].
-
-	    cls := aParameter at:1.
-	    cls notNil ifTrue:[  "/ should not happen (but does occasionally)
-		((classes includes:cls theMetaclass)
-		or:[(classes includes:cls theNonMetaclass)]) ifTrue:[
-		    self invalidateList.
-		    organizerMode value == #project ifTrue:[
-			self enqueueDelayedUpdateOutputGenerator.
-		    ]
-		].
-	    ].
-	    ^ self
-	].
-	^ self.
+        something == #methodInClass ifTrue:[
+            ^ self "no interest" 
+        ].    
+        something == #methodInClassRemoved ifTrue:[
+            "/ must update the list, if the methods package is different from
+            "/ the classes package (to undo any has-exension highlighting)
+            cls := aParameter first.
+            self updateListsFor:cls.
+            ^ self 
+        ].    
+        something == #organization ifTrue:[^ self "no interest" ].    
+
+        (something == #classDefinition 
+        or:[something == #classVariables
+        or:[something == #newClass]]) ifTrue:[
+            "/ update that class in my classList and the selection
+            listValid ifTrue:[
+                self classDefinitionChanged:aParameter.
+            ].
+            ^ self.
+        ].
+        (something == #lastTestRunResult) ifTrue:[
+            "/ update that class in my classList and the selection
+            listValid ifTrue:[
+                self updateListsFor:aParameter.
+                "/ self classDefinitionChanged:aParameter.
+            ].
+            ^ self.
+        ].
+        something == #classRemove ifTrue:[
+            "/ update my classList and the selection
+            self classRemoved:aParameter.
+            ^ self.
+        ].
+        something == #classRename ifTrue:[
+            "/ update that class in my classList and the selection
+            listValid ifTrue:[
+                aParameter isArray ifTrue:[
+                    cls := aParameter at:1.
+                    self classDefinitionChanged:cls.
+                ]
+            ].
+            ^ self.
+        ].
+
+        something == #projectOrganization ifTrue:[
+            aParameter isNil ifTrue:[
+                self invalidateList.
+                organizerMode value == #project ifTrue:[
+                    self enqueueDelayedUpdateOutputGenerator.
+                ].
+                ^ self
+            ].
+
+            cls := aParameter at:1.
+            cls notNil ifTrue:[  "/ should not happen (but does occasionally)
+                ((classes includes:cls theMetaclass)
+                or:[(classes includes:cls theNonMetaclass)]) ifTrue:[
+                    self invalidateList.
+                    organizerMode value == #project ifTrue:[
+                        self enqueueDelayedUpdateOutputGenerator.
+                    ]
+                ].
+            ].
+            ^ self
+        ].
+        ^ self.
     ].
 
     (something == #lastTestRunResult) ifTrue:[
-	^ self
+        ^ self
     ].
 
     changedObject == ChangeSet ifTrue:[
-	wg := self windowGroup.
-	wg isNil ifTrue:[
-	    changedObject removeDependent:self.
-	] ifFalse:[
-	    "/ react on changes of the changeSet to recolorize items
-	    something == #addChange: ifTrue:[
-		chgClass := aParameter changeClass.
-		chgClass notNil ifTrue:[
-		    ((classes includes:chgClass theNonMetaclass) 
-		    or:[classes includes:chgClass theMetaclass]) ifTrue:[
-			"/ remove all other addChange notifications ...
-			wg sensor 
-			    flushEventsFor:self 
-			    where:[:ev | ev isMessageSendEvent 
-					 and:[ev selector == #delayedUpdate:with:from:
-					 and:[(ev arguments at:3) == ChangeSet]]].
-			self reconstructNameList.
-		    ]
-		]
-	    ] ifFalse:[
-		"/ remove all other ChangeSet notifications ...
-		wg sensor 
-		    flushEventsFor:self 
-		    where:[:ev | ev isMessageSendEvent 
-				 and:[ev selector == #delayedUpdate:with:from:
-				 and:[(ev arguments at:3) == ChangeSet]]].
-		self reconstructNameList.
-	    ].
-	].
-	^ self 
+        wg := self windowGroup.
+        wg isNil ifTrue:[
+            changedObject removeDependent:self.
+        ] ifFalse:[
+            "/ react on changes of the changeSet to recolorize items
+            something == #addChange: ifTrue:[
+                chgClass := aParameter changeClass.
+                chgClass notNil ifTrue:[
+                    ((classes includes:chgClass theNonMetaclass) 
+                    or:[classes includes:chgClass theMetaclass]) ifTrue:[
+                        "/ remove all other addChange notifications ...
+                        wg sensor 
+                            flushEventsFor:self 
+                            where:[:ev | ev isMessageSendEvent 
+                                         and:[ev selector == #delayedUpdate:with:from:
+                                         and:[(ev arguments at:3) == ChangeSet]]].
+                        self reconstructNameList.
+                    ]
+                ]
+            ] ifFalse:[
+                "/ remove all other ChangeSet notifications ...
+                wg sensor 
+                    flushEventsFor:self 
+                    where:[:ev | ev isMessageSendEvent 
+                                 and:[ev selector == #delayedUpdate:with:from:
+                                 and:[(ev arguments at:3) == ChangeSet]]].
+                self reconstructNameList.
+            ].
+        ].
+        ^ self 
     ].
 
     changedObject == self selectedClasses ifTrue:[
-	slaveMode value ~~ true ifTrue:[
-	    listValid == true ifFalse:[
-		self updateList
-	    ].
-	    self selectedClassesChanged.
-	    self updateOutputGenerator.
-	] ifFalse:[
-	    listValid := false.
-	].
-	^ self 
+        slaveMode value ~~ true ifTrue:[
+            listValid == true ifFalse:[
+                self updateList
+            ].
+            self selectedClassesChanged.
+            self updateOutputGenerator.
+        ] ifFalse:[
+            listValid := false.
+        ].
+        ^ self 
     ].
 
     (changedObject == meta 
     or:[changedObject == selectedClassNameIndices]) ifTrue:[
-	self selectionChanged.
-	^ self
+        self selectionChanged.
+        ^ self
     ].
     changedObject == showClassPackages ifTrue:[
-	self classNameList value:nil.
-	self invalidateList.
-	^ self 
+        self classNameList value:nil.
+        self invalidateList.
+        ^ self 
     ].
 
     (changedObject == hideUnloadedClasses
     or:[changedObject == hidePrivateClasses
     or:[changedObject == nameSpaceFilter
     or:[changedObject == packageFilter]]]) ifTrue:[
-	self invalidateList.
-	^ self 
+        self invalidateList.
+        ^ self 
     ].
 
     super delayedUpdate:something with:aParameter from:changedObject
@@ -38680,8 +38680,8 @@
     |cls newMethod oldMethod idx classListValue|
 
     self slaveMode value == true ifTrue:[
-	something == #methodInClass ifTrue:[ ^ self ].
-	something == #addChange:    ifTrue:[ self invalidateList. ^ self ].
+        something == #methodInClass ifTrue:[ ^ self ].
+        something == #addChange:    ifTrue:[ self invalidateList. ^ self ].
     ].
 "/    self window sensor isNil ifTrue:[
 "/        "/ not visible ...
@@ -38692,73 +38692,73 @@
     classListValue := classList value.
 
     changedObject == Smalltalk ifTrue:[
-	something == #classComment ifTrue:[
-	    ^ self.
-	].
-	something == #methodDictionary ifTrue:[
-	    ^ self 
-	].
-	something == #methodTrap ifTrue:[
-	    ^ self
-	].
-	something == #methodInClassRemoved ifTrue:[
-	    cls := aParameter at:1.
-	    cls notNil ifTrue:[
-		classListValue size > 0 ifTrue:[
-		    ((classListValue includesIdentical:cls theNonMetaclass)
-		    or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[
-			self enqueueDelayedUpdateList
-		    ]
-		]
-	    ].
-	    ^ self
-	].
-
-	something == #methodInClass ifTrue:[
-	    cls := aParameter at:1.
-	    cls notNil ifTrue:[
-		classListValue size > 0 ifTrue:[
-		    ((classListValue includesIdentical:cls theNonMetaclass)
-		    or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[
-			newMethod := cls compiledMethodAt:(aParameter at:2).
-			oldMethod := aParameter at:3.
-			((oldMethod isNil
-			    and:[newMethod package ~= cls package])
-			or:[oldMethod notNil
-			    and:[newMethod package ~= oldMethod package]])
-			ifTrue:[
-			    "/ must update the list (for the package-info)
-			    self enqueueDelayedUpdateList
-			]
-		    ]
-		]
-	    ].
-	    ^ self
-	].
-
-	"/ kludge: must be careful if my inGenerator is a constant list.
-	"/ in that case, I have to update it 
-	"/ (sigh - all a consequence of not #becoming the new class)
-	something == #classDefinition ifTrue:[
-	    inGeneratorHolder value isOrderedCollection ifTrue:[
-		idx := inGeneratorHolder value findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name].
-		idx ~~ 0 ifTrue:[
-		    inGeneratorHolder value at:idx put:aParameter.
-		    self updateClassListFor:aParameter.
-		    "/ self enqueueDelayedUpdateList.
-		]
-	    ] ifFalse:[
-		classListValue size > 0 ifTrue:[
-		    idx := classListValue findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name].
-		    idx ~~ 0 ifTrue:[
-			listValid ifTrue:[
-			    self classDefinitionChanged:aParameter.
-			    ^ self.
-			]
-		    ]
-		].
-	    ].
-	].
+        something == #classComment ifTrue:[
+            ^ self.
+        ].
+        something == #methodDictionary ifTrue:[
+            ^ self 
+        ].
+        something == #methodTrap ifTrue:[
+            ^ self
+        ].
+        something == #methodInClassRemoved ifTrue:[
+            cls := aParameter at:1.
+            cls notNil ifTrue:[
+                classListValue size > 0 ifTrue:[
+                    ((classListValue includesIdentical:cls theNonMetaclass)
+                    or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[
+                        self enqueueDelayedUpdateList
+                    ]
+                ]
+            ].
+            ^ self
+        ].
+
+        something == #methodInClass ifTrue:[
+            cls := aParameter at:1.
+            cls notNil ifTrue:[
+                classListValue size > 0 ifTrue:[
+                    ((classListValue includesIdentical:cls theNonMetaclass)
+                    or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[
+                        newMethod := cls compiledMethodAt:(aParameter at:2).
+                        oldMethod := aParameter at:3.
+                        ((oldMethod isNil
+                            and:[newMethod package ~= cls package])
+                        or:[oldMethod notNil
+                            and:[newMethod package ~= oldMethod package]])
+                        ifTrue:[
+                            "/ must update the list (for the package-info)
+                            self enqueueDelayedUpdateList
+                        ]
+                    ]
+                ]
+            ].
+            ^ self
+        ].
+
+        "/ kludge: must be careful if my inGenerator is a constant list.
+        "/ in that case, I have to update it 
+        "/ (sigh - all a consequence of not #becoming the new class)
+        ((something == #classDefinition) or:[something == #newClass]) ifTrue:[
+            inGeneratorHolder value isOrderedCollection ifTrue:[
+                idx := inGeneratorHolder value findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name].
+                idx ~~ 0 ifTrue:[
+                    inGeneratorHolder value at:idx put:aParameter.
+                    self updateListsFor:aParameter.
+                    "/ self enqueueDelayedUpdateList.
+                ]
+            ] ifFalse:[
+                classListValue size > 0 ifTrue:[
+                    idx := classListValue findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name].
+                    idx ~~ 0 ifTrue:[
+                        listValid ifTrue:[
+                            self classDefinitionChanged:aParameter.
+                            ^ self.
+                        ]
+                    ]
+                ].
+            ].
+        ].
     ].
 
     super update:something with:aParameter from:changedObject
@@ -39217,40 +39217,45 @@
     |prevMode listView oldNameList newNameList sav|
 
     self classList value isNil ifTrue:[
-	self updateList
+        self updateList
     ].
 
     newNameList := self nameListForClasses:(classList value ? #()).
     oldNameList := self classNameList value ? #().
-    (newNameList sameContentsAs: oldNameList whenComparedWith:[:a :b | a sameStringAndEmphasisAs: b]) 
+    (newNameList 
+        sameContentsAs: oldNameList 
+        whenComparedWith:[:a :b | (a sameStringAndEmphasisAs: b) 
+                                  and:[ a hasImage == b hasImage
+                                  and:[ a hasIcon == b hasIcon ]]]
+    ) 
     ifTrue:[
-	"/ no need to update
-    ] ifFalse:[
-	listView := builder componentAt:#List.
-	(listView isNil or:[listView scrolledView isNil]) ifTrue:[    
-	    "/ invoked very early during setup
-	    self classNameList value:newNameList
-	] ifFalse:[
-	    "/ avoid flicker and useless redraws
-
-	    prevMode := listView scrollWhenUpdating.
-	    listView scrollWhenUpdating:nil.
-
-	    "/ this will lead to a selectionIndex change (done by the selListView);
-	    "/ however, we dont want this here, since it recurses into
-	    "/ a selectionChange. Therefore, temporarily disconnect the selectionIndexHolder...
-	    [
-		self selectedClassNameIndices removeDependent:self.
-		"/ also, dont want a callback (selectionChangedByClick)
-		sav := listView action.
-		listView action:nil.
-		self classNameList value:newNameList.
-	    ] ensure:[
-		listView action:sav.
-		self selectedClassNameIndices addDependent:self.
-		listView scrollWhenUpdating:prevMode.
-	    ].
-	]
+        "/ no need to update
+    ] ifFalse:[
+        listView := builder componentAt:#List.
+        (listView isNil or:[listView scrolledView isNil]) ifTrue:[    
+            "/ invoked very early during setup
+            self classNameList value:newNameList
+        ] ifFalse:[
+            "/ avoid flicker and useless redraws
+
+            prevMode := listView scrollWhenUpdating.
+            listView scrollWhenUpdating:nil.
+
+            "/ this will lead to a selectionIndex change (done by the selListView);
+            "/ however, we dont want this here, since it recurses into
+            "/ a selectionChange. Therefore, temporarily disconnect the selectionIndexHolder...
+            [
+                self selectedClassNameIndices removeDependent:self.
+                "/ also, dont want a callback (selectionChangedByClick)
+                sav := listView action.
+                listView action:nil.
+                self classNameList value:newNameList.
+            ] ensure:[
+                listView action:sav.
+                self selectedClassNameIndices addDependent:self.
+                listView scrollWhenUpdating:prevMode.
+            ].
+        ]
     ].
 
     "Modified: / 31.10.2001 / 11:33:21 / cg"
@@ -39269,72 +39274,6 @@
     "Created: / 5.2.2000 / 13:42:18 / cg"
 !
 
-updateClassListFor:aClass
-    |classes found foundInSelection|
-
-    found := foundInSelection := false.
-
-    "/ update for a changed class in the classList
-    (classes := classList value) size > 0 ifTrue:[
-	(self updateClassesIn:classes) ifTrue:[
-	    found := true
-	].
-	(classes includes:nil) ifTrue:[
-self halt:'should not happen'.
-	    classList value:(classes := classes select:[:each | each notNil]).
-	].
-    ].
-    "/ possibly in the generator
-    ((classes := inGeneratorHolder value) isOrderedCollection 
-    and:[classes size > 0]) ifTrue:[
-	(self updateClassesIn:classes) ifTrue:[
-	    found := true
-	].
-	(classes includes:nil) ifTrue:[
-self halt:'should not happen'.
-	    inGeneratorHolder value:(classes select:[:each | each notNil]).
-	]
-    ].
-    "/ and in the selection
-    (classes := self selectedClasses value) size > 0 ifTrue:[
-	(self updateClassesIn:classes) ifTrue:[
-	    found := true.
-	    foundInSelection := true.
-	].
-	(classes includes:nil) ifTrue:[
-self halt:'should not happen'.
-	    self selectedClasses value:(classes select:[:each | each notNil]).
-	]
-    ].
-    "/ and in the last selection
-    (classes := lastSelectedClasses) size > 0 ifTrue:[
-	(self updateClassesIn:classes) ifTrue:[
-	    found := true
-	].
-	(classes includes:nil) ifTrue:[
-self halt:'should not happen'.
-	    lastSelectedClasses := (classes select:[:each | each notNil]).
-	]
-    ].
-
-    found ifFalse:[
-	"/ could be a new class.
-	listValid ifTrue:[
-	    self enqueueDelayedUpdateList.
-	].
-	listValid := false.
-    ].
-    foundInSelection ifTrue:[
-	"/ force update of output generator
-	self selectedClasses 
-	    removeDependent:self;
-	    changed;
-	    addDependent:self.
-    ].
-
-    "Modified: / 25.2.2000 / 23:54:19 / cg"
-!
-
 updateClassesIn:aCollection
     "replace any obsolete class in aCollection;
      return true, if any was found"
@@ -39452,6 +39391,72 @@
 
     "Created: / 5.2.2000 / 13:42:18 / cg"
     "Modified: / 31.10.2001 / 11:35:39 / cg"
+!
+
+updateListsFor:aClass
+    |classes found foundInSelection|
+
+    found := foundInSelection := false.
+
+    "/ update for a changed class in the classList
+    (classes := classList value) size > 0 ifTrue:[
+        (self updateClassesIn:classes) ifTrue:[
+            found := true
+        ].
+        (classes includes:nil) ifTrue:[
+self halt:'should not happen'.
+            classList value:(classes := classes select:[:each | each notNil]).
+        ].
+    ].
+    "/ possibly in the generator
+    ((classes := inGeneratorHolder value) isOrderedCollection 
+    and:[classes size > 0]) ifTrue:[
+        (self updateClassesIn:classes) ifTrue:[
+            found := true
+        ].
+        (classes includes:nil) ifTrue:[
+self halt:'should not happen'.
+            inGeneratorHolder value:(classes select:[:each | each notNil]).
+        ]
+    ].
+    "/ and in the selection
+    (classes := self selectedClasses value) size > 0 ifTrue:[
+        (self updateClassesIn:classes) ifTrue:[
+            found := true.
+            foundInSelection := true.
+        ].
+        (classes includes:nil) ifTrue:[
+self halt:'should not happen'.
+            self selectedClasses value:(classes select:[:each | each notNil]).
+        ]
+    ].
+    "/ and in the last selection
+    (classes := lastSelectedClasses) size > 0 ifTrue:[
+        (self updateClassesIn:classes) ifTrue:[
+            found := true
+        ].
+        (classes includes:nil) ifTrue:[
+self halt:'should not happen'.
+            lastSelectedClasses := (classes select:[:each | each notNil]).
+        ]
+    ].
+
+    found ifFalse:[
+        "/ could be a new class (or no-longer autolaoded one).
+        listValid ifTrue:[
+            self enqueueDelayedUpdateList.
+        ].
+        listValid := false.
+    ].
+    foundInSelection ifTrue:[
+        "/ force update of output generator
+        self selectedClasses 
+            removeDependent:self;
+            changed;
+            addDependent:self.
+    ].
+
+    "Modified: / 25.2.2000 / 23:54:19 / cg"
 ! !
 
 !NewSystemBrowser::ClassList methodsFor:'setup'!
@@ -57483,7 +57488,7 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.709 2004-02-18 12:49:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.710 2004-02-25 16:15:11 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!