The Trunk: 60Deprecated-pre.45.mcz

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

The Trunk: 60Deprecated-pre.45.mcz

commits-2
Patrick Rein uploaded a new version of 60Deprecated to project The Trunk:
http://source.squeak.org/trunk/60Deprecated-pre.45.mcz

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

Name: 60Deprecated-pre.45
Author: pre
Time: 3 September 2019, 4:54:15.647361 pm
UUID: df9fca0c-6e72-8d4a-9e2b-a1bd0a236cb8
Ancestors: 60Deprecated-mt.44

Deprecates file reader registration methods on FileList

=============== Diff against 60Deprecated-mt.44 ===============

Item was added:
+ ----- Method: FileList class>>allRegisteredServices (in category '*60Deprecated-Tools-file reader registration') -----
+ allRegisteredServices
+
+ | col |
+ self deprecated: 'FileList is not responsible for file reader registration anymore. Use FileServices instead.'.
+ col := OrderedCollection new.
+ self registeredFileReaderClasses do: [:each | col addAll: (each services)].
+ ^ col!

Item was added:
+ ----- Method: FileList class>>detectService:ifNone: (in category '*60Deprecated-Tools-file reader registration') -----
+ detectService: aBlock ifNone: anotherBlock
+ "self detectService: [:each | each selector = #fileIn:] ifNone: [nil]"
+
+ self deprecated: 'FileList is not responsible for file reader registration anymore. Use FileServices instead.'.
+ ^ self allRegisteredServices
+ detect: aBlock
+ ifNone: anotherBlock!

Item was added:
+ ----- Method: FileList class>>isReaderNamedRegistered: (in category '*60Deprecated-Tools-file reader registration') -----
+ isReaderNamedRegistered: aSymbol
+ "return if a given reader class has been registered. Note that this is on purpose that the argument is
+ a symbol and not a class"
+
+ self deprecated: 'FileList is not responsible for file reader registration anymore. Use FileServices instead.'.
+ ^ (self registeredFileReaderClasses collect: [:each | each name]) includes: aSymbol
+ !

Item was added:
+ ----- Method: FileList class>>itemsForDirectory: (in category '*60Deprecated-Tools-file reader registration') -----
+ itemsForDirectory: aFileDirectory
+ "Answer a list of services appropriate when no file is selected."
+
+ | services |
+ self deprecated: 'FileList is not responsible for file reader registration anymore. Use FileServices instead.'.
+ services := OrderedCollection new.
+ self registeredFileReaderClasses do: [:reader |
+ reader ifNotNil: [services addAll: (reader fileReaderServicesForDirectory: aFileDirectory) ]].
+ ^ services!

Item was added:
+ ----- Method: FileList class>>itemsForFile: (in category '*60Deprecated-Tools-file reader registration') -----
+ itemsForFile: fullName
+ "Answer a list of services appropriate for a file of the given full name"
+
+ | services suffix |
+ self deprecated: 'FileList is not responsible for file reader registration anymore. Use FileServices instead.'.
+ suffix := self suffixOf: fullName.
+ services := OrderedCollection new.
+ self registeredFileReaderClasses do: [:reader |
+ reader ifNotNil: [services addAll: (reader fileReaderServicesForFile: fullName suffix: suffix)]].
+ ^ services!

Item was added:
+ ----- Method: FileList class>>registerFileReader: (in category '*60Deprecated-Tools-file reader registration') -----
+ registerFileReader: aProviderClass
+ "register the given class as providing services for reading files"
+
+ | registeredReaders |
+ self deprecated: 'FileList is not responsible for file reader registration anymore. Use FileServices instead.'.
+ registeredReaders := self registeredFileReaderClasses.
+ (registeredReaders includes: aProviderClass)
+ ifFalse: [ registeredReaders addLast: aProviderClass ]!

Item was added:
+ ----- Method: FileList class>>registeredFileReaderClasses (in category '*60Deprecated-Tools-file reader registration') -----
+ registeredFileReaderClasses
+
+ self deprecated: 'FileList is not responsible for file reader registration anymore. Use FileServices instead.'.
+ FileReaderRegistry := nil. "wipe it out"
+ ^FileServices registeredFileReaderClasses
+ !

Item was added:
+ ----- Method: FileList class>>suffixOf: (in category '*60Deprecated-Tools-file reader registration') -----
+ suffixOf: aName
+ "Answer the file extension of the given file"
+
+ self deprecated: 'FileList is not responsible for file reader registration anymore. Use FileServices instead.'.
+ ^ aName
+ ifNil:
+ ['']
+ ifNotNil:
+ [(FileDirectory extensionFor: aName) asLowercase]!

Item was added:
+ ----- Method: FileList class>>unregisterFileReader: (in category '*60Deprecated-Tools-file reader registration') -----
+ unregisterFileReader: aProviderClass
+ "unregister the given class as providing services for reading files"
+
+ self deprecated: 'FileList is not responsible for file reader registration anymore. Use FileServices instead.'.
+ self registeredFileReaderClasses remove: aProviderClass ifAbsent: [nil]!