author | Claus Gittinger <cg@exept.de> |
Sun, 14 Apr 2013 09:49:52 +0200 | |
changeset 3213 | 56e4caab0075 |
parent 3179 | f66dd0b4043c |
child 3214 | 905a4976fac8 |
permissions | -rw-r--r-- |
4 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
25 | 3 |
All Rights Reserved |
4 | 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 |
" |
|
956
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
12 |
"{ Package: 'stx:libbasic3' }" |
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
13 |
|
0 | 14 |
ClassChange subclass:#MethodChange |
956
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
15 |
instanceVariableNames:'selector methodCategory privacy previousVersion' |
2509 | 16 |
classVariableNames:'LastReplacementClass' |
235 | 17 |
poolDictionaries:'' |
18 |
category:'System-Changes' |
|
0 | 19 |
! |
20 |
||
1325 | 21 |
MethodChange subclass:#NamedMethodChange |
22 |
instanceVariableNames:'changeName' |
|
23 |
classVariableNames:'' |
|
24 |
poolDictionaries:'' |
|
25 |
privateIn:MethodChange |
|
26 |
! |
|
27 |
||
25 | 28 |
!MethodChange class methodsFor:'documentation'! |
29 |
||
30 |
copyright |
|
31 |
" |
|
32 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
33 |
All Rights Reserved |
|
10 | 34 |
|
25 | 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 |
||
45 | 44 |
documentation |
45 |
" |
|
46 |
instances represent method-changes (as done in the browser). |
|
47 |
They are typically held in a ChangeSet. |
|
235 | 48 |
|
49 |
[author:] |
|
50 |
Claus Gittinger |
|
45 | 51 |
" |
25 | 52 |
! ! |
10 | 53 |
|
0 | 54 |
!MethodChange class methodsFor:'instance creation'! |
55 |
||
2119 | 56 |
class:cls selector:sel category:cat |
57 |
^ self basicNew class:cls selector:sel category:cat |
|
58 |
||
59 |
||
60 |
! |
|
61 |
||
102
3f85fe87cc58
include category in methodChanges
Claus Gittinger <cg@exept.de>
parents:
85
diff
changeset
|
62 |
class:cls selector:sel source:src category:cat |
3f85fe87cc58
include category in methodChanges
Claus Gittinger <cg@exept.de>
parents:
85
diff
changeset
|
63 |
^ self basicNew class:cls selector:sel source:src category:cat |
1073 | 64 |
! |
65 |
||
2119 | 66 |
className:clsName selector:sel category:cat |
67 |
^ self basicNew className:clsName selector:sel category:cat |
|
68 |
||
69 |
"Created: / 12-11-2006 / 15:54:25 / cg" |
|
70 |
! |
|
71 |
||
1073 | 72 |
className:clsName selector:sel source:src category:cat |
73 |
^ self basicNew className:clsName selector:sel source:src category:cat |
|
0 | 74 |
! ! |
75 |
||
76 |
!MethodChange methodsFor:'accessing'! |
|
77 |
||
1073 | 78 |
category |
79 |
^ methodCategory |
|
80 |
! |
|
81 |
||
911 | 82 |
category: aCategory |
83 |
methodCategory := aCategory |
|
84 |
||
85 |
"Created: / 7.2.1998 / 19:47:53 / cg" |
|
86 |
! |
|
87 |
||
852 | 88 |
changeMethod |
89 |
|cls| |
|
90 |
||
91 |
cls := self changeClass. |
|
92 |
cls isNil ifTrue:[^ nil]. |
|
93 |
^ cls compiledMethodAt:selector |
|
94 |
||
95 |
"Created: / 7.2.1998 / 19:47:53 / cg" |
|
96 |
! |
|
97 |
||
850 | 98 |
changeSelector |
99 |
^ selector |
|
100 |
||
101 |
"Created: / 6.2.1998 / 13:29:25 / cg" |
|
102 |
! |
|
103 |
||
102
3f85fe87cc58
include category in methodChanges
Claus Gittinger <cg@exept.de>
parents:
85
diff
changeset
|
104 |
class:cls selector:sel source:src category:cat |
1288 | 105 |
self className:(cls name) selector:sel source:src category:cat |
648 | 106 |
! |
107 |
||
654 | 108 |
className:clsName selector:sel source:src category:cat |
1288 | 109 |
self className:clsName selector:sel source:src category:cat privacy:nil |
654 | 110 |
! |
111 |
||
112 |
className:clsName selector:sel source:src category:cat privacy:priv |
|
2258
b976e8e2874e
comment/format in: #selector:
Claus Gittinger <cg@exept.de>
parents:
2257
diff
changeset
|
113 |
self assert:(src isString). |
b976e8e2874e
comment/format in: #selector:
Claus Gittinger <cg@exept.de>
parents:
2257
diff
changeset
|
114 |
self assert:(sel isString or:[sel isSymbol]). |
1288 | 115 |
|
654 | 116 |
className := clsName. |
117 |
selector := sel. |
|
118 |
source := src. |
|
119 |
methodCategory := cat. |
|
120 |
privacy := priv. |
|
121 |
||
122 |
"Created: / 16.2.1998 / 12:29:49 / cg" |
|
123 |
"Modified: / 16.2.1998 / 14:28:12 / cg" |
|
124 |
! |
|
125 |
||
2369 | 126 |
delta |
2503 | 127 |
"/ obsolete: please use deltaDetail |
2369 | 128 |
|
129 |
| mth | |
|
130 |
||
131 |
self isMethodCodeChange ifFalse:[^super delta]. |
|
132 |
mth := self changeMethod. |
|
2625 | 133 |
mth isNil ifTrue:[^#+]. |
2369 | 134 |
^(self class isSource: self source sameSourceAs: mth source) |
135 |
ifTrue:[#=] |
|
136 |
ifFalse:[#~] |
|
2503 | 137 |
|
2625 | 138 |
"Modified: / 18-11-2011 / 14:48:50 / cg" |
2503 | 139 |
! |
140 |
||
141 |
deltaDetail |
|
142 |
"Returns a delta to the current state as a ChangeDelta object" |
|
143 |
||
144 |
| mth mySource imageSource| |
|
145 |
||
146 |
self isMethodCodeChange ifFalse:[^super deltaDetail]. |
|
147 |
mth := self changeMethod. |
|
148 |
mth isNil ifTrue:[^ ChangeDeltaInformation added ]. |
|
149 |
mySource := self source. |
|
150 |
imageSource := mth source. |
|
3138 | 151 |
|
152 |
(self class isSource: mySource sameSourceAs: imageSource) ifTrue:[ |
|
153 |
^ ChangeDeltaInformation identical |
|
154 |
]. |
|
155 |
^ ChangeDeltaInformation different |
|
2503 | 156 |
|
157 |
"Created: / 31-08-2011 / 10:27:58 / cg" |
|
2369 | 158 |
! |
159 |
||
2470 | 160 |
imageSource |
2846
221a345239fb
comment/format in: #imageSource
Claus Gittinger <cg@exept.de>
parents:
2625
diff
changeset
|
161 |
"return the source for the in-image version of the method" |
2470 | 162 |
|
163 |
| mth | |
|
164 |
||
2846
221a345239fb
comment/format in: #imageSource
Claus Gittinger <cg@exept.de>
parents:
2625
diff
changeset
|
165 |
self isMethodCodeChange ifFalse:[^ super imageSource]. |
2470 | 166 |
mth := self changeMethod. |
2846
221a345239fb
comment/format in: #imageSource
Claus Gittinger <cg@exept.de>
parents:
2625
diff
changeset
|
167 |
^ mth isNil |
221a345239fb
comment/format in: #imageSource
Claus Gittinger <cg@exept.de>
parents:
2625
diff
changeset
|
168 |
ifTrue: [nil] |
221a345239fb
comment/format in: #imageSource
Claus Gittinger <cg@exept.de>
parents:
2625
diff
changeset
|
169 |
ifFalse:[mth source] |
2470 | 170 |
|
171 |
"Created: / 19-07-2011 / 12:02:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2846
221a345239fb
comment/format in: #imageSource
Claus Gittinger <cg@exept.de>
parents:
2625
diff
changeset
|
172 |
"Modified (format): / 25-07-2012 / 17:37:52 / cg" |
2470 | 173 |
! |
174 |
||
652 | 175 |
methodCategory |
1234 | 176 |
|
652 | 177 |
^ methodCategory |
178 |
||
179 |
"Created: / 7.2.1998 / 19:47:53 / cg" |
|
180 |
! |
|
181 |
||
1234 | 182 |
previousPackage |
183 |
| isNewMethod | |
|
184 |
isNewMethod := self previousVersion isNil. |
|
185 |
isNewMethod ifFalse:[ |
|
186 |
^ self previousVersion package. |
|
187 |
]. |
|
188 |
||
189 |
^ nil |
|
190 |
! |
|
191 |
||
956
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
192 |
previousVersion |
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
193 |
"return the value of the instance variable 'previousVersion' (automatically generated)" |
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
194 |
|
1073 | 195 |
^ previousVersion |
196 |
! |
|
956
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
197 |
|
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
198 |
previousVersion:something |
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
199 |
"set the value of the instance variable 'previousVersion' (automatically generated)" |
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
200 |
|
1073 | 201 |
previousVersion := something. |
202 |
! |
|
956
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
203 |
|
1234 | 204 |
previousVersionSource |
205 |
"return the value of the instance variable 'previousVersion' (automatically generated)" |
|
206 |
||
207 |
previousVersion isNil ifTrue:[^ nil]. |
|
208 |
^ previousVersion source |
|
209 |
! |
|
210 |
||
2872 | 211 |
privacy |
212 |
||
213 |
^privacy ? #public |
|
214 |
||
215 |
"Created: / 19-03-2012 / 18:16:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
216 |
! |
|
217 |
||
648 | 218 |
selector |
219 |
^ selector |
|
220 |
||
221 |
"Created: / 6.2.1998 / 13:29:25 / cg" |
|
911 | 222 |
! |
223 |
||
224 |
selector:aSymbol |
|
2257 | 225 |
self assert:(aSymbol isSymbol). |
226 |
||
911 | 227 |
selector := aSymbol |
228 |
||
229 |
"Created: / 6.2.1998 / 13:29:25 / cg" |
|
0 | 230 |
! ! |
231 |
||
849 | 232 |
!MethodChange methodsFor:'applying'! |
233 |
||
234 |
apply |
|
235 |
"apply the change" |
|
236 |
||
2512 | 237 |
|class replacementClassName suggestion| |
1322 | 238 |
|
2020
5b3af99a4829
changed #apply: use #applyChange
Stefan Vogel <sv@exept.de>
parents:
1845
diff
changeset
|
239 |
class := self changeClass. |
1196 | 240 |
class isNil ifTrue:[ |
2512 | 241 |
"/ try the same replacement class again |
242 |
(LastReplacementClass notEmptyOrNil |
|
243 |
and:[ (class := Smalltalk classNamed:LastReplacementClass) notNil |
|
244 |
and:[ |
|
245 |
(className endsWith:' class') ifTrue:[ |
|
246 |
class := class theMetaclass |
|
247 |
] ifFalse:[ |
|
248 |
class := class theNonMetaclass |
|
249 |
]. |
|
250 |
class nameWithoutPrefix = className |
|
251 |
]]) |
|
252 |
ifFalse:[ |
|
253 |
"/ try a replacement class in the same namespace again |
|
254 |
suggestion := LastReplacementClass. |
|
255 |
(class notNil |
|
256 |
and:[ (class := class nameSpace classNamed:className) notNil |
|
257 |
and:[ |
|
258 |
(className endsWith:' class') ifTrue:[ |
|
259 |
class := class theMetaclass |
|
260 |
] ifFalse:[ |
|
261 |
class := class theNonMetaclass |
|
262 |
]. |
|
263 |
class nameWithoutPrefix = className |
|
264 |
]]) |
|
265 |
ifFalse:[ |
|
266 |
"/ ask for a replacement class |
|
267 |
replacementClassName := Dialog |
|
3156 | 268 |
requestClassName:('Cannot apply change for missing class: %1\\Use replacement class (or press cancel)' bindWith:className) withCRs |
2512 | 269 |
initialAnswer:suggestion. |
2516
a1fdfc5e22cd
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2512
diff
changeset
|
270 |
replacementClassName isNil ifTrue:[ AbortSignal raise ]. |
a1fdfc5e22cd
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2512
diff
changeset
|
271 |
|
2512 | 272 |
(replacementClassName isEmptyOrNil |
273 |
or:[ (class := Smalltalk classNamed:replacementClassName) isNil]) ifTrue:[ |
|
274 |
self error:('Cannot apply change for missing class: ' , replacementClassName) mayProceed:true. |
|
275 |
^ self |
|
276 |
]. |
|
277 |
(className endsWith:' class') ifTrue:[ |
|
278 |
class := class theMetaclass |
|
279 |
] ifFalse:[ |
|
280 |
class := class theNonMetaclass |
|
281 |
]. |
|
282 |
LastReplacementClass := replacementClassName |
|
283 |
] |
|
284 |
] |
|
1196 | 285 |
]. |
849 | 286 |
class compile:source classified:methodCategory logged:true. |
2509 | 287 |
|
2516
a1fdfc5e22cd
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2512
diff
changeset
|
288 |
"Modified: / 07-09-2011 / 21:09:19 / cg" |
849 | 289 |
! ! |
290 |
||
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
291 |
!MethodChange methodsFor:'comparing'! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
292 |
|
3213 | 293 |
isConflict |
294 |
"true if this change is different than what is already in the image |
|
295 |
(i.e. it overwrites some existing code)" |
|
296 |
||
297 |
|cls mthd| |
|
298 |
||
299 |
(cls := self changeClass) isNil ifTrue:[^ false]. |
|
300 |
(mthd := cls compiledMethodAt:selector) isNil ifTrue:[^ false]. |
|
301 |
^ mthd category ~= methodCategory |
|
302 |
or:[ mthd source ~= self source ] |
|
303 |
! |
|
304 |
||
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
305 |
isForSameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
306 |
"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:
779
diff
changeset
|
307 |
thingy as the receiver (i.e. same method, same definition etc.)." |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
308 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
309 |
"/ I am a methodChange - B must be as well. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
310 |
changeB isMethodChange ifFalse:[^ false]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
311 |
|
1199 | 312 |
selector ~= changeB selector ifTrue:[^ false]. |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
313 |
className ~= changeB className ifTrue:[^ false]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
314 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
315 |
^ true |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
316 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
317 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
318 |
sameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
319 |
"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:
779
diff
changeset
|
320 |
|
798 | 321 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
1509 | 322 |
(self sameSourceAs:changeB) ifTrue:[^ true]. |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
323 |
|
1509 | 324 |
^ false. |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
325 |
|
1509 | 326 |
"Modified: / 25-07-2006 / 11:23:27 / cg" |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
327 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
328 |
|
1325 | 329 |
!MethodChange methodsFor:'converting'! |
330 |
||
331 |
asNamedMethodChange |
|
332 |
^ NamedMethodChange fromMethodChange:self |
|
333 |
! ! |
|
334 |
||
2369 | 335 |
!MethodChange methodsFor:'fileout'! |
336 |
||
337 |
basicFileOutOn: aStream |
|
338 |
||
339 |
|cat | |
|
340 |
||
341 |
self isMethodCodeChange ifFalse:[^super basicFileOutOn: aStream]. |
|
342 |
||
343 |
||
344 |
||
345 |
aStream nextPutChunkSeparator. |
|
346 |
self className printOn:aStream. |
|
347 |
"/ self printClassNameOn:aStream. |
|
348 |
||
349 |
(privacy ? #public) ~~ #public ifTrue:[ |
|
350 |
aStream space; nextPutAll:privacy; nextPutAll:'MethodsFor:'. |
|
351 |
] ifFalse:[ |
|
352 |
aStream nextPutAll:' methodsFor:'. |
|
353 |
]. |
|
354 |
||
355 |
cat := methodCategory ? ''. |
|
356 |
aStream nextPutAll:cat asString storeString. |
|
357 |
aStream nextPutChunkSeparator; cr; cr. |
|
358 |
||
359 |
source := self source. |
|
360 |
source isNil ifTrue:[ |
|
361 |
ClassDescription fileOutErrorSignal |
|
362 |
raiseRequestWith:self |
|
363 |
errorString:(' - no source for method: ' , |
|
364 |
self className , '>>' , selector). |
|
365 |
||
366 |
] ifFalse:[ |
|
367 |
aStream nextChunkPut:source. |
|
368 |
]. |
|
369 |
aStream space. |
|
370 |
aStream nextPutChunkSeparator. |
|
371 |
aStream cr; cr |
|
372 |
||
373 |
"Modified: / 05-12-2009 / 12:38:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
374 |
! ! |
|
375 |
||
963 | 376 |
!MethodChange methodsFor:'printing & storing'! |
0 | 377 |
|
7 | 378 |
printOn:aStream |
800 | 379 |
"append a user printed representation of the receiver to aStream. |
380 |
The format is suitable for a human - not meant to be read back." |
|
381 |
||
2170 | 382 |
aStream |
3179 | 383 |
nextPutAll:(self className ? 'unnamed'); |
384 |
nextPutAll:' >> '; |
|
385 |
nextPutAll:(selector ? '?'); |
|
386 |
nextPutAll:' {'; |
|
387 |
nextPutAll:(methodCategory ? '?'); |
|
388 |
nextPutAll:'}' |
|
1512 | 389 |
|
1833
cf60e3c0087e
care for bad (nil) methodCategory
Claus Gittinger <cg@exept.de>
parents:
1512
diff
changeset
|
390 |
"Modified: / 04-10-2006 / 16:46:01 / cg" |
2170 | 391 |
"Modified: / 07-11-2008 / 08:29:03 / Jan Vrany <vranyj1@fel.cvut.cz>" |
779 | 392 |
! |
393 |
||
896 | 394 |
printWithoutClassNameOn:aStream |
395 |
(className endsWith:' class') ifTrue:[ |
|
396 |
aStream nextPutAll:'class ' |
|
397 |
]. |
|
398 |
aStream nextPutAll:selector |
|
399 |
! |
|
400 |
||
401 |
printWithoutOwningClassOn:aStream |
|
2022
a498c70c0aac
changed #printWithoutOwningClassOn:
Claus Gittinger <cg@exept.de>
parents:
2020
diff
changeset
|
402 |
self breakPoint:#cg. |
779 | 403 |
(className endsWith:' class') ifTrue:[ |
404 |
aStream nextPutAll:'class ' |
|
405 |
]. |
|
406 |
aStream nextPutAll:selector |
|
1845 | 407 |
! |
408 |
||
409 |
sourceForMethod |
|
2157 | 410 |
^ '(' , className , ' compiledMethodAt:' , selector asSymbol storeString, ')' |
1845 | 411 |
|
412 |
"Created: / 09-10-2006 / 13:58:09 / cg" |
|
0 | 413 |
! ! |
235 | 414 |
|
2130 | 415 |
!MethodChange methodsFor:'testing'! |
652 | 416 |
|
417 |
isMethodChange |
|
2130 | 418 |
"true if this is a method related change" |
419 |
||
652 | 420 |
^ true |
421 |
||
422 |
"Created: / 7.2.1998 / 19:26:59 / cg" |
|
2130 | 423 |
! |
424 |
||
2942
635660203429
added: #isMethodChangeForExtensionsVersionMethod
Claus Gittinger <cg@exept.de>
parents:
2872
diff
changeset
|
425 |
isMethodChangeForExtensionsVersionMethod |
2944 | 426 |
"true if this is a change for an extensionsVersion method" |
427 |
||
2942
635660203429
added: #isMethodChangeForExtensionsVersionMethod
Claus Gittinger <cg@exept.de>
parents:
2872
diff
changeset
|
428 |
^ self isMethodCodeChange |
635660203429
added: #isMethodChangeForExtensionsVersionMethod
Claus Gittinger <cg@exept.de>
parents:
2872
diff
changeset
|
429 |
and:[ AbstractSourceCodeManager isExtensionsVersionMethodSelector:self selector ] |
635660203429
added: #isMethodChangeForExtensionsVersionMethod
Claus Gittinger <cg@exept.de>
parents:
2872
diff
changeset
|
430 |
! |
635660203429
added: #isMethodChangeForExtensionsVersionMethod
Claus Gittinger <cg@exept.de>
parents:
2872
diff
changeset
|
431 |
|
2187 | 432 |
isMethodChangeForVersionMethod |
2944 | 433 |
"true if this is a change for a version method" |
434 |
||
2187 | 435 |
^ self isMethodCodeChange |
436 |
and:[ AbstractSourceCodeManager isVersionMethodSelector:self selector ] |
|
437 |
! |
|
438 |
||
2130 | 439 |
isMethodCodeChange |
440 |
"true if this is a method's code change (not package, category etc.)" |
|
441 |
||
2260 | 442 |
^ true |
652 | 443 |
! ! |
444 |
||
2616
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
445 |
!MethodChange methodsFor:'visiting'! |
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
446 |
|
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
447 |
acceptChangeVisitor:aVisitor |
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
448 |
^ aVisitor visitMethodChange:self. |
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
449 |
|
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
450 |
"Created: / 25-11-2011 / 17:13:50 / cg" |
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
451 |
! ! |
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
452 |
|
1325 | 453 |
!MethodChange::NamedMethodChange class methodsFor:'instance creation'! |
454 |
||
455 |
fromMethodChange:aMethodChange |
|
456 |
^ self new cloneInstanceVariablesFrom:aMethodChange |
|
457 |
! ! |
|
458 |
||
459 |
!MethodChange::NamedMethodChange methodsFor:'accessing'! |
|
460 |
||
461 |
changeName:something |
|
462 |
changeName := something. |
|
463 |
! ! |
|
464 |
||
465 |
!MethodChange::NamedMethodChange methodsFor:'printing & storing'! |
|
466 |
||
467 |
printOn:aStream |
|
468 |
changeName notNil ifTrue:[ |
|
469 |
changeName printOn:aStream. |
|
470 |
^ self. |
|
471 |
]. |
|
472 |
super printOn:aStream |
|
473 |
! ! |
|
474 |
||
235 | 475 |
!MethodChange class methodsFor:'documentation'! |
476 |
||
2944 | 477 |
version |
3213 | 478 |
^ '$Header: /cvs/stx/stx/libbasic3/MethodChange.st,v 1.72 2013-04-14 07:49:52 cg Exp $' |
2944 | 479 |
! |
480 |
||
481 |
version_CVS |
|
3213 | 482 |
^ '$Header: /cvs/stx/stx/libbasic3/MethodChange.st,v 1.72 2013-04-14 07:49:52 cg Exp $' |
2944 | 483 |
! |
484 |
||
2369 | 485 |
version_SVN |
2872 | 486 |
^ '§Id: MethodChange.st 1940 2012-07-26 15:09:40Z vranyj1 §' |
235 | 487 |
! ! |
3138 | 488 |