--- a/Tools__MethodList.st Fri Jan 22 20:50:38 2016 +0100
+++ b/Tools__MethodList.st Fri Jan 22 20:51:04 2016 +0100
@@ -720,12 +720,12 @@
methods := methodList ? #().
methods size == 0 ifTrue:[
- "/ this may happen during early startup,
- "/ when invoked with a preset methodSelection,
- "/ and the methodGenerator has not yet been setup
- "/ to not clobber the selection, defer the update
- "/ until the methodList arrives ...
- ^ self
+ "/ this may happen during early startup,
+ "/ when invoked with a preset methodSelection,
+ "/ and the methodGenerator has not yet been setup
+ "/ to not clobber the selection, defer the update
+ "/ until the methodList arrives ...
+ ^ self
].
selectedMethodsHolder := self selectedMethods.
@@ -734,32 +734,33 @@
"/ check if all is selected (likely)
((selectedMethods size == methodList size)
and:[selectedMethods = methodList]) ifTrue:[
- indices := (1 to:selectedMethods size)
+ indices := (1 to:selectedMethods size)
] ifFalse:[
- selectedMethods size > 100 ifTrue:[
- "/ check if all is selected (likely)
- ((selectedMethods size == methodList size)
- and:[selectedMethods = methodList]) ifTrue:[
- indices := (1 to:selectedMethods size)
- ] ifFalse:[
- "/ for big collections, generate a reverse map
- reverseMap := IdentityDictionary new.
- methods keysAndValuesDo:[:idx :mthd | reverseMap at:mthd put:idx].
- indices := selectedMethods collect:[:eachSelectedMethod |
- reverseMap at:eachSelectedMethod ifAbsent:0
- ]
- ]
- ] ifFalse:[
- indices := (selectedMethods ? #()) collect:[:eachSelectedMethod |
- methods identityIndexOf:eachSelectedMethod.
- ]
- ].
- indices := indices select:[:idx | idx ~= 0].
+ selectedMethods size > 100 ifTrue:[
+ "/ check if all is selected (likely)
+ ((selectedMethods size == methodList size)
+ and:[selectedMethods = methodList]) ifTrue:[
+ indices := (1 to:selectedMethods size)
+ ] ifFalse:[
+ "/ for big collections, generate a reverse map
+ reverseMap := IdentityDictionary new.
+ methods keysAndValuesDo:[:idx :mthd | reverseMap at:mthd put:idx].
+ indices := selectedMethods
+ collect:[:eachSelectedMethod |
+ reverseMap at:eachSelectedMethod ifAbsent:0]
+ thenSelect:[:idx | idx ~~ 0]
+ ]
+ ] ifFalse:[
+ indices := (selectedMethods ? #())
+ collect:[:eachSelectedMethod |
+ methods identityIndexOf:eachSelectedMethod]
+ thenSelect:[:idx | idx ~~ 0]
+ ].
].
selectedMethodNameIndicesHolder := self selectedMethodNameIndices.
selectedMethodNameIndicesHolder value ~= indices ifTrue:[
- selectedMethodNameIndicesHolder value:indices.
+ selectedMethodNameIndicesHolder value:indices.
]
!