The Trunk: Tools-eem.1005.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-eem.1005.mcz

commits-2
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.1005.mcz

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

Name: Tools-eem.1005
Author: eem
Time: 19 October 2020, 9:36:40.011366 pm
UUID: d9422010-74b2-478d-9313-84e1ecc5c5ec
Ancestors: Tools-eem.1004

Have the Workspace thang deal with both ,text and .txt

=============== Diff against Tools-eem.1004 ===============

Item was changed:
  ----- Method: FileList>>viewContentsInWorkspace (in category 'own services') -----
  viewContentsInWorkspace
  "View the contents of my selected file in a new workspace"
 
  | aFileStream aName lineConversion w |
  aFileStream := (directory readOnlyFileNamed: self fullName) setConverterForCode.
  aFileStream wantsLineEndConversion: true.
  lineConversion := aFileStream detectLineEndConvention.
  aName := aFileStream localName.
+ w := UIManager default
- w:= UIManager default
  edit: ([aFileStream contentsOfEntireFile] ensure: [aFileStream close])
  label: ((aName includesSubstring: 'Workspace')
+ ifTrue: [#('.text' '.txt') inject: aName into: [:name :ext| (name endsWith: ext) ifTrue: [name allButLast: ext size] ifFalse: [name]]]
- ifTrue: [(aName endsWith: '.text') ifTrue: [aName allButLast: 5] ifFalse: [aName]]
  ifFalse: ['Workspace from ', aName]).
  w setProperty: #lineConversion toValue: lineConversion.
  directory ~= FileDirectory default ifTrue: [w setProperty: #myDir toValue: directory]!