[Pkg] SystemEditor: SystemEditor-Traits-mtf.16.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Wed Nov 19 21:24:47 UTC 2008


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

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

Name: SystemEditor-Traits-mtf.16
Author: mtf
Time: 19 November 2008, 2:24:39 pm
UUID: 6f002f93-ad75-4909-b265-9876a0980938
Ancestors: SystemEditor-Traits-mtf.15

- For simplicity, treat TraitTransformations like an editor
- Fixed the bug where traits updated SystemOrganization prior to commit time (in TraitEditor >> edBuild)
- Fixed a typo in UserListDecorator
- Fixed a typo in TraitCompositionEditor >> edDependentsDo

=============== Diff against SystemEditor-Traits-mtf.15 ===============

Item was added:
+ ----- Method: TraitCompositionEditor>>edBuild (in category 'building') -----
+ edBuild
+ 	| result |
+ 	result := TraitComposition new.
+ 	transformations do: [:ea | result add: (ea edBuildIn: self system)].
+ 	^ result!

Item was added:
+ ----- Method: TraitExclusion>>edBuildIn: (in category '*systemeditor-traits') -----
+ edBuildIn: aSystemEditor
+ "Adapted from #copyTraitExpression"
+ 
+ 	^ (super edBuildIn: aSystemEditor)
+  		exclusions: self exclusions deepCopy;
+ 		yourself!

Item was added:
+ ----- Method: TraitTransformation>>edBuildIn: (in category '*systemeditor-traits') -----
+ edBuildIn: aSystemEditor
+ "Adapted from #copyTraitExpression"
+ 
+ 	^self shallowCopy
+  		subject: (self subject edBuildIn: aSystemEditor);
+ 		yourself!

Item was changed:
  ----- Method: UserListDecorator>>subject (in category 'accessing') -----
  subject
+ 	^ subject ifNil: [subject := parent subject ifNotNil: [parent subject users]]!
- 	^ subject ifNil: [subject := self parent subject ifNotNil: [self parent subject users]]!

Item was changed:
  ----- Method: UserListDecorator>>edBuild (in category 'building') -----
  edBuild
  	| result |
  	result := self subject
+ 		ifNil: [IdentitySet new]
- 		ifNil: [IdentityDictionary new]
  		ifNotNil: [self subject users copy].
  	removals do: [:ea | result remove: ea product].
  	additions do: [:ea | result add: ea product].
  	^ result!

Item was changed:
  ----- Method: TraitCompositionEditor>>edDependentsDo: (in category 'building') -----
  edDependentsDo: aBlock
  "Updates and enumerates the TraitEditors whose users list needs to be updated"
  
  	| oldTraits editor |
  	oldTraits := self subject
  		ifNil: [IdentitySet new]
  		ifNotNil: [self subject traits asIdentitySet].
  	self traitsOrEditorsDo: [:ea | ea edIsEditor
+ 		ifTrue: [ea addUser: parent. aBlock value: ea]
- 		ifTrue: [ea addUser: self. aBlock value: ea]
  		ifFalse: [oldTraits remove: ea
  			ifAbsent: [editor := self system edEditorFor: ea.
+ 				editor addUser: parent. aBlock value: editor]]].
- 				editor addUser: self. aBlock value: editor]]].
  	oldTraits do: [:ea | editor := self system edEditorFor: ea.
  		editor removeUser: self. aBlock value: editor]!

Item was changed:
  ----- Method: TraitEditor>>edBuild (in category 'building') -----
  edBuild
+ 	product := Trait basicNew.
+ 	product name: self name.
+ 
+ 	"category and environment are not set here.
+ 	category will be lazily computed sometime after
+ 		SystemEditor >> edRecatogorize runs. (see Class >> category)
+ 	environment can be left nil, since it has a default value"
- 	product := Trait
- 		named: self name
- 		uses: #()
- 		category: self category.
  
+ 	"Create a temporary MethodDictionary to catch code written by SyntaxError dialogs. MethodDictionaryEditor will overwrite this. See MethodEditor>>compileFor:"
- 	"Create a temporary MethodDictionary to catch code written by SyntaxError dialogs. 	MethodDictionaryEditor will overwrite this. See MethodEditor>>compileFor:"
  	product methodDictionary: MethodDictionary new.
  
  	product organization: self organization edBuild.
  	self decoratorsDo: [:ea | ea edBuild].
  
  	product methodDictionary: (self methods buildFor: self).
  	^product!

