initial checkin
authorClaus Gittinger <cg@exept.de>
Wed, 22 Nov 2006 14:12:20 +0100
changeset 64 7af753750409
parent 63 150479ea08e3
child 65 99f7b2e2fe1f
initial checkin
MCModification.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MCModification.st	Wed Nov 22 14:12:20 2006 +0100
@@ -0,0 +1,96 @@
+"{ Package: 'stx:goodies/monticello' }"
+
+MCPatchOperation subclass:#MCModification
+	instanceVariableNames:'obsoletion modification'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Monticello-Patching'
+!
+
+
+!MCModification class methodsFor:'as yet unclassified'!
+
+of: base to: target
+	^ self new initializeWithBase: base target: target
+! !
+
+!MCModification methodsFor:'accessing'!
+
+applyTo: anObject
+	anObject modifyDefinition: obsoletion to: modification
+!
+
+baseDefinition
+	^ obsoletion
+!
+
+definition
+	^ modification
+!
+
+fromSource
+	^ obsoletion source
+!
+
+modification
+	^ modification
+!
+
+obsoletion
+	^ obsoletion
+!
+
+summarySuffix
+	^self fromSource = self toSource
+		ifTrue: [ ' (source same but rev changed)' ]
+		ifFalse: [ ' (changed)' ]
+!
+
+targetClass
+	^ obsoletion actualClass
+!
+
+targetDefinition
+	^ modification
+!
+
+toSource
+	^ modification source
+! !
+
+!MCModification methodsFor:'as yet unclassified'!
+
+inverse
+	^ MCModification of: modification to: obsoletion
+!
+
+isClassPatch
+	^obsoletion isClassDefinition
+!
+
+printAnnotations: request on: aStream
+	aStream nextPutAll: 'old: '.
+	obsoletion printAnnotations: request on: aStream.
+	aStream cr.
+	aStream nextPutAll: 'new: '.
+	modification printAnnotations: request on: aStream.
+! !
+
+!MCModification methodsFor:'initializing'!
+
+initializeWithBase: base target: target
+	obsoletion _ base.
+	modification _ target.
+! !
+
+!MCModification methodsFor:'testing'!
+
+isModification
+	^ true
+! !
+
+!MCModification class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCModification.st,v 1.1 2006-11-22 13:12:20 cg Exp $'
+! !