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