'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 15 April 2006 at 10:56:58 am'! "Change Set: ECSorting Date: 15 April 2006 Author: Andrew P. Black This small changeset alters the collating sequence for the list of completions presented by the EC package. Specifically, the character : is made to sort ahead of letters and digits. This means, for example, that #to: and #to:by: will appear after #to but ahead of #toBeFixed, etc., which seems to me to be more useful."! Object subclass: #ECModel instanceVariableNames: 'clazz selectors narrowString entries ' classVariableNames: 'SelectorOrderTable ' poolDictionaries: '' category: 'ECompletion'! !ECModel methodsFor: 'initialize-release' stamp: 'apb 4/15/2006 09:53'! initialize super initialize. selectors := SortedCollection new: 500; sortBlock: self selectorOrder. entries := OrderedCollection new. narrowString := String new! ! !ECModel methodsFor: 'initialize-release' stamp: 'apb 4/15/2006 10:08'! selectorOrder "selector order collates : before 0" SelectorOrderTable ifNil: [ SelectorOrderTable := (0 to: 255) as: ByteArray. SelectorOrderTable at: ($: asciiValue + 1) put: ($0 asciiValue) ]. "compare returns 1, 2, or 3 for <, = and >" ^ [ :a :b | (a compare: a with: b collated: SelectorOrderTable) < 3] ! !