#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Mon, 13 Feb 2017 20:43:03 +0100
changeset 17406 30482cf03fc9
parent 17405 7dea25a92c4f
child 17407 8da9fd29c3bb
#DOCUMENTATION by cg class: Tools::MethodList comment/format in: #updateList
Tools__MethodList.st
--- a/Tools__MethodList.st	Mon Feb 13 20:42:57 2017 +0100
+++ b/Tools__MethodList.st	Mon Feb 13 20:43:03 2017 +0100
@@ -1495,7 +1495,7 @@
     oldListSize := self browserNameList size.
 
     self topApplication withWaitCursorDo:[
-	newList := self listOfMethodNames.
+        newList := self listOfMethodNames.
     ].
     newListSize := newList size.
     sameContents := self updateListFor:newList.
@@ -1503,70 +1503,71 @@
     sameContents ifFalse:[
 "/      self browserNameList value:newList.
 
-	(prevSelection size == 0
-	and:[selectedMethodsHolder value size ~~ 0]) ifTrue:[
-	    "/ this happens during early startup time,
-	    "/ when the selection is already (pre-)set,
-	    "/ and the methodList is generated the first time
-	    "/ (i.e. when opened with preset selection
+        (prevSelection size == 0
+        and:[selectedMethodsHolder value size ~~ 0]) ifTrue:[
+            "/ this happens during early startup time,
+            "/ when the selection is already (pre-)set,
+            "/ and the methodList is generated the first time
+            "/ (i.e. when opened with preset selection
 
-	    "/ do not clobber the selection in this case.
-	    prevSelection := selectedMethodsHolder value.
-	].
+            "/ do not clobber the selection in this case.
+            prevSelection := selectedMethodsHolder value.
+        ].
 
-	(methodList size == 0 or:[prevSelection size == 0]) ifTrue:[
-	    newSelection := #()
-	] ifFalse:[
-	    methodSet := methodList.
+        (methodList size == 0 or:[prevSelection size == 0]) ifTrue:[
+            newSelection := #()
+        ] ifFalse:[
+            methodSet := methodList.
 
-	    "/ intersect is much faster with sets, if the number of items is large
-	    "/ however, only if its worth building the set ...
-	    (methodSet size + prevSelection size) > 35 ifTrue:[
-		methodSet := methodSet asIdentitySet.
-	    ].
-	    newSelection := methodSet intersect:prevSelection.
-	].
-	newSelection size > 0 ifTrue:[
-	    newSelection size > 100 ifTrue:[
-		"/ need selection indices - might be expensive if done straight forward...
-		reverseMap := IdentityDictionary new.
-		methodList keysAndValuesDo:[:idx :mthd | reverseMap at:mthd put:idx].
-		newSelIdx := newSelection collect:[:mthd | reverseMap at:mthd].
-	    ] ifFalse:[
-		newSelIdx := newSelection collect:[:mthd | methodList identityIndexOf:mthd]
-	    ].
+            "/ intersect is much faster with sets, if the number of items is large
+            "/ however, only if it's worth building the set ...
+            (methodSet size + prevSelection size) > 35 ifTrue:[
+                methodSet := methodSet asIdentitySet.
+            ].
+            newSelection := methodSet intersect:prevSelection.
+        ].
+        newSelection size > 0 ifTrue:[
+            newSelection size > 100 ifTrue:[
+                "/ need selection indices - might be expensive if done straight forward...
+                reverseMap := IdentityDictionary new.
+                methodList keysAndValuesDo:[:idx :mthd | reverseMap at:mthd put:idx].
+                newSelIdx := newSelection collect:[:mthd | reverseMap at:mthd].
+            ] ifFalse:[
+                newSelIdx := newSelection collect:[:mthd | methodList identityIndexOf:mthd]
+            ].
 "/ self halt.
-	    "/ force change (for dependents)
-	    newSelIdx ~= selectedMethodNameIndices value ifTrue:[
-		self selectedMethodNameIndices value:newSelIdx.
-	    ].
-	] ifFalse:[
-	    lastSelectedMethods := selectedMethodsHolder value.
-	    lastSelectedMethods notNil ifTrue:[
-		lastSelectedMethods := lastSelectedMethods asOrderedCollection
-	    ].
-	    selectedMethodNameIndices value size > 0 ifTrue:[
-		selectedMethodNameIndices value:#().
-	    ]
-	].
+            "/ force change (for dependents)
+            newSelIdx ~= selectedMethodNameIndices value ifTrue:[
+                self selectedMethodNameIndices value:newSelIdx.
+            ].
+        ] ifFalse:[
+            lastSelectedMethods := selectedMethodsHolder value.
+            lastSelectedMethods notNil ifTrue:[
+                lastSelectedMethods := lastSelectedMethods asOrderedCollection
+            ].
+            selectedMethodNameIndices value size > 0 ifTrue:[
+                selectedMethodNameIndices value:#().
+            ]
+        ].
 
-	newSelection ~= prevSelection ifTrue:[
-	    self selectionChanged.
-	]
+        newSelection ~= prevSelection ifTrue:[
+            self selectionChanged.
+        ]
     ] ifTrue:[
-	"/ same list - but classes might have changed
-	"/ that is the case, if the class selection has been changed,
-	"/ to another class which has the same categories.
+        "/ same list - but classes might have changed
+        "/ that is the case, if the class selection has been changed,
+        "/ to another class which has the same categories.
 
-	(prevClasses ~= (classes ? IdentitySet new)) ifTrue:[
-	    (newListSize > 0 or:[oldListSize > 0]) ifTrue:[
-		self selectionChanged.
-	    ]
-	]
+        (prevClasses ~= (classes ? IdentitySet new)) ifTrue:[
+            (newListSize > 0 or:[oldListSize > 0]) ifTrue:[
+                self selectionChanged.
+            ]
+        ]
     ]
 
     "Modified: / 05-03-2007 / 16:07:24 / cg"
     "Modified: / 24-02-2014 / 11:08:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 13-02-2017 / 20:33:21 / cg"
 !
 
 updateListEntryFor:aMethod