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