- support for comment change in ChangeSet::ClassSourceWriter jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 05 Sep 2012 16:40:26 +0100
branchjv
changeset 3079 ac993a8ce737
parent 3078 3f5abbdcbde9
child 3080 0febf2fdcb76
- support for comment change in ChangeSet::ClassSourceWriter
ChangeSet.st
--- a/ChangeSet.st	Wed Sep 05 12:45:38 2012 +0100
+++ b/ChangeSet.st	Wed Sep 05 16:40:26 2012 +0100
@@ -42,9 +42,27 @@
 	privateIn:ChangeSet
 !
 
+NameSpace name:#'ChangeSet::ClassSourceWriter::ChangeSet'!
+
+NameSpace name:#'ChangeSet::ClassSourceWriter::ChangeSet::ClassSourceWriter'!
+
+"{ Package: 'stx:libbasic3' }"
+
+"{ NameSpace: 'ChangeSet::ClassSourceWriter::ChangeSet::ClassSourceWriter' }"
+
 Object subclass:#ClassInfo
-	instanceVariableNames:'name superclass definition methods methodDictionary namespace
-		primitiveDefinitions primitiveVariables primitiveFunctions'
+	instanceVariableNames:'name superclass definition comment methods methodDictionary
+		namespace primitiveDefinitions primitiveVariables
+		primitiveFunctions'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'System-Changes'
+!
+
+Object subclass:#ClassInfo
+	instanceVariableNames:'name superclass definition comment methods methodDictionary
+		namespace primitiveDefinitions primitiveVariables
+		primitiveFunctions'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:ChangeSet::ClassSourceWriter
@@ -552,6 +570,7 @@
     "Created: / 27.10.1997 / 13:52:54 / cg"
 ! !
 
+
 !ChangeSet class methodsFor:'Compatibility-VW'!
 
 component: component definition: anObject change: changeSymbol
@@ -739,9 +758,11 @@
 !ChangeSet methodsFor:'Compatibility-ST80'!
 
 changeClass:aClass
+
     "dummy here"
 
-    "Created: / 4.2.2000 / 18:30:59 / cg"
+    "Created: / 04-02-2000 / 18:30:59 / cg"
+    "Modified (format): / 05-09-2012 / 16:39:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 changeSelectors
@@ -1107,6 +1128,7 @@
     "Created: / 05-12-2009 / 12:32:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+
 !ChangeSet methodsFor:'misc'!
 
 addPatch:nameOfPatch
@@ -1115,6 +1137,7 @@
     ^ self
 ! !
 
+
 !ChangeSet methodsFor:'private-accessing'!
 
 addChange:aChange
@@ -3072,7 +3095,7 @@
 
 fileOut:aChangeSet on:outStreamArg withTimeStamp:stampIt withInitialize:initIt withDefinition:withDefinition methodFilter:methodFilter encoder:encoderOrNil
 
-    |collectionOfCategories versionMethods
+    |collectionOfCategories versionMethods comment
      nonMeta meta classesImplementingInitialize outStream|
 
     changeSetBeingSaved := aChangeSet.
@@ -3118,10 +3141,13 @@
         "/ a comment - if any
         "/
 
-"/        (comment := nonMeta comment) notNil ifTrue:[
-"/            nonMeta fileOutCommentOn:outStream.
-"/            outStream cr.
-"/        ].
+        (comment := nonMeta comment) notNil ifTrue:[
+            nonMeta printClassNameOn: outStream.
+            outStream nextPutAll:' comment:'.
+            comment comment storeOn: outStream.
+            outStream cr.
+            outStream nextPut:$!!; cr; cr.
+        ].
         "/
         "/ ST/X primitive definitions - if any
         "/
@@ -3435,6 +3461,26 @@
     "Created: / 15-03-2012 / 19:01:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!ClassInfo class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version_SVN
+    ^ '$Id:: ChangeSet.st 1958 2012-09-05 15:40:26Z vranyj1                                                                         $'
+! !
+
 !ChangeSet::ClassSourceWriter::ClassInfo class methodsFor:'instance creation'!
 
 new
@@ -3452,6 +3498,14 @@
     "Created: / 19-03-2012 / 18:03:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+comment
+    ^ comment
+!
+
+comment:something
+    comment := something.
+!
+
 definition
     ^ definition
 !
@@ -3593,6 +3647,11 @@
         ^self
     ].
 
+    change isClassCommentChange ifTrue:[
+        comment := change.
+        ^self
+    ].
+
     self error: 'Unknown change'
 
     "Created: / 15-03-2012 / 19:12:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -4076,9 +4135,9 @@
 !ChangeSet class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSet.st,v 1.197 2012/08/13 14:22:06 stefan Exp $'
+    ^ '$Id: ChangeSet.st 1958 2012-09-05 15:40:26Z vranyj1 $'
 !
 
 version_SVN
-    ^ '$Id: ChangeSet.st 1957 2012-09-05 11:45:38Z vranyj1 $'
+    ^ '$Id: ChangeSet.st 1958 2012-09-05 15:40:26Z vranyj1 $'
 ! !