<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        > <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Allow simple change sorters to become become dual sorters</span><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">What do you mean by that? Are you referring to the "inspect/explore" buttons in the Inspector and Object Explorer?</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 16.03.2020 21:03:29 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">Christoph Thiede uploaded a new version of Tools to project The Inbox:<br>http://source.squeak.org/inbox/Tools-ct.959.mcz<br><br>==================== Summary ====================<br><br>Name: Tools-ct.959<br>Author: ct<br>Time: 16 March 2020, 9:03:12.729937 pm<br>UUID: cae0b2d6-e131-7a40-b6a9-62a90172de94<br>Ancestors: Tools-mt.955<br><br>Proposal: Allow simple change sorters to become become dual sorters, and dual change sorters to be split into two separate change sorters. This commit also refactors DualChangeSorter in general.<br><br>=============== Diff against Tools-mt.955 ===============<br><br>Item was added:<br>+ ----- Method: ChangeSorter>>addModelItemsToWindowMenu: (in category 'as yet unclassified') -----<br>+ addModelItemsToWindowMenu: aMenu<br>+        "Add model-related item to the window menu"<br>+ <br>+    super addModelItemsToWindowMenu: aMenu. <br>+     aMenu addLine.<br>+       aMenu add: 'Become dual sorter' translated target: self action: #becomeDualSorter.!<br><br>Item was added:<br>+ ----- Method: ChangeSorter>>becomeDualSorter (in category 'as yet unclassified') -----<br>+ becomeDualSorter<br>+   "Switch the contents of the receiver's view to represent a DualChangeSorter. Kind of mitosis: We're doing the anaphase right now."<br>+ <br>+     | dualSorter |<br>+       dualSorter := DualChangeSorter withLeft: self right: nil.<br>+    dualSorter initializeSides.<br>+  self changed: #close.<br>+        ToolBuilder open: dualSorter.!<br><br>Item was added:<br>+ ----- Method: DualChangeSorter class>>new (in category 'instance creation') -----<br>+ new<br>+ <br>+      ^ super new<br>+          initializeSides;<br>+             yourself!<br><br>Item was added:<br>+ ----- Method: DualChangeSorter class>>withLeft:right: (in category 'instance creation') -----<br>+ withLeft: leftChangeSorter right: rightChangeSorter<br>+ <br>+       ^ self basicNew<br>+              leftChangeSorter: leftChangeSorter;<br>+          rightChangeSorter: rightChangeSorter;<br>+                yourself!<br><br>Item was added:<br>+ ----- Method: DualChangeSorter>>addModelItemsToWindowMenu: (in category 'user interface') -----<br>+ addModelItemsToWindowMenu: aMenu<br>+    "Add model-related item to the window menu"<br>+ <br>+    super addModelItemsToWindowMenu: aMenu. <br>+     aMenu addLine.<br>+       aMenu add: 'Split sides' translated target: self action: #splitSides.!<br><br>Item was changed:<br>  ----- Method: DualChangeSorter>>buildWith: (in category 'toolbuilder') -----<br>  buildWith: builder<br>-      | windowSpec window |<br>-        leftCngSorter := ChangeSorter new myChangeSet: ChangeSet current.<br>-    leftCngSorter parent: self.<br>-  rightCngSorter := ChangeSorter new myChangeSet: <br>-                     ChangeSet secondaryChangeSet.<br>-        rightCngSorter parent: self.<br>  <br>+     | windowSpec window |<br>         windowSpec := builder pluggableWindowSpec new.<br>        windowSpec model: self.<br>       windowSpec label: 'Change Sorter'.<br>    windowSpec children: OrderedCollection new.<br>   windowSpec label: #labelString.<br>       leftCngSorter buildWith: builder in: windowSpec rect: (0@0 extent: 0.5@1).<br>    rightCngSorter buildWith: builder in: windowSpec rect: (0.5@0 extent: 0.5@1).<br>         window := builder build: windowSpec.<br>          leftCngSorter addDependent: window.             "so it will get changed: #relabel"<br>          rightCngSorter addDependent: window.    "so it will get changed: #relabel"<br>          ^window!<br><br>Item was added:<br>+ ----- Method: DualChangeSorter>>initializeSides (in category 'initialization') -----<br>+ initializeSides<br>+ <br>+     leftCngSorter ifNil: [<br>+               leftCngSorter := ChangeSorter new myChangeSet: ChangeSet current].<br>+   leftCngSorter parent: self.<br>+  rightCngSorter ifNil: [<br>+              rightCngSorter := ChangeSorter new myChangeSet: ChangeSet secondaryChangeSet].<br>+       rightCngSorter parent: self.!<br><br>Item was changed:<br>+ ----- Method: DualChangeSorter>>isLeftSide: (in category 'accessing') -----<br>- ----- Method: DualChangeSorter>>isLeftSide: (in category 'other') -----<br>  isLeftSide: theOne<br>        "Which side am I?"<br>          ^ theOne == leftCngSorter!<br><br>Item was changed:<br>+ ----- Method: DualChangeSorter>>labelString (in category 'toolbuilder') -----<br>- ----- Method: DualChangeSorter>>labelString (in category 'other') -----<br>  labelString<br>        "The window label"<br>          ^'Changes go to "', ChangeSet current name,  '"'.!<br><br>Item was added:<br>+ ----- Method: DualChangeSorter>>leftChangeSorter: (in category 'initialization') -----<br>+ leftChangeSorter: aChangeSorter<br>+ <br>+       leftCngSorter := aChangeSorter!<br><br>Item was changed:<br>+ ----- Method: DualChangeSorter>>modelWakeUp (in category 'updating') -----<br>- ----- Method: DualChangeSorter>>modelWakeUp (in category 'other') -----<br>  modelWakeUp<br>      "A window with me as model is being entered.  Make sure I am up-to-date with the changeSets."<br>  <br>   "Dumb way"<br>          leftCngSorter canDiscardEdits <br>                ifTrue: [leftCngSorter update]  "does both"<br>                 ifFalse: [rightCngSorter update].<br>  !<br><br>Item was changed:<br>+ ----- Method: DualChangeSorter>>okToChange (in category 'updating') -----<br>- ----- Method: DualChangeSorter>>okToChange (in category 'initialization') -----<br>  okToChange<br>         ^ leftCngSorter okToChange & rightCngSorter okToChange!<br><br>Item was changed:<br>+ ----- Method: DualChangeSorter>>other: (in category 'accessing') -----<br>- ----- Method: DualChangeSorter>>other: (in category 'other') -----<br>  other: theOne<br>         "Return the other side's ChangeSorter"<br>      ^ theOne == leftCngSorter<br>             ifTrue: [rightCngSorter]<br>              ifFalse: [leftCngSorter]!<br><br>Item was added:<br>+ ----- Method: DualChangeSorter>>rightChangeSorter: (in category 'initialization') -----<br>+ rightChangeSorter: aChangeSorter<br>+ <br>+        rightCngSorter := aChangeSorter!<br><br>Item was added:<br>+ ----- Method: DualChangeSorter>>splitSides (in category 'menu commands') -----<br>+ splitSides<br>+    "Split the receiver into two independent views. Kind of mitosis: We're doing cytokinesis right now."<br>+ <br>+   {leftCngSorter. rightCngSorter} do: [:sorter |<br>+               ToolBuilder open: sorter].<br>+   self changed: #close.!<br><br><br></div></blockquote>
                                        </div></body>