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