class: ClassDefinitionChange
authorClaus Gittinger <cg@exept.de>
Sat, 30 Mar 2013 02:54:34 +0100
changeset 3163 16fdcb5a998b
parent 3162 cca29c5533fd
child 3164 e54571b3021f
class: ClassDefinitionChange added: #imageSource changed:5 methods
ClassDefinitionChange.st
--- a/ClassDefinitionChange.st	Sat Mar 30 00:56:49 2013 +0100
+++ b/ClassDefinitionChange.st	Sat Mar 30 02:54:34 2013 +0100
@@ -50,7 +50,7 @@
 !ClassDefinitionChange class methodsFor:'others'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.75 2013-03-27 18:18:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.76 2013-03-30 01:54:34 cg Exp $'
 ! !
 
 !ClassDefinitionChange methodsFor:'accessing'!
@@ -149,6 +149,16 @@
     "Modified: / 24-01-2012 / 22:13:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+imageSource
+    "return the source for the in-image version of the method"
+
+    | cls |
+
+    cls := self changeClass.
+    cls isNil ifTrue:[ ^ nil ].
+    ^ cls definitionWithoutPackage
+!
+
 instanceVariableNames
     ^ instanceVariableNames
 !
@@ -191,6 +201,7 @@
     otherParameters := Dictionary new addAll:otherParametersArg; yourself.
 
     superClassName := otherParameters at:#superclass: ifAbsent:nil.
+    self assert:(superClassName notNil).
     superClassName notNil ifTrue:[
         superClassName := superClassName pathString.
     ].
@@ -261,16 +272,17 @@
     |nm|
 
     nm := superClassName.
-    nm notNil ifTrue:[
-        (nm includes:$.) ifTrue:[
-            ^ nm copyReplaceAll:$. withAll:'::'.
-        ]
+    nm isNil ifTrue:[^ 'nil'].
+    "/ convert VW namespace syntax
+    (nm includes:$.) ifTrue:[
+        ^ nm copyReplaceAll:$. withAll:'::'.
     ].
     ^ nm
 !
 
-superClassName:something
-    superClassName := something.
+superClassName:aString
+    superClassName := aString.
+    self assert:(aString notNil).
     self invalidateSource.
 !
 
@@ -340,14 +352,7 @@
      thingy as the receiver (i.e. same method, same definition etc.)."
 
     changeB isClassDefinitionChange ifFalse:[^ false].   
-
-    className ~= changeB className ifTrue:[^ false].
-    ^ true
-
-
-
-
-
+    ^ className = changeB className
 !
 
 sameAs:changeB
@@ -768,6 +773,7 @@
         ].
 
         superClassName := parseTree receiver name.
+        self assert:(superClassName notNil).
     ].
 
     "Created: / 11-10-2006 / 14:10:02 / cg"
@@ -786,7 +792,7 @@
 !ClassDefinitionChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.75 2013-03-27 18:18:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.76 2013-03-30 01:54:34 cg Exp $'
 !
 
 version_SVN