The Inbox: Tools-LM.829.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Tools-LM.829.mcz

commits-2
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]!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

David T. Lewis
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.

Dave


On Thu, Aug 16, 2018 at 12:01:11AM +0000, [hidden email] 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]!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

Edgar De Cleene
+1
And freeze 5.2



On 15/08/2018, 21:46, "David T. Lewis" <[hidden email]> 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.

Dave



Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

David T. Lewis
OK, I merged the PointerFinder and ObjectExplorer changes to trunk.

Edgar, I think you are right that we are ready for a code freeze for 5.2.
Maybe you can send a separate message to the list to make it official :-)

Dave

On Thu, Aug 16, 2018 at 05:38:38AM -0300, Edgar J. De Cleene wrote:

> +1
> And freeze 5.2
>
>
>
> On 15/08/2018, 21:46, "David T. Lewis" <[hidden email]> 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.
>
> Dave
>
>
>

Reply | Threaded
Open this post in threaded view
|

Frrezing 5.2 (was Re: The Inbox: Tools-LM.829.mcz)

Edgar De Cleene
People:

I wish say a loud GRACIAS to all helping Squeak moves on.
Still we have bugs in some places.
Send mails with [BUG] so we discuss here, collect info and I made Mantis
report if necessary.

I wish see some of you on Salta , la linda for Smalltalks 2018

https://www.fast.org.ar/


Edgar
@morplenauta








On 16/08/2018, 09:37, "David T. Lewis" <[hidden email]> wrote:

> Edgar, I think you are right that we are ready for a code freeze for
> 5.2.
Maybe you can send a separate message to the list to make it official
> :-)




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

Eliot Miranda-2
In reply to this post by David T. Lewis

> On Aug 15, 2018, at 5:46 PM, David T. Lewis <[hidden email]> 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, [hidden email] 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]!
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

Chris Muller-3
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 <[hidden email]> wrote:

>
>> On Aug 15, 2018, at 5:46 PM, David T. Lewis <[hidden email]> 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, [hidden email] 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]!
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

Chris Muller-3
In reply to this post by Eliot Miranda-2
> +1.  Merge now.  It won’t break anything.

The date on the methods is _yesterday_, are you really comfortable
making such a statement?

So what about FileContentsBrowser>>#browseVersions?  Looks like it was
rolled back to Doug Way's version from 2000 to no longer use your
2016 update to use ToolSet.  But please, just let me know, don't
commit any more versions yet, 'cuz I see some other issues..

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

David T. Lewis
In reply to this post by Chris Muller-3
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 <[hidden email]> wrote:
> >
> >> On Aug 15, 2018, at 5:46 PM, David T. Lewis <[hidden email]> 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, [hidden email] 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]!
> >>>
> >>>
> >>
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

Eliot Miranda-2

> On Aug 16, 2018, at 6:08 PM, David T. Lewis <[hidden email]> wrote:
>
> 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.

+1

>
> 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 <[hidden email]> wrote:
>>>
>>>> On Aug 15, 2018, at 5:46 PM, David T. Lewis <[hidden email]> 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, [hidden email] 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]!
>>>>>
>>>>>
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

Tim Johnson-2
In reply to this post by Chris Muller-3


> On Aug 16, 2018, at 2:41 PM, Chris Muller <[hidden email]> wrote:
>
>> +1.  Merge now.  It won’t break anything.
>
> The date on the methods is _yesterday_, are you really comfortable
> making such a statement?
>
> So what about FileContentsBrowser>>#browseVersions?  Looks like it was
> rolled back to Doug Way's version from 2000 to no longer use your
> 2016 update to use ToolSet.  But please, just let me know, don't
> commit any more versions yet, 'cuz I see some other issues..

This sounds like a contribution I made.  #browseVersions in FileContentsBrowser cannot use the 2016 update to use ToolSet.  It doesn't work.  Try it for yourself.

Reverting to the 2000 version allows it to work again.

Cheers,
Tim


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

David T. Lewis
Thanks Tim,

This sounds like Tools-tcj.827.mcz in the inbox. I had not intended to
include that in this merge, but I may have done so by accident.

Chris, if you're looking at this, please say if you think the two methods
from Tools-tcj.827 belong in trunk. If yes, we can move Tools-tcj.827.mcz
to trunk so that the record is complete; if no, the two methods can be
reverted and considered later after the 5.2 release.

Dave


>
>
>> On Aug 16, 2018, at 2:41 PM, Chris Muller <[hidden email]> wrote:
>>
>>> +1.  Merge now.  It won’t break anything.
>>
>> The date on the methods is _yesterday_, are you really comfortable
>> making such a statement?
>>
>> So what about FileContentsBrowser>>#browseVersions?  Looks like it was
>> rolled back to Doug Way's version from 2000 to no longer use your
>> 2016 update to use ToolSet.  But please, just let me know, don't
>> commit any more versions yet, 'cuz I see some other issues..
>
> This sounds like a contribution I made.  #browseVersions in
> FileContentsBrowser cannot use the 2016 update to use ToolSet.  It doesn't
> work.  Try it for yourself.
>
> Reverting to the 2000 version allows it to work again.
>
> Cheers,
> Tim
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

