ClassCategoryChange.st
changeset 1177 91756124439b
child 1984 e24fdc626215
equal deleted inserted replaced
1176:6c65f871a3bc 1177:91756124439b
       
     1 "{ Package: 'stx:libbasic3' }"
       
     2 
       
     3 ClassChange subclass:#ClassCategoryChange
       
     4 	instanceVariableNames:'category'
       
     5 	classVariableNames:''
       
     6 	poolDictionaries:''
       
     7 	category:'System-Changes'
       
     8 !
       
     9 
       
    10 
       
    11 !ClassCategoryChange methodsFor:'accessing'!
       
    12 
       
    13 category
       
    14     ^ category
       
    15 !
       
    16 
       
    17 category:aCategory
       
    18     ^ category := aCategory
       
    19 !
       
    20 
       
    21 className:clsName category:aCategoryString
       
    22     className := clsName.
       
    23     category := aCategoryString
       
    24 ! !
       
    25 
       
    26 !ClassCategoryChange methodsFor:'comparing'!
       
    27 
       
    28 isForSameAs:changeB
       
    29     "return true, if the given change represents a change for the same
       
    30      thingy as the receiver (i.e. same method, same definition etc.)."
       
    31 
       
    32     changeB isClassCategoryChange ifFalse:[^ false].   
       
    33     ^ className = changeB className
       
    34 !
       
    35 
       
    36 sameAs:changeB
       
    37     "return true, if the given change represents the same change as the receiver."
       
    38 
       
    39     changeB isClassCategoryChange ifFalse:[^ false].
       
    40     className = changeB className ifFalse:[^ false].
       
    41     ^ category = changeB category 
       
    42 !
       
    43 
       
    44 source
       
    45     "synthesize the changes source"
       
    46 
       
    47     ^ className , ' category: ' , category storeString
       
    48 ! !
       
    49 
       
    50 !ClassCategoryChange methodsFor:'printing & storing'!
       
    51 
       
    52 printOn:aStream
       
    53     "append a user printed representation of the receiver to aStream.
       
    54      The format is suitable for a human - not meant to be read back."
       
    55 
       
    56     aStream nextPutAll:className; nextPutAll:' category:'
       
    57 !
       
    58 
       
    59 printWithoutClassNameOn:aStream
       
    60     (className endsWith:' class') ifTrue:[
       
    61         aStream nextPutAll:'class '
       
    62     ].
       
    63     aStream nextPutAll:'category:'
       
    64 ! !
       
    65 
       
    66 !ClassCategoryChange methodsFor:'queries'!
       
    67 
       
    68 isClassCategoryChange
       
    69     ^ true
       
    70 ! !
       
    71 
       
    72 !ClassCategoryChange class methodsFor:'documentation'!
       
    73 
       
    74 version
       
    75     ^ '$Header: /cvs/stx/stx/libbasic3/ClassCategoryChange.st,v 1.1 2002-11-11 09:40:14 cg Exp $'
       
    76 ! !