added: #deltaDetail
authorClaus Gittinger <cg@exept.de>
Wed, 31 Aug 2011 12:06:12 +0200
changeset 2503 bbdc31516652
parent 2502 03d16407304d
child 2504 c0f78584ae54
added: #deltaDetail comment/format in: #delta
MethodChange.st
--- a/MethodChange.st	Wed Aug 31 12:05:55 2011 +0200
+++ b/MethodChange.st	Wed Aug 31 12:06:12 2011 +0200
@@ -124,6 +124,7 @@
 !
 
 delta
+    "/ obsolete: please use deltaDetail
 
     | mth |
 
@@ -133,6 +134,25 @@
     ^(self class isSource: self source sameSourceAs: mth source)
         ifTrue:[#=]
         ifFalse:[#~]
+
+    "Modified (comment): / 31-08-2011 / 10:29:55 / cg"
+!
+
+deltaDetail
+    "Returns a delta to the current state as a ChangeDelta object"
+
+    | mth mySource imageSource|
+
+    self isMethodCodeChange ifFalse:[^super deltaDetail].
+    mth := self changeMethod.
+    mth isNil ifTrue:[^ ChangeDeltaInformation added ].
+    mySource := self source.
+    imageSource := mth source.
+    ^(self class isSource: mySource sameSourceAs: imageSource)
+        ifTrue:[ ChangeDeltaInformation identical ]
+        ifFalse:[ ChangeDeltaInformation different ]
+
+    "Created: / 31-08-2011 / 10:27:58 / cg"
 !
 
 imageSource
@@ -323,7 +343,6 @@
     "Created: / 09-10-2006 / 13:58:09 / cg"
 ! !
 
-
 !MethodChange methodsFor:'testing'!
 
 isMethodChange
@@ -370,7 +389,7 @@
 !MethodChange class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/MethodChange.st,v 1.58 2011-07-25 10:40:48 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/MethodChange.st,v 1.59 2011-08-31 10:06:12 cg Exp $'
 !
 
 version_SVN