AbstractSourceFileWriter.st
changeset 16879 2b94ea863dda
parent 15419 a1da7568bcfe
child 16881 0971640d795b
--- a/AbstractSourceFileWriter.st	Sat Oct 04 00:26:29 2014 +0200
+++ b/AbstractSourceFileWriter.st	Sat Oct 04 00:26:35 2014 +0200
@@ -12,7 +12,7 @@
 "{ Package: 'stx:libbasic' }"
 
 Object subclass:#AbstractSourceFileWriter
-	instanceVariableNames:''
+	instanceVariableNames:'generatingSourceForOriginal'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Kernel-Classes-Support'
@@ -62,6 +62,19 @@
     ^ MethodSourceRewriteQuery
 ! !
 
+!AbstractSourceFileWriter methodsFor:'accessing'!
+
+generatingSourceForOriginal:aBoolean
+    "if false (the default), the source of the current (in image) code is generated.
+     That means, that any extension method which shadows some other original method,
+     that extension method's code is generated.
+     if true, the code of the original method is generated.
+     Use a true value, when generating code for a SCM checkin operation, as then we do not
+     want the extension to shadow the original"
+
+    generatingSourceForOriginal := aBoolean.
+! !
+
 !AbstractSourceFileWriter methodsFor:'fileout'!
 
 fileOut:aClass on:outStreamArg 
@@ -194,7 +207,7 @@
 !AbstractSourceFileWriter class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractSourceFileWriter.st,v 1.9 2013-06-23 22:22:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractSourceFileWriter.st,v 1.10 2014-10-03 22:26:35 vrany Exp $'
 !
 
 version_SVN