equal
deleted
inserted
replaced
20 Class comment:' |
20 Class comment:' |
21 |
21 |
22 COPYRIGHT (c) 1989 by Claus Gittinger |
22 COPYRIGHT (c) 1989 by Claus Gittinger |
23 All Rights Reserved |
23 All Rights Reserved |
24 |
24 |
25 $Header: /cvs/stx/stx/libbasic/Class.st,v 1.12 1994-05-17 10:06:53 claus Exp $ |
25 $Header: /cvs/stx/stx/libbasic/Class.st,v 1.13 1994-06-02 11:19:23 claus Exp $ |
26 written Spring 89 by claus |
26 written Spring 89 by claus |
27 '! |
27 '! |
28 |
28 |
29 !Class class methodsFor:'documentation'! |
29 !Class class methodsFor:'documentation'! |
30 |
30 |
484 addClassVarName:aString |
484 addClassVarName:aString |
485 "add a class variable" |
485 "add a class variable" |
486 |
486 |
487 (self classVarNames includes:aString) ifFalse:[ |
487 (self classVarNames includes:aString) ifFalse:[ |
488 self classVariableString:(self classVariableString , ' ' , aString) |
488 self classVariableString:(self classVariableString , ' ' , aString) |
|
489 ] |
|
490 ! |
|
491 |
|
492 renameCategory:oldCategory to:newCategory |
|
493 "change methods categories" |
|
494 |
|
495 |any| |
|
496 |
|
497 any := false. |
|
498 methods do:[:aMethod | |
|
499 aMethod category = oldCategory ifTrue:[ |
|
500 aMethod category:newCategory. |
|
501 any := true. |
|
502 ] |
|
503 ]. |
|
504 any ifTrue:[ |
|
505 self addChangeRecordForRenameCategory:oldCategory to:newCategory |
489 ] |
506 ] |
490 ! ! |
507 ! ! |
491 |
508 |
492 !Class methodsFor:'adding/removing'! |
509 !Class methodsFor:'adding/removing'! |
493 |
510 |
713 |
730 |
714 aStream := self changesStream. |
731 aStream := self changesStream. |
715 aStream notNil ifTrue:[ |
732 aStream notNil ifTrue:[ |
716 aStream nextPutAll:('Smalltalk removeClass:' , oldName). |
733 aStream nextPutAll:('Smalltalk removeClass:' , oldName). |
717 aStream nextPut:$!!. |
734 aStream nextPut:$!!. |
|
735 aStream cr. |
|
736 aStream close |
|
737 ] |
|
738 ! |
|
739 |
|
740 addChangeRecordForRenameCategory:oldCategory to:newCategory |
|
741 "add a category-rename record to the changes file" |
|
742 |
|
743 |aStream| |
|
744 |
|
745 aStream := self changesStream. |
|
746 aStream notNil ifTrue:[ |
|
747 self printClassNameOn:aStream. |
|
748 aStream nextPutAll:(' renameCategory:' , oldCategory storeString). |
|
749 aStream nextPutAll:(' to:' , newCategory storeString). |
|
750 aStream nextPut:(aStream class chunkSeparator). |
|
751 aStream cr. |
|
752 aStream close |
|
753 ] |
|
754 ! |
|
755 |
|
756 addChangeRecordForChangeCategory |
|
757 "add a category change record to the changes file" |
|
758 |
|
759 |aStream| |
|
760 |
|
761 aStream := self changesStream. |
|
762 aStream notNil ifTrue:[ |
|
763 self printClassNameOn:aStream. |
|
764 aStream nextPutAll:(' category:' , category storeString). |
|
765 aStream nextPut:(aStream class chunkSeparator). |
718 aStream cr. |
766 aStream cr. |
719 aStream close |
767 aStream close |
720 ] |
768 ] |
721 ! |
769 ! |
722 |
770 |