author | Claus Gittinger <cg@exept.de> |
Fri, 18 Aug 2000 00:23:41 +0200 | |
changeset 2714 | 281436f9e143 |
parent 2710 | 88a97fa1d140 |
child 2716 | 8451e7057f00 |
permissions | -rw-r--r-- |
2626 | 1 |
" |
2 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
3 |
All Rights Reserved |
|
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 |
" |
|
12 |
||
13 |
||
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
14 |
"{ Package: 'stx:libtool' }" |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
15 |
|
2221 | 16 |
ApplicationModel subclass:#VersionDiffBrowser |
2497 | 17 |
instanceVariableNames:'classChangeSet diffTextView' |
2221 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
20 |
category:'Interface-Browsers' |
|
21 |
! |
|
22 |
||
2497 | 23 |
HierarchicalItem subclass:#ClassChangeSet |
2695 | 24 |
instanceVariableNames:'classBeingCompared labelA labelB diffSet onlyInA onlyInB |
2497 | 25 |
changedMethods' |
26 |
classVariableNames:'' |
|
27 |
poolDictionaries:'' |
|
28 |
privateIn:VersionDiffBrowser |
|
29 |
! |
|
30 |
||
2224 | 31 |
VersionDiffBrowser comment:'some comment |
32 |
'! |
|
33 |
||
2626 | 34 |
!VersionDiffBrowser class methodsFor:'documentation'! |
35 |
||
36 |
copyright |
|
37 |
" |
|
38 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
39 |
All Rights Reserved |
|
40 |
||
41 |
This software is furnished under a license and may be used |
|
42 |
only in accordance with the terms of that license and with the |
|
43 |
inclusion of the above copyright notice. This software may not |
|
44 |
be provided or otherwise made available to, or used by, any |
|
45 |
other person. No title to or ownership of the software is |
|
46 |
hereby transferred. |
|
47 |
" |
|
48 |
||
49 |
! |
|
50 |
||
51 |
documentation |
|
52 |
" |
|
53 |
This is not yet finished (work in progress). |
|
54 |
||
55 |
A browser to show differences between class versions, |
|
56 |
allowing easy comparison; will also eventually add capabilities |
|
57 |
to checkIn / load classes into / from the repository. |
|
58 |
||
59 |
[see also:] |
|
60 |
||
61 |
[instance variables:] |
|
62 |
||
63 |
[class variables:] |
|
64 |
" |
|
65 |
||
66 |
||
67 |
! ! |
|
2221 | 68 |
|
69 |
!VersionDiffBrowser class methodsFor:'interface specs'! |
|
70 |
||
71 |
windowSpec |
|
72 |
"This resource specification was automatically generated |
|
73 |
by the UIPainter of ST/X." |
|
74 |
||
75 |
"Do not manually edit this!! If it is corrupted, |
|
76 |
the UIPainter may not be able to read the specification." |
|
77 |
||
78 |
" |
|
79 |
UIPainter new openOnClass:VersionDiffBrowser andSelector:#windowSpec |
|
80 |
VersionDiffBrowser new openInterface:#windowSpec |
|
81 |
VersionDiffBrowser open |
|
82 |
" |
|
83 |
||
84 |
<resource: #canvas> |
|
85 |
||
86 |
^ |
|
87 |
#(#FullSpec |
|
88 |
#name: #windowSpec |
|
89 |
#window: |
|
90 |
#(#WindowSpec |
|
91 |
#label: 'Version DiffBrowser' |
|
92 |
#name: 'Version DiffBrowser' |
|
93 |
#min: #(#Point 10 10) |
|
94 |
#max: #(#Point nil nil) |
|
2695 | 95 |
#bounds: #(#Rectangle 12 22 877 526) |
2221 | 96 |
#menu: #mainMenu |
97 |
) |
|
98 |
#component: |
|
99 |
#(#SpecCollection |
|
100 |
#collection: #( |
|
101 |
#(#VariableVerticalPanelSpec |
|
102 |
#name: 'VariableVerticalPanel1' |
|
103 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
104 |
#component: |
|
105 |
#(#SpecCollection |
|
106 |
#collection: #( |
|
107 |
#(#HorizontalPanelViewSpec |
|
108 |
#name: 'TopHorizontalPanel' |
|
109 |
#horizontalLayout: #fit |
|
110 |
#verticalLayout: #fit |
|
111 |
#horizontalSpace: 3 |
|
112 |
#verticalSpace: 3 |
|
113 |
#component: |
|
114 |
#(#SpecCollection |
|
115 |
#collection: #( |
|
116 |
#(#ViewSpec |
|
117 |
#name: 'BoxA' |
|
118 |
#level: 0 |
|
2585 | 119 |
#visibilityChannel: #boxAVisible |
2221 | 120 |
#component: |
121 |
#(#SpecCollection |
|
122 |
#collection: #( |
|
123 |
#(#LabelSpec |
|
2714 | 124 |
#label: 'Only in A (i.e. removed)' |
2224 | 125 |
#name: 'OnlyInALabel' |
2221 | 126 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 20 0) |
127 |
#translateLabel: true |
|
128 |
#labelChannel: #onlyInALabelHolder |
|
129 |
) |
|
130 |
#(#SequenceViewSpec |
|
131 |
#name: 'ListA' |
|
132 |
#layout: #(#LayoutFrame 0 0.0 20 0.0 0 1.0 -3 1.0) |
|
133 |
#model: #methodsOnlyInASelection |
|
134 |
#menu: #menuA |
|
135 |
#hasHorizontalScrollBar: true |
|
136 |
#hasVerticalScrollBar: true |
|
137 |
#miniScrollerHorizontal: true |
|
138 |
#valueChangeSelector: #methodsOnlyInASelectionChanged |
|
139 |
#useIndex: true |
|
140 |
#sequenceList: #methodsOnlyInA |
|
141 |
) |
|
142 |
) |
|
143 |
||
144 |
) |
|
2497 | 145 |
#extent: #(#Point 286 252) |
2221 | 146 |
) |
147 |
#(#ViewSpec |
|
148 |
#name: 'BoxM' |
|
2585 | 149 |
#visibilityChannel: #boxMVisible |
2221 | 150 |
#component: |
151 |
#(#SpecCollection |
|
152 |
#collection: #( |
|
153 |
#(#LabelSpec |
|
154 |
#label: 'Changed' |
|
155 |
#name: 'Label2' |
|
156 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 20 0) |
|
157 |
#translateLabel: true |
|
158 |
#labelChannel: #changedLabelHolder |
|
159 |
) |
|
160 |
#(#SequenceViewSpec |
|
161 |
#name: 'ListM' |
|
162 |
#layout: #(#LayoutFrame 0 0.0 20 0.0 0 1.0 -3 1.0) |
|
163 |
#model: #methodsChangedSelection |
|
164 |
#menu: #menuM |
|
165 |
#hasHorizontalScrollBar: true |
|
166 |
#hasVerticalScrollBar: true |
|
167 |
#miniScrollerHorizontal: true |
|
168 |
#valueChangeSelector: #methodsChangedSelectionChanged |
|
169 |
#useIndex: true |
|
170 |
#sequenceList: #methodsChanged |
|
171 |
) |
|
172 |
) |
|
173 |
||
174 |
) |
|
2497 | 175 |
#extent: #(#Point 286 252) |
2221 | 176 |
) |
177 |
#(#ViewSpec |
|
178 |
#name: 'BoxB' |
|
2585 | 179 |
#visibilityChannel: #boxBVisible |
2221 | 180 |
#component: |
181 |
#(#SpecCollection |
|
182 |
#collection: #( |
|
183 |
#(#LabelSpec |
|
2714 | 184 |
#label: 'Only in B (i.e. added)' |
2224 | 185 |
#name: 'OnlyInBLabel' |
2221 | 186 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 20 0) |
187 |
#translateLabel: true |
|
188 |
#labelChannel: #onlyInBLabelHolder |
|
189 |
) |
|
190 |
#(#SequenceViewSpec |
|
191 |
#name: 'ListB' |
|
192 |
#layout: #(#LayoutFrame 0 0.0 20 0.0 0 1.0 -3 1.0) |
|
193 |
#model: #methodsOnlyInBSelection |
|
194 |
#menu: #menuB |
|
195 |
#hasHorizontalScrollBar: true |
|
196 |
#hasVerticalScrollBar: true |
|
197 |
#miniScrollerHorizontal: true |
|
198 |
#valueChangeSelector: #methodsOnlyInBSelectionChanged |
|
199 |
#useIndex: true |
|
200 |
#sequenceList: #methodsOnlyInB |
|
201 |
) |
|
202 |
) |
|
203 |
||
204 |
) |
|
2497 | 205 |
#extent: #(#Point 287 252) |
2221 | 206 |
) |
207 |
) |
|
208 |
||
209 |
) |
|
210 |
) |
|
211 |
#(#ViewSpec |
|
212 |
#name: 'Box4' |
|
213 |
#component: |
|
214 |
#(#SpecCollection |
|
215 |
#collection: #( |
|
216 |
#(#ViewSpec |
|
217 |
#name: 'diffTextViewBox' |
|
218 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
219 |
#initiallyInvisible: true |
|
220 |
#component: |
|
221 |
#(#SpecCollection |
|
222 |
#collection: #( |
|
223 |
#(#LabelSpec |
|
224 |
#label: 'A' |
|
225 |
#name: 'DiffTextLabelA' |
|
226 |
#layout: #(#LayoutFrame 0 0 0 0 0 0.5 20 0) |
|
227 |
#translateLabel: true |
|
228 |
#labelChannel: #diffTextLabelA |
|
229 |
) |
|
230 |
#(#LabelSpec |
|
231 |
#label: 'B' |
|
232 |
#name: 'DiffTextLabelB' |
|
233 |
#layout: #(#LayoutFrame 0 0.5 0 0 0 1 20 0) |
|
234 |
#translateLabel: true |
|
235 |
#labelChannel: #diffTextLabelB |
|
236 |
) |
|
237 |
#(#ArbitraryComponentSpec |
|
238 |
#name: 'diffTextView' |
|
239 |
#layout: #(#LayoutFrame 0 0.0 20 0.0 0 1.0 0 1.0) |
|
240 |
#hasBorder: false |
|
241 |
#component: #diffTextView |
|
242 |
) |
|
243 |
) |
|
244 |
||
245 |
) |
|
246 |
) |
|
247 |
#(#TextEditorSpec |
|
248 |
#name: 'singleTextView' |
|
249 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
250 |
#model: #methodText |
|
251 |
#hasHorizontalScrollBar: true |
|
252 |
#hasVerticalScrollBar: true |
|
253 |
#miniScrollerHorizontal: true |
|
254 |
) |
|
255 |
) |
|
256 |
||
257 |
) |
|
258 |
) |
|
259 |
) |
|
260 |
||
261 |
) |
|
2497 | 262 |
#handles: #(#Any 0.5 1.0) |
2221 | 263 |
) |
264 |
) |
|
265 |
||
266 |
) |
|
267 |
) |
|
268 |
! ! |
|
269 |
||
270 |
!VersionDiffBrowser class methodsFor:'menu specs'! |
|
271 |
||
272 |
mainMenu |
|
273 |
"This resource specification was automatically generated |
|
274 |
by the MenuEditor of ST/X." |
|
275 |
||
276 |
"Do not manually edit this!! If it is corrupted, |
|
277 |
the MenuEditor may not be able to read the specification." |
|
278 |
||
279 |
" |
|
280 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#mainMenu |
|
281 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser mainMenu)) startUp |
|
282 |
" |
|
283 |
||
284 |
<resource: #menu> |
|
285 |
||
286 |
^ |
|
287 |
#(#Menu |
|
288 |
#( |
|
289 |
#(#MenuItem |
|
290 |
#label: 'File' |
|
291 |
#translateLabel: true |
|
292 |
#submenu: |
|
293 |
#(#Menu |
|
294 |
#( |
|
295 |
#(#MenuItem |
|
2469 | 296 |
#label: 'Create PatchFile' |
297 |
#translateLabel: true |
|
298 |
#value: #createPatchFile |
|
299 |
) |
|
300 |
#(#MenuItem |
|
301 |
#label: '-' |
|
302 |
) |
|
303 |
#(#MenuItem |
|
2221 | 304 |
#label: 'Exit' |
305 |
#translateLabel: true |
|
306 |
#value: #closeRequest |
|
307 |
) |
|
308 |
) |
|
309 |
nil |
|
310 |
nil |
|
311 |
) |
|
312 |
) |
|
313 |
#(#MenuItem |
|
314 |
#label: 'Help' |
|
315 |
#translateLabel: true |
|
316 |
#startGroup: #right |
|
317 |
#submenu: |
|
318 |
#(#Menu |
|
319 |
#( |
|
320 |
#(#MenuItem |
|
321 |
#label: 'Documentation' |
|
322 |
#translateLabel: true |
|
323 |
#value: #openDocumentation |
|
324 |
) |
|
325 |
#(#MenuItem |
|
326 |
#label: '-' |
|
327 |
) |
|
328 |
#(#MenuItem |
|
329 |
#label: 'About this Application' |
|
330 |
#translateLabel: true |
|
331 |
#value: #openAboutThisApplication |
|
332 |
) |
|
333 |
) |
|
334 |
nil |
|
335 |
nil |
|
336 |
) |
|
337 |
) |
|
338 |
) |
|
339 |
nil |
|
340 |
nil |
|
341 |
) |
|
342 |
! |
|
343 |
||
344 |
menuA |
|
345 |
"This resource specification was automatically generated |
|
346 |
by the MenuEditor of ST/X." |
|
347 |
||
348 |
"Do not manually edit this!! If it is corrupted, |
|
349 |
the MenuEditor may not be able to read the specification." |
|
350 |
||
351 |
" |
|
352 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#menu1 |
|
353 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser menu1)) startUp |
|
354 |
" |
|
355 |
||
356 |
<resource: #menu> |
|
357 |
||
358 |
^ |
|
359 |
#(#Menu |
|
360 |
#( |
|
361 |
#(#MenuItem |
|
362 |
#label: 'Inspect' |
|
363 |
#translateLabel: true |
|
364 |
#value: #inspectSelectedChangeInA |
|
365 |
#choiceValue: 'nil "UndefinedObject" ' |
|
366 |
) |
|
2465 | 367 |
#(#MenuItem |
368 |
#label: '-' |
|
369 |
) |
|
370 |
#(#MenuItem |
|
371 |
#label: 'Browse' |
|
372 |
#translateLabel: true |
|
373 |
#value: #browseClassInA |
|
374 |
) |
|
2221 | 375 |
) |
376 |
nil |
|
377 |
nil |
|
378 |
) |
|
379 |
! |
|
380 |
||
381 |
menuB |
|
382 |
"This resource specification was automatically generated |
|
383 |
by the MenuEditor of ST/X." |
|
384 |
||
385 |
"Do not manually edit this!! If it is corrupted, |
|
386 |
the MenuEditor may not be able to read the specification." |
|
387 |
||
388 |
" |
|
389 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#menuB |
|
390 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser menuB)) startUp |
|
391 |
" |
|
392 |
||
393 |
<resource: #menu> |
|
394 |
||
395 |
^ |
|
396 |
#(#Menu |
|
397 |
#( |
|
398 |
#(#MenuItem |
|
399 |
#label: 'Inspect' |
|
400 |
#translateLabel: true |
|
401 |
#value: #inspectSelectedChangeInB |
|
402 |
#choiceValue: 'nil "UndefinedObject" ' |
|
403 |
) |
|
2465 | 404 |
#(#MenuItem |
405 |
#label: '-' |
|
406 |
) |
|
407 |
#(#MenuItem |
|
408 |
#label: 'Browse' |
|
409 |
#translateLabel: true |
|
410 |
#value: #browseClassInB |
|
411 |
) |
|
2221 | 412 |
) |
413 |
nil |
|
414 |
nil |
|
415 |
) |
|
416 |
! |
|
417 |
||
418 |
menuM |
|
419 |
"This resource specification was automatically generated |
|
420 |
by the MenuEditor of ST/X." |
|
421 |
||
422 |
"Do not manually edit this!! If it is corrupted, |
|
423 |
the MenuEditor may not be able to read the specification." |
|
424 |
||
425 |
" |
|
426 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#menu1 |
|
427 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser menu1)) startUp |
|
428 |
" |
|
429 |
||
430 |
<resource: #menu> |
|
431 |
||
432 |
^ |
|
433 |
#(#Menu |
|
434 |
#( |
|
435 |
#(#MenuItem |
|
2224 | 436 |
#label: 'Inspect both' |
2221 | 437 |
#translateLabel: true |
438 |
#value: #inspectSelectedChangeInM |
|
439 |
#choiceValue: 'nil "UndefinedObject" ' |
|
440 |
) |
|
2465 | 441 |
#(#MenuItem |
442 |
#label: '-' |
|
443 |
) |
|
444 |
#(#MenuItem |
|
445 |
#label: 'Browse' |
|
446 |
#translateLabel: true |
|
447 |
#value: #browseClassInM |
|
448 |
) |
|
2221 | 449 |
) |
450 |
nil |
|
451 |
nil |
|
452 |
) |
|
453 |
! ! |
|
454 |
||
2695 | 455 |
!VersionDiffBrowser class methodsFor:'plugIn spec'! |
456 |
||
457 |
aspectSelectors |
|
458 |
"This resource specification was automatically generated |
|
459 |
by the UIPainter of ST/X." |
|
460 |
||
461 |
"Do not manually edit this. If it is corrupted, |
|
462 |
the UIPainter may not be able to read the specification." |
|
463 |
||
464 |
"Return a description of exported aspects; |
|
465 |
these can be connected to aspects of an embedding application |
|
466 |
(if this app is embedded in a subCanvas)." |
|
467 |
||
468 |
^ #( |
|
469 |
#changedLabelHolder |
|
470 |
#onlyInALabelHolder |
|
471 |
#onlyInBLabelHolder |
|
472 |
). |
|
473 |
||
474 |
! ! |
|
475 |
||
2221 | 476 |
!VersionDiffBrowser class methodsFor:'startup'! |
477 |
||
2695 | 478 |
openOnClass:aClass againstVersion:aVersionA |
2507 | 479 |
" |
480 |
create an VersionDiffBrowser instance and set the class change set of the |
|
2695 | 481 |
browser. The class diff set is generated from classes current against some version |
482 |
via the source code manager . |
|
2507 | 483 |
|
484 |
<return: VersionDiffBrowser> |
|
485 |
" |
|
2497 | 486 |
|theBrowser| |
2224 | 487 |
|
2497 | 488 |
theBrowser := self new. |
489 |
theBrowser allButOpen. |
|
2695 | 490 |
theBrowser setupForClass:aClass againstVersion:aVersionA. |
2497 | 491 |
theBrowser openWindow. |
492 |
^ theBrowser. |
|
2224 | 493 |
|
2695 | 494 |
" |
495 |
self openOnClass:Array againstVersion:'1.116' |
|
496 |
self openOnClass:Array againstVersion:nil - against the version on which Array is based upon |
|
497 |
self openOnClass:Array againstVersion:#newest - against the newest repository version |
|
498 |
||
499 |
self openOnClass:VersionDiffBrowser againstVersion:nil |
|
500 |
self openOnClass:VersionDiffBrowser againstVersion:#newest |
|
501 |
" |
|
502 |
! |
|
503 |
||
504 |
openOnClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
|
505 |
" |
|
506 |
create an VersionDiffBrowser instance and set the class change set of the |
|
507 |
browser. The class diff set is generated from two source files. |
|
508 |
||
509 |
<return: VersionDiffBrowser> |
|
510 |
" |
|
511 |
|theBrowser| |
|
512 |
||
513 |
theBrowser := self new. |
|
514 |
theBrowser allButOpen. |
|
515 |
theBrowser setupForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB. |
|
516 |
theBrowser openWindow. |
|
517 |
^ theBrowser. |
|
518 |
||
519 |
||
2224 | 520 |
! |
521 |
||
2497 | 522 |
openOnClass:aClass versionA:aVersionA versionB:aVersionB |
2507 | 523 |
" |
524 |
create an VersionDiffBrowser instance and set the class change set of the |
|
2695 | 525 |
browser. The class diff set is generated from two class versions via |
2507 | 526 |
the source code manager . |
527 |
||
528 |
<return: VersionDiffBrowser> |
|
529 |
" |
|
2497 | 530 |
|theBrowser| |
2221 | 531 |
|
2497 | 532 |
theBrowser := self new. |
533 |
theBrowser allButOpen. |
|
2695 | 534 |
theBrowser setupForClass:aClass versionA:aVersionA versionB:aVersionB. |
2497 | 535 |
theBrowser openWindow. |
536 |
^ theBrowser. |
|
2221 | 537 |
|
538 |
" |
|
539 |
self openOnClass:Array versionA:'1.116' versionB:'1.113' |
|
540 |
" |
|
541 |
! ! |
|
542 |
||
543 |
!VersionDiffBrowser methodsFor:'accessing'! |
|
544 |
||
2497 | 545 |
changeSetA |
546 |
" |
|
547 |
gets the change set which contains only the new methods |
|
548 |
in versionA of the class |
|
2221 | 549 |
|
2497 | 550 |
<return: ChangeSet> |
551 |
" |
|
2221 | 552 |
|
2497 | 553 |
^ self classChangeSet methodsOnlyInA |
2221 | 554 |
! |
555 |
||
2497 | 556 |
changeSetB |
557 |
" |
|
558 |
gets the change set which contains only the new methods |
|
559 |
in versionB of the class |
|
560 |
||
561 |
<return: ChangeSet> |
|
562 |
" |
|
563 |
||
564 |
^ self classChangeSet methodsOnlyInB |
|
565 |
! |
|
566 |
||
567 |
classBeingCompared |
|
2507 | 568 |
" |
569 |
gets the class from the change set which is compared. |
|
2224 | 570 |
|
2507 | 571 |
<return: Class> |
572 |
" |
|
2497 | 573 |
^ self classChangeSet classBeingCompared |
574 |
! |
|
575 |
||
576 |
classChangeSet |
|
2507 | 577 |
" |
578 |
returns the class change set which is the model of the version diff browser. |
|
2224 | 579 |
|
2507 | 580 |
<return: ClassChangeSet> |
581 |
" |
|
582 |
^ classChangeSet |
|
583 |
! |
|
2497 | 584 |
|
2507 | 585 |
classChangeSet:aClassChangeSet |
2501 | 586 |
" |
2507 | 587 |
sets the class change set which is the model of the version diff browser. |
588 |
The labels, the lists, the visibility and the selection of the lists must be reseted |
|
589 |
when a new change set is given. |
|
2497 | 590 |
|
2507 | 591 |
<return: self> |
2501 | 592 |
" |
2507 | 593 |
classChangeSet := aClassChangeSet. |
2501 | 594 |
self updateLabels. |
595 |
self updateLists. |
|
596 |
self resetSelectionHolders. |
|
597 |
! |
|
2224 | 598 |
|
2507 | 599 |
selectedChangeInA |
600 |
" |
|
601 |
gets the selected method change for the 'method only in version A'. |
|
602 |
||
603 |
<return: MethodChange | nil> |
|
604 |
" |
|
605 |
|sel change| |
|
606 |
||
607 |
sel := self methodsOnlyInASelection value. |
|
608 |
sel notNil ifTrue:[ |
|
609 |
change := (self changeSetA at:sel). |
|
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
610 |
^ change |
2507 | 611 |
]. |
612 |
^ nil |
|
613 |
! |
|
614 |
||
615 |
selectedChangeInB |
|
616 |
" |
|
617 |
gets the selected method change for the 'method only in version B'. |
|
618 |
||
619 |
<return: MethodChange | nil> |
|
620 |
" |
|
621 |
|sel change| |
|
622 |
||
623 |
sel := self methodsOnlyInBSelection value. |
|
624 |
sel notNil ifTrue:[ |
|
625 |
change := (self changeSetB at:sel). |
|
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
626 |
^ change |
2507 | 627 |
]. |
628 |
^ nil |
|
629 |
! |
|
630 |
||
631 |
selectedChangesInM |
|
632 |
" |
|
633 |
get the two method changes for the selected 'changed method'. |
|
634 |
||
635 |
<return: <Array with:MethodChange with:MethodChange | nil>> |
|
636 |
" |
|
637 |
|sel changeA changeB| |
|
638 |
||
639 |
sel := self methodsChangedSelection value. |
|
640 |
sel notNil ifTrue:[ |
|
641 |
changeA := (self classChangeSet methodsChanged at:sel) first. |
|
642 |
changeB := (self classChangeSet methodsChanged at:sel) second. |
|
643 |
^ Array with:changeA |
|
644 |
with:changeB |
|
645 |
]. |
|
646 |
^ nil |
|
647 |
! |
|
648 |
||
2221 | 649 |
versionA |
2507 | 650 |
" |
651 |
gets the first class version to be compared |
|
2221 | 652 |
|
2507 | 653 |
<return: String> |
654 |
" |
|
2497 | 655 |
^ self classChangeSet labelA |
2221 | 656 |
|
657 |
! |
|
658 |
||
659 |
versionB |
|
2507 | 660 |
" |
661 |
gets the second class version to be compared |
|
2221 | 662 |
|
2507 | 663 |
<return: String> |
664 |
" |
|
2497 | 665 |
^ self classChangeSet labelB |
2221 | 666 |
|
667 |
! ! |
|
668 |
||
669 |
!VersionDiffBrowser methodsFor:'actions'! |
|
670 |
||
671 |
methodsChangedSelectionChanged |
|
2507 | 672 |
" |
673 |
the selection in the list of the 'changed methods' changed. |
|
674 |
Reset the selection of the two other lists and calc the method change. |
|
675 |
||
676 |
<return: self> |
|
677 |
" |
|
2695 | 678 |
|sel idxA idxB changeA changeB methodsChanged| |
2221 | 679 |
|
680 |
sel := self methodsChangedSelection value. |
|
681 |
sel notNil ifTrue:[ |
|
682 |
self methodsOnlyInASelection value:nil. |
|
683 |
self methodsOnlyInBSelection value:nil. |
|
2695 | 684 |
methodsChanged := self classChangeSet methodsChanged. |
685 |
changeA := (methodsChanged at:sel) first. |
|
686 |
changeB := (methodsChanged at:sel) second. |
|
2501 | 687 |
self withReadCursorDo:[ |
2377 | 688 |
self diffTextView text1:changeA source text2:changeB source. |
2501 | 689 |
self diffTextView moveToNextChanged |
2377 | 690 |
]. |
2221 | 691 |
self showDiffTextView. |
692 |
] |
|
2377 | 693 |
|
694 |
"Modified: / 3.9.1999 / 15:01:30 / ps" |
|
2221 | 695 |
! |
696 |
||
697 |
methodsOnlyInASelectionChanged |
|
2507 | 698 |
" |
699 |
the selection in the list of the 'method only in version A' changed. |
|
700 |
Reset the selection of the two other lists and show the method in |
|
701 |
the text view. |
|
702 |
||
703 |
<return: self> |
|
704 |
" |
|
2221 | 705 |
|change sel| |
706 |
||
707 |
sel := self methodsOnlyInASelection value. |
|
708 |
sel notNil ifTrue:[ |
|
709 |
self methodsOnlyInBSelection value:nil. |
|
710 |
self methodsChangedSelection value:nil. |
|
2497 | 711 |
change := self changeSetA at:sel. |
2221 | 712 |
self methodText value:(change source). |
713 |
self showSingleTextView. |
|
714 |
] |
|
715 |
! |
|
716 |
||
717 |
methodsOnlyInBSelectionChanged |
|
2507 | 718 |
" |
719 |
the selection in the list of the 'method only in version B' changed. |
|
720 |
Reset the selection of the two other lists and show the method in |
|
721 |
the text view. |
|
722 |
||
723 |
<return: self> |
|
724 |
" |
|
2221 | 725 |
|change sel| |
726 |
||
727 |
sel := self methodsOnlyInBSelection value. |
|
728 |
sel notNil ifTrue:[ |
|
729 |
self methodsOnlyInASelection value:nil. |
|
730 |
self methodsChangedSelection value:nil. |
|
2497 | 731 |
change := self changeSetB at:sel. |
2221 | 732 |
self methodText value:(change source). |
733 |
self showSingleTextView. |
|
734 |
] |
|
735 |
! ! |
|
736 |
||
737 |
!VersionDiffBrowser methodsFor:'aspects'! |
|
738 |
||
2585 | 739 |
boxAVisible |
740 |
|holder| |
|
741 |
||
742 |
(holder := builder bindingAt:#boxAVisible) isNil ifTrue:[ |
|
743 |
builder aspectAt:#boxAVisible put:(holder := true asValue). |
|
744 |
]. |
|
745 |
^ holder. |
|
746 |
! |
|
747 |
||
748 |
boxBVisible |
|
749 |
|holder| |
|
750 |
||
751 |
(holder := builder bindingAt:#boxBVisible) isNil ifTrue:[ |
|
752 |
builder aspectAt:#boxBVisible put:(holder := true asValue). |
|
753 |
]. |
|
754 |
^ holder. |
|
755 |
! |
|
756 |
||
757 |
boxMVisible |
|
758 |
|holder| |
|
759 |
||
760 |
(holder := builder bindingAt:#boxMVisible) isNil ifTrue:[ |
|
761 |
builder aspectAt:#boxMVisible put:(holder := true asValue). |
|
762 |
]. |
|
763 |
^ holder. |
|
764 |
! |
|
765 |
||
2221 | 766 |
changedLabelHolder |
2507 | 767 |
" |
768 |
aspect for the label of the changed method box. |
|
2221 | 769 |
|
2507 | 770 |
<return: ValueHolder on: nil> |
771 |
" |
|
2221 | 772 |
|holder| |
773 |
||
774 |
(holder := builder bindingAt:#changedLabelHolder) isNil ifTrue:[ |
|
775 |
builder aspectAt:#changedLabelHolder put:(holder := ValueHolder new). |
|
776 |
]. |
|
777 |
^ holder. |
|
778 |
! |
|
779 |
||
780 |
diffTextLabelA |
|
2507 | 781 |
" |
782 |
aspect for the label for version A. |
|
2221 | 783 |
|
2507 | 784 |
<return: ValueHolder on: nil> |
785 |
" |
|
2221 | 786 |
|
787 |
|holder| |
|
788 |
||
789 |
(holder := builder bindingAt:#diffTextLabelA) isNil ifTrue:[ |
|
790 |
builder aspectAt:#diffTextLabelA put:(holder := ValueHolder new). |
|
791 |
]. |
|
792 |
^ holder. |
|
793 |
! |
|
794 |
||
795 |
diffTextLabelB |
|
2507 | 796 |
" |
797 |
aspect for the label for version B. |
|
2221 | 798 |
|
2507 | 799 |
<return: ValueHolder on: nil> |
800 |
" |
|
2221 | 801 |
|
802 |
|holder| |
|
803 |
||
804 |
(holder := builder bindingAt:#diffTextLabelB) isNil ifTrue:[ |
|
805 |
builder aspectAt:#diffTextLabelB put:(holder := ValueHolder new). |
|
806 |
]. |
|
807 |
^ holder. |
|
808 |
! |
|
809 |
||
2497 | 810 |
diffTextView |
2507 | 811 |
" |
812 |
return the component for the diff text view. |
|
2497 | 813 |
|
2507 | 814 |
<return: HVScrollableView> |
815 |
" |
|
2497 | 816 |
diffTextView isNil ifTrue:[ |
817 |
diffTextView := HVScrollableView |
|
818 |
for:DiffTextView |
|
819 |
miniScrollerH:true miniScrollerV:false. |
|
820 |
diffTextView addNextPreviousButtons. |
|
821 |
]. |
|
822 |
^ diffTextView |
|
823 |
! |
|
824 |
||
2221 | 825 |
methodText |
2507 | 826 |
" |
827 |
aspect for the text in the method text view. |
|
2221 | 828 |
|
2507 | 829 |
<return: ValueHolder on: nil> |
830 |
" |
|
2221 | 831 |
|holder| |
832 |
||
833 |
(holder := builder bindingAt:#methodText) isNil ifTrue:[ |
|
834 |
builder aspectAt:#methodText put:(holder := ValueHolder new). |
|
835 |
]. |
|
836 |
^ holder. |
|
837 |
! |
|
838 |
||
839 |
methodsChanged |
|
2507 | 840 |
" |
841 |
aspect for the 'changed method' list. |
|
2221 | 842 |
|
2507 | 843 |
<return: List> |
844 |
" |
|
2221 | 845 |
|
846 |
|holder| |
|
847 |
||
848 |
(holder := builder bindingAt:#methodsChanged) isNil ifTrue:[ |
|
849 |
builder aspectAt:#methodsChanged put:(holder := List new). |
|
850 |
]. |
|
851 |
^ holder. |
|
852 |
! |
|
853 |
||
854 |
methodsChangedSelection |
|
2507 | 855 |
" |
856 |
aspect for the selection holder of 'changed method'-list. |
|
2221 | 857 |
|
2507 | 858 |
<return: ValueHolder on: nil> |
859 |
" |
|
2221 | 860 |
|
861 |
|holder| |
|
862 |
||
863 |
(holder := builder bindingAt:#methodsChangedSelection) isNil ifTrue:[ |
|
864 |
builder aspectAt:#methodsChangedSelection put:(holder := ValueHolder new). |
|
865 |
]. |
|
866 |
^ holder. |
|
867 |
! |
|
868 |
||
869 |
methodsOnlyInA |
|
2507 | 870 |
" |
871 |
aspect for the 'method only in version A' list. |
|
2221 | 872 |
|
2507 | 873 |
<return: List> |
874 |
" |
|
2221 | 875 |
|
876 |
|holder| |
|
877 |
||
878 |
(holder := builder bindingAt:#methodsOnlyInA) isNil ifTrue:[ |
|
879 |
builder aspectAt:#methodsOnlyInA put:(holder := List new). |
|
880 |
]. |
|
881 |
^ holder. |
|
882 |
! |
|
883 |
||
884 |
methodsOnlyInASelection |
|
2507 | 885 |
" |
886 |
aspect for the selection holder of 'method only in version A'-list. |
|
2221 | 887 |
|
2507 | 888 |
<return: ValueHolder on: nil> |
889 |
" |
|
2221 | 890 |
|
891 |
|holder| |
|
892 |
||
893 |
(holder := builder bindingAt:#methodsOnlyInASelection) isNil ifTrue:[ |
|
894 |
builder aspectAt:#methodsOnlyInASelection put:(holder := ValueHolder new). |
|
895 |
]. |
|
896 |
^ holder. |
|
897 |
! |
|
898 |
||
899 |
methodsOnlyInB |
|
2507 | 900 |
" |
901 |
aspect for the 'method only in version B' list. |
|
2221 | 902 |
|
2507 | 903 |
<return: List> |
904 |
" |
|
2221 | 905 |
|
906 |
|holder| |
|
907 |
||
908 |
(holder := builder bindingAt:#methodsOnlyInB) isNil ifTrue:[ |
|
909 |
builder aspectAt:#methodsOnlyInB put:(holder := List new). |
|
910 |
]. |
|
911 |
^ holder. |
|
912 |
! |
|
913 |
||
914 |
methodsOnlyInBSelection |
|
2507 | 915 |
" |
916 |
aspect for the selection holder of 'method only in version B'-list. |
|
2221 | 917 |
|
2507 | 918 |
<return: ValueHolder on: nil> |
919 |
" |
|
2221 | 920 |
|
921 |
|holder| |
|
922 |
||
923 |
(holder := builder bindingAt:#methodsOnlyInBSelection) isNil ifTrue:[ |
|
924 |
builder aspectAt:#methodsOnlyInBSelection put:(holder := ValueHolder new). |
|
925 |
]. |
|
926 |
^ holder. |
|
927 |
! |
|
928 |
||
929 |
onlyInALabelHolder |
|
2507 | 930 |
" |
931 |
aspect for the label for 'method only in version A'. |
|
2221 | 932 |
|
2507 | 933 |
<return: ValueHolder on: nil> |
934 |
" |
|
2221 | 935 |
|
936 |
|holder| |
|
937 |
||
938 |
(holder := builder bindingAt:#onlyInALabelHolder) isNil ifTrue:[ |
|
939 |
builder aspectAt:#onlyInALabelHolder put:(holder := ValueHolder new). |
|
940 |
]. |
|
941 |
^ holder. |
|
942 |
! |
|
943 |
||
944 |
onlyInBLabelHolder |
|
2507 | 945 |
" |
946 |
aspect for the label for 'method only in version B'. |
|
2221 | 947 |
|
2507 | 948 |
<return: ValueHolder on: nil> |
949 |
" |
|
2221 | 950 |
|
951 |
|holder| |
|
952 |
||
953 |
(holder := builder bindingAt:#onlyInBLabelHolder) isNil ifTrue:[ |
|
954 |
builder aspectAt:#onlyInBLabelHolder put:(holder := ValueHolder new). |
|
955 |
]. |
|
956 |
^ holder. |
|
957 |
! ! |
|
958 |
||
2695 | 959 |
!VersionDiffBrowser methodsFor:'aspects - exported'! |
960 |
||
961 |
changedLabelHolder:aValueHolder |
|
962 |
builder aspectAt:#changedLabelHolder put:aValueHolder. |
|
963 |
||
964 |
! |
|
965 |
||
966 |
classHolder:aValueHolder |
|
967 |
|holder| |
|
968 |
||
969 |
(holder := builder bindingAt:#classHolder) notNil ifTrue:[ |
|
970 |
holder removeDependent:self |
|
971 |
]. |
|
972 |
builder aspectAt:#classHolder put:aValueHolder. |
|
973 |
aValueHolder notNil ifTrue:[ |
|
974 |
aValueHolder addDependent:self |
|
975 |
] |
|
976 |
! |
|
977 |
||
978 |
onlyInALabelHolder:aValueHolder |
|
979 |
builder aspectAt:#onlyInALabelHolder put:aValueHolder. |
|
980 |
! |
|
981 |
||
982 |
onlyInBLabelHolder:aValueHolder |
|
983 |
builder aspectAt:#onlyInBLabelHolder put:aValueHolder. |
|
984 |
! |
|
985 |
||
986 |
versionAHolder:aValueHolder |
|
987 |
|holder| |
|
988 |
||
989 |
(holder := builder bindingAt:#versionAHolder) notNil ifTrue:[ |
|
990 |
holder removeDependent:self |
|
991 |
]. |
|
992 |
builder aspectAt:#versionAHolder put:aValueHolder. |
|
993 |
aValueHolder notNil ifTrue:[ |
|
994 |
aValueHolder addDependent:self |
|
995 |
] |
|
996 |
! |
|
997 |
||
998 |
versionBHolder:aValueHolder |
|
999 |
|holder| |
|
1000 |
||
1001 |
(holder := builder bindingAt:#versionBHolder) notNil ifTrue:[ |
|
1002 |
holder removeDependent:self |
|
1003 |
]. |
|
1004 |
builder aspectAt:#versionBHolder put:aValueHolder. |
|
1005 |
aValueHolder notNil ifTrue:[ |
|
1006 |
aValueHolder addDependent:self |
|
1007 |
] |
|
1008 |
! ! |
|
1009 |
||
1010 |
!VersionDiffBrowser methodsFor:'change & update'! |
|
1011 |
||
1012 |
update:something with:parameter from:changedObject |
|
1013 |
|classHolder versionAHolder versionBHolder| |
|
1014 |
||
1015 |
classHolder := self classHolder. |
|
1016 |
versionAHolder := self versionAHolder. |
|
1017 |
versionBHolder := self versionBHolder. |
|
1018 |
||
1019 |
(changedObject == classHolder |
|
1020 |
or:[changedObject == versionAHolder |
|
1021 |
or:[changedObject == versionBHolder]]) ifTrue:[ |
|
1022 |
self setupForClass:(classHolder value) versionA:(versionAHolder value) versionB:(versionBHolder value) |
|
1023 |
. ^ self |
|
1024 |
]. |
|
1025 |
super update:something with:parameter from:changedObject |
|
1026 |
! ! |
|
1027 |
||
2221 | 1028 |
!VersionDiffBrowser methodsFor:'initialization & release'! |
1029 |
||
1030 |
postBuildWith:aBuilder |
|
2507 | 1031 |
" |
1032 |
components which are invisible should be ignored by the panel. |
|
1033 |
Cannot be set via the interface builder. |
|
2221 | 1034 |
|
2507 | 1035 |
<return: self> |
1036 |
" |
|
2221 | 1037 |
(aBuilder componentAt:#TopHorizontalPanel) ignoreInvisibleComponents:true. |
1038 |
^ super postBuildWith:aBuilder |
|
1039 |
! ! |
|
1040 |
||
1041 |
!VersionDiffBrowser methodsFor:'menu action'! |
|
1042 |
||
2465 | 1043 |
browseChange:aChange |
2507 | 1044 |
" |
1045 |
browse the change in aChange |
|
1046 |
||
1047 |
<return: self> |
|
1048 |
" |
|
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1049 |
|cls sel m| |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1050 |
|
2578
29264fb3847e
avoid debugger in browse-menu
Claus Gittinger <cg@exept.de>
parents:
2536
diff
changeset
|
1051 |
aChange isNil ifTrue:[^ self]. |
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1052 |
cls := aChange changeClass. |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1053 |
sel := aChange changeSelector. |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1054 |
(cls compiledMethodAt:sel) isNil ifTrue:[ |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1055 |
self information:'Method does not exist.' |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1056 |
]. |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1057 |
|
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2695
diff
changeset
|
1058 |
UserPreferences current systemBrowserClass openInClass:cls selector:sel. |
2465 | 1059 |
! |
1060 |
||
1061 |
browseClassInA |
|
2507 | 1062 |
" |
1063 |
browse the selected method. |
|
1064 |
||
1065 |
<return: self> |
|
1066 |
" |
|
2465 | 1067 |
self browseChange:(self selectedChangeInA). |
1068 |
! |
|
2221 | 1069 |
|
2465 | 1070 |
browseClassInB |
2507 | 1071 |
" |
1072 |
browse the selected method. |
|
1073 |
||
1074 |
<return: self> |
|
1075 |
" |
|
2465 | 1076 |
self browseChange:(self selectedChangeInB). |
1077 |
! |
|
1078 |
||
1079 |
browseClassInM |
|
2507 | 1080 |
" |
1081 |
browse the selected method. |
|
1082 |
||
1083 |
<return: self> |
|
1084 |
" |
|
2465 | 1085 |
self browseChange:(self selectedChangesInM first). |
1086 |
! |
|
1087 |
||
2469 | 1088 |
createPatchFile |
1089 |
"create a pacthFile, to patch the old version (versionB) into |
|
1090 |
the new version (versionA)" |
|
1091 |
||
1092 |
|oldVersion newVersion vsnMthdA vsnMthdB vsnA vsnB info| |
|
2507 | 1093 |
self halt. |
2497 | 1094 |
vsnMthdA := self changeSetA |
2469 | 1095 |
detect:[:ch | ch isMethodChange |
1096 |
and:[ch changeClass isMeta |
|
1097 |
and:[ch changeSelector = #version]]] |
|
1098 |
ifNone:nil. |
|
2497 | 1099 |
vsnMthdB := self changeSetA |
2469 | 1100 |
detect:[:ch | ch isMethodChange |
1101 |
and:[ch changeClass isMeta |
|
1102 |
and:[ch changeSelector = #version]]] |
|
1103 |
ifNone:nil. |
|
1104 |
||
1105 |
vsnMthdA notNil ifTrue:[ |
|
1106 |
"/ extract the version |
|
1107 |
vsnA := Class revisionStringFromSource:vsnMthdA source. |
|
1108 |
vsnA notNil ifTrue:[ |
|
1109 |
info := Class revisionInfoFromString:vsnA. |
|
1110 |
info notNil ifTrue:[ |
|
1111 |
vsnA := info at:#revision ifAbsent:nil. |
|
1112 |
] ifFalse:[ |
|
1113 |
vsnA := nil. |
|
1114 |
]. |
|
1115 |
]. |
|
1116 |
]. |
|
1117 |
vsnMthdB notNil ifTrue:[ |
|
1118 |
"/ extract the version |
|
1119 |
vsnB := Class revisionStringFromSource:vsnMthdB source. |
|
1120 |
vsnB notNil ifTrue:[ |
|
1121 |
info := Class revisionInfoFromString:vsnB. |
|
1122 |
info notNil ifTrue:[ |
|
1123 |
vsnB := info at:#revision ifAbsent:nil. |
|
1124 |
] ifFalse:[ |
|
1125 |
vsnB := nil. |
|
1126 |
]. |
|
1127 |
]. |
|
1128 |
]. |
|
1129 |
||
2507 | 1130 |
(vsnA isNil or:[vsnB isNil or:[vsnA = vsnB]]) ifTrue:[ |
2469 | 1131 |
self warn:'The generated patch file will not be able to validate/update the class version'. |
1132 |
]. |
|
1133 |
||
1134 |
self halt. |
|
1135 |
||
1136 |
! |
|
1137 |
||
2465 | 1138 |
inspectSelectedChangeInA |
2507 | 1139 |
" |
1140 |
inspect the selected method change for the 'method only in version A'. |
|
1141 |
||
1142 |
<return: self> |
|
1143 |
" |
|
2465 | 1144 |
self selectedChangeInA inspect. |
2221 | 1145 |
! |
1146 |
||
1147 |
inspectSelectedChangeInB |
|
2507 | 1148 |
" |
1149 |
inspect the selected method change for the 'method only in version B'. |
|
1150 |
||
1151 |
<return: self> |
|
1152 |
" |
|
2465 | 1153 |
self selectedChangeInB inspect. |
1154 |
! |
|
1155 |
||
1156 |
inspectSelectedChangeInM |
|
2507 | 1157 |
" |
1158 |
inspect the two method changes for the selected 'changed method'. |
|
1159 |
||
1160 |
<return: self> |
|
1161 |
" |
|
2465 | 1162 |
|changes| |
1163 |
||
1164 |
changes := self selectedChangesInM. |
|
1165 |
changes do:[:change | |
|
1166 |
change inspect |
|
1167 |
]. |
|
1168 |
! |
|
1169 |
||
2501 | 1170 |
mainMenu |
2507 | 1171 |
" |
1172 |
if this application runs as an subapplication, |
|
1173 |
the menu bar should not be used. |
|
1174 |
||
1175 |
<return: self> |
|
1176 |
" |
|
2501 | 1177 |
self masterApplication isNil ifTrue:[ |
1178 |
^ self class mainMenu |
|
1179 |
]. |
|
1180 |
^ nil |
|
2221 | 1181 |
! ! |
1182 |
||
1183 |
!VersionDiffBrowser methodsFor:'private'! |
|
1184 |
||
2497 | 1185 |
generator |
2507 | 1186 |
" |
1187 |
generate a print string for a change. |
|
2497 | 1188 |
|
2507 | 1189 |
<return: Block> |
1190 |
" |
|
1191 |
^[:aChange | |
|
2585 | 1192 |
|result mPkg cPkg cls m changeClassName| |
1193 |
||
2507 | 1194 |
aChange isClassDefinitionChange ifTrue:[ |
2585 | 1195 |
result := aChange printStringWithoutClassName |
2497 | 1196 |
] ifFalse:[ |
2507 | 1197 |
aChange isDoIt ifTrue:[ |
1198 |
result := aChange source , ' (doIt)' |
|
2497 | 1199 |
] ifFalse:[ |
2585 | 1200 |
changeClassName := aChange className. |
1201 |
changeClassName = self classBeingCompared name ifTrue:[ |
|
1202 |
result := aChange printStringWithoutClassName. |
|
2507 | 1203 |
aChange isMethodChange ifTrue:[ |
1204 |
cls := aChange changeClass. |
|
2497 | 1205 |
cls notNil ifTrue:[ |
2507 | 1206 |
m := cls compiledMethodAt:aChange selector. |
2497 | 1207 |
(m notNil |
1208 |
and:[m package ~= cls package]) ifTrue:[ |
|
2585 | 1209 |
result := aChange printStringWithoutClassName , ' [' , m package , ']'. |
2497 | 1210 |
]. |
1211 |
]. |
|
1212 |
] |
|
1213 |
] ifFalse:[ |
|
1214 |
"/ include name in private class changes |
|
2585 | 1215 |
(changeClassName startsWith:(self classBeingCompared name , '::')) ifTrue:[ |
1216 |
result := (changeClassName copyFrom:(self classBeingCompared name size + 3)) , ' ' , aChange printStringWithoutClassName |
|
2497 | 1217 |
] ifFalse:[ |
2507 | 1218 |
result := aChange printString |
2497 | 1219 |
] |
1220 |
] |
|
1221 |
] |
|
1222 |
]. |
|
1223 |
result |
|
1224 |
]. |
|
1225 |
||
1226 |
! |
|
1227 |
||
2501 | 1228 |
resetSelectionHolders |
2507 | 1229 |
" |
1230 |
reset all selection holders when a new change set is given. |
|
1231 |
First set the selection to nil. |
|
1232 |
||
1233 |
<return: self> |
|
1234 |
" |
|
2501 | 1235 |
|
1236 |
self methodsChangedSelection value:nil. |
|
1237 |
self methodsOnlyInASelection value:nil. |
|
1238 |
self methodsOnlyInBSelection value:nil. |
|
2507 | 1239 |
self diffTextView text1:'' text2:''. |
1240 |
self methodText value:''. |
|
1241 |
||
1242 |
"/ self methodsChangedSelectionChanged. |
|
1243 |
"/ self methodsOnlyInASelectionChanged. |
|
1244 |
"/ self methodsOnlyInBSelectionChanged. |
|
2501 | 1245 |
|
1246 |
! |
|
1247 |
||
2221 | 1248 |
showDiffTextView |
2507 | 1249 |
" |
1250 |
if a method change is selected, then show the diff text view. |
|
1251 |
Add an accept entry to the popup menu. |
|
1252 |
||
1253 |
<return: self> |
|
1254 |
" |
|
2694 | 1255 |
|builder| |
1256 |
||
1257 |
builder := self builder. |
|
1258 |
(builder componentAt:#diffTextViewBox) raise; beVisible. |
|
1259 |
(builder componentAt:#singleTextView) beInvisible. |
|
1260 |
(builder componentAt:#diffTextView) realizeAllSubViews. |
|
1261 |
||
2465 | 1262 |
self addAcceptToTextViewMenus. |
2221 | 1263 |
! |
1264 |
||
1265 |
showSingleTextView |
|
2507 | 1266 |
" |
1267 |
if a method is selected which is only in version A or B of the class, |
|
1268 |
then show the text view. |
|
1269 |
Add an accept entry to the popup menu. |
|
1270 |
||
1271 |
<return: self> |
|
1272 |
" |
|
1273 |
||
2694 | 1274 |
|builder| |
1275 |
||
1276 |
builder := self builder. |
|
1277 |
(builder componentAt:#singleTextView) raise; beVisible. |
|
1278 |
(builder componentAt:#diffTextViewBox) beInvisible. |
|
2501 | 1279 |
self addAcceptToTextViewMenus. |
2221 | 1280 |
! |
1281 |
||
2497 | 1282 |
updateLabels |
2507 | 1283 |
" |
1284 |
update the labels of the diff text view. Show the version numbers |
|
1285 |
of the class. |
|
2221 | 1286 |
|
2507 | 1287 |
<return: self> |
1288 |
" |
|
2221 | 1289 |
|
2694 | 1290 |
|theVersionA theVersionB builder| |
2224 | 1291 |
|
2694 | 1292 |
builder := self builder. |
2497 | 1293 |
(theVersionA := self versionA) notNil ifTrue:[ |
1294 |
self diffTextLabelA value:theVersionA. |
|
2714 | 1295 |
self onlyInALabelHolder value:('Only in ' , theVersionA , ' (i.e. removed)'). |
2694 | 1296 |
(builder componentAt:#OnlyInALabel) backgroundColor:Color green darkened. |
2224 | 1297 |
]. |
2497 | 1298 |
(theVersionB :=self versionB) notNil ifTrue:[ |
1299 |
self diffTextLabelB value:theVersionB. |
|
2714 | 1300 |
self onlyInBLabelHolder value:('Only in ' , theVersionB , ' (i.e. added)'). |
2694 | 1301 |
(builder componentAt:#OnlyInBLabel) backgroundColor:Color red darkened. |
2224 | 1302 |
]. |
1303 |
! |
|
1304 |
||
1305 |
updateLists |
|
2507 | 1306 |
"walk over the two changeSets and add change to one of the tree lists. |
1307 |
Methods which belong to the version A of the class or version B go |
|
1308 |
to the list methodsOnlyInA or methodsOnlyInB. |
|
1309 |
Methods which are changed from version A to B go to the list methodsChanged. |
|
1310 |
||
1311 |
<return: self> |
|
1312 |
" |
|
2585 | 1313 |
|classChangeSet| |
2230
5e10eebb1de2
move change-compare code to where it belongs (Change-hierarchy)
Claus Gittinger <cg@exept.de>
parents:
2229
diff
changeset
|
1314 |
|
2585 | 1315 |
classChangeSet := self classChangeSet. |
1316 |
||
1317 |
self methodsOnlyInA |
|
1318 |
removeAll; addAll: (classChangeSet methodsOnlyInA collect:self generator). |
|
1319 |
||
1320 |
self methodsOnlyInB |
|
1321 |
removeAll; addAll: (classChangeSet methodsOnlyInB collect:self generator). |
|
2221 | 1322 |
|
2585 | 1323 |
self methodsChanged |
1324 |
removeAll; addAll: (classChangeSet methodsChanged collect:[:arr| self generator value:(arr first)]). |
|
2221 | 1325 |
|
2585 | 1326 |
self boxAVisible value:(self methodsOnlyInA notEmpty). |
1327 |
self boxBVisible value:(self methodsOnlyInB notEmpty). |
|
2221 | 1328 |
|
2585 | 1329 |
self boxMVisible value:(self methodsChanged isEmpty |
1330 |
and: [(self methodsOnlyInA notEmpty |
|
1331 |
or:[self methodsOnlyInB notEmpty])]) not. |
|
2221 | 1332 |
! ! |
1333 |
||
2501 | 1334 |
!VersionDiffBrowser methodsFor:'setup'! |
1335 |
||
2695 | 1336 |
setupForClass:aClass againstVersion:aVersionA |
1337 |
" |
|
1338 |
compute the class change set for the class aClass of its current version against the repository version A. |
|
1339 |
When setting the class change set, the labels, list etc. of the receiver |
|
1340 |
are updated. |
|
1341 |
||
1342 |
<return: self> |
|
1343 |
" |
|
1344 |
self classChangeSet:(ClassChangeSet newForClass:aClass againstVersion:aVersionA) |
|
1345 |
! |
|
1346 |
||
2510 | 1347 |
setupForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
1348 |
" |
|
1349 |
generate the class change set from the two source files A and B. |
|
1350 |
When setting the class change set, the labels, list etc. of the receiver |
|
1351 |
are updated. |
|
1352 |
||
1353 |
<return: self> |
|
1354 |
" |
|
1355 |
self classChangeSet:(ClassChangeSet newForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB) |
|
1356 |
! |
|
1357 |
||
2501 | 1358 |
setupForClass:aClass versionA:aVersionA versionB:aVersionB |
2507 | 1359 |
" |
1360 |
compute the class change set for the class aClass and the versions A and B. |
|
1361 |
When setting the class change set, the labels, list etc. of the receiver |
|
1362 |
are updated. |
|
2501 | 1363 |
|
2507 | 1364 |
<return: self> |
1365 |
" |
|
2501 | 1366 |
self classChangeSet:(ClassChangeSet newForClass:aClass versionA:aVersionA versionB:aVersionB) |
1367 |
! ! |
|
1368 |
||
2221 | 1369 |
!VersionDiffBrowser methodsFor:'values'! |
1370 |
||
2465 | 1371 |
addAcceptToTextViewMenus |
2507 | 1372 |
" |
1373 |
add to the standard diff text view or single text views menu an accept entry. |
|
2694 | 1374 |
The acceptAction will fetch the corresponding change and apply it |
1375 |
(not the shown text) |
|
2507 | 1376 |
|
1377 |
<return: self> |
|
1378 |
" |
|
1379 |
||
2694 | 1380 |
|m v diffTextView leftView rightView singleView| |
1381 |
||
1382 |
diffTextView := self diffTextView. |
|
1383 |
leftView := diffTextView leftTextView. |
|
1384 |
rightView := diffTextView rightTextView. |
|
1385 |
singleView := self builder componentAt:#singleTextView. |
|
2465 | 1386 |
|
1387 |
(Array |
|
2694 | 1388 |
with:leftView |
1389 |
with:rightView |
|
1390 |
with:singleView) |
|
2465 | 1391 |
do:[:v | |
1392 |
m := v editMenu. |
|
2536 | 1393 |
(m selectorAt:#accept) isNil ifTrue:[ |
1394 |
m addLabels:#('-' 'accept') |
|
1395 |
selectors:(Array with:nil with:#accept) |
|
1396 |
after:#copySelection. |
|
1397 |
]. |
|
2465 | 1398 |
m |
1399 |
actionAt:#accept |
|
2694 | 1400 |
put:[ |
1401 |
|idx idx2 text change changeSet| |
|
1402 |
||
1403 |
changeSet := self classChangeSet. |
|
2465 | 1404 |
|
2694 | 1405 |
v == singleView ifTrue:[ |
1406 |
self methodsOnlyInASelection value notNil |
|
1407 |
ifTrue: [ |
|
1408 |
change := (changeSet methodsOnlyInA at: self methodsOnlyInASelection value) |
|
1409 |
] ifFalse:[ |
|
1410 |
change := (changeSet methodsOnlyInB at: self methodsOnlyInBSelection value) |
|
1411 |
]. |
|
1412 |
] ifFalse:[ |
|
1413 |
idx := self methodsChangedSelection value. |
|
1414 |
||
1415 |
v == self diffTextView leftTextView ifTrue:[ |
|
1416 |
change := (changeSet methodsChanged at:idx) first. |
|
1417 |
] ifFalse:[ |
|
1418 |
change := (changeSet methodsChanged at:idx) second. |
|
1419 |
]. |
|
1420 |
]. |
|
2501 | 1421 |
change apply |
2694 | 1422 |
]. |
2465 | 1423 |
m selectorAt:#accept put:nil. |
1424 |
v menuHolder:m. |
|
1425 |
v menuMessage:#value. |
|
1426 |
] |
|
2497 | 1427 |
! ! |
1428 |
||
1429 |
!VersionDiffBrowser::ClassChangeSet class methodsFor:'instance creation'! |
|
1430 |
||
2695 | 1431 |
changeSetForClass:aClass |
1432 |
"return a ChangeSet for the class aClass and its current source. |
|
1433 |
The source is generated into a stream and then the change set is generated |
|
1434 |
from the source stream. |
|
1435 |
||
1436 |
<return: ChangeSet|nil> |
|
1437 |
" |
|
1438 |
|theChangeSet source s| |
|
1439 |
||
1440 |
s := '' writeStream. |
|
1441 |
aClass fileOutOn:s. |
|
1442 |
source := s contents. |
|
1443 |
||
1444 |
theChangeSet := ChangeSet fromStream:(source readStream). |
|
1445 |
^theChangeSet |
|
1446 |
! |
|
1447 |
||
2497 | 1448 |
changeSetForClass:aClass andRevision:aVersion |
1449 |
"return a ChangeSet for the class aClass and version aVersion. |
|
1450 |
The version from the class source stream is checked out from the repositiory |
|
1451 |
into a source stream. Then the change set is generated from the source stream. |
|
1452 |
||
1453 |
<return: ChangeSet|nil> |
|
1454 |
" |
|
1455 |
|theSourceCodeManager theSourceStream theChangeSet| |
|
1456 |
||
1457 |
theSourceCodeManager := aClass sourceCodeManager. |
|
1458 |
[theSourceStream := theSourceCodeManager getSourceStreamFor:aClass revision:aVersion. |
|
1459 |
theSourceStream notNil |
|
1460 |
ifTrue:[theChangeSet:=ChangeSet fromStream:theSourceStream]] |
|
1461 |
valueNowOrOnUnwindDo: |
|
1462 |
[theSourceStream notNil ifTrue:[theSourceStream close]]. |
|
1463 |
^theChangeSet |
|
1464 |
! |
|
1465 |
||
1466 |
changeSetForClass:aClass andSource:aSource |
|
1467 |
"return a ChangeSet for the class aClass and source aSource. |
|
1468 |
The source is converted to a stream and then the change set is generated |
|
1469 |
from the source stream. |
|
1470 |
||
1471 |
<return: ChangeSet|nil> |
|
1472 |
" |
|
1473 |
|theChangeSet theSourceStream| |
|
1474 |
||
1475 |
[(theSourceStream := aSource readStream) notNil |
|
1476 |
ifTrue:[theChangeSet:=ChangeSet fromStream:(theSourceStream := aSource readStream)]] |
|
1477 |
valueNowOrOnUnwindDo: |
|
1478 |
[theSourceStream notNil |
|
1479 |
ifTrue:[theSourceStream close]]. |
|
1480 |
^theChangeSet |
|
1481 |
! |
|
1482 |
||
2695 | 1483 |
newForClass:aClass againstVersion:aVersionA |
1484 |
"return a ClassChangeSet for the class aClass against some verison in the repository. |
|
1485 |
A new instance of ClassChangeSet is generated containing |
|
1486 |
the correspondenting changes. |
|
1487 |
||
1488 |
<return: ClassChangeSet> |
|
1489 |
" |
|
2710
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1490 |
|theChangeSetA theChangeSetB theClassChangeSet versionCompared diffSet| |
2695 | 1491 |
|
1492 |
theClassChangeSet := self new. |
|
1493 |
theClassChangeSet classBeingCompared:aClass. |
|
1494 |
versionCompared := aVersionA. |
|
1495 |
aVersionA isNil ifTrue:[ |
|
1496 |
theClassChangeSet labelA:(versionCompared := aClass revision). |
|
1497 |
] ifFalse:[ |
|
1498 |
aVersionA == #newest ifTrue:[ |
|
1499 |
theClassChangeSet labelA:'newest'. |
|
1500 |
] ifFalse:[ |
|
1501 |
theClassChangeSet labelA:versionCompared. |
|
1502 |
] |
|
1503 |
]. |
|
1504 |
theClassChangeSet labelB:'current'. |
|
1505 |
theChangeSetA := self changeSetForClass: aClass andRevision: versionCompared. |
|
1506 |
theChangeSetB := self changeSetForClass: aClass. |
|
1507 |
theChangeSetA isNil |
|
1508 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1509 |
theChangeSetB isNil |
|
1510 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
2710
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1511 |
"/ if we are comparing a private class, prune out other changes |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1512 |
aClass isPrivate ifTrue:[ |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1513 |
theChangeSetA removeAllSuchThat:[:aChange | |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1514 |
aChange className ~= aClass name |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1515 |
]. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1516 |
theChangeSetB removeAllSuchThat:[:aChange | |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1517 |
aChange className ~= aClass name |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1518 |
]. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1519 |
]. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1520 |
self activityNotification:'generating diff-set...'. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1521 |
diffSet := theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB). |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1522 |
self activityNotification:nil. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1523 |
^ diffSet |
2695 | 1524 |
! |
1525 |
||
2497 | 1526 |
newForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
1527 |
"return a ClassChangeSet for the class aClass and the two sources. |
|
1528 |
The two classes are compared via the source files. A new instance of |
|
1529 |
ClassChangeSet is generated containing the correspondenting changes. |
|
1530 |
||
1531 |
<return: ClassChangeSet> |
|
1532 |
" |
|
1533 |
|theChangeSetA theChangeSetB theClassChangeSet| |
|
1534 |
||
1535 |
theClassChangeSet := self new. |
|
1536 |
theClassChangeSet classBeingCompared:aClass. |
|
1537 |
theClassChangeSet labelA:aLabelA. |
|
1538 |
theClassChangeSet labelB:aLabelB. |
|
1539 |
theChangeSetA:=self changeSetForClass:aClass andSource:aSourceA. |
|
1540 |
theChangeSetB:=self changeSetForClass:aClass andSource:aSourceB. |
|
1541 |
theChangeSetA isNil |
|
1542 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1543 |
theChangeSetB isNil |
|
1544 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
2695 | 1545 |
^theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB) |
2465 | 1546 |
! |
1547 |
||
2497 | 1548 |
newForClass:aClass versionA:aVersionA versionB:aVersionB |
1549 |
"return a ClassChangeSet for the class aClass and the two versions. |
|
1550 |
The two class version are checked out from the repository and then being |
|
1551 |
compared. A new instance of ClassChangeSet is generated containing |
|
1552 |
the correspondenting changes. |
|
1553 |
||
1554 |
<return: ClassChangeSet> |
|
1555 |
" |
|
1556 |
|theChangeSetA theChangeSetB theClassChangeSet| |
|
1557 |
||
1558 |
theClassChangeSet := self new. |
|
1559 |
theClassChangeSet classBeingCompared:aClass. |
|
1560 |
theClassChangeSet labelA:aVersionA. |
|
1561 |
theClassChangeSet labelB:aVersionB. |
|
1562 |
theChangeSetA := self changeSetForClass: aClass andRevision: aVersionA. |
|
1563 |
theChangeSetB := self changeSetForClass: aClass andRevision: aVersionB. |
|
1564 |
theChangeSetA isNil |
|
1565 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1566 |
theChangeSetB isNil |
|
1567 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
2695 | 1568 |
^theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB) |
2497 | 1569 |
|
1570 |
! ! |
|
1571 |
||
1572 |
!VersionDiffBrowser::ClassChangeSet methodsFor:'accessing'! |
|
1573 |
||
1574 |
classBeingCompared |
|
1575 |
"returns the value of the class which is compared |
|
1576 |
||
1577 |
<return: Behavior> |
|
1578 |
" |
|
1579 |
||
1580 |
^ classBeingCompared |
|
1581 |
! |
|
2221 | 1582 |
|
2497 | 1583 |
classBeingCompared:something |
1584 |
"set the value of the class which is compared |
|
1585 |
||
1586 |
<return: self>" |
|
1587 |
||
1588 |
classBeingCompared := something. |
|
1589 |
! |
|
1590 |
||
2695 | 1591 |
diffSet |
1592 |
"returns a identity dictionary containing the different changes. |
|
1593 |
key: value: |
|
1594 |
#changed OrderedCollection of arrays containing ChangeSets for methods |
|
1595 |
which are changed and exists in the class versionA and versionB |
|
1596 |
#onlyInArg ChangeSet for the methods which exists only in the class versionB |
|
1597 |
#onlyInReceiver ChangeSet for the methods which exists only in the class versionA |
|
1598 |
||
1599 |
<return: IdentityDictionary> |
|
1600 |
" |
|
1601 |
^ diffSet |
|
1602 |
! |
|
1603 |
||
1604 |
diffSet:something |
|
1605 |
"sets a identity dictionary containing the different changes. |
|
1606 |
key: value: |
|
1607 |
#changed OrderedCollection of arrays containing ChangeSets for methods |
|
1608 |
which are changed and exists in the class versionA and versionB |
|
1609 |
#onlyInArg ChangeSet for the methods which exists only in the class versionB |
|
1610 |
#onlyInReceiver ChangeSet for the methods which exists only in the class versionA |
|
1611 |
||
1612 |
<return: self> |
|
1613 |
" |
|
1614 |
||
1615 |
diffSet := something. |
|
1616 |
! |
|
1617 |
||
2497 | 1618 |
labelA |
1619 |
"returns the label for the class versionA |
|
1620 |
||
1621 |
<return: String> |
|
1622 |
" |
|
1623 |
^ labelA |
|
1624 |
! |
|
1625 |
||
1626 |
labelA:something |
|
1627 |
"sets the label for the class versionA |
|
1628 |
||
1629 |
<return: self> |
|
1630 |
" |
|
1631 |
labelA := something. |
|
1632 |
! |
|
1633 |
||
1634 |
labelB |
|
1635 |
"returns the label for the class versionB |
|
1636 |
||
1637 |
<return: String> |
|
1638 |
" |
|
1639 |
^ labelB |
|
1640 |
! |
|
2465 | 1641 |
|
2497 | 1642 |
labelB:something |
1643 |
"sets the label for the class versionB |
|
1644 |
||
1645 |
<return: self> |
|
1646 |
" |
|
1647 |
||
1648 |
labelB := something. |
|
1649 |
! |
|
1650 |
||
1651 |
methodsChanged |
|
1652 |
"returns a OrderedCollection of arrays containing ChangeSets for methods |
|
1653 |
which are changed and exists in the class versionA and versionB |
|
1654 |
||
1655 |
<return: OrderedCollection> |
|
1656 |
" |
|
2695 | 1657 |
^ self diffSet at:#changed |
2497 | 1658 |
! |
1659 |
||
1660 |
methodsOnlyInA |
|
1661 |
"returns a ChangeSet for the methods which exists only in the class versionA |
|
1662 |
||
1663 |
<return: ChangeSet> |
|
1664 |
" |
|
1665 |
||
2695 | 1666 |
^ self diffSet at:#onlyInReceiver |
2497 | 1667 |
! |
1668 |
||
1669 |
methodsOnlyInB |
|
1670 |
"returns a ChangeSet for the methods which exists only in the class versionB |
|
1671 |
||
1672 |
<return: ChangeSet> |
|
1673 |
" |
|
1674 |
||
2695 | 1675 |
^ self diffSet at:#onlyInArg |
2221 | 1676 |
! ! |
1677 |
||
1678 |
!VersionDiffBrowser class methodsFor:'documentation'! |
|
1679 |
||
1680 |
version |
|
2714 | 1681 |
^ '$Header: /cvs/stx/stx/libtool/VersionDiffBrowser.st,v 1.27 2000-08-17 22:23:41 cg Exp $' |
2221 | 1682 |
! ! |