[squeak-dev] The Trunk: Tools-cmm.348.mcz

Chris Muller asqueaker at gmail.com
Tue May 3 14:28:54 UTC 2011


Yes, I wanted to delete flattenHierarchy... et al, but it looks like
there might be one more sender..

On Tue, May 3, 2011 at 1:23 AM, Frank Shearar
<frank.shearar at angband.za.org> wrote:
> On 2011/05/03 01:24, commits at source.squeak.org wrote:
>>
>> Chris Muller uploaded a new version of Tools to project The Trunk:
>> http://source.squeak.org/trunk/Tools-cmm.348.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Tools-cmm.348
>> Author: cmm
>> Time: 2 May 2011, 8:24:10.46 pm
>> UUID: b02d968c-e94f-452b-aef7-d78fa343ff09
>> Ancestors: Tools-cmm.347
>>
>> Fixed performance bug when opening hierarchy browser on Object.
>>
>> =============== Diff against Tools-cmm.347 ===============
>>
>> Item was changed:
>>   ----- Method: HierarchyBrowser>>initHierarchyForClass: (in category
>> 'initialization') -----
>> + initHierarchyForClass: aClassOrMetaClass
>> +       | nonMetaClass superclasses |
>> - initHierarchyForClass: aClassOrMetaClass
>> -       | nonMetaClass |
>>        centralClass := aClassOrMetaClass.
>>        nonMetaClass := aClassOrMetaClass theNonMetaClass.
>>        self systemOrganizer: SystemOrganization.
>>        metaClassIndicated := aClassOrMetaClass isMeta.
>>        classDisplayList := OrderedCollection new.
>> +       (superclasses := nonMetaClass allSuperclasses reversed)
>> withIndexDo:
>> +               [ : each : indent | classDisplayList add:
>> +                       (String streamContents:
>> +                               [ : stream | indent - 1 timesRepeat: [
>> stream nextPutAll: '  ' ].
>> +                               stream nextPutAll: each name ]) ].
>> +       nonMetaClass
>> +               allSubclassesWithLevelDo:
>> +                       [ : eachClass : lvl | classDisplayList add:
>> +                               (String streamContents:
>> +                                       [ : stream | lvl+1 timesRepeat: [
>> stream nextPutAll: '  ' ].
>> +                                       stream nextPutAll: eachClass name
>> ]) ]
>> +               startingLevel: superclasses size.
>> +       self selectClass: nonMetaClass!
>> -       self
>> -               flattenHierarchyTree: (self createHierarchyTreeOf:
>> (nonMetaClass allSuperclasses, { nonMetaClass }, nonMetaClass
>> allSubclasses))
>> -               on: classDisplayList
>> -               indent: ''
>> -               by: '  '.
>> -
>> -       self selectClass: nonMetaClass.!
>
> That also looks rather more understandable that trying to wrap one's head
> around how createHierarchyTreeOf: works. And this avoids the ObjectTracer
> hierarchy issue too, doesn't it?
>
> frank
>
>



More information about the Squeak-dev mailing list