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