<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"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></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>>addChildrenForList:addingTo:withExpandedItems: (in category 'container protocol - private') -----<br>
- ----- Method: IndentingListItemMorph>>addChildrenForList:addingTo:withExpandedItems: (in category 'private-container protocol') -----<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>>canExpand (in category 'testing') -----<br>
- ----- Method: IndentingListItemMorph>>canExpand (in category 'accessing') -----<br>
canExpand<br>
<br>
^complexContents hasContents!<br>
<br>
Item was added:<br>
+ ----- Method: IndentingListItemMorph>>collapse (in category 'container protocol') -----<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>>complexContents (in category 'accessing') -----<br>
- ----- Method: IndentingListItemMorph>>complexContents (in category 'private-container protocol') -----<br>
complexContents<br>
<br>
^complexContents!<br>
<br>
Item was added:<br>
+ ----- Method: IndentingListItemMorph>>expand (in category 'container protocol') -----<br>
+ expand<br>
+<br>
+ | newChildren c |<br>
+<br>
+ (self isExpanded or: [self canExpand not])<br>
+ ifTrue: [^ self].<br>
+<br>
+ (c := self getChildren) ifEmpty: [<br>
+ "Due to the guessing in #canExpand, it may still fail here."<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>>hasIcon (in category 'testing') -----<br>
- ----- Method: IndentingListItemMorph>>hasIcon (in category 'accessing') -----<br>
hasIcon<br>
"Answer whether the receiver has an icon."<br>
^ icon notNil!<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph>>highlight (in category 'container protocol - private') -----<br>
- ----- Method: IndentingListItemMorph>>highlight (in category 'private-container protocol') -----<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>>isFirstItem (in category 'testing') -----<br>
- ----- Method: IndentingListItemMorph>>isFirstItem (in category 'accessing') -----<br>
isFirstItem<br>
^owner submorphs first == self!<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph>>isSoleItem (in category 'testing') -----<br>
- ----- Method: IndentingListItemMorph>>isSoleItem (in category 'accessing') -----<br>
isSoleItem<br>
^self isFirstItem and: [ owner submorphs size = 1 ]!<br>
<br>
Item was changed:<br>
+ ----- Method: IndentingListItemMorph>>openPath: (in category 'container protocol - private') -----<br>
- ----- Method: IndentingListItemMorph>>openPath: (in category 'private-container protocol') -----<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: ["try again with no case sensitivity"<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>>recursiveAddTo: (in category 'container protocol - private') -----<br>
- ----- Method: IndentingListItemMorph>>recursiveAddTo: (in category 'private-container protocol') -----<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>>recursiveDelete (in category 'container protocol - private') -----<br>
- ----- Method: IndentingListItemMorph>>recursiveDelete (in category 'private-container protocol') -----<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>>toggleExpandedState (in category 'container protocol') -----<br>
- ----- Method: IndentingListItemMorph>>toggleExpandedState (in category 'private-container protocol') -----<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>