[Pkg] DeltaStreams: DeltaStreams-Logging-gk.7.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Sun Sep 6 12:22:52 UTC 2009

A new version of DeltaStreams-Logging was added to project DeltaStreams:

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

Name: DeltaStreams-Logging-gk.7
Author: gk
Time: 6 September 2009, 2:22:47 am
UUID: 39b7abf3-2767-4ef2-9ab4-e6402f1489a8
Ancestors: DeltaStreams-Logging-gk.6

- Added code for logging doit events.
- Moved two methods here that had ended up wrongly in Model.
- Renamed a method.

=============== Diff against DeltaStreams-Logging-gk.6 ===============

Item was added:
+ ----- Method: DSDelta>>addMethodChange:from: (in category '*deltastreams-logging') -----
+ addMethodChange: changeClass from: event
+ 	"Extract all relevant information from the event
+ 	to create and add a method change of given class name."
+ 	| method selector class category |
+ 	category := event itemProtocol.
+ 	method := event item "Method".
+ 	"Do not ask me why we need to do it like the next three lines..."
+ 	selector := event itemSelector.
+ 	selector ifNil: [selector := event itemMethod sourceSelector].
+ 	selector ifNil: [selector := event itemMethod selector].
+ 	class := event itemClass.
+ 	^self add: (
+ 		self className: class name
+ 			selector: selector
+ 			change: changeClass
+ 			category: category
+ 			source: method getSource asString
+ 			stamp: method timeStamp)!

Item was added:
+ ----- Method: DSDelta>>logReorganizeClass: (in category '*deltastreams-logging') -----
+ logReorganizeClass: aClass
+ 	self notYetImplemented!

Item was added:
+ ----- Method: DSDelta>>logDoIt: (in category '*deltastreams-logging') -----
+ logDoIt: event
+ 	"A DoIt was executed."
+ 	^ self add: (
+ 		(DSDoIt doIt: event item)
+ 			contextWasNil: event context isNil;
+ 			kind: event itemKind)!

Item was changed:
  ----- Method: DSDelta>>event: (in category '*deltastreams-logging') -----
  event: anEvent
  	"This is where events come in from the SystemChangeNotifier.
  	This code is similar to the old code in ChangeSet."
  	| class |
+ 	(anEvent isDoIt and: [self recordDoIts])  ifTrue: [
+ 		"We never log empty doits, just like changes file does not."
+ 		anEvent item isAllSeparators ifFalse: [
+ 			self logDoIt: anEvent]
+ 	].
  	anEvent itemKind = SystemChangeNotifier classKind ifTrue: [
  		class := anEvent item.
  		class isBehavior ifFalse: [^ self]. "Ignore traits for now"
  		class wantsChangeSetLogging ifFalse: [^self].
  		anEvent isAdded ifTrue: [self logClassCreatedEvent: anEvent].
  		anEvent isRemoved ifTrue: [self logClassRemovedEvent: anEvent].
  		anEvent isRenamed ifTrue: [self logClassRenamedEvent: anEvent].
  		anEvent isCommented ifTrue: [self logClassCommentChangedEvent: anEvent].
  		anEvent isModified ifTrue: [class isMeta
  			ifTrue: [self modifyMetaclass: class event: anEvent]
  			ifFalse: [self modifyClass: class event: anEvent]].
+ 		anEvent isReorganized ifTrue: [self logReorganizeClass: anEvent item].
- 		anEvent isReorganized ifTrue: [self reorganizeClass: anEvent item].
  		anEvent isRecategorized ifTrue: [self logClassCategoryChangedEvent: anEvent].
  	anEvent itemKind = SystemChangeNotifier methodKind ifTrue: [
  		class := anEvent itemClass.
  		class isBehavior ifFalse: [^ self]. "Ignore traits for now"
  		class wantsChangeSetLogging ifFalse: [^self].
  		anEvent isAdded ifTrue: [self logMethodAddedEvent: anEvent].
  		anEvent isRemoved ifTrue: [self logMethodRemovedEvent: anEvent].
  		anEvent isRecategorized ifTrue: [self logMethodProtocolEvent: anEvent oldProtocol: anEvent oldCategory newProtocol: anEvent itemProtocol ].
  		anEvent isModified ifTrue: [self logMethodModifyEvent: anEvent].

Item was added:
+ ----- Method: DSDelta>>addClassChange:from: (in category '*deltastreams-logging') -----
+ addClassChange: changeClass from: event
+ 	"Extract all relevant information from the event
+ 	to create and add a class change of given class name."
+ 	| class metaclass |
+ 	class := event itemClass theNonMetaClass.
+ 	metaclass := event itemClass theMetaClass.
+ 	^self add: (
+ 		self className: class name
+ 			changeClass: changeClass
+ 			superclassName: class superclass name
+ 			instVarNames: class instVarNames
+ 			classVarNames: class classVarNames asArray
+ 			poolDictionaryNames: class poolDictionaryNames
+ 			category: class category
+ 			type: class typeOfClass
+ 			classInstVarNames: metaclass instVarNames
+ 			comment: class organization classComment asString
+ 			stamp: class organization commentStamp)!

More information about the Packages mailing list