[squeak-dev] The Inbox: Morphic-ct.1958.mcz
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Apr 1 16:18:09 UTC 2022
[cid:2306d1cc-3d1c-436d-851c-b61d702452bf]
________________________________
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
==================== 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 |
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/20220401/c50cf5c0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 65530 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220401/c50cf5c0/attachment-0001.png>
More information about the Squeak-dev
mailing list
|