[squeak-dev] The Inbox: Tools-LM.829.mcz

David T. Lewis lewis at mail.msen.com
Fri Aug 17 01:08:04 UTC 2018


I am not used to being criticized for being "way to quick", so I happily
accept the criticism ;-)

Joking aside, I do think it is worth noting that Leon Matthes made an
important contribution here. He documented the changes clearly in his
commits to the inbox. He accepted input from reviewers and responded
with an update (Tools-LM.829) to incorporate suggested improvements.

I am really happy to see this, and I look forward to future comtributions
from Leon.

Dave


On Thu, Aug 16, 2018 at 04:20:57PM -0500, Chris Muller wrote:
> I was just getting ready to take a look at it, but you and Dave are
> way too quick for me...
> 
> On Thu, Aug 16, 2018 at 9:43 AM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> >
> >> On Aug 15, 2018, at 5:46 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> >>
> >> This (along with Tools-LM.828) seems like a worthwhile set of improvements. Should
> >> we merge it now, or is it better to wait until immediately after the 5.2 release?
> >>
> >> I am inclined to say merge it now, because it seems like low risk with respect to
> >> the release, but I would not want to do anything to get in the way of the release
> >> process.
> >
> > +1.  Merge now.  It won???t break anything.
> >
> >>
> >> Dave
> >>
> >>
> >>> On Thu, Aug 16, 2018 at 12:01:11AM +0000, commits at source.squeak.org wrote:
> >>> A new version of Tools was added to project The Inbox:
> >>> http://source.squeak.org/inbox/Tools-LM.829.mcz
> >>>
> >>> ==================== Summary ====================
> >>>
> >>> Name: Tools-LM.829
> >>> Author: LM
> >>> Time: 16 August 2018, 2:01:04.706807 am
> >>> UUID: 46879fde-2c09-ca4a-9b63-b14a1e21e4c0
> >>> Ancestors: Tools-LM.828
> >>>
> >>> In response to the feedback I received to Tools-LM.828 ( http://forum.world.st/The-Inbox-Tools-LM-828-mcz-td5082873.html ).
> >>>
> >>> I now made the ObjectExplorer only exclude those ObjectExplorerWrappers from the "chase pointers" search that are a submorph of the ActiveWorld.
> >>> This is helpful if, for example, one reference to the object in question is held by an ObjectExplorer in another project that you forgot about.
> >>>
> >>> The findDeepSubmorphsIn:that: method should probably be moved into the Morph class, because it is a classic case of feature envy and Morph already contains a findDeepSubmorphThat:ifAbsent: method, which is similar. I just didn't want to mess with one of the core Morphic classes.
> >>>
> >>> I know that the way I find which ObjectExplorerWrappers are visible is not ideal, because it violates the principle of MVC that the model should not know about the implementation specifics of the view. So any feedback and suggestions in that regard would be appreciated.
> >>>
> >>> =============== Diff against Tools-LM.828 ===============
> >>>
> >>> Item was changed:
> >>>  ----- Method: ObjectExplorer>>chasePointersForSelection (in category 'menus - actions') -----
> >>>  chasePointersForSelection
> >>>
> >>> +    PointerFinder on: self object except: self possibleReferencesToSelection!
> >>> -    PointerFinder on: self object except: {self}, ObjectExplorerWrapper allInstances!
> >>>
> >>> Item was added:
> >>> + ----- Method: ObjectExplorer>>findDeepSubmorphsIn:that: (in category 'accessing - view') -----
> >>> + findDeepSubmorphsIn: aMorph that: aBlock
> >>> +
> >>> +    | selectedSubmorphs |
> >>> +    selectedSubmorphs := aMorph submorphs select: aBlock.
> >>> +    ^ selectedSubmorphs, (aMorph submorphs collect: [:each |
> >>> +        self findDeepSubmorphsIn: each that: aBlock]) flatten!
> >>>
> >>> Item was added:
> >>> + ----- Method: ObjectExplorer>>possibleReferencesToSelection (in category 'accessing - view') -----
> >>> + possibleReferencesToSelection
> >>> +
> >>> +    ^ {self}, self visibleObjectExplorerWrappers!
> >>>
> >>> Item was added:
> >>> + ----- Method: ObjectExplorer>>views (in category 'accessing - view') -----
> >>> + views
> >>> +
> >>> +    ^ self findDeepSubmorphsIn: ActiveWorld that: [:morph |
> >>> +        morph modelOrNil = self]!
> >>>
> >>> Item was added:
> >>> + ----- Method: ObjectExplorer>>visibleListItems (in category 'accessing - view') -----
> >>> + visibleListItems
> >>> +
> >>> +    | lists |
> >>> +    lists := self views select: [:morph |
> >>> +        (morph isKindOf: PluggableTreeMorph)].
> >>> +    ^ (lists collect: [:each|
> >>> +        each items]) flatten!
> >>>
> >>> Item was added:
> >>> + ----- Method: ObjectExplorer>>visibleObjectExplorerWrappers (in category 'accessing - view') -----
> >>> + visibleObjectExplorerWrappers
> >>> +
> >>> +    | listItems |
> >>> +    listItems := self visibleListItems.
> >>> +    ^ listItems collect: [:each | each complexContents]!
> >>>
> >>> Item was changed:
> >>>  ----- Method: PointerFinder>>buildList (in category 'application') -----
> >>>  buildList
> >>>      | list obj parent object key |
> >>>      list := OrderedCollection new.
> >>>      obj := goal.
> >>> -
> >>>      [list addFirst: obj.
> >>> +    obj := parents at: obj ifAbsent: [].
> >>> -    obj := parents at: obj ifAbsent: [nil].
> >>>      obj == nil] whileFalse.
> >>>      list removeFirst.
> >>>      parent := Smalltalk.
> >>>      objectList := OrderedCollection new.
> >>>      pointerList := OrderedCollection new.
> >>>      [list isEmpty]
> >>>          whileFalse:
> >>>              [object := list removeFirst.
> >>>              key := nil.
> >>>              (parent isKindOf: Dictionary)
> >>>                  ifTrue: [list size >= 2
> >>>                          ifTrue:
> >>>                              [key := parent keyAtValue: list second ifAbsent: [].
> >>>                              key == nil
> >>>                                  ifFalse:
> >>>                                      [object := list removeFirst; removeFirst.
> >>>                                      pointerList add: key printString , ' -> ' , object class name]]].
> >>>              key == nil
> >>>                  ifTrue:
> >>>                      [parent class == object ifTrue: [key := 'CLASS'].
> >>>                      key == nil ifTrue: [1 to: parent class instSize do: [:i | key == nil ifTrue: [(parent instVarAt: i)
> >>>                                      == object ifTrue: [key := parent class instVarNameForIndex: i]]]].
> >>>                      key == nil ifTrue: [parent isCompiledCode ifTrue: [key := 'literals?']].
> >>>                      key == nil ifTrue: [1 to: parent basicSize do: [:i | key == nil ifTrue: [(parent basicAt: i)
> >>>                                      == object ifTrue: [key := i printString]]]].
> >>>                      key == nil ifTrue: [(parent isMorph and: [object isKindOf: Array]) ifTrue: [key := 'submorphs?']].
> >>>                      key == nil ifTrue: [key := '???'].
> >>>                      pointerList add: key , ': ' , object class name, (object isMorph ifTrue: [' (', object identityHash asString, ')'] ifFalse: [ String empty ]) ].
> >>>              objectList add: object.
> >>>              parent := object]!
> >>>
> >>>
> >>
> >
> 


More information about the Squeak-dev mailing list