<div dir="ltr">Hi Marcel,<div><br></div><div>    this may have broken the FileList. At least after the latest update the FileList no longer opens up the tree of directories in the left-hand pane to the current directory.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 29, 2015 at 5:44 AM,  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Marcel Taeumel uploaded a new version of Tools to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Tools-mt.565.mcz" target="_blank">http://source.squeak.org/trunk/Tools-mt.565.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-mt.565<br>
Author: mt<br>
Time: 29 March 2015, 2:44:29.709 pm<br>
UUID: f8216267-8713-0449-bef6-35fecc620960<br>
Ancestors: Tools-topa.564<br>
<br>
Refactored toggle/expand code in IndentingListItemMorph.<br>
<br>
=============== Diff against Tools-topa.564 ===============<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;addChildrenForList:addingTo:withExpandedItems: (in category &#39;container protocol - private&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;addChildrenForList:addingTo:withExpandedItems: (in category &#39;private-container protocol&#39;) -----<br>
  addChildrenForList: hostList addingTo: morphList withExpandedItems: expandedItems<br>
<br>
        firstChild ifNotNil: [<br>
                firstChild withSiblingsDo: [ :aNode | aNode delete].<br>
        ].<br>
        firstChild := nil.<br>
        complexContents hasContents ifFalse: [^self].<br>
        firstChild := hostList<br>
                addMorphsTo: morphList<br>
                from: complexContents contents<br>
                allowSorting: true<br>
                withExpandedItems: expandedItems<br>
                atLevel: indentLevel + 1.<br>
        !<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;canExpand (in category &#39;testing&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;canExpand (in category &#39;accessing&#39;) -----<br>
  canExpand<br>
<br>
        ^complexContents hasContents!<br>
<br>
Item was added:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;collapse (in category &#39;container protocol&#39;) -----<br>
+ collapse<br>
+<br>
+       self isExpanded ifFalse: [^ self].<br>
+<br>
+       self isExpanded: false.<br>
+<br>
+       firstChild ifNotNil: [:collapsingNode |<br>
+               | toDelete |<br>
+               toDelete := OrderedCollection new.<br>
+               collapsingNode withSiblingsDo: [:aNode | aNode recursiveAddTo: toDelete].<br>
+               container noteRemovalOfAll: toDelete].<br>
+<br>
+       self changed.!<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;complexContents (in category &#39;accessing&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;complexContents (in category &#39;private-container protocol&#39;) -----<br>
  complexContents<br>
<br>
        ^complexContents!<br>
<br>
Item was added:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;expand (in category &#39;container protocol&#39;) -----<br>
+ expand<br>
+<br>
+       | newChildren c |<br>
+<br>
+       (self isExpanded or: [self canExpand not])<br>
+               ifTrue: [^ self].<br>
+<br>
+       (c := self getChildren) ifEmpty: [<br>
+               &quot;Due to the guessing in #canExpand, it may still fail here.&quot;<br>
+               ^ self].<br>
+<br>
+       self isExpanded: true.<br>
+<br>
+       newChildren := container<br>
+               addSubmorphsAfter: self<br>
+               fromCollection: c<br>
+               allowSorting: true.<br>
+<br>
+       firstChild := newChildren first.!<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;hasIcon (in category &#39;testing&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;hasIcon (in category &#39;accessing&#39;) -----<br>
  hasIcon<br>
        &quot;Answer whether the receiver has an icon.&quot;<br>
        ^ icon notNil!<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;highlight (in category &#39;container protocol - private&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;highlight (in category &#39;private-container protocol&#39;) -----<br>
  highlight<br>
<br>
        (self valueOfProperty: #wasRefreshed ifAbsent: [false])<br>
                ifFalse: [self color: complexContents highlightingColor]<br>
                ifTrue: [self color: self color negated].<br>
<br>
        self changed.<br>
<br>
  !<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;isFirstItem (in category &#39;testing&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;isFirstItem (in category &#39;accessing&#39;) -----<br>
  isFirstItem<br>
        ^owner submorphs first == self!<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;isSoleItem (in category &#39;testing&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;isSoleItem (in category &#39;accessing&#39;) -----<br>
  isSoleItem<br>
        ^self isFirstItem and: [ owner submorphs size = 1 ]!<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;openPath: (in category &#39;container protocol - private&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;openPath: (in category &#39;private-container protocol&#39;) -----<br>
  openPath: anArray<br>
        | found |<br>
        anArray isEmpty<br>
                ifTrue: [^ container setSelectedMorph: nil].<br>
        found := nil.<br>
        self<br>
                withSiblingsDo: [:each | found<br>
                                ifNil: [(each complexContents asString = anArray first<br>
                                                        or: [anArray first isNil])<br>
                                                ifTrue: [found := each]]].<br>
        found<br>
                ifNil: [&quot;try again with no case sensitivity&quot;<br>
                        self<br>
                                withSiblingsDo: [:each | found<br>
                                                ifNil: [(each complexContents asString sameAs: anArray first)<br>
                                                                ifTrue: [found := each]]]].<br>
        found<br>
                ifNotNil: [found isExpanded<br>
                                ifFalse: [found toggleExpandedState.<br>
                                        container adjustSubmorphPositions].<br>
                        found changed.<br>
                        anArray size = 1<br>
                                ifTrue: [^ container setSelectedMorph: found].<br>
                        ^ found firstChild<br>
                                ifNil: [container setSelectedMorph: nil]<br>
                                ifNotNil: [found firstChild openPath: anArray allButFirst]].<br>
        ^ container setSelectedMorph: nil!<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;recursiveAddTo: (in category &#39;container protocol - private&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;recursiveAddTo: (in category &#39;private-container protocol&#39;) -----<br>
  recursiveAddTo: aCollection<br>
<br>
        firstChild ifNotNil: [<br>
                firstChild withSiblingsDo: [ :aNode | aNode recursiveAddTo: aCollection].<br>
        ].<br>
        aCollection add: self<br>
        !<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;recursiveDelete (in category &#39;container protocol - private&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;recursiveDelete (in category &#39;private-container protocol&#39;) -----<br>
  recursiveDelete<br>
<br>
        firstChild ifNotNil: [<br>
                firstChild withSiblingsDo: [ :aNode | aNode recursiveDelete].<br>
        ].<br>
        self delete<br>
        !<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph&gt;&gt;toggleExpandedState (in category &#39;container protocol&#39;) -----<br>
- ----- Method: IndentingListItemMorph&gt;&gt;toggleExpandedState (in category &#39;private-container protocol&#39;) -----<br>
  toggleExpandedState<br>
<br>
+       self isExpanded<br>
+               ifTrue: [self collapse]<br>
+               ifFalse: [self expand].!<br>
-       | newChildren toDelete c |<br>
-<br>
-       isExpanded := isExpanded not.<br>
-       toDelete := OrderedCollection new.<br>
-       firstChild ifNotNil: [<br>
-               firstChild withSiblingsDo: [ :aNode | aNode recursiveAddTo: toDelete].<br>
-       ].<br>
-       container noteRemovalOfAll: toDelete.<br>
-       (isExpanded and: [complexContents hasContents]) ifFalse: [<br>
-               ^self changed<br>
-       ].<br>
-       (c := self getChildren) isEmpty ifTrue: [^self changed].<br>
-       newChildren := container<br>
-               addSubmorphsAfter: self<br>
-               fromCollection: c<br>
-               allowSorting: true.<br>
-       firstChild := newChildren first.<br>
- !<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div>