Tim Johnson-2
Hi,

I think my contribution Tools-tcj.827.mcz included another method change
by mistake (due to a difference between my image and trunk, perhaps) and
should be discarded.

The only change I intended to share was the reversion (revert) of
FileContentsBrowser>>#browseVersions .

Thanks,
Tim


On 2018-08-17 09:37, David T. Lewis wrote:

> Thanks Tim,
>
> This sounds like Tools-tcj.827.mcz in the inbox. I had not intended to
> include that in this merge, but I may have done so by accident.
>
> Chris, if you're looking at this, please say if you think the two
> methods
> from Tools-tcj.827 belong in trunk. If yes, we can move
> Tools-tcj.827.mcz
> to trunk so that the record is complete; if no, the two methods can be
> reverted and considered later after the 5.2 release.
>
> Dave
>
>
>>
>>
>>> On Aug 16, 2018, at 2:41 PM, Chris Muller <[hidden email]>
>>> wrote:
>>>
>>>> +1.  Merge now.  It won’t break anything.
>>>
>>> The date on the methods is _yesterday_, are you really comfortable
>>> making such a statement?
>>>
>>> So what about FileContentsBrowser>>#browseVersions?  Looks like it
>>> was
>>> rolled back to Doug Way's version from 2000 to no longer use your
>>> 2016 update to use ToolSet.  But please, just let me know, don't
>>> commit any more versions yet, 'cuz I see some other issues..
>>
>> This sounds like a contribution I made.  #browseVersions in
>> FileContentsBrowser cannot use the 2016 update to use ToolSet.  It
>> doesn't
>> work.  Try it for yourself.
>>
>> Reverting to the 2000 version allows it to work again.
>>
>> Cheers,
>> Tim
>>
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-LM.829.mcz

David T. Lewis
Tim,

Thanks for that fix. Your Tools-LM.829 contains just the one method change,
as you intended.

Your update should be moved from inbox to trunk, because it is part of the
update history:

  Tools-cmm.826 -> Tools-tcj.827 -> Tools-LM.828 -> Tools-LM.829 -> Tools-dtl.830 -> Tools-cmm.831
  Tools.cmm.826 -> Tools-eem.827 -> Tools-cmm.828 -> Tools-eem.829 -> Tools-dtl.830 -> Tools-cmm.831

I will wait a day or so and then move Tools-tcj.827 from inbox to trunk
so that it is part of the trunk update history.

<OT>
If someone is looking for a cool project, a Monticello version branch
visualizer based on Connectors would be a great thing to have.
</OT>

Dave


On Fri, Aug 17, 2018 at 11:39:44AM -0700, Tim Johnson wrote:

> Hi,
>
> I think my contribution Tools-tcj.827.mcz included another method change
> by mistake (due to a difference between my image and trunk, perhaps) and
> should be discarded.
>
> The only change I intended to share was the reversion (revert) of
> FileContentsBrowser>>#browseVersions .
>
> Thanks,
> Tim
>
>
> On 2018-08-17 09:37, David T. Lewis wrote:
> >Thanks Tim,
> >
> >This sounds like Tools-tcj.827.mcz in the inbox. I had not intended to
> >include that in this merge, but I may have done so by accident.
> >
> >Chris, if you're looking at this, please say if you think the two
> >methods
> >from Tools-tcj.827 belong in trunk. If yes, we can move
> >Tools-tcj.827.mcz
> >to trunk so that the record is complete; if no, the two methods can be
> >reverted and considered later after the 5.2 release.
> >
> >Dave
> >
> >
> >>
> >>
> >>>On Aug 16, 2018, at 2:41 PM, Chris Muller <[hidden email]>
> >>>wrote:
> >>>
> >>>>+1.  Merge now.  It won??????t break anything.
> >>>
> >>>The date on the methods is _yesterday_, are you really comfortable
> >>>making such a statement?
> >>>
> >>>So what about FileContentsBrowser>>#browseVersions?  Looks like it
> >>>was
> >>>rolled back to Doug Way's version from 2000 to no longer use your
> >>>2016 update to use ToolSet.  But please, just let me know, don't
> >>>commit any more versions yet, 'cuz I see some other issues..
> >>
> >>This sounds like a contribution I made.  #browseVersions in
> >>FileContentsBrowser cannot use the 2016 update to use ToolSet.  It
> >>doesn't
> >>work.  Try it for yourself.
> >>
> >>Reverting to the 2000 version allows it to work again.
> >>
> >>Cheers,
> >>Tim
> >>
> >>
> >>