ClassDefinitionChange.st
changeset 3210 ab1729c084da
parent 3205 5d3a00da5f5a
child 3219 92e64a42ab4e
child 3220 a8e24cc171f6
--- a/ClassDefinitionChange.st	Wed Apr 10 10:58:10 2013 +0200
+++ b/ClassDefinitionChange.st	Sun Apr 14 08:55:37 2013 +0200
@@ -50,7 +50,7 @@
 !ClassDefinitionChange class methodsFor:'others'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.78 2013-04-10 08:58:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.79 2013-04-14 06:55:37 cg Exp $'
 ! !
 
 !ClassDefinitionChange methodsFor:'accessing'!
@@ -347,6 +347,26 @@
 
 !ClassDefinitionChange methodsFor:'comparing'!
 
+isConflict
+    "true if this change is different than what is already in the image
+     (i.e. it overwrites some existing code)"
+
+    |cls|
+
+    (cls := self changeClass) isNil ifTrue:[^ false].
+    cls superclass name ~= superClassName ifTrue:[ ^ true ].
+    cls instanceVariableString ~= instanceVariableNames ifTrue:[ ^ true ].
+    cls classVariableString ~= classVariableNames ifTrue:[ ^ true ].
+    cls class instanceVariableString ~= classInstanceVariableNames ifTrue:[ ^ true ].
+    cls sharedPoolNames ~= poolDictionaries ifTrue:[ ^ true ].
+    cls category ~= category ifTrue:[ ^ true ].
+    cls isPrivate ifTrue:[
+        cls owningClass name ~= owningClassName ifTrue:[ ^ true ].
+    ].
+    cls definitionSelector ~= self definitionSelector ifTrue:[ ^ true ].
+    ^  false
+!
+
 isForSameAs:changeB
     "return true, if the given change represents a change for the same
      thingy as the receiver (i.e. same method, same definition etc.)."
@@ -708,7 +728,7 @@
 !ClassDefinitionChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.78 2013-04-10 08:58:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.79 2013-04-14 06:55:37 cg Exp $'
 !
 
 version_SVN