author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 28 Aug 2017 16:16:00 +0100 | |
branch | jv |
changeset 4259 | 4f1299274d32 |
parent 4022 | b596e506bbe9 |
child 4330 | 998eb03f0736 |
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 |
" |
|
957 | 12 |
"{ Package: 'stx:libbasic3' }" |
13 |
||
3744 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
0 | 16 |
ClassChange subclass:#ClassDefinitionChange |
2316 | 17 |
instanceVariableNames:'objectType superClassName classType indexedType otherParameters |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
18 |
instanceVariableString classVariableString |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
19 |
classInstanceVariableString poolDictionaries category private |
3446 | 20 |
definitionSelector' |
235 | 21 |
classVariableNames:'' |
22 |
poolDictionaries:'' |
|
23 |
category:'System-Changes' |
|
0 | 24 |
! |
25 |
||
9 | 26 |
!ClassDefinitionChange class methodsFor:'documentation'! |
27 |
||
28 |
copyright |
|
29 |
" |
|
30 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
38 | 31 |
All Rights Reserved |
9 | 32 |
|
33 |
This software is furnished under a license and may be used |
|
34 |
only in accordance with the terms of that license and with the |
|
35 |
inclusion of the above copyright notice. This software may not |
|
36 |
be provided or otherwise made available to, or used by, any |
|
37 |
other person. No title to or ownership of the software is |
|
38 |
hereby transferred. |
|
39 |
" |
|
40 |
! |
|
41 |
||
42 |
documentation |
|
43 |
" |
|
1162 | 44 |
instances represent class definition-changes. |
45 |
They are typically held in a ChangeSet. |
|
235 | 46 |
|
47 |
[author:] |
|
48 |
Claus Gittinger |
|
9 | 49 |
" |
100 | 50 |
! ! |
51 |
||
911 | 52 |
!ClassDefinitionChange methodsFor:'accessing'! |
53 |
||
1434 | 54 |
basicSuperClassName |
55 |
^ superClassName |
|
56 |
! |
|
57 |
||
1427 | 58 |
category |
1854 | 59 |
category isNil ifTrue:[ |
60 |
self setupFromSource. |
|
61 |
]. |
|
1427 | 62 |
^ category |
1854 | 63 |
|
64 |
"Modified: / 11-10-2006 / 14:12:01 / cg" |
|
1427 | 65 |
! |
66 |
||
1178 | 67 |
category:something |
68 |
category := something. |
|
69 |
! |
|
70 |
||
1427 | 71 |
classInstanceVariableNames |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
72 |
^ self classInstanceVariableString asCollectionOfWords |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
73 |
! |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
74 |
|
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
75 |
classInstanceVariableNames:aCollectionOfWords |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
76 |
self classInstanceVariableString:(aCollectionOfWords asStringWith:' '). |
1427 | 77 |
! |
78 |
||
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
79 |
classInstanceVariableString |
3744 | 80 |
^ classInstanceVariableString ? '' |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
81 |
! |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
82 |
|
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
83 |
classInstanceVariableString:aString |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
84 |
classInstanceVariableString := aString. |
1427 | 85 |
! |
86 |
||
87 |
classVariableNames |
|
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
88 |
^ self classVariableString asCollectionOfWords |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
89 |
! |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
90 |
|
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
91 |
classVariableNames:aCollectionOfWords |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
92 |
self classVariableString:(aCollectionOfWords asStringWith:' '). |
1427 | 93 |
! |
94 |
||
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
95 |
classVariableString |
3875
aaa891f63fc6
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3855
diff
changeset
|
96 |
^ classVariableString ? '' |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
97 |
! |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
98 |
|
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
99 |
classVariableString:aString |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
100 |
classVariableString := aString. |
1427 | 101 |
! |
102 |
||
2504 | 103 |
deltaDetail |
104 |
"Returns a delta to the current state as a ChangeDelta object" |
|
105 |
||
3851
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
106 |
| class mySource imageSource myTree myClassDefTree imageTree imageClassDefTree same | |
2504 | 107 |
|
108 |
class := self changeClass. |
|
109 |
class isNil ifTrue:[^ ChangeDeltaInformation added ]. |
|
2753 | 110 |
class isLoaded ifFalse:[^ ChangeDeltaInformation different ]. |
2504 | 111 |
mySource := self source. |
3851
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
112 |
imageSource := self imageSource. |
2690 | 113 |
same := (mySource = imageSource). |
114 |
same ifFalse:[ |
|
115 |
same := (self class isSource: mySource sameSourceAs: imageSource ). |
|
116 |
same ifFalse:[ |
|
117 |
"/ care for formatting (tabs, indentation etc.) |
|
118 |
myTree := RBParser parseExpression:mySource. |
|
119 |
imageTree := RBParser parseExpression:imageSource. |
|
120 |
same := (myTree = imageTree). |
|
121 |
same ifFalse:[ |
|
3275
e525d31c2a9b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3270
diff
changeset
|
122 |
"/ some classDefinition strings may contain whitespace |
2690 | 123 |
"/ instVarName string like 'foo bar ' instead of 'foo bar' (i.e. added a space)... |
3851
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
124 |
|
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
125 |
"/ Kludge for class instance variable definitions. |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
126 |
"/ In that case, myTree is not the subclass:.. message send node but |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
127 |
"/ an sequence. In that case, make it a a subclass:... message send node |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
128 |
"/ so the following code works... |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
129 |
|
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
130 |
myClassDefTree := myTree isSequence |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
131 |
ifTrue:[ myTree statements first] |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
132 |
ifFalse:[ myTree ]. |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
133 |
imageClassDefTree := imageTree isSequence |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
134 |
ifTrue:[ imageTree statements first] |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
135 |
ifFalse:[ imageTree ]. |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
136 |
|
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
137 |
((myClassDefTree receiver = imageClassDefTree receiver) |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
138 |
and:[ (myClassDefTree selector = imageClassDefTree selector) |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
139 |
and:[ ('*ubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' match: myClassDefTree selector) |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
140 |
and:[ (myClassDefTree arguments at:1) = (imageClassDefTree arguments at:1) |
2690 | 141 |
|
142 |
and:[ (2 to:5) conform:[:i | |
|
3851
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
143 |
((myClassDefTree arguments at:i) isLiteral |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
144 |
and:[ (imageClassDefTree arguments at:i) isLiteral |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
145 |
and:[ (myClassDefTree arguments at:i) value asString asCollectionOfWords |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
146 |
= (imageClassDefTree arguments at:i) value asString asCollectionOfWords ]]) ] |
2690 | 147 |
|
148 |
]]]]) |
|
149 |
ifTrue:[ |
|
3851
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
150 |
same := myTree isSequence == imageTree isSequence |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
151 |
and:[ myTree isSequence not or:[ myTree statements second = imageTree statements second] ] |
2690 | 152 |
] |
153 |
]. |
|
154 |
] |
|
155 |
]. |
|
156 |
||
157 |
^ same |
|
2504 | 158 |
ifTrue:[ ChangeDeltaInformation identical ] |
159 |
ifFalse:[ ChangeDeltaInformation different ] |
|
160 |
||
161 |
"Created: / 31-08-2011 / 10:26:42 / cg" |
|
3851
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
162 |
"Modified: / 15-04-2015 / 11:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2368 | 163 |
! |
164 |
||
3163
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
165 |
imageSource |
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
166 |
"return the source for the in-image version of the method" |
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
167 |
|
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
168 |
| cls | |
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
169 |
|
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
170 |
cls := self changeClass. |
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
171 |
cls isNil ifTrue:[ ^ nil ]. |
3851
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
172 |
^ cls class instanceVariableNames isEmptyOrNil ifTrue:[ |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
173 |
cls definitionWithoutPackage |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
174 |
] ifFalse:[ |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
175 |
String streamContents:[ :s| |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
176 |
s nextPutAll: cls definitionWithoutPackage trimSeparators. |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
177 |
s nextPut: $.; cr;cr. |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
178 |
s nextPutAll:cls nameWithoutNameSpacePrefix; |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
179 |
nextPutAll:' class instanceVariableNames: '; |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
180 |
nextPutAll:cls class instanceVariableString storeString. |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
181 |
] |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
182 |
]. |
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
183 |
|
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
184 |
"Modified: / 15-04-2015 / 11:11:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3163
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
185 |
! |
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
186 |
|
3689
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
187 |
indexedType |
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
188 |
^ indexedType |
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
189 |
! |
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
190 |
|
1427 | 191 |
instanceVariableNames |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
192 |
^ self instanceVariableString asCollectionOfWords |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
193 |
! |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
194 |
|
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
195 |
instanceVariableNames:aCollectionOfWords |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
196 |
self instanceVariableString:(aCollectionOfWords asStringWith:' ') |
1427 | 197 |
! |
198 |
||
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
199 |
instanceVariableString |
3875
aaa891f63fc6
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3855
diff
changeset
|
200 |
^ instanceVariableString ? '' |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
201 |
! |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
202 |
|
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
203 |
instanceVariableString:aString |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
204 |
instanceVariableString := aString. |
1427 | 205 |
! |
206 |
||
3150
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
207 |
localClassName |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
208 |
"for private classes, this returns the name relative to its owner; |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
209 |
for non-private ones, this is the regular name. |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
210 |
Notice that className always returns the full name (incl. any owner prefix)" |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
211 |
|
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
212 |
self isPrivateClassDefinitionChange ifFalse:[^ self className]. |
3837
30ceae481017
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3810
diff
changeset
|
213 |
owningClassName isNil ifTrue:[^ self className]. |
3220
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
214 |
|
3150
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
215 |
(className startsWith:(owningClassName,'::')) ifTrue:[ |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
216 |
^ className copyFrom:(owningClassName size + 2 + 1). |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
217 |
] ifFalse:[ |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
218 |
"/ should not happen |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
219 |
^ self className |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
220 |
] |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
221 |
! |
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
222 |
|
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
223 |
nameSpaceName |
3446 | 224 |
| nm | |
3270
b986056e7fe8
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3245
diff
changeset
|
225 |
|
3446 | 226 |
nm := super nameSpaceName. |
227 |
^nm. |
|
228 |
||
229 |
"/ "/ JV: What is the following good for? Please explain..." |
|
230 |
"/ objectType == #variable ifTrue:[ |
|
231 |
"/ ^ nil |
|
232 |
"/ ]. |
|
233 |
"/ ^ self cutNameSpaceOf:(self nameSpaceOverride ? super nameSpaceName) |
|
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
234 |
|
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
235 |
"Modified: / 07-09-2011 / 20:47:14 / cg" |
3446 | 236 |
"Modified: / 11-06-2013 / 17:18:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
237 |
! |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
238 |
|
1196 | 239 |
nameSpaceName: aNameSpaceName classType: aClassType otherParameters:otherParametersArg |
1854 | 240 |
"this instance setup message is used when reading from a VW-xml change file. |
241 |
Support for this is not yet complete." |
|
242 |
||
3446 | 243 |
| imports | |
1196 | 244 |
|
3446 | 245 |
nameSpaceName := aNameSpaceName. |
911 | 246 |
classType := aClassType. |
1196 | 247 |
otherParameters := Dictionary new addAll:otherParametersArg; yourself. |
3543
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
248 |
private := otherParameters at:#private: ifAbsent:nil. |
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
249 |
category := otherParameters at:#category: ifAbsent:nil. |
1196 | 250 |
|
3543
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
251 |
aClassType == #defineSharedVariable: ifTrue:[ |
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
252 |
] ifFalse:[ |
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
253 |
superClassName := otherParameters at:#superclass: ifAbsent:nil. |
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
254 |
self assert:(superClassName notNil). |
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
255 |
superClassName notNil ifTrue:[ |
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
256 |
superClassName := superClassName pathString. |
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
257 |
]. |
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
258 |
indexedType := otherParameters at:#indexedType: ifAbsent:nil. |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
259 |
instanceVariableString := otherParameters at:#instanceVariableNames: ifAbsent:nil. |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
260 |
classInstanceVariableString := otherParameters at:#classInstanceVariableNames: ifAbsent:nil. |
3543
ed4000ee3e21
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3491
diff
changeset
|
261 |
imports := otherParameters at:#imports: ifAbsent:nil. |
1196 | 262 |
]. |
1854 | 263 |
|
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
264 |
"Modified: / 15-06-2010 / 14:50:35 / cg" |
3446 | 265 |
"Modified: / 12-12-2013 / 12:59:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
911 | 266 |
! |
267 |
||
268 |
objectType |
|
269 |
"return the value of the instance variable 'objectType' (automatically generated)" |
|
270 |
||
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
271 |
^ objectType |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
272 |
! |
911 | 273 |
|
274 |
objectType:something |
|
275 |
"set the value of the instance variable 'objectType' (automatically generated)" |
|
276 |
||
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
277 |
objectType := something. |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
278 |
! |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
279 |
|
1427 | 280 |
poolDictionaries |
2832 | 281 |
poolDictionaries isNil ifTrue:[ |
282 |
self setupFromSource. |
|
283 |
]. |
|
1427 | 284 |
^ poolDictionaries |
2832 | 285 |
|
286 |
"Modified: / 13-06-2012 / 12:23:41 / cg" |
|
1427 | 287 |
! |
288 |
||
289 |
poolDictionaries:something |
|
290 |
poolDictionaries := something. |
|
291 |
! |
|
292 |
||
2289 | 293 |
private:aBoolean |
294 |
private := aBoolean. |
|
295 |
||
296 |
"Created: / 30-08-2010 / 13:56:11 / cg" |
|
297 |
! |
|
298 |
||
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
299 |
source |
3220
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
300 |
"return the source of the change; |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
301 |
either the original source or a synthesized" |
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
302 |
|
3220
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
303 |
|src| |
1196 | 304 |
|
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
305 |
(src := source) isNil ifTrue:[ |
1196 | 306 |
src := self definitionString |
307 |
]. |
|
308 |
^ src |
|
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
309 |
|
2900
c21c251db4a0
fixed namespaceoverride (for changeSetBrowser)
Claus Gittinger <cg@exept.de>
parents:
2876
diff
changeset
|
310 |
"Modified: / 10-08-2012 / 11:53:54 / cg" |
1196 | 311 |
! |
312 |
||
3855
ea6eae92e1ab
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3837
diff
changeset
|
313 |
superClassName |
ea6eae92e1ab
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3837
diff
changeset
|
314 |
"returns nil, if no superclass" |
ea6eae92e1ab
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3837
diff
changeset
|
315 |
|
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
316 |
|nm| |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
317 |
|
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
318 |
nm := superClassName. |
3855
ea6eae92e1ab
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3837
diff
changeset
|
319 |
nm isNil ifTrue:[^ nil " 'nil' "]. |
3163
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
320 |
"/ convert VW namespace syntax |
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
321 |
(nm includes:$.) ifTrue:[ |
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
322 |
^ nm copyReplaceAll:$. withAll:'::'. |
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
323 |
]. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
324 |
^ nm |
1427 | 325 |
! |
326 |
||
3163
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
327 |
superClassName:aString |
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
328 |
superClassName := aString. |
16fdcb5a998b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
329 |
self assert:(aString notNil). |
2207 | 330 |
self invalidateSource. |
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
331 |
! |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
332 |
|
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
333 |
superClassNameWithoutMyNamespace |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
334 |
|nm| |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
335 |
|
1956 | 336 |
superClassName isNil ifTrue:[^ 'nil']. |
337 |
||
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
338 |
nm := self cutMyNameSpaceOf:superClassName. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
339 |
(nm includes:$.) ifTrue:[ |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
340 |
^ nm copyReplaceAll:$. withAll:'::'. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
341 |
]. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
342 |
^ nm |
1956 | 343 |
|
344 |
"Modified: / 03-03-2007 / 13:09:07 / cg" |
|
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
345 |
! |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
346 |
|
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
347 |
superClassNameWithoutNamespace |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
348 |
|nm| |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
349 |
|
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
350 |
nm := self cutNameSpaceOf:superClassName. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
351 |
(nm includes:$.) ifTrue:[ |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
352 |
^ nm copyReplaceAll:$. withAll:'::'. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
353 |
]. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
354 |
^ nm |
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
355 |
! ! |
911 | 356 |
|
1998
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
357 |
!ClassDefinitionChange methodsFor:'applying'! |
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
358 |
|
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
359 |
apply |
3808
c9927a70b702
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3744
diff
changeset
|
360 |
|changeClass sourceWithNamespace ns| |
3111 | 361 |
|
2425 | 362 |
superClassName isNil ifTrue:[ |
3446 | 363 |
self setupFromSource. |
364 |
]. |
|
365 |
"Some classes have nil superclass (such as Object)..." |
|
366 |
superClassName notNil ifTrue:[ |
|
3808
c9927a70b702
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3744
diff
changeset
|
367 |
nameSpaceOverride notEmptyOrNil ifTrue:[ |
c9927a70b702
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3744
diff
changeset
|
368 |
"/ a q&d hack: need to find those which pass in a nameSpace isntead of a string |
c9927a70b702
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3744
diff
changeset
|
369 |
(ns := nameSpaceOverride) isString ifFalse:[ ns := ns name ]. |
c9927a70b702
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3744
diff
changeset
|
370 |
(superClassName startsWith:(ns,'::')) ifFalse:[ |
c9927a70b702
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3744
diff
changeset
|
371 |
superClassName := (ns,'::',superClassName) asSymbol. |
c9927a70b702
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3744
diff
changeset
|
372 |
]. |
c9927a70b702
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3744
diff
changeset
|
373 |
]. |
3446 | 374 |
(Smalltalk classNamed:superClassName) isNil ifTrue:[ |
375 |
Class undeclared:superClassName |
|
3111 | 376 |
]. |
2425 | 377 |
]. |
3220
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
378 |
|
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
379 |
"/ here, using the current namespace as provided by the query or the override, |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
380 |
"/ generate a class definition with full names (i.e. incl. ns prefix). |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
381 |
sourceWithNamespace := self source. |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
382 |
"/ as the namespace is already in the definition string, make sure that the namespace is not |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
383 |
"/ added twice, by anwering Smalltalk now!! |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
384 |
Class nameSpaceQuerySignal |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
385 |
answer:Smalltalk |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
386 |
do:[ |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
387 |
Parser evaluate:sourceWithNamespace. |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
388 |
]. |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
389 |
|
1998
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
390 |
package notNil ifTrue:[ |
3111 | 391 |
changeClass := self changeClass. |
392 |
changeClass notNil ifTrue:[ |
|
393 |
changeClass setPackage:package. |
|
394 |
]. |
|
1998
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
395 |
]. |
2368 | 396 |
|
397 |
" |
|
2425 | 398 |
(ClassDefinitionChange className: #TestB source: 'TestA subclass: #TestB |
399 |
instanceVariableNames:'''' |
|
400 |
classVariableNames:'''' |
|
401 |
poolDictionaries:'''' |
|
402 |
category:''* remove me *''') |
|
403 |
apply |
|
2368 | 404 |
" |
405 |
||
2554 | 406 |
"Modified: / 06-10-2011 / 17:01:58 / cg" |
3446 | 407 |
"Modified: / 10-06-2013 / 17:12:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1998
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
408 |
! ! |
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
409 |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
410 |
!ClassDefinitionChange methodsFor:'comparing'! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
411 |
|
3210
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
412 |
isConflict |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
413 |
"true if this change is different than what is already in the image |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
414 |
(i.e. it overwrites some existing code)" |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
415 |
|
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
416 |
|cls| |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
417 |
|
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
418 |
(cls := self changeClass) isNil ifTrue:[^ false]. |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
419 |
cls superclass name ~= superClassName ifTrue:[ ^ true ]. |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
420 |
cls instanceVariableString ~= instanceVariableString ifTrue:[ ^ true ]. |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
421 |
cls classVariableString ~= classVariableString ifTrue:[ ^ true ]. |
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
422 |
cls class instanceVariableString ~= (classInstanceVariableString ? '') ifTrue:[ ^ true ]. |
3485
d191b20c93a5
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3446
diff
changeset
|
423 |
cls poolDictionaries ~= poolDictionaries ifTrue:[ ^ true ]. |
3210
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
424 |
cls category ~= category ifTrue:[ ^ true ]. |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
425 |
cls isPrivate ifTrue:[ |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
426 |
cls owningClass name ~= owningClassName ifTrue:[ ^ true ]. |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
427 |
]. |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
428 |
cls definitionSelector ~= self definitionSelector ifTrue:[ ^ true ]. |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
429 |
^ false |
3485
d191b20c93a5
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3446
diff
changeset
|
430 |
|
d191b20c93a5
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3446
diff
changeset
|
431 |
"Modified: / 12-02-2014 / 20:25:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3210
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
432 |
! |
ab1729c084da
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3205
diff
changeset
|
433 |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
434 |
isForSameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
435 |
"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
|
436 |
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
|
437 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
438 |
changeB isClassDefinitionChange ifFalse:[^ false]. |
3205 | 439 |
^ self className = changeB className. |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
440 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
441 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
442 |
sameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
443 |
"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
|
444 |
|
798 | 445 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
446 |
^ self sameSourceAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
447 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
448 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
449 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
450 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
451 |
|
2410 | 452 |
!ClassDefinitionChange methodsFor:'converting'! |
453 |
||
454 |
asAntiChange |
|
455 |
||
456 |
^ClassRemoveChange className: self className |
|
457 |
||
458 |
"Created: / 02-11-2009 / 11:11:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
459 |
! ! |
|
460 |
||
962 | 461 |
!ClassDefinitionChange methodsFor:'printing & storing'! |
787 | 462 |
|
1196 | 463 |
definitionString |
3446 | 464 |
| ns | |
465 |
||
3841
813b462d169a
Fixed class definition fileout to catch up with changes in stx:libbasic
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3838
diff
changeset
|
466 |
ns := (self nameSpaceName) ? 'Smalltalk'. |
3446 | 467 |
^String streamContents:[:s| |
3841
813b462d169a
Fixed class definition fileout to catch up with changes in stx:libbasic
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3838
diff
changeset
|
468 |
s nextPutAll: '"{ NameSpace: '; nextPutAll: ns; nextPutAll: ' }"'. |
813b462d169a
Fixed class definition fileout to catch up with changes in stx:libbasic
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3838
diff
changeset
|
469 |
s cr; cr. |
3446 | 470 |
s nextPutAll: (self definitionStringInNamespace: ns). |
471 |
] |
|
472 |
||
3841
813b462d169a
Fixed class definition fileout to catch up with changes in stx:libbasic
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3838
diff
changeset
|
473 |
"Modified (comment): / 13-04-2015 / 18:23:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3203
2639572248b5
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3163
diff
changeset
|
474 |
! |
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
475 |
|
3203
2639572248b5
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3163
diff
changeset
|
476 |
definitionStringInNamespace: nsOrNil |
3446 | 477 |
| classNameUsed superClassNameUsed selPart ownerNameUsed classNameSymbolString | |
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
478 |
|
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
479 |
objectType == #variable ifTrue:[ |
3220
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
480 |
"/ a visualWorks static variable definition change. |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
481 |
"/ kludge to be here - should be a separate StaticVariableDefinitionChange |
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
482 |
^ String streamContents:[:stream | |
3203
2639572248b5
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3163
diff
changeset
|
483 |
nsOrNil notNil ifTrue:[ |
2639572248b5
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3163
diff
changeset
|
484 |
stream nextPutAll:((nsOrNil asCollectionOfSubstringsSeparatedBy:$.) asStringWith:'::') |
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
485 |
] ifFalse:[ |
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
486 |
self halt:'can this happen ?'. |
2834 | 487 |
stream nextPutAll:'Smalltalk' |
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
488 |
]. |
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
489 |
|
1196 | 490 |
stream |
491 |
nextPutAll:' addClassVarName:'; |
|
1318 | 492 |
nextPutAll:className asString storeString |
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
493 |
]. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
494 |
]. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
495 |
|
3855
ea6eae92e1ab
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3837
diff
changeset
|
496 |
superClassNameUsed := (self superClassName) ? 'nil'. |
3446 | 497 |
"Strip of namespace" |
498 |
nsOrNil notNil ifTrue:[ |
|
499 |
(superClassNameUsed startsWith: nsOrNil) ifTrue:[ |
|
500 |
superClassNameUsed := superClassNameUsed copyFrom: nsOrNil size + 3 |
|
501 |
]. |
|
502 |
]. |
|
503 |
||
3150
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
504 |
"/ careful with private classes: the definition MUST give the |
3446 | 505 |
"/ local name as argument, not the full name |
3220
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
506 |
self isPrivateClassDefinitionChange ifTrue:[ |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
507 |
classNameUsed := self localClassName. |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
508 |
] ifFalse:[ |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
509 |
classNameUsed := className. |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
510 |
]. |
3150
10fa70a50dfa
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3139
diff
changeset
|
511 |
|
3203
2639572248b5
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3163
diff
changeset
|
512 |
"/ selPart is the subclass:/variableSubclass/variableByteSubclass:/... - part |
2834 | 513 |
selPart := (self definitionSelector ? #'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:') |
514 |
keywords first. |
|
2554 | 515 |
|
3446 | 516 |
(classNameUsed first isLetter not or:[classNameUsed contains:[:c | c isLetterOrDigit not and:[c ~~ $_]]]) ifTrue:[ |
517 |
classNameSymbolString := classNameUsed asSymbol storeString |
|
518 |
] ifFalse:[ |
|
519 |
classNameSymbolString := '#' , classNameUsed. |
|
520 |
]. |
|
521 |
||
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
522 |
^ String streamContents:[:stream | |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
523 |
stream |
2554 | 524 |
nextPutAll:superClassNameUsed; |
2834 | 525 |
nextPutAll:' ',selPart; |
3446 | 526 |
nextPutLine: classNameSymbolString; |
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
527 |
tab; |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
528 |
nextPutAll:'instanceVariableNames:'; |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
529 |
nextPutLine:(instanceVariableString ? '') storeString; |
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
530 |
tab; |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
531 |
nextPutAll:'classVariableNames:'; |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
532 |
nextPutLine:(classVariableString ? '') storeString; |
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
533 |
tab; |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
534 |
nextPutAll:'poolDictionaries:'; |
3203
2639572248b5
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3163
diff
changeset
|
535 |
nextPutLine:(poolDictionaries ? '') storeString. |
3837
30ceae481017
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3810
diff
changeset
|
536 |
(self isPrivateClassDefinitionChange and:[owningClassName notNil]) ifTrue:[ |
3220
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
537 |
ownerNameUsed := self owningClassName. |
3446 | 538 |
(nsOrNil isNil or:[nsOrNil ~~ nameSpaceName]) ifTrue:[ |
539 |
(nsOrNil ? nameSpaceName) notNil ifTrue:[ |
|
540 |
ownerNameUsed := (nsOrNil ? nameSpaceName),'::',ownerNameUsed. |
|
541 |
]. |
|
3220
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
542 |
]. |
2831 | 543 |
stream |
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
544 |
tab; |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
545 |
nextPutAll:'privateIn:'; |
3220
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
546 |
nextPutAll:ownerNameUsed |
2831 | 547 |
] ifFalse:[ |
548 |
stream |
|
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
549 |
tab; |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
550 |
nextPutAll:'category:'; |
3203
2639572248b5
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3163
diff
changeset
|
551 |
nextPutAll:(category ? '') asString storeString |
2831 | 552 |
]. |
3810
542fa7a00a6f
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3808
diff
changeset
|
553 |
|
542fa7a00a6f
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3808
diff
changeset
|
554 |
classInstanceVariableString notEmptyOrNil ifTrue:[ |
3851
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
555 |
stream nextPut:$.; cr; cr; |
3810
542fa7a00a6f
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3808
diff
changeset
|
556 |
nextPutAll:classNameUsed; |
542fa7a00a6f
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3808
diff
changeset
|
557 |
nextPutAll:' class instanceVariableNames: '; |
3851
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
558 |
nextPutAll:classInstanceVariableString storeString. |
3810
542fa7a00a6f
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3808
diff
changeset
|
559 |
]. |
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
560 |
] |
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
561 |
|
2834 | 562 |
"Modified: / 13-06-2012 / 13:01:58 / cg" |
3851
525e62236712
Fix in ClassDefinitionChange: show class instance variables as statement, not as comment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
563 |
"Modified: / 15-04-2015 / 10:30:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1196 | 564 |
! |
565 |
||
3203
2639572248b5
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3163
diff
changeset
|
566 |
definitionStringWithoutNamespace |
2639572248b5
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3163
diff
changeset
|
567 |
"cg - huh - who needs that? (the definitionString already does NOT include the classes namespace)" |
2876 | 568 |
|
569 |
|ns classNameUsed superClassNameUsed| |
|
570 |
||
571 |
ns := self nameSpaceOverride. |
|
572 |
||
573 |
objectType == #variable ifTrue:[ |
|
574 |
^ String streamContents:[:stream | |
|
575 |
ns notNil ifTrue:[ |
|
576 |
stream |
|
577 |
nextPutAll:((ns asCollectionOfSubstringsSeparatedBy:$.) asStringWith:'::') |
|
578 |
] ifFalse:[ |
|
579 |
self halt:'can this happen ?'. |
|
580 |
stream |
|
581 |
nextPutAll:'Smalltalk' |
|
582 |
]. |
|
583 |
||
584 |
stream |
|
585 |
nextPutAll:' addClassVarName:'; |
|
586 |
nextPutAll:className asString storeString |
|
587 |
]. |
|
588 |
]. |
|
589 |
||
3855
ea6eae92e1ab
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3837
diff
changeset
|
590 |
superClassNameUsed := self superClassName ? 'nil'. |
2876 | 591 |
classNameUsed := self classNameWithoutNamespace. |
592 |
||
593 |
^ String streamContents:[:stream | |
|
594 |
self isPrivateClassDefinitionChange ifFalse:[ |
|
595 |
stream |
|
596 |
nextPutAll:superClassNameUsed; |
|
597 |
nextPutAll:' subclass:'; |
|
598 |
nextPutAll: classNameUsed asSymbol storeString |
|
599 |
; |
|
600 |
cr; |
|
601 |
tab; |
|
602 |
nextPutAll:'instanceVariableNames:'; |
|
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
603 |
nextPutAll:(instanceVariableString ? '') storeString; |
2876 | 604 |
cr; |
605 |
tab; |
|
606 |
nextPutAll:'classVariableNames:'; |
|
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
607 |
nextPutAll:(classVariableString ? '') storeString; |
2876 | 608 |
cr; |
609 |
tab; |
|
610 |
nextPutAll:'poolDictionaries:'; |
|
611 |
nextPutAll:(poolDictionaries ? '') storeString; |
|
612 |
cr; |
|
613 |
tab; |
|
614 |
nextPutAll:'category:'; |
|
615 |
nextPutAll:(category ? '') storeString; |
|
616 |
cr |
|
617 |
] ifTrue:[ |
|
618 |
stream |
|
619 |
nextPutAll:superClassNameUsed; |
|
620 |
nextPutAll:' subclass:'; |
|
621 |
nextPutAll: (self className copyFrom: owningClassName size + 3) asSymbol storeString |
|
622 |
; |
|
623 |
cr; |
|
624 |
tab; |
|
625 |
nextPutAll:'instanceVariableNames:'; |
|
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
626 |
nextPutAll:(instanceVariableString ? '') storeString; |
2876 | 627 |
cr; |
628 |
tab; |
|
629 |
nextPutAll:'classVariableNames:'; |
|
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
630 |
nextPutAll:(classVariableString ? '') storeString; |
2876 | 631 |
cr; |
632 |
tab; |
|
633 |
nextPutAll:'poolDictionaries:'; |
|
634 |
nextPutAll:(poolDictionaries ? '') storeString; |
|
635 |
cr; |
|
636 |
tab; |
|
637 |
nextPutAll:'privateIn:'; |
|
638 |
nextPutAll: |
|
639 |
((ns := self nameSpaceName) isNil |
|
640 |
ifTrue:[owningClassName] |
|
641 |
ifFalse:[owningClassName copyFrom: ns size + 3]); |
|
642 |
cr |
|
643 |
] |
|
644 |
] |
|
645 |
||
646 |
"Modified: / 06-10-2011 / 17:02:05 / cg" |
|
647 |
"Created: / 20-03-2012 / 16:37:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
648 |
! |
|
649 |
||
1101 | 650 |
printOn:aStream |
1866 | 651 |
aStream |
652 |
nextPutAll:className; nextPutAll:' {definition}' |
|
653 |
||
654 |
"Modified: / 12-10-2006 / 17:48:28 / cg" |
|
1101 | 655 |
! |
656 |
||
896 | 657 |
printWithoutClassNameOn:aStream |
787 | 658 |
aStream nextPutAll:('definition of ' , className) |
659 |
||
660 |
||
661 |
! ! |
|
662 |
||
772 | 663 |
!ClassDefinitionChange methodsFor:'queries'! |
664 |
||
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
665 |
definitionSelector |
1854 | 666 |
definitionSelector isNil ifTrue:[ |
667 |
self setupFromSource. |
|
3485
d191b20c93a5
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3446
diff
changeset
|
668 |
definitionSelector isNil ifTrue:[ |
d191b20c93a5
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3446
diff
changeset
|
669 |
definitionSelector := #'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' |
d191b20c93a5
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3446
diff
changeset
|
670 |
]. |
1854 | 671 |
]. |
672 |
^ definitionSelector |
|
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
673 |
|
1854 | 674 |
"Modified: / 11-10-2006 / 14:11:44 / cg" |
3485
d191b20c93a5
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3446
diff
changeset
|
675 |
"Modified: / 12-02-2014 / 20:25:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
676 |
! |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
677 |
|
2833 | 678 |
definitionSelector:aSelector |
679 |
definitionSelector := aSelector |
|
680 |
||
681 |
"Created: / 13-06-2012 / 12:45:02 / cg" |
|
682 |
! |
|
683 |
||
1871
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
684 |
owningClassName |
3220
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
685 |
"the owner's name, excluding the namespace" |
a8e24cc171f6
namespace handling fixed (I hope)
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
686 |
|
1871
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
687 |
self isPrivateClassDefinitionChange ifTrue:[ |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
688 |
owningClassName isNil ifTrue:[ |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
689 |
self setupFromSource. |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
690 |
]. |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
691 |
]. |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
692 |
^ owningClassName |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
693 |
|
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
694 |
"Created: / 12-10-2006 / 23:07:25 / cg" |
2289 | 695 |
! |
696 |
||
697 |
owningClassName:aStringOrSymbol |
|
698 |
owningClassName := aStringOrSymbol |
|
699 |
||
700 |
"Created: / 30-08-2010 / 13:55:37 / cg" |
|
772 | 701 |
! ! |
702 |
||
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
703 |
!ClassDefinitionChange methodsFor:'special'! |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
704 |
|
1395
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
705 |
installAsAutoloadedClassIfPublicWithFilename:aFilenameString |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
706 |
"install the class defined by this change as autoloaded. |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
707 |
Skip private classes. |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
708 |
Enter class file name as abbreviation" |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
709 |
|
1904 | 710 |
|parseTree sel cat clsName cls catIdx pkg| |
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
711 |
|
2289 | 712 |
private == true ifTrue:[^ self]. |
713 |
||
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
714 |
parseTree := Parser parseExpression:self source. |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
715 |
parseTree isMessage ifFalse:[ |
1395
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
716 |
self error:'bad change source'. |
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
717 |
]. |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
718 |
|
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
719 |
sel := parseTree selector. |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
720 |
(sel endsWith:':privateIn:') ifTrue:[^ self]. |
1418 | 721 |
|
3402
d13a0331a314
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3380
diff
changeset
|
722 |
catIdx := sel keywords indexOf:'category:'. |
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
723 |
catIdx ~~ 0 ifTrue:[ |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
724 |
cat := (parseTree args at:catIdx) evaluate. |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
725 |
]. |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
726 |
|
3223
c3c37b9ce3f1
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3220
diff
changeset
|
727 |
clsName := self fullClassName "className" asSymbol. |
1802 | 728 |
cls := Smalltalk at:clsName. |
1904 | 729 |
|
730 |
pkg := package ? Project current package. |
|
731 |
||
1802 | 732 |
(cls isNil |
733 |
or:[cls isBehavior not |
|
734 |
or:[cls isLoaded not]]) ifTrue:[ |
|
1904 | 735 |
|autoloadedClass| |
1395
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
736 |
|
1836 | 737 |
autoloadedClass := Smalltalk |
1395
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
738 |
installAutoloadedClassNamed:clsName |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
739 |
category:cat |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
740 |
package:pkg |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
741 |
revision:nil. |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
742 |
aFilenameString notNil ifTrue:[ |
1836 | 743 |
autoloadedClass setClassFilename:aFilenameString. |
744 |
"/ Smalltalk setFilename:aFilenameString forClass:clsName package:pkg. |
|
1395
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
745 |
] |
1904 | 746 |
] ifFalse:[ |
747 |
cls notNil ifTrue:[ |
|
748 |
cls isBehavior ifTrue:[ |
|
749 |
cls package ~= pkg ifTrue:[ |
|
3380 | 750 |
Transcript showCR:('Autoloaded class: %1 (%4) not installed (package would change from %2 to %3)' |
751 |
bindWith:clsName with:cls package with:pkg with:aFilenameString). |
|
1904 | 752 |
] |
753 |
]. |
|
754 |
]. |
|
755 |
]. |
|
1836 | 756 |
|
2402
f6799fe6acc4
changed: #installAsAutoloadedClassIfPublicWithFilename:
Claus Gittinger <cg@exept.de>
parents:
2368
diff
changeset
|
757 |
"Modified: / 03-07-2011 / 18:34:05 / cg" |
1854 | 758 |
! |
759 |
||
2207 | 760 |
invalidateSource |
761 |
"internal - flush the sourceString if it got invalidated due to a |
|
762 |
className, superclassName, etc... change" |
|
763 |
||
764 |
source := nil. |
|
765 |
! |
|
766 |
||
1854 | 767 |
setupFromSource |
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
768 |
"Extract data from class definition string in source. |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
769 |
WARNING: This overwrites values in instvars!!" |
1854 | 770 |
|
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
771 |
|parseTree catIdx poolIdx instVarIdx classVarIdx | |
1854 | 772 |
|
773 |
source notNil ifTrue:[ |
|
774 |
parseTree := Parser parseExpression:source. |
|
1878 | 775 |
(parseTree notNil and:[parseTree isMessage]) ifFalse:[ |
1887 | 776 |
self error:'bad change source' mayProceed:true. |
777 |
^ self |
|
1854 | 778 |
]. |
779 |
||
780 |
definitionSelector := parseTree selector. |
|
781 |
||
782 |
private := (definitionSelector endsWith:':privateIn:'). |
|
1871
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
783 |
private ifTrue:[ |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
784 |
owningClassName := parseTree args last name. |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
785 |
]. |
1854 | 786 |
|
787 |
catIdx := definitionSelector keywords indexOf:'category:'. |
|
788 |
catIdx ~~ 0 ifTrue:[ |
|
789 |
category := (parseTree args at:catIdx) evaluate. |
|
790 |
]. |
|
2368 | 791 |
|
2832 | 792 |
poolIdx := definitionSelector keywords indexOf:'poolDictionaries:'. |
793 |
poolIdx ~~ 0 ifTrue:[ |
|
794 |
poolDictionaries := (parseTree args at:poolIdx) evaluate. |
|
795 |
]. |
|
796 |
||
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
797 |
instVarIdx := definitionSelector keywords indexOf:'instanceVariableNames:'. |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
798 |
instVarIdx ~~ 0 ifTrue:[ |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
799 |
instanceVariableString := (parseTree args at:instVarIdx) value. |
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
800 |
]. |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
801 |
|
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
802 |
classVarIdx := definitionSelector keywords indexOf:'classVariableNames:'. |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
803 |
classVarIdx ~~ 0 ifTrue:[ |
3694
401ad8b2ca8b
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3689
diff
changeset
|
804 |
classVariableString := (parseTree args at:classVarIdx) value. |
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
805 |
]. |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
806 |
|
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
807 |
|
3446 | 808 |
"Care about nil superclasss (that's valid for certain |
809 |
classes like Object, ProtoObject or custom proxies" |
|
810 |
parseTree receiver isVariable ifTrue:[ |
|
811 |
superClassName := parseTree receiver name. |
|
812 |
] ifFalse:[ |
|
4012 | 813 |
parseTree receiver isLiteral ifTrue:[ |
3446 | 814 |
superClassName := parseTree receiver value. |
815 |
superClassName notNil ifTrue:[ |
|
816 |
self error: 'Invalid superclass - can be either a class or nil' |
|
817 |
] |
|
818 |
] |
|
819 |
]. |
|
1854 | 820 |
]. |
821 |
||
822 |
"Created: / 11-10-2006 / 14:10:02 / cg" |
|
2832 | 823 |
"Modified: / 13-06-2012 / 12:25:10 / cg" |
3446 | 824 |
"Modified: / 10-06-2013 / 17:07:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
825 |
! ! |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
826 |
|
3491
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
827 |
!ClassDefinitionChange methodsFor:'testing'! |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
828 |
|
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
829 |
isClassDefinitionChange |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
830 |
^ true |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
831 |
! |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
832 |
|
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
833 |
isOrContainsClassDefinitionChange |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
834 |
^ true |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
835 |
! |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
836 |
|
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
837 |
isPrivateClassDefinitionChange |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
838 |
"compute lazily; remember in private" |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
839 |
|
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
840 |
private isNil ifTrue:[ |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
841 |
(className includes:$:) ifFalse:[ |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
842 |
"/ cannot be private |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
843 |
private := false |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
844 |
] ifTrue:[ |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
845 |
source isNil ifTrue:[^ false ]. |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
846 |
(source includesString:'private') ifFalse:[ |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
847 |
private := false. |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
848 |
] ifTrue:[ |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
849 |
"/ (self changeClass notNil |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
850 |
"/ and:[self changeClass isLoaded not]) ifTrue:[ |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
851 |
"/ "/ cannot be private |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
852 |
"/ private := false |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
853 |
"/ ] ifTrue:[ |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
854 |
self setupFromSource. |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
855 |
"/ ]. |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
856 |
]. |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
857 |
]. |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
858 |
]. |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
859 |
^ private |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
860 |
|
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
861 |
"Created: / 11-10-2006 / 14:19:03 / cg" |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
862 |
"Modified: / 16-11-2006 / 16:34:19 / cg" |
3689
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
863 |
! |
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
864 |
|
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
865 |
isVariable |
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
866 |
indexedType notNil ifTrue:[ |
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
867 |
self halt. |
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
868 |
^ true. |
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
869 |
]. |
4d94248f61ed
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3543
diff
changeset
|
870 |
^ false. |
3491
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
871 |
! ! |
39ab3f1bc8fa
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3485
diff
changeset
|
872 |
|
2614
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
873 |
!ClassDefinitionChange methodsFor:'visiting'! |
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
874 |
|
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
875 |
acceptChangeVisitor:aVisitor |
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
876 |
^ aVisitor visitClassDefinitionChange:self. |
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
877 |
|
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
878 |
"Created: / 25-11-2011 / 17:13:13 / cg" |
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
879 |
! ! |
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
880 |
|
100 | 881 |
!ClassDefinitionChange class methodsFor:'documentation'! |
882 |
||
2518 | 883 |
version |
4012 | 884 |
^ '$Header$' |
3223
c3c37b9ce3f1
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3220
diff
changeset
|
885 |
! |
c3c37b9ce3f1
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3220
diff
changeset
|
886 |
|
c3c37b9ce3f1
class: ClassDefinitionChange
Claus Gittinger <cg@exept.de>
parents:
3220
diff
changeset
|
887 |
version_CVS |
4012 | 888 |
^ '$Header$' |
3245
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
889 |
! |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
890 |
|
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
891 |
version_HG |
a0e79ed3aa65
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3223
diff
changeset
|
892 |
|
3270
b986056e7fe8
class: ClassDefinitionChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3245
diff
changeset
|
893 |
^ '$Changeset: <not expanded> $' |
2180
c952a3ae234d
changed: #installAsAutoloadedClassIfPublicWithFilename:
Stefan Vogel <sv@exept.de>
parents:
2093
diff
changeset
|
894 |
! |
c952a3ae234d
changed: #installAsAutoloadedClassIfPublicWithFilename:
Stefan Vogel <sv@exept.de>
parents:
2093
diff
changeset
|
895 |
|
2368 | 896 |
version_SVN |
4012 | 897 |
^ '$Id$' |
100 | 898 |
! ! |
3111 | 899 |