[Pkg] SystemEditor: SystemEditor-mtf.138.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Wed Oct 22 05:10:38 UTC 2008


A new version of SystemEditor was added to project SystemEditor:
http://www.squeaksource.com/SystemEditor/SystemEditor-mtf.138.mcz

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

Name: SystemEditor-mtf.138
Author: mtf
Time: 16 October 2008, 12:00 am
UUID: 7bf134e4-9963-4f57-87e7-52e1f0397d37
Ancestors: SystemEditor-mtf.137

Moved some building methods up in the class heiarchy
Added some property access methods.
changed decorators to be an on-demand thing

=============== Diff against SystemEditor-mtf.137 ===============

Item was added:
+ ----- Method: ClassDescriptionEditor>>edIsBehavior (in category 'testing') -----
+ edIsBehavior
+ "Answers true if I am an editor for a Behavior"
+ 	^ true!

Item was changed:
  ----- 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 subclassResponsibility!
- 	^ self!

Item was changed:
  ----- Method: ClassEditor>>setSubject:system: (in category 'initialize-release') -----
  setSubject: aClass system: aSystemEditor 
  	subject := aClass.
  	system := aSystemEditor. 
  	subject ifNil: 
  			[superEditor := aSystemEditor at: #Object.
  			name := #Annonymous.
  			type := #normal.
  			instVarNames := Array new.
  			classVarNames := Array new.
  			sharedPools := Array new.
  			methods := MethodDictionaryEditor for: self.
+ 			self class edInitializeForNewClass]!
- 			self class edInitializeForNewClass].
- 		decorators := ClassDecorator decoratorsFor: self.!

Item was changed:
  ----- Method: ClassEditor>>edPrepareMigration: (in category 'building') -----
  edPrepareMigration: txn
  	self subject ifNil: [^ self].
  	self edRequiresBuild 
  		ifTrue: [self edPrepareInstanceMigration: txn]
+ 		ifFalse: [super edPrepareMigration: txn]!
- 		ifFalse: [methods edPrepareMigration: txn for: self.
- 				organization edPrepareMigration: txn.
- 				self decoratorsDo: [:ea | ea edPrepareMigration: txn]]!

Item was changed:
  ----- Method: MetaclassEditor>>product (in category 'building') -----
  product
+ 	^ product ifNil: [product := editor product class]!
- 	^ editor product class!

Item was added:
+ ----- Method: AbstractEditor>>edRequiresBuild (in category 'building') -----
+ edRequiresBuild
+ "Answer true if this editor needs building; false otherwise"
+ 	^ true!

Item was added:
+ ----- Method: PureBehaviorEditor>>decorateWith: (in category 'accessing decorators') -----
+ decorateWith: aClass
+ 	decorators ifNil: [decorators := IdentityDictionary new].
+ 	^ decorators at: aClass ifAbsentPut: [aClass for: self]!

Item was changed:
  ----- Method: ClassEditor>>edRequiresBuild (in category 'building') -----
  edRequiresBuild
  	self edRequiresRecompile ifTrue: [^ true].
  	self edSuperclassHasChanged ifTrue: [^ true].
  	self edNameHasChanged ifTrue: [^ true].
+ 	self class edRequiresBuild ifTrue: [^ true].
- 	(self edRequiresBuildFor: self class) ifTrue: [^ true].
  	self decoratorsDo: [:ea | ea edRequiresBuild ifTrue: [^ true]].
  	^ false!

Item was changed:
  ----- Method: SystemEditor>>edSubclassesOrEditorsOf: (in category 'building') -----
  edSubclassesOrEditorsOf: anEditor
  "Answer all subclasses of the given ClassEditor, as either an editor (if it has changed), or as a class (if it has not changed). Does not add any items to my additions list"
  
  	| subclasses subeditors |
  	subclasses := anEditor subject
  		ifNil: [Set new]
  		ifNotNilDo: [ :class | class subclasses asSet].
  	subeditors := additions select: [ :ea |
  		subclasses remove: ea subject ifAbsent: [].
+ 		ea edIsBehavior and: [ea superclassOrEditor == anEditor]].
- 		ea superclassOrEditor == anEditor].
  	removals do: [ :removedKey | subclasses remove: (subject at: removedKey) ifAbsent: []].
  	^ subclasses asArray, subeditors asArray!

Item was added:
+ ----- Method: ClassDescriptionEditor>>edIsValid (in category '*SystemEditor-Tests') -----
+ edIsValid
+ 	[self validate]
+ 		on: InvalidSystemChange
+ 		do: [:ex | ^ false].
+ 	^ true!

Item was added:
+ ----- Method: PureBehaviorEditor>>propertyAt:ifPresentDo: (in category 'accessing properties') -----
+ propertyAt: key ifPresentDo: aBlock
+ 
+ 	| value |
+ 	value := self propertyAt: key ifAbsent: [^ nil].
+ 	^ aBlock value: value!

Item was added:
+ ----- Method: ClassDescriptionEditor>>edRequiresRecompile (in category 'building') -----
+ edRequiresRecompile
+ 	instVarNames ifNotNil: [^ true].
+ 	self decoratorsDo: [:ea | ea edRequiresRecompile ifTrue: [^ true]].
+ 	^ self edSuperclassRequiresRecompile!

Item was added:
+ ----- Method: PureBehaviorEditor>>edPrepareMigration: (in category 'building') -----
+ edPrepareMigration: txn
+ 	self subject ifNil: [^ self].
+ 	methods edPrepareMigration: txn for: self.
+ 	organization edPrepareMigration: txn.
+ 	self decoratorsDo: [:ea | ea edPrepareMigration: txn]!

