author | Claus Gittinger <cg@exept.de> |
Fri, 09 Nov 2001 17:20:24 +0100 | |
changeset 1101 | fd826cb660e6 |
parent 1046 | 450ef3136cc3 |
child 1134 | 915934e8aab8 |
permissions | -rw-r--r-- |
3 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
85 | 3 |
All Rights Reserved |
3 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
0 | 12 |
|
957 | 13 |
"{ Package: 'stx:libbasic3' }" |
14 |
||
0 | 15 |
ClassChange subclass:#ClassDefinitionChange |
911 | 16 |
instanceVariableNames:'definition objectType nameSpaceName classType otherParameters' |
235 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'System-Changes' |
|
0 | 20 |
! |
21 |
||
9 | 22 |
!ClassDefinitionChange class methodsFor:'documentation'! |
23 |
||
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
38 | 27 |
All Rights Reserved |
9 | 28 |
|
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
38 |
documentation |
|
39 |
" |
|
45 | 40 |
instances represent class definition-changes. They are typically |
41 |
held in a ChangeSet. |
|
235 | 42 |
|
43 |
[author:] |
|
44 |
Claus Gittinger |
|
9 | 45 |
" |
100 | 46 |
! ! |
47 |
||
911 | 48 |
!ClassDefinitionChange methodsFor:'accessing'! |
49 |
||
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
50 |
nameSpaceName |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
51 |
^ nameSpaceName ? super nameSpaceName |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
52 |
! |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
53 |
|
911 | 54 |
nameSpaceName: aNameSpaceName classType: aClassType otherParameters: someOtherParameters |
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
55 |
nameSpaceName := aNameSpaceName. |
911 | 56 |
classType := aClassType. |
57 |
otherParameters := someOtherParameters |
|
58 |
! |
|
59 |
||
60 |
objectType |
|
61 |
"return the value of the instance variable 'objectType' (automatically generated)" |
|
62 |
||
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
63 |
^ objectType |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
64 |
! |
911 | 65 |
|
66 |
objectType:something |
|
67 |
"set the value of the instance variable 'objectType' (automatically generated)" |
|
68 |
||
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
69 |
objectType := something. |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
70 |
! |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
71 |
|
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
72 |
source |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
73 |
"return the source of the change" |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
74 |
|
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
75 |
|nsName| |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
76 |
|
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
77 |
(nsName := self nameSpaceName) notNil ifTrue:[ |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
78 |
^ '"{ NameSpace: ' , nsName , ' }"' , |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
79 |
Character cr, Character cr , |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
80 |
super source |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
81 |
]. |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
82 |
^ super source |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
83 |
! ! |
911 | 84 |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
85 |
!ClassDefinitionChange methodsFor:'comparing'! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
86 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
87 |
isForSameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
88 |
"return true, if the given change represents a change for the same |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
89 |
thingy as the receiver (i.e. same method, same definition etc.)." |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
90 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
91 |
changeB isClassDefinitionChange ifFalse:[^ false]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
92 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
93 |
className ~= changeB className ifTrue:[^ false]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
94 |
^ true |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
95 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
96 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
97 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
98 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
99 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
100 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
101 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
102 |
sameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
103 |
"return true, if the given change represents the same change as the receiver." |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
104 |
|
798 | 105 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
106 |
^ self sameSourceAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
107 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
108 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
109 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
110 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
111 |
|
962 | 112 |
!ClassDefinitionChange methodsFor:'printing & storing'! |
787 | 113 |
|
1101 | 114 |
printOn:aStream |
115 |
aStream nextPutAll:className |
|
116 |
! |
|
117 |
||
896 | 118 |
printWithoutClassNameOn:aStream |
787 | 119 |
aStream nextPutAll:('definition of ' , className) |
120 |
||
121 |
||
122 |
! ! |
|
123 |
||
772 | 124 |
!ClassDefinitionChange methodsFor:'queries'! |
125 |
||
126 |
isClassDefinitionChange |
|
127 |
^ true |
|
128 |
! ! |
|
129 |
||
100 | 130 |
!ClassDefinitionChange class methodsFor:'documentation'! |
131 |
||
132 |
version |
|
1101 | 133 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.24 2001-11-09 16:20:24 cg Exp $' |
100 | 134 |
! ! |