author | vrany |
Tue, 24 Jan 2012 23:17:07 +0100 | |
changeset 2753 | 81f43ea8ce75 |
parent 2690 | f2ccdca6b6af |
child 2831 | 667bf6769db8 |
child 3011 | 1997ff6e7e55 |
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 |
||
0 | 14 |
ClassChange subclass:#ClassDefinitionChange |
2316 | 15 |
instanceVariableNames:'objectType superClassName classType indexedType otherParameters |
16 |
instanceVariableNames classVariableNames |
|
1854 | 17 |
classInstanceVariableNames poolDictionaries category private |
1871
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
18 |
definitionSelector owningClassName' |
235 | 19 |
classVariableNames:'' |
20 |
poolDictionaries:'' |
|
21 |
category:'System-Changes' |
|
0 | 22 |
! |
23 |
||
9 | 24 |
!ClassDefinitionChange class methodsFor:'documentation'! |
25 |
||
26 |
copyright |
|
27 |
" |
|
28 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
38 | 29 |
All Rights Reserved |
9 | 30 |
|
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
1162 | 42 |
instances represent class definition-changes. |
43 |
They are typically held in a ChangeSet. |
|
235 | 44 |
|
45 |
[author:] |
|
46 |
Claus Gittinger |
|
9 | 47 |
" |
100 | 48 |
! ! |
49 |
||
911 | 50 |
!ClassDefinitionChange methodsFor:'accessing'! |
51 |
||
1434 | 52 |
basicSuperClassName |
53 |
^ superClassName |
|
54 |
! |
|
55 |
||
1427 | 56 |
category |
1854 | 57 |
category isNil ifTrue:[ |
58 |
self setupFromSource. |
|
59 |
]. |
|
1427 | 60 |
^ category |
1854 | 61 |
|
62 |
"Modified: / 11-10-2006 / 14:12:01 / cg" |
|
1427 | 63 |
! |
64 |
||
1178 | 65 |
category:something |
66 |
category := something. |
|
67 |
! |
|
68 |
||
1427 | 69 |
classInstanceVariableNames |
70 |
^ classInstanceVariableNames |
|
71 |
! |
|
72 |
||
73 |
classInstanceVariableNames:something |
|
74 |
classInstanceVariableNames := something. |
|
75 |
! |
|
76 |
||
77 |
classVariableNames |
|
78 |
^ classVariableNames |
|
79 |
! |
|
80 |
||
81 |
classVariableNames:something |
|
82 |
classVariableNames := something. |
|
83 |
! |
|
84 |
||
2368 | 85 |
delta |
86 |
||
87 |
| class | |
|
88 |
class := self changeClass. |
|
89 |
class ifNil:[^#+]. |
|
2504 | 90 |
^(self class isSource: self source sameSourceAs: class definitionWithoutPackage "definition") |
2368 | 91 |
ifTrue:[#=] |
92 |
ifFalse:[#~] |
|
2504 | 93 |
|
94 |
"Modified: / 31-08-2011 / 09:26:48 / cg" |
|
95 |
! |
|
96 |
||
97 |
deltaDetail |
|
98 |
"Returns a delta to the current state as a ChangeDelta object" |
|
99 |
||
2690 | 100 |
| class mySource imageSource myTree imageTree same | |
2504 | 101 |
|
102 |
class := self changeClass. |
|
103 |
class isNil ifTrue:[^ ChangeDeltaInformation added ]. |
|
2753 | 104 |
class isLoaded ifFalse:[^ ChangeDeltaInformation different ]. |
2504 | 105 |
mySource := self source. |
106 |
imageSource := class definitionWithoutPackage "definition". |
|
2690 | 107 |
same := (mySource = imageSource). |
108 |
same ifFalse:[ |
|
109 |
same := (self class isSource: mySource sameSourceAs: imageSource ). |
|
110 |
same ifFalse:[ |
|
111 |
"/ care for formatting (tabs, indentation etc.) |
|
112 |
myTree := RBParser parseExpression:mySource. |
|
113 |
imageTree := RBParser parseExpression:imageSource. |
|
114 |
same := (myTree = imageTree). |
|
115 |
same ifFalse:[ |
|
116 |
"/ some classDefinition strings contain sn |
|
117 |
"/ instVarName string like 'foo bar ' instead of 'foo bar' (i.e. added a space)... |
|
118 |
((myTree receiver = imageTree receiver) |
|
119 |
and:[ (myTree selector = imageTree selector) |
|
120 |
and:[ ('*ubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' match: myTree selector) |
|
121 |
and:[ (myTree arguments at:1) = (imageTree arguments at:1) |
|
122 |
||
123 |
and:[ (2 to:5) conform:[:i | |
|
124 |
((myTree arguments at:i) isLiteral |
|
125 |
and:[ (imageTree arguments at:i) isLiteral |
|
126 |
and:[ (myTree arguments at:i) value asString withoutSeparators |
|
127 |
= (imageTree arguments at:i) value asString withoutSeparators ]]) ] |
|
128 |
||
129 |
]]]]) |
|
130 |
ifTrue:[ |
|
131 |
same := true |
|
132 |
] |
|
133 |
]. |
|
134 |
] |
|
135 |
]. |
|
136 |
||
137 |
^ same |
|
2504 | 138 |
ifTrue:[ ChangeDeltaInformation identical ] |
139 |
ifFalse:[ ChangeDeltaInformation different ] |
|
140 |
||
141 |
"Created: / 31-08-2011 / 10:26:42 / cg" |
|
2753 | 142 |
"Modified: / 24-01-2012 / 22:13:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2368 | 143 |
! |
144 |
||
1427 | 145 |
instanceVariableNames |
146 |
^ instanceVariableNames |
|
147 |
! |
|
148 |
||
149 |
instanceVariableNames:something |
|
150 |
instanceVariableNames := something. |
|
151 |
! |
|
152 |
||
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
153 |
nameSpaceName |
1318 | 154 |
objectType == #variable ifTrue:[ |
155 |
^ nil |
|
156 |
]. |
|
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
157 |
^ 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
|
158 |
|
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
159 |
"Modified: / 07-09-2011 / 20:47:14 / cg" |
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
160 |
! |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
161 |
|
1196 | 162 |
nameSpaceName: aNameSpaceName classType: aClassType otherParameters:otherParametersArg |
1854 | 163 |
"this instance setup message is used when reading from a VW-xml change file. |
164 |
Support for this is not yet complete." |
|
165 |
||
166 |
|indexedType imports| |
|
1196 | 167 |
|
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
168 |
nameSpaceOverride := aNameSpaceName. |
911 | 169 |
classType := aClassType. |
1196 | 170 |
otherParameters := Dictionary new addAll:otherParametersArg; yourself. |
171 |
||
172 |
superClassName := otherParameters at:#superclass: ifAbsent:nil. |
|
173 |
superClassName notNil ifTrue:[ |
|
174 |
superClassName := superClassName pathString. |
|
175 |
]. |
|
176 |
indexedType := otherParameters at:#indexedType: ifAbsent:nil. |
|
177 |
private := otherParameters at:#private: ifAbsent:nil. |
|
178 |
instanceVariableNames := otherParameters at:#instanceVariableNames: ifAbsent:nil. |
|
179 |
classInstanceVariableNames := otherParameters at:#classInstanceVariableNames: ifAbsent:nil. |
|
180 |
imports := otherParameters at:#imports: ifAbsent:nil. |
|
181 |
category := otherParameters at:#category: ifAbsent:nil. |
|
1854 | 182 |
|
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
183 |
"Modified: / 15-06-2010 / 14:50:35 / cg" |
911 | 184 |
! |
185 |
||
186 |
objectType |
|
187 |
"return the value of the instance variable 'objectType' (automatically generated)" |
|
188 |
||
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
189 |
^ objectType |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
190 |
! |
911 | 191 |
|
192 |
objectType:something |
|
193 |
"set the value of the instance variable 'objectType' (automatically generated)" |
|
194 |
||
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
195 |
objectType := something. |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
196 |
! |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
197 |
|
1427 | 198 |
poolDictionaries |
199 |
^ poolDictionaries |
|
200 |
! |
|
201 |
||
202 |
poolDictionaries:something |
|
203 |
poolDictionaries := something. |
|
204 |
! |
|
205 |
||
2289 | 206 |
private:aBoolean |
207 |
private := aBoolean. |
|
208 |
||
209 |
"Created: / 30-08-2010 / 13:56:11 / cg" |
|
210 |
! |
|
211 |
||
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
212 |
source |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
213 |
"return the source of the change" |
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
214 |
|
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
215 |
|src ns| |
1196 | 216 |
|
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
217 |
(src := source) isNil ifTrue:[ |
1196 | 218 |
src := self definitionString |
219 |
]. |
|
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
220 |
|
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
221 |
(ns := self nameSpaceOverride) notNil ifTrue:[ |
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
222 |
(className startsWith:(ns,'::')) ifFalse:[ |
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
223 |
^ '"{ NameSpace: ' , ns , ' }"' , |
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
224 |
Character cr, Character cr , |
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
225 |
src string |
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
226 |
]. |
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
227 |
]. |
1196 | 228 |
^ src |
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
229 |
|
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
230 |
"Modified: / 07-09-2011 / 20:46:13 / cg" |
1196 | 231 |
! |
232 |
||
233 |
superClassName |
|
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
234 |
|nm| |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
235 |
|
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
236 |
nm := superClassName. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
237 |
nm notNil ifTrue:[ |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
238 |
(nm includes:$.) ifTrue:[ |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
239 |
^ nm copyReplaceAll:$. withAll:'::'. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
240 |
] |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
241 |
]. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
242 |
^ nm |
1427 | 243 |
! |
244 |
||
245 |
superClassName:something |
|
246 |
superClassName := something. |
|
2207 | 247 |
self invalidateSource. |
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
248 |
! |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
249 |
|
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
250 |
superClassNameWithoutMyNamespace |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
251 |
|nm| |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
252 |
|
1956 | 253 |
superClassName isNil ifTrue:[^ 'nil']. |
254 |
||
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
255 |
nm := self cutMyNameSpaceOf:superClassName. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
256 |
(nm includes:$.) ifTrue:[ |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
257 |
^ nm copyReplaceAll:$. withAll:'::'. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
258 |
]. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
259 |
^ nm |
1956 | 260 |
|
261 |
"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
|
262 |
! |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
263 |
|
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
264 |
superClassNameWithoutNamespace |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
265 |
|nm| |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
266 |
|
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
267 |
nm := self cutNameSpaceOf:superClassName. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
268 |
(nm includes:$.) ifTrue:[ |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
269 |
^ nm copyReplaceAll:$. withAll:'::'. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
270 |
]. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
271 |
^ nm |
1046
450ef3136cc3
care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents:
962
diff
changeset
|
272 |
! ! |
911 | 273 |
|
1998
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
274 |
!ClassDefinitionChange methodsFor:'applying'! |
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
275 |
|
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
276 |
apply |
2425 | 277 |
superClassName isNil ifTrue:[ |
278 |
self setupFromSource |
|
279 |
]. |
|
280 |
superClassName isNil ifTrue:[ |
|
281 |
self error:'Should not happen' |
|
282 |
]. |
|
283 |
(Smalltalk classNamed:superClassName) isNil ifTrue:[ |
|
284 |
Class undeclared:superClassName |
|
285 |
]. |
|
2554 | 286 |
Parser evaluate:(self source). |
1998
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
287 |
package notNil ifTrue:[ |
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
288 |
self changeClass setPackage:package. |
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
289 |
]. |
2368 | 290 |
|
291 |
" |
|
2425 | 292 |
(ClassDefinitionChange className: #TestB source: 'TestA subclass: #TestB |
293 |
instanceVariableNames:'''' |
|
294 |
classVariableNames:'''' |
|
295 |
poolDictionaries:'''' |
|
296 |
category:''* remove me *''') |
|
297 |
apply |
|
2368 | 298 |
" |
299 |
||
300 |
"Modified: / 08-11-2010 / 16:10:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2554 | 301 |
"Modified: / 06-10-2011 / 17:01:58 / cg" |
1998
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
302 |
! ! |
06004ad8a6e4
changed #apply - set the packageId
Stefan Vogel <sv@exept.de>
parents:
1956
diff
changeset
|
303 |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
304 |
!ClassDefinitionChange methodsFor:'comparing'! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
305 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
306 |
isForSameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
307 |
"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
|
308 |
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
|
309 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
310 |
changeB isClassDefinitionChange ifFalse:[^ false]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
311 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
312 |
className ~= changeB className ifTrue:[^ false]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
313 |
^ true |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
314 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
315 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
316 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
317 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
318 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
319 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
320 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
321 |
sameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
322 |
"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
|
323 |
|
798 | 324 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
325 |
^ self sameSourceAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
326 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
327 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
328 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
329 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
330 |
|
2410 | 331 |
!ClassDefinitionChange methodsFor:'converting'! |
332 |
||
333 |
asAntiChange |
|
334 |
||
335 |
^ClassRemoveChange className: self className |
|
336 |
||
337 |
"Created: / 02-11-2009 / 11:11:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
338 |
! ! |
|
339 |
||
962 | 340 |
!ClassDefinitionChange methodsFor:'printing & storing'! |
787 | 341 |
|
1196 | 342 |
definitionString |
2554 | 343 |
|ns classNameUsed superClassNameUsed| |
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
344 |
|
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
345 |
ns := self nameSpaceOverride. |
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
346 |
|
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
347 |
objectType == #variable ifTrue:[ |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
348 |
^ String streamContents:[:stream | |
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
349 |
ns notNil ifTrue:[ |
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
350 |
stream |
2515
39059cf824a8
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2504
diff
changeset
|
351 |
nextPutAll:((ns asCollectionOfSubstringsSeparatedBy:$.) asStringWith:'::') |
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
352 |
] ifFalse:[ |
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
353 |
self halt:'can this happen ?'. |
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
354 |
stream |
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
355 |
nextPutAll:'Smalltalk' |
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
356 |
]. |
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
357 |
|
1196 | 358 |
stream |
359 |
nextPutAll:' addClassVarName:'; |
|
1318 | 360 |
nextPutAll:className asString storeString |
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
361 |
]. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
362 |
]. |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
363 |
|
2554 | 364 |
superClassNameUsed := self superClassName. |
365 |
classNameUsed := self className. |
|
366 |
||
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
367 |
^ String streamContents:[:stream | |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
368 |
stream |
2554 | 369 |
nextPutAll:superClassNameUsed; |
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
370 |
nextPutAll:' subclass:'; |
2554 | 371 |
nextPutAll: classNameUsed asSymbol storeString |
1473
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
372 |
; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
373 |
cr; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
374 |
spaces:4; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
375 |
nextPutAll:'instanceVariableNames: '; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
376 |
nextPutAll:(instanceVariableNames ? '') storeString; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
377 |
cr; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
378 |
spaces:4; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
379 |
nextPutAll:'classVariableNames: '; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
380 |
nextPutAll:(classVariableNames ? '') storeString; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
381 |
cr; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
382 |
spaces:4; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
383 |
nextPutAll:'poolDictionaries: '; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
384 |
nextPutAll:(poolDictionaries ? '') storeString; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
385 |
cr; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
386 |
spaces:4; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
387 |
nextPutAll:'category: '; |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
388 |
nextPutAll:(category ? '') storeString |
a8fe22600414
more support for alien namespaces (VW7)
Claus Gittinger <cg@exept.de>
parents:
1434
diff
changeset
|
389 |
] |
2280
c93519e114c9
fix for namespace: do not add ns twice.
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
390 |
|
2554 | 391 |
"Modified: / 06-10-2011 / 17:02:05 / cg" |
1196 | 392 |
! |
393 |
||
1101 | 394 |
printOn:aStream |
1866 | 395 |
aStream |
396 |
nextPutAll:className; nextPutAll:' {definition}' |
|
397 |
||
398 |
"Modified: / 12-10-2006 / 17:48:28 / cg" |
|
1101 | 399 |
! |
400 |
||
896 | 401 |
printWithoutClassNameOn:aStream |
787 | 402 |
aStream nextPutAll:('definition of ' , className) |
403 |
||
404 |
||
405 |
! ! |
|
406 |
||
772 | 407 |
!ClassDefinitionChange methodsFor:'queries'! |
408 |
||
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
409 |
definitionSelector |
1854 | 410 |
definitionSelector isNil ifTrue:[ |
411 |
self setupFromSource. |
|
412 |
]. |
|
413 |
^ definitionSelector |
|
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
414 |
|
1854 | 415 |
"Modified: / 11-10-2006 / 14:11:44 / cg" |
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
416 |
! |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
417 |
|
772 | 418 |
isClassDefinitionChange |
419 |
^ true |
|
1854 | 420 |
! |
421 |
||
422 |
isPrivateClassDefinitionChange |
|
423 |
private isNil ifTrue:[ |
|
1904 | 424 |
(className includes:$:) ifFalse:[ |
425 |
"/ cannot be private |
|
426 |
private := false |
|
427 |
] ifTrue:[ |
|
1909
ec92c9dabf66
care for isPrivate query when no source is avail.
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
428 |
source isNil ifTrue:[^ false ]. |
ec92c9dabf66
care for isPrivate query when no source is avail.
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
429 |
(source includesString:'private') ifFalse:[ |
ec92c9dabf66
care for isPrivate query when no source is avail.
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
430 |
private := false. |
1904 | 431 |
] ifTrue:[ |
1916 | 432 |
"/ (self changeClass notNil |
433 |
"/ and:[self changeClass isLoaded not]) ifTrue:[ |
|
434 |
"/ "/ cannot be private |
|
435 |
"/ private := false |
|
436 |
"/ ] ifTrue:[ |
|
1909
ec92c9dabf66
care for isPrivate query when no source is avail.
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
437 |
self setupFromSource. |
1916 | 438 |
"/ ]. |
1904 | 439 |
]. |
440 |
]. |
|
1854 | 441 |
]. |
442 |
^ private |
|
443 |
||
444 |
"Created: / 11-10-2006 / 14:19:03 / cg" |
|
1909
ec92c9dabf66
care for isPrivate query when no source is avail.
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
445 |
"Modified: / 16-11-2006 / 16:34:19 / cg" |
1871
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
446 |
! |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
447 |
|
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
448 |
owningClassName |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
449 |
self isPrivateClassDefinitionChange ifTrue:[ |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
450 |
owningClassName isNil ifTrue:[ |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
451 |
self setupFromSource. |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
452 |
]. |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
453 |
]. |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
454 |
^ owningClassName |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
455 |
|
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
456 |
"Created: / 12-10-2006 / 23:07:25 / cg" |
2289 | 457 |
! |
458 |
||
459 |
owningClassName:aStringOrSymbol |
|
460 |
owningClassName := aStringOrSymbol |
|
461 |
||
462 |
"Created: / 30-08-2010 / 13:55:37 / cg" |
|
772 | 463 |
! ! |
464 |
||
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
465 |
!ClassDefinitionChange methodsFor:'special'! |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
466 |
|
1395
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
467 |
installAsAutoloadedClassIfPublicWithFilename:aFilenameString |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
468 |
"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
|
469 |
Skip private classes. |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
470 |
Enter class file name as abbreviation" |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
471 |
|
1904 | 472 |
|parseTree sel cat clsName cls catIdx pkg| |
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
473 |
|
2289 | 474 |
private == true ifTrue:[^ self]. |
475 |
||
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
476 |
parseTree := Parser parseExpression:self source. |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
477 |
parseTree isMessage ifFalse:[ |
1395
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
478 |
self error:'bad change source'. |
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
479 |
]. |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
480 |
|
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
481 |
sel := parseTree selector. |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
482 |
(sel endsWith:':privateIn:') ifTrue:[^ self]. |
1418 | 483 |
|
2402
f6799fe6acc4
changed: #installAsAutoloadedClassIfPublicWithFilename:
Claus Gittinger <cg@exept.de>
parents:
2368
diff
changeset
|
484 |
catIdx := sel asSymbol keywords indexOf:'category:'. |
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
485 |
catIdx ~~ 0 ifTrue:[ |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
486 |
cat := (parseTree args at:catIdx) evaluate. |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
487 |
]. |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
488 |
|
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
489 |
clsName := self className asSymbol. |
1802 | 490 |
cls := Smalltalk at:clsName. |
1904 | 491 |
|
492 |
pkg := package ? Project current package. |
|
493 |
||
1802 | 494 |
(cls isNil |
495 |
or:[cls isBehavior not |
|
496 |
or:[cls isLoaded not]]) ifTrue:[ |
|
1904 | 497 |
|autoloadedClass| |
1395
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
498 |
|
1836 | 499 |
autoloadedClass := Smalltalk |
1395
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
500 |
installAutoloadedClassNamed:clsName |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
501 |
category:cat |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
502 |
package:pkg |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
503 |
revision:nil. |
6ea99b157f6b
Use #setFilename:forClass:package: to define an abbreviation
Stefan Vogel <sv@exept.de>
parents:
1318
diff
changeset
|
504 |
aFilenameString notNil ifTrue:[ |
1836 | 505 |
autoloadedClass setClassFilename:aFilenameString. |
506 |
"/ 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
|
507 |
] |
1904 | 508 |
] ifFalse:[ |
509 |
cls notNil ifTrue:[ |
|
510 |
cls isBehavior ifTrue:[ |
|
511 |
cls package ~= pkg ifTrue:[ |
|
2180
c952a3ae234d
changed: #installAsAutoloadedClassIfPublicWithFilename:
Stefan Vogel <sv@exept.de>
parents:
2093
diff
changeset
|
512 |
Transcript showCR:('Autoloaded class: %1 not installed (package would change from %2 to %3)' |
c952a3ae234d
changed: #installAsAutoloadedClassIfPublicWithFilename:
Stefan Vogel <sv@exept.de>
parents:
2093
diff
changeset
|
513 |
bindWith:clsName with:cls package with:pkg). |
1904 | 514 |
] |
515 |
]. |
|
516 |
]. |
|
517 |
]. |
|
1836 | 518 |
|
2402
f6799fe6acc4
changed: #installAsAutoloadedClassIfPublicWithFilename:
Claus Gittinger <cg@exept.de>
parents:
2368
diff
changeset
|
519 |
"Modified: / 03-07-2011 / 18:34:05 / cg" |
1854 | 520 |
! |
521 |
||
2207 | 522 |
invalidateSource |
523 |
"internal - flush the sourceString if it got invalidated due to a |
|
524 |
className, superclassName, etc... change" |
|
525 |
||
526 |
source := nil. |
|
527 |
! |
|
528 |
||
1854 | 529 |
setupFromSource |
530 |
"extract privacy, category and selector from the source" |
|
531 |
||
532 |
|parseTree catIdx| |
|
533 |
||
534 |
source notNil ifTrue:[ |
|
535 |
parseTree := Parser parseExpression:source. |
|
1878 | 536 |
(parseTree notNil and:[parseTree isMessage]) ifFalse:[ |
1887 | 537 |
self error:'bad change source' mayProceed:true. |
538 |
^ self |
|
1854 | 539 |
]. |
540 |
||
541 |
definitionSelector := parseTree selector. |
|
542 |
||
543 |
private := (definitionSelector endsWith:':privateIn:'). |
|
1871
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
544 |
private ifTrue:[ |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
545 |
owningClassName := parseTree args last name. |
3daa5601c86e
+owner access and other support for private classes
Claus Gittinger <cg@exept.de>
parents:
1866
diff
changeset
|
546 |
]. |
1854 | 547 |
|
548 |
catIdx := definitionSelector keywords indexOf:'category:'. |
|
549 |
catIdx ~~ 0 ifTrue:[ |
|
550 |
category := (parseTree args at:catIdx) evaluate. |
|
551 |
]. |
|
2368 | 552 |
|
553 |
superClassName := parseTree receiver name. |
|
1854 | 554 |
]. |
555 |
||
556 |
"Created: / 11-10-2006 / 14:10:02 / cg" |
|
1887 | 557 |
"Modified: / 26-10-2006 / 19:29:17 / cg" |
2368 | 558 |
"Modified: / 08-11-2010 / 13:47:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1134
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
559 |
! ! |
915934e8aab8
care for package; added installAsAutoloaded
Claus Gittinger <cg@exept.de>
parents:
1101
diff
changeset
|
560 |
|
2614
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
561 |
!ClassDefinitionChange methodsFor:'visiting'! |
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
562 |
|
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
563 |
acceptChangeVisitor:aVisitor |
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
564 |
^ aVisitor visitClassDefinitionChange:self. |
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
565 |
|
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
566 |
"Created: / 25-11-2011 / 17:13:13 / cg" |
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
567 |
! ! |
7d342615bb66
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2554
diff
changeset
|
568 |
|
100 | 569 |
!ClassDefinitionChange class methodsFor:'documentation'! |
570 |
||
2518 | 571 |
version |
2753 | 572 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.66 2012-01-24 22:17:07 vrany Exp $' |
2518 | 573 |
! |
574 |
||
2368 | 575 |
version_CVS |
2753 | 576 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.66 2012-01-24 22:17:07 vrany Exp $' |
2180
c952a3ae234d
changed: #installAsAutoloadedClassIfPublicWithFilename:
Stefan Vogel <sv@exept.de>
parents:
2093
diff
changeset
|
577 |
! |
c952a3ae234d
changed: #installAsAutoloadedClassIfPublicWithFilename:
Stefan Vogel <sv@exept.de>
parents:
2093
diff
changeset
|
578 |
|
2368 | 579 |
version_SVN |
2402
f6799fe6acc4
changed: #installAsAutoloadedClassIfPublicWithFilename:
Claus Gittinger <cg@exept.de>
parents:
2368
diff
changeset
|
580 |
^ '§ Id: ClassDefinitionChange.st 1867 2011-06-08 21:57:08Z vranyj1 §' |
100 | 581 |
! ! |