The Trunk: Tools-topa.799.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-topa.799.mcz

commits-2
Tobias Pape uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-topa.799.mcz

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

Name: Tools-topa.799
Author: topa
Time: 7 March 2018, 10:49:48.272623 pm
UUID: e81a8f85-40fe-4345-8ce5-24bbe57f6fef
Ancestors: Tools-tpr.798

Slight improvement to tim's improvement

=============== Diff against Tools-tpr.798 ===============

Item was changed:
  ----- Method: ChangeSorter>>fileIntoNewChangeSet (in category 'changeSet menu') -----
  fileIntoNewChangeSet
  "Obtain a file designation from the user, and file its contents into a  
  new change set whose name is a function of the filename. Show the  
  new set and leave the current changeSet unaltered."
- | aNewChangeSet stream fileName |
  self okToChange
  ifFalse: [^ self].
  ChangeSet promptForDefaultChangeSetDirectoryIfNecessary.
- fileName := (FileChooserDialog openOn: ChangeSet defaultChangeSetDirectory) ifNil: [^nil].
- stream := FileStream oldFileNamed: fileName.
- stream ifNil: [^ self].
 
+ (FileChooserDialog openOn: ChangeSet defaultChangeSetDirectory) ifNotNil:
+ [:fileName |
+ FileStream oldFileNamed: fileName do:
+ [:stream | | localName |
+ localName := FileDirectory localNameFor: fileName.
+ (self class newChangesFromStream: stream named: localName)
+ ifNotNil: [:aNewChangeSet | self showChangeSet: aNewChangeSet]]].!
- aNewChangeSet := self class
- newChangesFromStream: stream
- named: (FileDirectory localNameFor:fileName).
- aNewChangeSet
- ifNotNil: [self showChangeSet: aNewChangeSet]!

Item was changed:
  ----- Method: FileList class>>openFileDirectly (in category 'instance creation') -----
  openFileDirectly
 
+ (FileChooserDialog openOn: FileDirectory default) ifNotNil:
+ [:fileName | self openEditorOn: (FileStream readOnlyFileNamed: fileName) editString: nil]!
- | fileName |
- (fileName :=FileChooserDialog openOn: FileDirectory default) ifNotNil:
- [self openEditorOn: (FileStream readOnlyFileNamed: fileName) editString: nil]!