A new version of SystemEditor was added to project SystemEditor: http://www.squeaksource.com/SystemEditor/SystemEditor-mtf.106.mcz
==================== Summary ====================
Name: SystemEditor-mtf.106 Author: mtf Time: 11 July 2008, 1:04:45 pm UUID: a50dbaff-7f4e-4770-a72d-9ecb2c462d7d Ancestors: SystemEditor-mtf.105
some more refactoring to move stuff into AbstractEditor. Editor creation is now in there mostly
=============== Diff against SystemEditor-mtf.105 ===============
Item was changed: + ----- Method: ClassEditor class>>forNewClassNamed: (in category '*SystemEditor-Tests') ----- - ----- Method: ClassEditor class>>forNewClassNamed: (in category 'instance creation') ----- forNewClassNamed: aSymbol ^ self named: aSymbol for: SystemEditor new!
Item was added: + ----- Method: AbstractEditor>>edPrepareMigration: (in category 'building') ----- + edPrepareMigration: txn + "Adds migrators to the given MigrationTransaction, as necessary to support converting my subject to my product" + ^ self!
Item was added: + ----- Method: AbstractEditor>>edRegisterEditor (in category 'initialize-release') ----- + edRegisterEditor + "Register myself with my container, which is presumed to be a DictionaryEditor" + self environment edRegisterEditor: self!
Item was changed: ----- Method: AbstractEditor class>>on:ifNotHandled: (in category 'as yet unclassified') ----- + on: subject ifNotHandled: aBlock + ^ self on: subject for: nil ifNotHandled: aBlock! - on: anObject ifNotHandled: aBlock - ^ self on: anObject for: nil ifNotHandled: aBlock!
Item was changed: ----- Method: SystemEditor>>edRegisterEditor: (in category 'building') ----- + edRegisterEditor: anEditor + editors at: anEditor name put: anEditor! - edRegisterEditor: aClassEditor - editors at: aClassEditor name put: aClassEditor!
Item was changed: ----- Method: AbstractEditor class>>on:for:ifNotHandled: (in category 'as yet unclassified') ----- + on: subject for: collectionEditor ifNotHandled: aBlock - on: anObject for: collectionEditor ifNotHandled: aBlock "Try to find the most specialized subclass willing to edit, for extensibility" | editor | self subclassesDo: [:class | + editor := class on: subject for: collectionEditor ifNotHandled: [nil]. - editor := class on: anObject for: collectionEditor ifNotHandled: [nil]. editor ifNotNil: [^ editor]]. + (subject isNil "nil subject is always permitted; it means new object" + or: [self canEdit: subject for: collectionEditor]) + ifTrue: [^ self new on: subject for: collectionEditor]. - (self canEdit: anObject for: collectionEditor) ifTrue: [^ self new on: anObject for: collectionEditor]. ^ aBlock value!
Item was added: + ----- Method: AbstractEditor class>>named:for: (in category 'as yet unclassified') ----- + named: aName for: aDictionaryEditor + "Answers a new or existing instance with the given name, and installs it, if necessary" + ^ aDictionaryEditor at: aName ifAbsent: [ + (self on: nil for: aDictionaryEditor) + setName: aName; + edRegisterEditor; + yourself]!
Item was changed: ----- Method: AbstractEditor class>>on:for: (in category 'as yet unclassified') ----- + on: subject for: collectionEditor + ^ self on: subject for: collectionEditor ifNotHandled: [self error: + self class name, ' does not know how to edit ', subject printString]! - on: anObject for: collectionEditor - ^ self on: anObject for: collectionEditor ifNotHandled: [self error: - self class name, ' does not know how to edit ', anObject printString]!
Item was removed: - ----- Method: ClassEditor>>edRegisterEditor (in category 'initialize-release') ----- - edRegisterEditor - - system edRegisterEditor: self!
Item was removed: - ----- Method: ClassEditor class>>named:for: (in category 'instance creation') ----- - named: aSymbol for: aSystemEditor - | subject inst | - subject := aSystemEditor edClassAt: aSymbol ifAbsent: [nil]. - inst := self on: subject for: aSystemEditor. - subject ifNil: [inst setName: aSymbol]. - inst edRegisterEditor. - ^ inst!
packages@lists.squeakfoundation.org