--- a/Class.st Thu Jun 02 13:20:08 1994 +0200
+++ b/Class.st Thu Jun 02 13:21:56 1994 +0200
@@ -22,7 +22,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Class.st,v 1.12 1994-05-17 10:06:53 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Class.st,v 1.13 1994-06-02 11:19:23 claus Exp $
written Spring 89 by claus
'!
@@ -487,6 +487,23 @@
(self classVarNames includes:aString) ifFalse:[
self classVariableString:(self classVariableString , ' ' , aString)
]
+!
+
+renameCategory:oldCategory to:newCategory
+ "change methods categories"
+
+ |any|
+
+ any := false.
+ methods do:[:aMethod |
+ aMethod category = oldCategory ifTrue:[
+ aMethod category:newCategory.
+ any := true.
+ ]
+ ].
+ any ifTrue:[
+ self addChangeRecordForRenameCategory:oldCategory to:newCategory
+ ]
! !
!Class methodsFor:'adding/removing'!
@@ -720,6 +737,37 @@
]
!
+addChangeRecordForRenameCategory:oldCategory to:newCategory
+ "add a category-rename record to the changes file"
+
+ |aStream|
+
+ aStream := self changesStream.
+ aStream notNil ifTrue:[
+ self printClassNameOn:aStream.
+ aStream nextPutAll:(' renameCategory:' , oldCategory storeString).
+ aStream nextPutAll:(' to:' , newCategory storeString).
+ aStream nextPut:(aStream class chunkSeparator).
+ aStream cr.
+ aStream close
+ ]
+!
+
+addChangeRecordForChangeCategory
+ "add a category change record to the changes file"
+
+ |aStream|
+
+ aStream := self changesStream.
+ aStream notNil ifTrue:[
+ self printClassNameOn:aStream.
+ aStream nextPutAll:(' category:' , category storeString).
+ aStream nextPut:(aStream class chunkSeparator).
+ aStream cr.
+ aStream close
+ ]
+!
+
addChangeRecordForSnapshot:aFileName
"add a snapshot-record to the changes file"