Item was changed:
  AbstractEditor subclass: #TraitCompositionEditor
  	instanceVariableNames: 'subject transformations parent'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'SystemEditor-Traits'!
  
+ !TraitCompositionEditor commentStamp: 'mtf 11/7/2008 09:13' prior: 0!
- !TraitCompositionEditor commentStamp: 'mtf 10/20/2008 11:22' prior: 0!
  I store the new version of a TraitComposition. I don't use any kind of diff between the subject and product. For now at least, I don't use a TraitTransformationEditor, but use plain TraitTransforms which include TraitEditors
  
+ Unlike most editors, I am not modifiable. Transient instances of myself are built and combined, and only then is one of them given a subject and environment. This is how TraitDescriptions work, so, that is how I work!
- Unlike most editors, I am not persistent. Transient instances of myself are usually built, and only then is my subject and environment set. This is how TraitDescriptions work, so, that is how I work!

Item was changed:
  ----- Method: TraitCompositionDecorator>>edBuild (in category 'building') -----
  edBuild
  	editor product traitComposition: self traitComposition edBuild.
+ 	self traitComposition edApplyChanges.!
- 	self traitComposition edApplyChanges.
- 	self applyChangesOfNewTraitCompositionReplacing: self subject.!

Item was added:
+ ----- Method: TraitDescription>>edBuildIn: (in category '*systemeditor-traits') -----
+ edBuildIn: aSystemEditor
+ "Adapted from #copyTraitExpression"
+ 
+ 	^ self!

Item was changed:
  ----- Method: TraitTransformation>>asTraitCompositionEditor (in category '*systemeditor-traits') -----
  asTraitCompositionEditor
+ 	^TraitCompositionEditor with: self!
- 	^TraitCompositionEditor with: (TraitTransformationEditor from: self)!

Item was added:
+ ----- Method: TraitDescriptionEditor>>edBuildIn: (in category 'building') -----
+ edBuildIn: aSystemEditor
+ 	^ self product!

Item was added:
+ ----- Method: TraitCompositionEditor>>edApplyChanges (in category 'building') -----
+ edApplyChanges
+ "Change the method dictionary as appropriate"
+ 	self shouldBeImplemented.
+ 	true ifTrue: [^ self].
+ 	TPureBehavior updateMethodDictionarySelector: self.
+ 	self applyChangesOfNewTraitCompositionReplacing: self subject.!

Item was added:
+ ----- Method: TraitAlias>>edBuildIn: (in category '*systemeditor-traits') -----
+ edBuildIn: aSystemEditor
+ "Adapted from #copyTraitExpression"
+ 
+ 	^ (super edBuildIn: aSystemEditor)
+ 		aliases: self aliases deepCopy;
+ 		yourself!

Item was removed:
- ----- Method: TraitTransformationEditor class>>from: (in category 'instance creation') -----
- from: aTraitTransformation
- 	^ self new from: aTraitTransformation!

Item was removed:
- AbstractEditor subclass: #TraitTransformationEditor
- 	instanceVariableNames: 'transformation'
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'SystemEditor-Traits'!
- 
- !TraitTransformationEditor commentStamp: 'mtf 10/24/2008 21:43' prior: 0!
- I am a minimal wrapper around a TraitTransformation to support building. I have no subject!

Item was removed:
- ----- Method: TComposingDescription>>asTraitCompositionEditor (in category '*systemeditor-traits') -----
- asTraitCompositionEditor
- 	^TraitCompositionEditor with: self!

Item was removed:
- ----- Method: TraitTransformationEditor>>from: (in category 'initialize-release') -----
- from: aTraitTransformation
- 	transformation := aTraitTransformation copyTraitExpression!

Item was removed:
- ----- Method: TraitDescription>>asTraitCompositionEditor (in category '*systemeditor-traits') -----
- asTraitCompositionEditor
- 	^TraitCompositionEditor with: self!



More information about the Packages mailing list