author | Claus Gittinger <cg@exept.de> |
Sun, 27 Nov 2011 13:29:49 +0100 | |
changeset 2625 | 5dc802065e4b |
parent 2616 | 0eba26a9f6af |
child 2846 | 221a345239fb |
child 3011 | 1997ff6e7e55 |
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. |
|
151 |
^(self class isSource: mySource sameSourceAs: imageSource) |
|
152 |
ifTrue:[ ChangeDeltaInformation identical ] |
|
153 |
ifFalse:[ ChangeDeltaInformation different ] |
|
154 |
||
155 |
"Created: / 31-08-2011 / 10:27:58 / cg" |
|
2369 | 156 |
! |
157 |
||
2470 | 158 |
imageSource |
159 |
||
160 |
| mth | |
|
161 |
||
162 |
self isMethodCodeChange ifFalse:[^super imageSource]. |
|
163 |
mth := self changeMethod. |
|
164 |
^mth isNil ifTrue: [nil] ifFalse:[mth source] |
|
165 |
||
166 |
"Created: / 19-07-2011 / 12:02:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
167 |
! |
|
168 |
||
652 | 169 |
methodCategory |
1234 | 170 |
|
652 | 171 |
^ methodCategory |
172 |
||
173 |
"Created: / 7.2.1998 / 19:47:53 / cg" |
|
174 |
! |
|
175 |
||
1234 | 176 |
previousPackage |
177 |
| isNewMethod | |
|
178 |
isNewMethod := self previousVersion isNil. |
|
179 |
isNewMethod ifFalse:[ |
|
180 |
^ self previousVersion package. |
|
181 |
]. |
|
182 |
||
183 |
^ nil |
|
184 |
! |
|
185 |
||
956
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
186 |
previousVersion |
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
187 |
"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
|
188 |
|
1073 | 189 |
^ previousVersion |
190 |
! |
|
956
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
191 |
|
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
192 |
previousVersion:something |
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
193 |
"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
|
194 |
|
1073 | 195 |
previousVersion := something. |
196 |
! |
|
956
0c6c209df4e9
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
911
diff
changeset
|
197 |
|
1234 | 198 |
previousVersionSource |
199 |
"return the value of the instance variable 'previousVersion' (automatically generated)" |
|
200 |
||
201 |
previousVersion isNil ifTrue:[^ nil]. |
|
202 |
^ previousVersion source |
|
203 |
! |
|
204 |
||
648 | 205 |
selector |
206 |
^ selector |
|
207 |
||
208 |
"Created: / 6.2.1998 / 13:29:25 / cg" |
|
911 | 209 |
! |
210 |
||
211 |
selector:aSymbol |
|
2257 | 212 |
self assert:(aSymbol isSymbol). |
213 |
||
911 | 214 |
selector := aSymbol |
215 |
||
216 |
"Created: / 6.2.1998 / 13:29:25 / cg" |
|
0 | 217 |
! ! |
218 |
||
849 | 219 |
!MethodChange methodsFor:'applying'! |
220 |
||
221 |
apply |
|
222 |
"apply the change" |
|
223 |
||
2512 | 224 |
|class replacementClassName suggestion| |
1322 | 225 |
|
2020
5b3af99a4829
changed #apply: use #applyChange
Stefan Vogel <sv@exept.de>
parents:
1845
diff
changeset
|
226 |
class := self changeClass. |
1196 | 227 |
class isNil ifTrue:[ |
2512 | 228 |
"/ try the same replacement class again |
229 |
(LastReplacementClass notEmptyOrNil |
|
230 |
and:[ (class := Smalltalk classNamed:LastReplacementClass) notNil |
|
231 |
and:[ |
|
232 |
(className endsWith:' class') ifTrue:[ |
|
233 |
class := class theMetaclass |
|
234 |
] ifFalse:[ |
|
235 |
class := class theNonMetaclass |
|
236 |
]. |
|
237 |
class nameWithoutPrefix = className |
|
238 |
]]) |
|
239 |
ifFalse:[ |
|
240 |
"/ try a replacement class in the same namespace again |
|
241 |
suggestion := LastReplacementClass. |
|
242 |
(class notNil |
|
243 |
and:[ (class := class nameSpace classNamed:className) 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 |
"/ ask for a replacement class |
|
254 |
replacementClassName := Dialog |
|
255 |
request:('Cannot apply change for missing class: %1\\Use replacement class (or press cancel)' bindWith:className) withCRs |
|
256 |
initialAnswer:suggestion. |
|
2516
a1fdfc5e22cd
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2512
diff
changeset
|
257 |
replacementClassName isNil ifTrue:[ AbortSignal raise ]. |
a1fdfc5e22cd
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2512
diff
changeset
|
258 |
|
2512 | 259 |
(replacementClassName isEmptyOrNil |
260 |
or:[ (class := Smalltalk classNamed:replacementClassName) isNil]) ifTrue:[ |
|
261 |
self error:('Cannot apply change for missing class: ' , replacementClassName) mayProceed:true. |
|
262 |
^ self |
|
263 |
]. |
|
264 |
(className endsWith:' class') ifTrue:[ |
|
265 |
class := class theMetaclass |
|
266 |
] ifFalse:[ |
|
267 |
class := class theNonMetaclass |
|
268 |
]. |
|
269 |
LastReplacementClass := replacementClassName |
|
270 |
] |
|
271 |
] |
|
1196 | 272 |
]. |
849 | 273 |
class compile:source classified:methodCategory logged:true. |
2509 | 274 |
|
2516
a1fdfc5e22cd
handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents:
2512
diff
changeset
|
275 |
"Modified: / 07-09-2011 / 21:09:19 / cg" |
849 | 276 |
! ! |
277 |
||
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
278 |
!MethodChange methodsFor:'comparing'! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
279 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
280 |
isForSameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
281 |
"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
|
282 |
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
|
283 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
284 |
"/ 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
|
285 |
changeB isMethodChange ifFalse:[^ false]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
286 |
|
1199 | 287 |
selector ~= changeB selector ifTrue:[^ false]. |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
288 |
className ~= changeB className ifTrue:[^ false]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
289 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
290 |
^ true |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
291 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
292 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
293 |
sameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
294 |
"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
|
295 |
|
798 | 296 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
1509 | 297 |
(self sameSourceAs:changeB) ifTrue:[^ true]. |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
298 |
|
1509 | 299 |
^ false. |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
300 |
|
1509 | 301 |
"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
|
302 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
779
diff
changeset
|
303 |
|
1325 | 304 |
!MethodChange methodsFor:'converting'! |
305 |
||
306 |
asNamedMethodChange |
|
307 |
^ NamedMethodChange fromMethodChange:self |
|
308 |
! ! |
|
309 |
||
2369 | 310 |
!MethodChange methodsFor:'fileout'! |
311 |
||
312 |
basicFileOutOn: aStream |
|
313 |
||
314 |
|cat | |
|
315 |
||
316 |
self isMethodCodeChange ifFalse:[^super basicFileOutOn: aStream]. |
|
317 |
||
318 |
||
319 |
||
320 |
aStream nextPutChunkSeparator. |
|
321 |
self className printOn:aStream. |
|
322 |
"/ self printClassNameOn:aStream. |
|
323 |
||
324 |
(privacy ? #public) ~~ #public ifTrue:[ |
|
325 |
aStream space; nextPutAll:privacy; nextPutAll:'MethodsFor:'. |
|
326 |
] ifFalse:[ |
|
327 |
aStream nextPutAll:' methodsFor:'. |
|
328 |
]. |
|
329 |
||
330 |
cat := methodCategory ? ''. |
|
331 |
aStream nextPutAll:cat asString storeString. |
|
332 |
aStream nextPutChunkSeparator; cr; cr. |
|
333 |
||
334 |
source := self source. |
|
335 |
source isNil ifTrue:[ |
|
336 |
ClassDescription fileOutErrorSignal |
|
337 |
raiseRequestWith:self |
|
338 |
errorString:(' - no source for method: ' , |
|
339 |
self className , '>>' , selector). |
|
340 |
||
341 |
] ifFalse:[ |
|
342 |
aStream nextChunkPut:source. |
|
343 |
]. |
|
344 |
aStream space. |
|
345 |
aStream nextPutChunkSeparator. |
|
346 |
aStream cr; cr |
|
347 |
||
348 |
"Modified: / 05-12-2009 / 12:38:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
349 |
! ! |
|
350 |
||
963 | 351 |
!MethodChange methodsFor:'printing & storing'! |
0 | 352 |
|
7 | 353 |
printOn:aStream |
800 | 354 |
"append a user printed representation of the receiver to aStream. |
355 |
The format is suitable for a human - not meant to be read back." |
|
356 |
||
2170 | 357 |
aStream |
358 |
nextPutAll:(self className ? 'unnamed'); |
|
359 |
nextPutAll:'>>'; |
|
360 |
nextPutAll:(selector ? '?'); |
|
361 |
nextPutAll:' {'; |
|
362 |
nextPutAll:(methodCategory ? '?'); |
|
363 |
nextPutAll:'}' |
|
1512 | 364 |
|
1833
cf60e3c0087e
care for bad (nil) methodCategory
Claus Gittinger <cg@exept.de>
parents:
1512
diff
changeset
|
365 |
"Modified: / 04-10-2006 / 16:46:01 / cg" |
2170 | 366 |
"Modified: / 07-11-2008 / 08:29:03 / Jan Vrany <vranyj1@fel.cvut.cz>" |
779 | 367 |
! |
368 |
||
896 | 369 |
printWithoutClassNameOn:aStream |
370 |
(className endsWith:' class') ifTrue:[ |
|
371 |
aStream nextPutAll:'class ' |
|
372 |
]. |
|
373 |
aStream nextPutAll:selector |
|
374 |
! |
|
375 |
||
376 |
printWithoutOwningClassOn:aStream |
|
2022
a498c70c0aac
changed #printWithoutOwningClassOn:
Claus Gittinger <cg@exept.de>
parents:
2020
diff
changeset
|
377 |
self breakPoint:#cg. |
779 | 378 |
(className endsWith:' class') ifTrue:[ |
379 |
aStream nextPutAll:'class ' |
|
380 |
]. |
|
381 |
aStream nextPutAll:selector |
|
1845 | 382 |
! |
383 |
||
384 |
sourceForMethod |
|
2157 | 385 |
^ '(' , className , ' compiledMethodAt:' , selector asSymbol storeString, ')' |
1845 | 386 |
|
387 |
"Created: / 09-10-2006 / 13:58:09 / cg" |
|
0 | 388 |
! ! |
235 | 389 |
|
2130 | 390 |
!MethodChange methodsFor:'testing'! |
652 | 391 |
|
392 |
isMethodChange |
|
2130 | 393 |
"true if this is a method related change" |
394 |
||
652 | 395 |
^ true |
396 |
||
397 |
"Created: / 7.2.1998 / 19:26:59 / cg" |
|
2130 | 398 |
! |
399 |
||
2187 | 400 |
isMethodChangeForVersionMethod |
401 |
^ self isMethodCodeChange |
|
402 |
and:[ AbstractSourceCodeManager isVersionMethodSelector:self selector ] |
|
403 |
! |
|
404 |
||
2130 | 405 |
isMethodCodeChange |
406 |
"true if this is a method's code change (not package, category etc.)" |
|
407 |
||
2260 | 408 |
^ true |
652 | 409 |
! ! |
410 |
||
2616
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
411 |
!MethodChange methodsFor:'visiting'! |
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
412 |
|
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
413 |
acceptChangeVisitor:aVisitor |
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
414 |
^ aVisitor visitMethodChange:self. |
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
415 |
|
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
416 |
"Created: / 25-11-2011 / 17:13:50 / cg" |
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
417 |
! ! |
0eba26a9f6af
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2516
diff
changeset
|
418 |
|
1325 | 419 |
!MethodChange::NamedMethodChange class methodsFor:'instance creation'! |
420 |
||
421 |
fromMethodChange:aMethodChange |
|
422 |
^ self new cloneInstanceVariablesFrom:aMethodChange |
|
423 |
! ! |
|
424 |
||
425 |
!MethodChange::NamedMethodChange methodsFor:'accessing'! |
|
426 |
||
427 |
changeName:something |
|
428 |
changeName := something. |
|
429 |
! ! |
|
430 |
||
431 |
!MethodChange::NamedMethodChange methodsFor:'printing & storing'! |
|
432 |
||
433 |
printOn:aStream |
|
434 |
changeName notNil ifTrue:[ |
|
435 |
changeName printOn:aStream. |
|
436 |
^ self. |
|
437 |
]. |
|
438 |
super printOn:aStream |
|
439 |
! ! |
|
440 |
||
235 | 441 |
!MethodChange class methodsFor:'documentation'! |
442 |
||
2369 | 443 |
version_CVS |
2625 | 444 |
^ '$Header: /cvs/stx/stx/libbasic3/MethodChange.st,v 1.64 2011-11-27 12:29:49 cg Exp $' |
2187 | 445 |
! |
446 |
||
2369 | 447 |
version_SVN |
2414 | 448 |
^ '§ Id: MethodChange.st 1867 2011-06-08 21:57:08Z vranyj1 §' |
235 | 449 |
! ! |