Item was changed:
+ ----- Method: PureBehaviorEditor>>decoratorsDo: (in category 'accessing decorators') -----
- ----- Method: PureBehaviorEditor>>decoratorsDo: (in category 'accessing') -----
  decoratorsDo: aBlock
  	decorators ifNotNil: [decorators do: aBlock]!

Item was added:
+ ----- Method: PureBehaviorEditor>>product (in category 'building') -----
+ product
+ 	^ product ifNil: [product := self edRequiresBuild ifTrue: [self edBuild] ifFalse: [subject]]!

Item was added:
+ ----- Method: PureBehaviorEditor>>edRequiresBuild (in category 'building') -----
+ edRequiresBuild
+ "Answer true if this editor needs building; false otherwise"
+ 	^ self subject isNil!

Item was changed:
  ----- Method: ClassEditor>>edRequiresRecompile (in category 'building') -----
  edRequiresRecompile
- 	instVarNames ifNotNil: [^ true].
  	classVarNames ifNotNil: [^ true].
  	sharedPools ifNotNil: [^ true].
+ 	^ super edRequiresRecompile!
- 	self decoratorsDo: [:ea | ea edRequiresRecompile ifTrue: [^ true]].
- 	^ self edSuperclassRequiresRecompile!

Item was added:
+ ----- Method: PureBehaviorEditor>>propertyAt:ifPresent: (in category 'accessing properties') -----
+ propertyAt: key ifPresent: aBlock
+ 
+ 	self propertyAt: key ifAbsent: [^ nil].
+ 	^ aBlock value!

Item was changed:
  ----- Method: ClassEditor>>edBuild (in category 'building') -----
  edBuild
  	| meta |
  	meta := self class edBuild.
  	product := subject ifNil: [meta new]
  				ifNotNil: [meta adoptInstance: subject from: subject class].
  	product
  		superclass: self edSuperclass;
  		setFormat: self format;
  		setName: self name;
  		setInstVarNames: self instVarNames;
  		classPoolFrom: self;
  		instVarNamed: #sharedPools put: self sharedPools;
  		organization: self organization edBuild.
  	"Create a temporary MethodDictionary to catch code written by SyntaxError dialogs. MethodDictionaryEditor will overwrite this. See MethodEditor>>compileFor:"
  	product methodDictionary: MethodDictionary new.
+ 	self decoratorsDo: [:ea | ea edBuild].
- 	self decoratorsDo: [:ea | ea buildFor: self].
  
  	"Class methods should be compiled before instance methods,
  	since #compilerClass may be among the class methods.
  	Class methods should be compiled after installing class and pool variables"
  	product class methodDictionary: (self class methods buildFor: self class).
  	product methodDictionary: (self methods buildFor: self).
  	^product!

Item was added:
+ ----- Method: ClassDescriptionEditor>>methodDictionary (in category '*SystemEditor-Tests') -----
+ methodDictionary
+ 	| methodEditor |
+ 	(methods isNil and: [self edRequiresRecompile not]) ifTrue: [^ self subject methodDictionary].
+ 	methodEditor := methods ifNil: [MethodDictionaryEditor for: self].
+ 	^ methodEditor buildFor: self!

Item was added:
+ ----- Method: PureBehaviorEditor>>edIsBehavior (in category 'testing') -----
+ edIsBehavior
+ "Answers true if I am an editor for a Behavior"
+ 	^ false!

Item was removed:
- ----- Method: ClassEditor>>edIsValid (in category '*SystemEditor-Tests') -----
- edIsValid
- 	[self validate]
- 		on: InvalidSystemChange
- 		do: [:ex | ^ false].
- 	^ true!

Item was removed:
- ----- Method: ClassEditor>>edRequiresBuildFor: (in category 'building') -----
- edRequiresBuildFor: anObject
- 	^ anObject
- 		ifNil: [false]
- 		ifNotNil: [anObject edRequiresBuild]!

Item was removed:
- ----- Method: ClassEditor>>product (in category 'building') -----
- product
- 	^ product ifNil: [product := self edRequiresBuild ifTrue: [self edBuild] ifFalse: [subject]]!

Item was removed:
- ----- Method: ClassDescriptionEditor>>isMethodsChanged (in category 'testing') -----
- isMethodsChanged
- 	methods ifNil: [^ false].
- 	^ methods isChanged!

Item was removed:
- ----- Method: UndefinedObject>>edPrepareMigration: (in category '*systemeditor-building') -----
- edPrepareMigration: aMigrationTransaction!

Item was removed:
- ----- Method: PureBehaviorEditor>>methodDictionary (in category 'building') -----
- methodDictionary
- 	| methodEditor |
- 	(methods isNil and: [self edRequiresRecompile not]) ifTrue: [^ self subject methodDictionary].
- 	methodEditor := methods ifNil: [MethodDictionaryEditor for: self].
- 	^ methodEditor buildFor: self!

Item was removed:
- ----- Method: UndefinedObject>>edPrepareMigration:for: (in category '*systemeditor-building') -----
- edPrepareMigration: aMigrationTransaction for: anEditor!

Item was removed:
- ----- Method: MetaclassEditor>>edRequiresRecompile (in category 'building') -----
- edRequiresRecompile
- 	^ instVarNames ~~ nil!



More information about the Packages mailing list