<div dir="ltr">This might be introducing some duplicate code, because fileOut a single selection from the Versions browser was already available via hotkey (Command+o)...</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Jul 17, 2014 at 3:09 PM, <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">
Eliot Miranda uploaded a new version of Tools to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Tools-eem.524.mcz" target="_blank">http://source.squeak.org/trunk/Tools-eem.524.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-eem.524<br>
Author: eem<br>
Time: 17 July 2014, 1:09:47.094 pm<br>
UUID: 043177a8-a8de-4183-a284-6fd22ff5e70b<br>
Ancestors: Tools-eem.523<br>
<br>
Add a menu pick to file out a specific version from the<br>
method versions browser.<br>
<br>
=============== Diff against Tools-eem.523 ===============<br>
<br>
Item was added:<br>
+ ----- Method: VersionsBrowser>>fileOutSelection (in category 'menu') -----<br>
+ fileOutSelection<br>
+ | them it file |<br>
+ them := OrderedCollection new.<br>
+ listSelections with: changeList do:<br>
+ [:selected :item | selected ifTrue: [them add: item]].<br>
+ them size ~= 1<br>
+ ifTrue: [self inform: 'single version not selected, so nothing done']<br>
+ ifFalse:<br>
+ [it := them first.<br>
+ file := FileStream newFileNamed: it methodClassName, (it isMetaClassChange ifTrue: [' class'] ifFalse: ['']), '-' , (it methodSelector copyReplaceAll: ':' with: '').<br>
+ [file header; timeStamp.<br>
+ it fileOutOn: file] ensure: [file close]]!<br>
<br>
Item was changed:<br>
----- Method: VersionsBrowser>>versionsMenu: (in category 'menu') -----<br>
versionsMenu: aMenu<br>
"Fill aMenu with menu items appropriate to the receiver"<br>
<br>
aMenu title: 'Versions' translated.<br>
aMenu addStayUpItemSpecial.<br>
<br>
listIndex > 0 ifTrue:[<br>
(list size > 1 ) ifTrue: [ aMenu addTranslatedList: #(<br>
('compare to current' compareToCurrentVersion 'compare selected version to the current version')<br>
('compare to version...' compareToOtherVersion 'compare selected version to another selected version'))].<br>
"Note: Revert to selected should be visible for lists of length one for having the ability to revert to an accidentally deleted method"<br>
aMenu addTranslatedList: #(<br>
+ ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version')<br>
+ ('fileOut selected version' fileOutSelection 'file out the selected version') )].<br>
- ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version') )].<br>
<br>
aMenu addTranslatedList: #(<br>
('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present')<br>
('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method')<br>
('find original change set' findOriginalChangeSet 'locate the changeset which originally contained this version')<br>
-<br>
('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here')<br>
('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality')<br>
-<br>
('senders (n)' browseSenders 'browse all senders of this selector')<br>
('implementors (m)' browseImplementors 'browse all implementors of this selector')<br>
-<br>
('help...' offerVersionsHelp 'provide an explanation of the use of this tool')).<br>
<br>
^aMenu!<br>
<br>
<br>
</blockquote></div><br></div>