Class definition fileout format changed. jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 04 Feb 2014 21:09:59 +0100
branchjv
changeset 18119 cb7a12afe736
parent 18118 997e1134b949
child 18120 e3a375d5f6a8
Class definition fileout format changed. By default, namespace is filed-out as a namespace pragma rather than prefixing class name with namespace. This makes it easier for changeset reader to figure out what's a class in namespace and what's a private class.
Class.st
SmalltalkChunkFileSourceWriter.st
--- a/Class.st	Tue Feb 04 21:02:56 2014 +0100
+++ b/Class.st	Tue Feb 04 21:09:59 2014 +0100
@@ -21,7 +21,7 @@
 	category:'Kernel-Classes'
 !
 
-Array subclass:#ArrayWithSequenceNumberValidation
+Array variableSubclass:#ArrayWithSequenceNumberValidation
 	instanceVariableNames:'sequenceNumber'
 	classVariableNames:''
 	poolDictionaries:''
@@ -455,6 +455,8 @@
     "Modified: 23.4.1996 / 15:56:58 / cg"
 ! !
 
+
+
 !Class methodsFor:'Compatibility-Dolphin'!
 
 defaultCategoryForDolphinClasses
@@ -1966,6 +1968,7 @@
     "Modified: 4.6.1997 / 14:48:02 / cg"
 ! !
 
+
 !Class methodsFor:'changes management'!
 
 addChangeRecordForChangeCategory
@@ -2696,9 +2699,10 @@
 fileOutDefinitionOn:aStream
     "append an expression on aStream, which defines myself."
 
-    ^ self basicFileOutDefinitionOn:aStream withNameSpace:false
-
-    "Modified: 4.1.1997 / 20:55:18 / cg"
+    ^ self basicFileOutDefinitionOn:aStream withNameSpace:true
+
+    "Modified: / 04-01-1997 / 20:55:18 / cg"
+    "Modified: / 04-02-2014 / 16:49:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 fileOutIn:aDirectoryName
@@ -3344,6 +3348,7 @@
     "
 ! !
 
+
 !Class methodsFor:'printOut'!
 
 htmlDocumentation
--- a/SmalltalkChunkFileSourceWriter.st	Tue Feb 04 21:02:56 2014 +0100
+++ b/SmalltalkChunkFileSourceWriter.st	Tue Feb 04 21:09:59 2014 +0100
@@ -307,12 +307,20 @@
 !
 
 fileOutAllDefinitionsOf:aNonMetaClass on:aStream
+    self fileOutAllDefinitionsOf:aNonMetaClass on:aStream withNameSpace: true.
+
+    "Created: / 15-10-1996 / 11:15:19 / cg"
+    "Modified: / 22-03-1997 / 16:11:56 / cg"
+    "Modified: / 04-02-2014 / 20:00:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+fileOutAllDefinitionsOf:aNonMetaClass on:aStream withNameSpace: withNameSpacePragma
     "append expressions on aStream, which defines myself and all of my private classes."
 
     |s|
 
     s := CharacterWriteStream on:(String new:50).
-    self fileOutDefinitionOf:aNonMetaClass on:s.
+    self fileOutDefinitionOf:aNonMetaClass on:s withNameSpace: withNameSpacePragma.
     aStream nextChunkPut:(s contents).
 
     "/ self fileOutDefinitionOf:aNonMetaClass on:aStream.
@@ -335,13 +343,12 @@
     Class fileOutNameSpaceQuerySignal answer:false do:[
         Class forceNoNameSpaceQuerySignal answer:true do:[
             aNonMetaClass privateClassesSorted do:[:aClass |
-                 self fileOutAllDefinitionsOf:aClass on:aStream
+                 self fileOutAllDefinitionsOf:aClass on:aStream withNameSpace: false
             ]
         ]
     ].
 
-    "Created: 15.10.1996 / 11:15:19 / cg"
-    "Modified: 22.3.1997 / 16:11:56 / cg"
+    "Created: / 04-02-2014 / 20:00:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 fileOutAllMethodsOf:aClass on:aStream methodFilter:methodFilter
@@ -501,8 +508,10 @@
     "/ intentionally left blank - make each line an EOL-comment instead
 !
 
-fileOutDefinitionOf:aNonMetaClass on:aStream
-    aNonMetaClass fileOutDefinitionOn:aStream.
+fileOutDefinitionOf:aNonMetaClass on:aStream withNameSpace: withNameSpacePragma
+    aNonMetaClass basicFileOutDefinitionOn:aStream withNameSpace: withNameSpacePragma
+
+    "Created: / 04-02-2014 / 20:00:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 fileOutMethod:aMethod on:aStream