[squeak-dev] The Inbox: Morphic-ct.1958.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Fri Apr 8 08:18:08 UTC 2022

Hi Christoph --

- Please name it "Select (new) change set..."
- Please use the method's array definition for this new entry
- Add a line after it

Am 01.04.2022 18:18:19 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:

Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Freitag, 1. April 2022 18:16:32
An: squeak-dev at lists.squeakfoundation.org
Betreff: [squeak-dev] The Inbox: Morphic-ct.1958.mcz
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1958.mcz [http://source.squeak.org/inbox/Morphic-ct.1958.mcz]

==================== Summary ====================

Name: Morphic-ct.1958
Author: ct
Time: 1 April 2022, 6:16:24.044058 pm
UUID: dbc1bb59-95b0-bf46-9cc5-d6c6a58bc1c4
Ancestors: Morphic-ul.1956

Proposal: Add "select change set..." item to the new changes menu in the docking bar.

=============== Diff against Morphic-ul.1956 ===============

Item was changed:
  ----- Method: TheWorldMainDockingBar>>listChangesOn: (in category 'submenu - changes') -----
  listChangesOn: menu
         | fetchChangesBlock |
+        menu addItem: [:item | item
+                contents: 'Select change set...' translated;
+                help: 'Switch to another change set or create a new one' translated;
+                target: self;
+                selector: #selectChangeSet;
+                arguments: #()].
                 'Browse current change set' translated. #browseChangeSet. nil.
                 'Browse changed methods' translated. #browseChangedMethods. nil.
                 nil. nil. nil.
                 'Simple Change Sorter' translated.      #browseChanges. ChangeSorter.
                 'Dual Change Sorter' translated. #browseChangesDual. DualChangeSorter.
                 nil. nil. nil.
         } groupsDo: [:label :selector :modelClass |
                 label ifNil: [menu addLine] ifNotNil: [
                         menu addItem: [:item |
                                         contents: label;
                                         icon: ((modelClass ifNotNil: [self colorIcon: modelClass basicNew windowColorToUse])
                                                 ifNil: [MenuIcons blankIcon]);
                                         target: self;
                                         selector: selector]] ].
         fetchChangesBlock := [ | latestMethodChanges latestClassChanges updateBlock |
                 self flag: #concurrency. "mt: Is this safe enough given the current update frequency of change sets and when this code is executed?"
                 latestMethodChanges := (Array streamContents: [:s |
                         ChangeSet current changedMethodsDo: [:method :changeType :dateAndTime :category |
                                 s nextPut: { dateAndTime. method. changeType. category }]])
                                 sorted: [:a :b | a first >= b first].
                 latestClassChanges := (Array streamContents: [:s |
                         ChangeSet current changedClassesDo: [:class :changeTypes :dateAndTime :category |
                                 "We are not interested in classes whose method's did only change."
                                 changeTypes ifNotEmpty: [s nextPut: { dateAndTime. class. changeTypes. category }]]])
                                 sorted: [:a :b | a first >= b first].
                 updateBlock := [self listMethodChanges: latestMethodChanges andClassChanges: latestClassChanges on: menu].
                 Project current uiProcess == Processor activeProcess
                         ifTrue: updateBlock
                         ifFalse: [Project current addDeferredUIMessage: [
                                 menu isInWorld ifTrue: [menu lastItem delete. updateBlock value]] ]].
         ChangeSet current numberOfChanges <= 30
                 ifTrue: fetchChangesBlock ifFalse: [
                         "We have too much data to process. Do it in the background to keep the UI responsive."
                         menu add: '... fetching changes ...' translated action: nil.
                         menu lastItem isEnabled: false.
                         fetchChangesBlock forkAt: Processor userBackgroundPriority].!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>selectChangeSet (in category 'submenu - changes') -----
+ selectChangeSet
+        | changeSets choice set |
+        changeSets := ChangeSet allChangeSetNames reverse.
+        choice := Project uiManager chooseFromOrAddTo: changeSets lines: #() title: 'Select or add change set...' translated.
+        choice ifNil: [^ self].
+        set := ChangeSet assuredChangeSetNamed: choice.
+        set ifNotNil: [ChangeSet newChanges: set].!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220408/9af2920d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 65530 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220408/9af2920d/attachment-0001.png>

More information about the Squeak-dev mailing list