author | Claus Gittinger <cg@exept.de> |
Thu, 13 Apr 2006 17:22:33 +0200 | |
changeset 6766 | 3d83ccd2965d |
parent 6760 | 83fb9efe5dd2 |
child 6964 | ba22a471854d |
permissions | -rw-r--r-- |
30 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
45 | 3 |
All Rights Reserved |
30 | 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 |
||
2862
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
13 |
"{ Package: 'stx:libtool' }" |
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
14 |
|
30 | 15 |
ChangesBrowser subclass:#ChangeSetBrowser |
1470 | 16 |
instanceVariableNames:'changeSet originalChangeSet' |
17 |
classVariableNames:'' |
|
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-Browsers' |
|
30 | 20 |
! |
21 |
||
22 |
!ChangeSetBrowser class methodsFor:'documentation'! |
|
23 |
||
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
45 | 27 |
All Rights Reserved |
30 | 28 |
|
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
38 |
documentation |
|
39 |
" |
|
40 |
like a changesBrowser, but manipulates the per-project change-lists. |
|
5703 | 41 |
|
42 |
This is operating on changes as a list of Change-instances |
|
43 |
as opposed to the ChangesBrowser which is doing it completely non-object oriented, |
|
44 |
as a list of text-chunks. |
|
45 |
||
46 |
ChangeSetBrowser is going to completely replace the ChangesBrowser class in the near |
|
47 |
future. |
|
30 | 48 |
" |
49 |
! ! |
|
50 |
||
51 |
!ChangeSetBrowser class methodsFor:'instance creation'! |
|
52 |
||
2862
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
53 |
open |
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
54 |
"create a changes browser on the current change set" |
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
55 |
|
3898 | 56 |
^ self openOn:(ChangeSet current) |
57 |
||
58 |
" |
|
59 |
ChangeSetBrowser open |
|
60 |
" |
|
2862
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
61 |
! |
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
62 |
|
40 | 63 |
openOn:aChangeSet |
2862
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
64 |
"create a changes browser on a change set" |
30 | 65 |
|
45 | 66 |
^ ((self new label:'ChangeSet Browser') changeSet:aChangeSet) open |
4232 | 67 |
! |
68 |
||
69 |
openOnFile:aFileName |
|
70 |
|changeSet| |
|
71 |
||
72 |
changeSet := ChangeSet fromFile:aFileName. |
|
73 |
^ self openOn:changeSet |
|
30 | 74 |
! ! |
75 |
||
1470 | 76 |
!ChangeSetBrowser class methodsFor:'defaults'! |
77 |
||
78 |
defaultLabel |
|
5527 | 79 |
^ self classResources string:'ChangeSet Browser' |
1470 | 80 |
|
81 |
"Created: / 6.2.1998 / 13:25:47 / cg" |
|
82 |
! ! |
|
83 |
||
3203 | 84 |
!ChangeSetBrowser class methodsFor:'menu specs'! |
85 |
||
86 |
menuSpec |
|
87 |
"This resource specification was automatically generated |
|
88 |
by the MenuEditor of ST/X." |
|
89 |
||
90 |
"Do not manually edit this!! If it is corrupted, |
|
91 |
the MenuEditor may not be able to read the specification." |
|
92 |
||
93 |
" |
|
94 |
MenuEditor new openOnClass:ChangeSetBrowser andSelector:#menuSpec |
|
95 |
(Menu new fromLiteralArrayEncoding:(ChangeSetBrowser menuSpec)) startUp |
|
96 |
" |
|
97 |
||
98 |
<resource: #menu> |
|
99 |
||
100 |
^ |
|
6766 | 101 |
#(Menu |
102 |
( |
|
103 |
(MenuItem |
|
104 |
label: 'File' |
|
105 |
translateLabel: true |
|
106 |
submenu: |
|
107 |
(Menu |
|
108 |
( |
|
109 |
(MenuItem |
|
110 |
label: 'Compress' |
|
111 |
itemValue: doCompress |
|
112 |
translateLabel: true |
|
113 |
isVisible: notEditingClassSourceAndNotReadOnly |
|
3203 | 114 |
) |
6766 | 115 |
(MenuItem |
116 |
enabled: hasSelection |
|
117 |
label: 'Compress for Class' |
|
118 |
itemValue: doCompressClass |
|
119 |
translateLabel: true |
|
120 |
isVisible: notEditingClassSourceAndNotReadOnly |
|
3203 | 121 |
) |
6766 | 122 |
(MenuItem |
123 |
label: 'Compare and Compress' |
|
124 |
itemValue: doCompareAndCompress |
|
125 |
translateLabel: true |
|
126 |
isVisible: notEditingClassSourceAndNotReadOnly |
|
3203 | 127 |
) |
6766 | 128 |
(MenuItem |
129 |
label: '-' |
|
130 |
isVisible: notEditingClassSourceAndNotReadOnly |
|
3203 | 131 |
) |
6766 | 132 |
(MenuItem |
133 |
enabled: hasSelection |
|
134 |
label: 'Fileout && Delete all Changes for Class' |
|
135 |
itemValue: doFileoutAndDeleteClassAll |
|
136 |
translateLabel: true |
|
137 |
isVisible: notEditingClassSourceAndNotReadOnly |
|
3203 | 138 |
) |
6766 | 139 |
(MenuItem |
140 |
enabled: hasSelection |
|
141 |
label: 'CheckIn && Delete all Changes for Class' |
|
142 |
itemValue: doCheckinAndDeleteClassAll |
|
143 |
translateLabel: true |
|
144 |
isVisible: notEditingClassSourceAndNotReadOnly |
|
3203 | 145 |
) |
6766 | 146 |
(MenuItem |
147 |
label: '-' |
|
148 |
isVisible: notEditingClassSourceAndNotReadOnly |
|
3203 | 149 |
) |
6766 | 150 |
(MenuItem |
151 |
enabled: hasSelection |
|
152 |
label: 'Save in...' |
|
153 |
itemValue: doSave |
|
154 |
translateLabel: true |
|
3203 | 155 |
) |
6766 | 156 |
(MenuItem |
157 |
enabled: hasSelection |
|
158 |
label: 'Save to End in...' |
|
159 |
itemValue: doSaveRest |
|
160 |
translateLabel: true |
|
3203 | 161 |
) |
6766 | 162 |
(MenuItem |
163 |
enabled: hasSelection |
|
164 |
label: 'Save for Class to End in...' |
|
165 |
itemValue: doSaveClassRest |
|
166 |
translateLabel: true |
|
3203 | 167 |
) |
6766 | 168 |
(MenuItem |
169 |
enabled: hasSelection |
|
170 |
label: 'Save All for Class in...' |
|
171 |
itemValue: doSaveClassAll |
|
172 |
translateLabel: true |
|
3203 | 173 |
) |
6766 | 174 |
(MenuItem |
175 |
label: '-' |
|
3203 | 176 |
) |
6766 | 177 |
(MenuItem |
178 |
label: 'Saveback ChangeSet' |
|
179 |
itemValue: doSaveBack |
|
180 |
translateLabel: true |
|
181 |
isVisible: notReadOnly |
|
3203 | 182 |
) |
6766 | 183 |
(MenuItem |
184 |
label: '-' |
|
185 |
isVisible: notReadOnly |
|
3203 | 186 |
) |
6766 | 187 |
(MenuItem |
188 |
label: 'Update' |
|
189 |
itemValue: doUpdate |
|
190 |
translateLabel: true |
|
191 |
isVisible: notReadOnly |
|
3203 | 192 |
) |
6766 | 193 |
(MenuItem |
194 |
label: '-' |
|
195 |
isVisible: notReadOnly |
|
3203 | 196 |
) |
6766 | 197 |
(MenuItem |
198 |
label: 'Exit' |
|
199 |
itemValue: menuExit |
|
200 |
translateLabel: true |
|
3203 | 201 |
) |
202 |
) |
|
203 |
nil |
|
204 |
nil |
|
205 |
) |
|
206 |
) |
|
6766 | 207 |
(MenuItem |
208 |
label: 'Change' |
|
209 |
translateLabel: true |
|
210 |
submenu: |
|
211 |
(Menu |
|
212 |
( |
|
213 |
(MenuItem |
|
214 |
label: 'Undo (undelete Method)' |
|
215 |
itemValue: doUndoRemoveMethod |
|
216 |
translateLabel: true |
|
217 |
isVisible: hasUndoableRemoveMethodChangeSelected |
|
3857 | 218 |
) |
6766 | 219 |
(MenuItem |
220 |
label: 'Undo (previous Version)' |
|
221 |
itemValue: doUndoMethodChange |
|
222 |
translateLabel: true |
|
223 |
isVisible: hasUndoableMethodChangeSelected |
|
3857 | 224 |
) |
6766 | 225 |
(MenuItem |
226 |
enabled: false |
|
227 |
label: 'Undo' |
|
228 |
itemValue: doUndoMethodChange |
|
229 |
translateLabel: true |
|
230 |
isVisible: hasNotUndoableChangeSelected |
|
3857 | 231 |
) |
6766 | 232 |
(MenuItem |
233 |
label: '-' |
|
3857 | 234 |
) |
6766 | 235 |
(MenuItem |
236 |
enabled: hasSelection |
|
237 |
label: 'Apply' |
|
238 |
itemValue: doApply |
|
239 |
translateLabel: true |
|
3554 | 240 |
) |
6766 | 241 |
(MenuItem |
242 |
enabled: hasSelection |
|
243 |
label: 'Apply to End' |
|
244 |
itemValue: doApplyRest |
|
245 |
translateLabel: true |
|
3554 | 246 |
) |
6766 | 247 |
(MenuItem |
248 |
enabled: hasSelection |
|
249 |
label: 'Apply for Class to End' |
|
250 |
itemValue: doApplyClassRest |
|
251 |
translateLabel: true |
|
3554 | 252 |
) |
6766 | 253 |
(MenuItem |
254 |
enabled: hasNoSelection |
|
255 |
label: 'Apply All' |
|
256 |
itemValue: doApplyAll |
|
257 |
translateLabel: true |
|
3554 | 258 |
) |
6766 | 259 |
(MenuItem |
260 |
label: '-' |
|
3554 | 261 |
) |
6766 | 262 |
(MenuItem |
263 |
enabled: hasSelection |
|
264 |
label: 'Delete' |
|
265 |
itemValue: doDelete |
|
266 |
translateLabel: true |
|
267 |
isVisible: notReadOnly |
|
3554 | 268 |
) |
6766 | 269 |
(MenuItem |
270 |
enabled: hasSelection |
|
271 |
label: 'Delete to End' |
|
272 |
itemValue: doDeleteRest |
|
273 |
translateLabel: true |
|
274 |
isVisible: notReadOnly |
|
3554 | 275 |
) |
6766 | 276 |
(MenuItem |
277 |
enabled: hasSelection |
|
278 |
label: 'Delete for Class to End' |
|
279 |
itemValue: doDeleteClassRest |
|
280 |
translateLabel: true |
|
281 |
isVisible: notReadOnly |
|
3554 | 282 |
) |
6766 | 283 |
(MenuItem |
284 |
enabled: hasSelection |
|
285 |
label: 'Delete for Class from Begin' |
|
286 |
itemValue: doDeleteClassFromBeginning |
|
287 |
translateLabel: true |
|
288 |
isVisible: notReadOnly |
|
3554 | 289 |
) |
6766 | 290 |
(MenuItem |
291 |
enabled: hasSelection |
|
292 |
label: 'Delete All for Class' |
|
293 |
itemValue: doDeleteClassAll |
|
294 |
translateLabel: true |
|
295 |
isVisible: notReadOnly |
|
3554 | 296 |
) |
6766 | 297 |
(MenuItem |
298 |
enabled: hasSelection |
|
299 |
label: 'Delete All for Class && its Private Classes' |
|
300 |
itemValue: doDeleteClassAndPrivateClassesAll |
|
301 |
translateLabel: true |
|
302 |
isVisible: notReadOnly |
|
3554 | 303 |
) |
6766 | 304 |
(MenuItem |
305 |
label: '-' |
|
306 |
isVisible: notReadOnly |
|
3554 | 307 |
) |
6766 | 308 |
(MenuItem |
309 |
enabled: hasSelection |
|
310 |
label: 'Compare with Current' |
|
311 |
itemValue: doCompare |
|
312 |
translateLabel: true |
|
3554 | 313 |
) |
6766 | 314 |
(MenuItem |
315 |
enabled: hasSelection |
|
316 |
label: 'Browse' |
|
317 |
itemValue: doBrowse |
|
318 |
translateLabel: true |
|
3554 | 319 |
) |
6766 | 320 |
(MenuItem |
321 |
label: '-' |
|
3554 | 322 |
) |
6766 | 323 |
(MenuItem |
324 |
enabled: hasSelection |
|
325 |
label: 'Make Change a Patch' |
|
326 |
itemValue: doMakePatch |
|
327 |
translateLabel: true |
|
3554 | 328 |
) |
329 |
) |
|
330 |
nil |
|
331 |
nil |
|
332 |
) |
|
333 |
) |
|
6766 | 334 |
(MenuItem |
335 |
label: 'Search' |
|
336 |
translateLabel: true |
|
337 |
submenu: |
|
338 |
(Menu |
|
339 |
( |
|
340 |
(MenuItem |
|
341 |
label: 'Class...' |
|
342 |
itemValue: findClass |
|
343 |
translateLabel: true |
|
3203 | 344 |
) |
6766 | 345 |
(MenuItem |
346 |
enabled: hasSelection |
|
347 |
label: 'Previous for Class' |
|
348 |
itemValue: findPreviousForClass |
|
349 |
translateLabel: true |
|
3203 | 350 |
) |
6766 | 351 |
(MenuItem |
352 |
enabled: hasSelection |
|
353 |
label: 'Next for Class' |
|
354 |
itemValue: findNextForClass |
|
355 |
translateLabel: true |
|
3203 | 356 |
) |
6766 | 357 |
(MenuItem |
358 |
label: '-' |
|
3203 | 359 |
) |
6766 | 360 |
(MenuItem |
361 |
label: 'Selector...' |
|
362 |
itemValue: findSelector |
|
363 |
translateLabel: true |
|
3203 | 364 |
) |
6766 | 365 |
(MenuItem |
366 |
enabled: hasSelection |
|
367 |
label: 'Previous for Selector' |
|
368 |
itemValue: findPreviousForSelector |
|
369 |
translateLabel: true |
|
370 |
) |
|
371 |
(MenuItem |
|
372 |
enabled: hasSelection |
|
373 |
label: 'Next for Selector' |
|
374 |
itemValue: findNextForSelector |
|
375 |
translateLabel: true |
|
3203 | 376 |
) |
6766 | 377 |
(MenuItem |
378 |
label: '-' |
|
3203 | 379 |
) |
6766 | 380 |
(MenuItem |
381 |
label: 'String...' |
|
382 |
itemValue: findString |
|
383 |
translateLabel: true |
|
3203 | 384 |
) |
6766 | 385 |
(MenuItem |
386 |
enabled: hasSelection |
|
387 |
label: 'Previous with String' |
|
388 |
itemValue: findPreviousForString |
|
389 |
translateLabel: true |
|
3203 | 390 |
) |
6766 | 391 |
(MenuItem |
392 |
enabled: hasSelection |
|
393 |
label: 'Next with String' |
|
394 |
itemValue: findNextForString |
|
395 |
translateLabel: true |
|
3203 | 396 |
) |
6766 | 397 |
(MenuItem |
398 |
label: '-' |
|
3203 | 399 |
) |
6766 | 400 |
(MenuItem |
401 |
enabled: hasSelection |
|
402 |
label: 'Previous Snapshot' |
|
403 |
itemValue: findPreviousSnapshot |
|
404 |
translateLabel: true |
|
3203 | 405 |
) |
6766 | 406 |
(MenuItem |
407 |
enabled: hasSelection |
|
408 |
label: 'Next Snapshot' |
|
409 |
itemValue: findNextSnapshot |
|
410 |
translateLabel: true |
|
3203 | 411 |
) |
6766 | 412 |
(MenuItem |
413 |
label: '-' |
|
414 |
) |
|
415 |
(MenuItem |
|
416 |
label: 'Next Difference' |
|
417 |
itemValue: findNextDifference |
|
418 |
translateLabel: true |
|
3203 | 419 |
) |
420 |
) |
|
421 |
nil |
|
422 |
nil |
|
423 |
) |
|
424 |
) |
|
6766 | 425 |
(MenuItem |
426 |
label: 'Browse' |
|
427 |
translateLabel: true |
|
428 |
submenu: |
|
429 |
(Menu |
|
430 |
( |
|
431 |
(MenuItem |
|
432 |
enabled: hasSingleSelection |
|
433 |
label: 'Class' |
|
434 |
itemValue: doBrowse |
|
435 |
translateLabel: true |
|
3203 | 436 |
) |
6766 | 437 |
(MenuItem |
438 |
label: '-' |
|
3203 | 439 |
) |
6766 | 440 |
(MenuItem |
441 |
label: 'Senders...' |
|
442 |
itemValue: doBrowseSenders |
|
443 |
translateLabel: true |
|
3203 | 444 |
) |
6766 | 445 |
(MenuItem |
446 |
label: 'Implementors...' |
|
447 |
itemValue: doBrowseImplementors |
|
448 |
translateLabel: true |
|
3203 | 449 |
) |
450 |
) |
|
451 |
nil |
|
452 |
nil |
|
453 |
) |
|
454 |
) |
|
6766 | 455 |
(MenuItem |
456 |
label: 'Settings' |
|
457 |
translateLabel: true |
|
458 |
submenu: |
|
459 |
(Menu |
|
460 |
( |
|
461 |
(MenuItem |
|
462 |
label: 'Auto Compare' |
|
463 |
translateLabel: true |
|
464 |
indication: autoCompare |
|
3203 | 465 |
) |
6766 | 466 |
(MenuItem |
467 |
label: 'Auto Update' |
|
468 |
translateLabel: true |
|
469 |
isVisible: notReadOnly |
|
470 |
indication: autoUpdate |
|
3203 | 471 |
) |
6766 | 472 |
(MenuItem |
473 |
label: '-' |
|
3203 | 474 |
) |
6766 | 475 |
(MenuItem |
476 |
label: 'Add Applies to ChangeSet...' |
|
477 |
translateLabel: true |
|
478 |
indication: updateChangeSet |
|
4483 | 479 |
) |
6766 | 480 |
(MenuItem |
481 |
label: 'Apply in Original NameSpace' |
|
482 |
translateLabel: true |
|
483 |
indication: applyInOriginalNameSpace |
|
3203 | 484 |
) |
6766 | 485 |
(MenuItem |
486 |
label: '-' |
|
4279
1fbb8fa63669
care for parser errors when applying
Claus Gittinger <cg@exept.de>
parents:
4232
diff
changeset
|
487 |
) |
6766 | 488 |
(MenuItem |
489 |
label: 'Apply into Package...' |
|
490 |
itemValue: setEnforcedPackage |
|
491 |
translateLabel: true |
|
4483 | 492 |
) |
6766 | 493 |
(MenuItem |
494 |
label: 'Apply in NameSpace...' |
|
495 |
itemValue: setEnforcedNameSpace |
|
496 |
translateLabel: true |
|
4279
1fbb8fa63669
care for parser errors when applying
Claus Gittinger <cg@exept.de>
parents:
4232
diff
changeset
|
497 |
) |
3203 | 498 |
) |
499 |
nil |
|
500 |
nil |
|
501 |
) |
|
502 |
) |
|
6766 | 503 |
(MenuItem |
504 |
label: 'Help' |
|
505 |
translateLabel: true |
|
506 |
startGroup: right |
|
507 |
submenu: |
|
508 |
(Menu |
|
509 |
( |
|
510 |
(MenuItem |
|
511 |
label: 'ChangesBrowser Documentation' |
|
512 |
itemValue: openHTMLDocument: |
|
513 |
translateLabel: true |
|
514 |
argument: 'tools/cbrowser/TOP.html' |
|
3203 | 515 |
) |
6766 | 516 |
(MenuItem |
517 |
label: '-' |
|
3205 | 518 |
) |
6766 | 519 |
(MenuItem |
520 |
label: 'About ChangesBrowser...' |
|
521 |
itemValue: openAboutThisApplication |
|
522 |
translateLabel: true |
|
3205 | 523 |
) |
3203 | 524 |
) |
525 |
nil |
|
526 |
nil |
|
527 |
) |
|
528 |
) |
|
529 |
) |
|
530 |
nil |
|
531 |
nil |
|
532 |
) |
|
533 |
! ! |
|
534 |
||
6297 | 535 |
!ChangeSetBrowser methodsFor:'initialization & release'! |
30 | 536 |
|
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
537 |
askIfChangesAreToBeWrittenBack |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
538 |
|action| |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
539 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
540 |
anyChanges ifFalse:[^ self]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
541 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
542 |
action := OptionBox |
6644 | 543 |
request:(resources string:'The modified changeSet has not been saved.\\Update the changeSet before closing ?') withCRs |
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
544 |
label:'ChangesBrowser' |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
545 |
form:(WarningBox iconBitmap) |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
546 |
buttonLabels:(resources array:#('Cancel' 'Don''t Update' 'Update')) |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
547 |
values:#(#abort #ignore #save) |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
548 |
default:#save |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
549 |
onCancel:#abort. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
550 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
551 |
action == #abort ifTrue:[^ self]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
552 |
action == #save ifTrue:[ |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
553 |
self saveBackChanges |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
554 |
]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
555 |
! |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
556 |
|
224 | 557 |
changeListMenu |
3203 | 558 |
<resource: #programMenu > |
559 |
||
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
560 |
|items m| |
30 | 561 |
|
3203 | 562 |
items := #( |
563 |
('Apply' doApply) |
|
564 |
('Apply to End' doApplyRest) |
|
565 |
('Apply All changes' doApplyAll) |
|
566 |
('-' ) |
|
567 |
('Delete' doDelete) |
|
568 |
('Delete to End' doDeleteRest) |
|
569 |
('Delete for Class to End' doDeleteClassRest) |
|
570 |
('Delete All for Class' doDeleteClassAll) |
|
571 |
('-' ) |
|
4316 | 572 |
"/ ('Compress' doCompress) |
3203 | 573 |
('Compare with Current' doCompare) |
574 |
('-' ) |
|
575 |
('Make Change a Patch' doMakePatch) |
|
576 |
('-' ) |
|
577 |
('Saveback ChangeSet' doSaveBack) |
|
578 |
('-' ) |
|
579 |
('Update' doUpdate) |
|
580 |
). |
|
224 | 581 |
|
4316 | 582 |
device ctrlDown ifTrue:[ |
583 |
items := #( |
|
584 |
('Inspect Change' doInspectChange) |
|
585 |
). |
|
586 |
]. |
|
587 |
||
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
588 |
m := PopUpMenu |
3203 | 589 |
itemList:items |
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
590 |
resources:resources. |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
591 |
|
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
592 |
readOnly == true ifTrue:[ |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
593 |
m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
594 |
doDeleteClassAndPrivateClassesAll doCompress |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
595 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
596 |
doWriteBack doSaveBack doUpdate |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
597 |
doApplyAll doApplyRest) |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
598 |
]. |
3228 | 599 |
|
600 |
self hasSelection ifTrue:[ |
|
601 |
m disable:#doApplyAll |
|
602 |
]. |
|
603 |
||
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3212
diff
changeset
|
604 |
^ m |
224 | 605 |
|
606 |
"Created: 3.12.1995 / 18:06:35 / cg" |
|
607 |
"Modified: 3.12.1995 / 18:13:06 / cg" |
|
4942 | 608 |
! |
609 |
||
610 |
showingDiffsDefault |
|
611 |
^ "false" super showingDiffsDefault |
|
30 | 612 |
! ! |
613 |
||
3857 | 614 |
!ChangeSetBrowser methodsFor:'menu aspects'! |
615 |
||
616 |
hasNotUndoableChangeSelected |
|
617 |
^ (self hasUndoableMethodChangeSelected |
|
618 |
or:[self hasUndoableRemoveMethodChangeSelected]) not |
|
619 |
! |
|
620 |
||
621 |
hasUndoableMethodChangeSelected |
|
622 |
|nr chg| |
|
623 |
||
624 |
self hasSingleSelection ifTrue:[ |
|
625 |
nr := self theSingleSelection. |
|
626 |
nr notNil ifTrue:[ |
|
627 |
chg := changeSet at:nr. |
|
628 |
chg isMethodChange ifTrue:[ |
|
629 |
chg isMethodRemoveChange ifFalse:[ |
|
630 |
chg previousVersion notNil ifTrue:[ |
|
631 |
^ true |
|
632 |
] |
|
633 |
] |
|
634 |
] |
|
635 |
] |
|
636 |
]. |
|
637 |
^ false |
|
638 |
! |
|
639 |
||
640 |
hasUndoableRemoveMethodChangeSelected |
|
641 |
|nr chg| |
|
642 |
||
643 |
self hasSingleSelection ifTrue:[ |
|
644 |
nr := self theSingleSelection. |
|
645 |
nr notNil ifTrue:[ |
|
646 |
chg := changeSet at:nr. |
|
647 |
chg isMethodRemoveChange ifTrue:[ |
|
648 |
chg previousVersion notNil ifTrue:[ |
|
649 |
^ true |
|
650 |
] |
|
651 |
] |
|
652 |
] |
|
653 |
]. |
|
654 |
^ false |
|
655 |
! ! |
|
656 |
||
2862
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
657 |
!ChangeSetBrowser methodsFor:'private'! |
1474 | 658 |
|
659 |
applyChange:changeNr |
|
660 |
"fileIn a change" |
|
661 |
||
4990 | 662 |
|nm applyAction aborted| |
1474 | 663 |
|
664 |
nm := self classNameOfChange:changeNr. |
|
665 |
nm notNil ifTrue:[ |
|
666 |
|cls| |
|
667 |
||
668 |
cls := Smalltalk at:(nm asSymbol) ifAbsent:[]. |
|
669 |
cls notNil ifTrue:[ |
|
670 |
cls isLoaded ifFalse:[ |
|
671 |
cls autoload |
|
672 |
] |
|
673 |
] |
|
674 |
]. |
|
675 |
||
676 |
changeNrProcessed := changeNr. |
|
4990 | 677 |
aborted := false. |
1474 | 678 |
|
679 |
applyAction := [ |
|
680 |
|sig| |
|
681 |
||
682 |
(skipSignal notNil) ifTrue:[ |
|
683 |
sig := skipSignal |
|
684 |
] ifFalse:[ |
|
4990 | 685 |
sig := AbortOperationRequest |
1474 | 686 |
]. |
4990 | 687 |
sig handle:[:ex | |
688 |
aborted := (sig == AbortOperationRequest). |
|
689 |
] do:[ |
|
4279
1fbb8fa63669
care for parser errors when applying
Claus Gittinger <cg@exept.de>
parents:
4232
diff
changeset
|
690 |
Parser::ParseError handle:[:ex | |
1fbb8fa63669
care for parser errors when applying
Claus Gittinger <cg@exept.de>
parents:
4232
diff
changeset
|
691 |
ex signal == Parser::UndefinedSuperclassError ifTrue:[ |
1fbb8fa63669
care for parser errors when applying
Claus Gittinger <cg@exept.de>
parents:
4232
diff
changeset
|
692 |
codeView error:(ex errorString) position:1 to:nil from:nil |
1fbb8fa63669
care for parser errors when applying
Claus Gittinger <cg@exept.de>
parents:
4232
diff
changeset
|
693 |
] ifFalse:[ |
4990 | 694 |
codeView error:(ex description) position:(ex startPosition) to:(ex endPosition) from:(ex parser) |
4279
1fbb8fa63669
care for parser errors when applying
Claus Gittinger <cg@exept.de>
parents:
4232
diff
changeset
|
695 |
] |
1fbb8fa63669
care for parser errors when applying
Claus Gittinger <cg@exept.de>
parents:
4232
diff
changeset
|
696 |
] do:[ |
4483 | 697 |
|nameSpace pkg| |
698 |
||
699 |
nameSpace := self nameSpaceForApply. |
|
700 |
pkg := enforcedPackage ? Class packageQuerySignal query. |
|
701 |
Class packageQuerySignal answer:pkg |
|
702 |
do:[ |
|
703 |
Class nameSpaceQuerySignal answer:nameSpace |
|
704 |
do:[ |
|
6603 | 705 |
self applyPossiblyModifiedChange:(changeSet at:changeNr). |
4483 | 706 |
] |
707 |
] |
|
4279
1fbb8fa63669
care for parser errors when applying
Claus Gittinger <cg@exept.de>
parents:
4232
diff
changeset
|
708 |
] |
1474 | 709 |
]. |
710 |
changeNrProcessed := nil. |
|
711 |
]. |
|
712 |
||
713 |
"/ |
|
714 |
"/ if I am showing the changes file, dont update it |
|
715 |
"/ |
|
716 |
changeFileName = ObjectMemory nameForChanges ifTrue:[ |
|
717 |
Class withoutUpdatingChangesDo:applyAction |
|
718 |
] ifFalse:[ |
|
719 |
applyAction value |
|
720 |
]. |
|
4990 | 721 |
^ aborted not |
1474 | 722 |
|
723 |
"Created: / 7.2.1998 / 19:32:35 / cg" |
|
724 |
"Modified: / 7.2.1998 / 19:35:11 / cg" |
|
2862
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
725 |
! |
30 | 726 |
|
6603 | 727 |
applyPossiblyModifiedChange:aChange |
728 |
|ns superClass superClassName| |
|
729 |
||
6683 | 730 |
aChange isClassDefinitionChange ifTrue:[ |
731 |
superClassName := aChange superClassName. |
|
732 |
superClassName notNil ifTrue:[ |
|
733 |
superClassName := superClassName asSymbol. |
|
734 |
applyInOriginalNameSpace value ifFalse:[ |
|
735 |
ns := Class nameSpaceQuerySignal query. |
|
736 |
superClass := ns at:superClassName. |
|
737 |
(superClass isNil and:[ superClass ~~ Smalltalk ]) ifTrue:[ |
|
738 |
superClass := Smalltalk at:superClassName. |
|
739 |
]. |
|
740 |
] ifTrue:[ |
|
6603 | 741 |
superClass := Smalltalk at:superClassName. |
742 |
]. |
|
743 |
superClass isNil ifTrue:[ |
|
6760 | 744 |
|guess idx baseName| |
745 |
idx := superClassName lastIndexOf:$:. |
|
746 |
baseName := superClassName copyFrom:idx+1. |
|
747 |
guess := Smalltalk classNamed:baseName. |
|
748 |
guess isNil ifTrue:[ |
|
749 |
guess := SystemBrowser classesWithNameSimilarTo:baseName. |
|
750 |
guess notEmptyOrNil ifTrue:[ guess := guess first ] ifFalse:[ guess := nil ]. |
|
751 |
]. |
|
6683 | 752 |
superClass := Dialog |
753 |
requestClass:'No superclass: ', superClassName allBold , ' enter a replacement:' |
|
754 |
initialAnswer:(guess ? superClassName). |
|
755 |
superClass isNil ifTrue:[^ self ]. |
|
6603 | 756 |
]. |
6683 | 757 |
|
6603 | 758 |
superClass notNil ifTrue:[ |
759 |
aChange superClassName:superClass name. |
|
6683 | 760 |
]. |
6603 | 761 |
]. |
762 |
]. |
|
763 |
||
764 |
aChange apply. |
|
765 |
! |
|
766 |
||
1470 | 767 |
changeIsFollowupMethodChange:changeNr |
768 |
^ false |
|
769 |
||
770 |
"Created: / 6.2.1998 / 13:04:59 / cg" |
|
1474 | 771 |
"Modified: / 7.2.1998 / 19:28:52 / cg" |
1470 | 772 |
! |
773 |
||
30 | 774 |
changeSet:aChangeSet |
775 |
originalChangeSet := aChangeSet. |
|
776 |
changeSet := OrderedCollection new. |
|
106 | 777 |
originalChangeSet notNil ifTrue:[ |
778 |
originalChangeSet do:[:aChange | |
|
779 |
changeSet add:aChange |
|
780 |
]. |
|
30 | 781 |
]. |
782 |
! |
|
783 |
||
222 | 784 |
checkIfFileHasChanged |
785 |
Processor removeTimedBlock:checkBlock. |
|
786 |
changeSet size ~= originalChangeSet size ifTrue:[ |
|
787 |
self newLabel:'(outdated)'. |
|
3203 | 788 |
autoUpdate value ifTrue:[ |
222 | 789 |
self doUpdate |
790 |
] |
|
791 |
] ifFalse:[ |
|
5178 | 792 |
"/ self newLabel:'' |
222 | 793 |
]. |
794 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
|
795 |
||
796 |
"Created: 3.12.1995 / 13:52:30 / cg" |
|
797 |
"Modified: 3.12.1995 / 14:15:06 / cg" |
|
798 |
! |
|
799 |
||
1470 | 800 |
fullClassNameOfChange:nr |
4992 | 801 |
^ (changeSet at:nr) fullClassName |
1470 | 802 |
|
803 |
"Created: / 6.2.1998 / 13:02:25 / cg" |
|
804 |
"Modified: / 6.2.1998 / 13:07:02 / cg" |
|
805 |
! |
|
806 |
||
3203 | 807 |
isChangeSetBrowser |
808 |
^ true |
|
809 |
! |
|
810 |
||
224 | 811 |
numberOfChanges |
812 |
^ changeSet size |
|
813 |
||
814 |
"Created: 3.12.1995 / 18:15:56 / cg" |
|
815 |
! |
|
816 |
||
222 | 817 |
queryCloseText |
818 |
^ 'Quit without updating changeSet ?' |
|
819 |
! |
|
820 |
||
45 | 821 |
readChangesFileInBackground:dummy |
30 | 822 |
"read the changeSet, create a list of header-lines" |
823 |
||
3673 | 824 |
|tabSpec| |
30 | 825 |
|
826 |
self withCursor:(Cursor read) do:[ |
|
3673 | 827 |
changeSet size == 0 ifTrue:[ |
828 |
changeFileName notNil ifTrue:[ |
|
829 |
changeSet := self class readXMLChangesFromFile:changeFileName inBackground:false. |
|
830 |
]. |
|
831 |
]. |
|
832 |
changeSet size == 0 ifTrue:[ |
|
833 |
^ nil |
|
834 |
]. |
|
835 |
||
836 |
tabSpec := TabulatorSpecification new. |
|
837 |
tabSpec unit:#inch. |
|
838 |
tabSpec positions:#(-1 0 5 8.5 ). |
|
839 |
" +/- cls>>sel type info" |
|
840 |
tabSpec align: #(#left #left #left #left). |
|
30 | 841 |
|
3673 | 842 |
changeChunks := OrderedCollection new. |
843 |
changeHeaderLines := OrderedCollection new. |
|
844 |
||
845 |
changeSet do:[:aChange | |entry| |
|
846 |
changeChunks add:(aChange printString). |
|
847 |
"/ changeHeaderLines add:(aChange printString) |
|
848 |
entry := MultiColListEntry new. |
|
849 |
entry tabulatorSpecification:tabSpec. |
|
850 |
entry colAt:1 put:''. "/ changeDelta. |
|
851 |
entry colAt:2 put:aChange printString. |
|
852 |
entry colAt:3 put:''. "/ changeType. |
|
853 |
||
854 |
(aChange respondsTo:#timeOfChangeIfKnown) ifTrue:[ |
|
855 |
aChange timeOfChangeIfKnown notNil ifTrue:[ |
|
856 |
entry colAt:4 put:(aChange timeOfChangeIfKnown printString). |
|
857 |
] |
|
858 |
]. |
|
859 |
changeHeaderLines add:entry |
|
860 |
]. |
|
861 |
changeClassNames := OrderedCollection new:(changeChunks size). |
|
862 |
anyChanges := false |
|
224 | 863 |
]. |
864 |
||
865 |
"Created: 3.12.1995 / 18:02:39 / cg" |
|
30 | 866 |
! |
867 |
||
3364 | 868 |
realClassNameOfChange:nr |
869 |
^ (changeSet at:nr) className. |
|
870 |
||
871 |
"Created: / 5.11.2001 / 18:10:38 / cg" |
|
872 |
! |
|
873 |
||
30 | 874 |
saveBackChanges |
875 |
"save back the change set" |
|
876 |
||
877 |
[originalChangeSet isEmpty] whileFalse:[ |
|
45 | 878 |
originalChangeSet removeLast |
30 | 879 |
]. |
880 |
changeSet do:[:aChange | |
|
45 | 881 |
originalChangeSet add:aChange |
30 | 882 |
] |
883 |
! |
|
884 |
||
1470 | 885 |
selectorOfMethodChange:changeNr |
886 |
^ (changeSet at:changeNr) selector |
|
887 |
||
888 |
"Created: / 6.2.1998 / 13:28:20 / cg" |
|
889 |
"Modified: / 6.2.1998 / 13:29:59 / cg" |
|
890 |
! |
|
891 |
||
30 | 892 |
silentDeleteChange:changeNr |
893 |
"delete a change do not update changeListView" |
|
894 |
||
1474 | 895 |
changeSet removeIndex:changeNr. |
896 |
super silentDeleteChange:changeNr. |
|
897 |
||
898 |
"Created: / 3.12.1995 / 18:14:17 / cg" |
|
899 |
"Modified: / 7.2.1998 / 19:57:57 / cg" |
|
900 |
! |
|
224 | 901 |
|
1474 | 902 |
silentDeleteInternalChange:changeNr |
903 |
"delete a change do not update changeListView" |
|
904 |
||
905 |
changeSet removeIndex:changeNr. |
|
906 |
super silentDeleteInternalChange:changeNr. |
|
907 |
||
908 |
"Modified: / 7.2.1998 / 19:44:45 / cg" |
|
909 |
"Created: / 7.2.1998 / 19:58:02 / cg" |
|
222 | 910 |
! |
911 |
||
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
912 |
sourceOfChange:changeNr |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
913 |
"answer a changes source" |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
914 |
|
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
915 |
|change| |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
916 |
|
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
917 |
change := changeSet at:changeNr. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
918 |
change isNil ifTrue:[^nil]. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
919 |
^ change source |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
920 |
|
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
921 |
"Modified: / 7.2.1998 / 19:52:44 / cg" |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
922 |
! |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3673
diff
changeset
|
923 |
|
222 | 924 |
streamForChange:changeNr |
925 |
"answer a stream for change" |
|
926 |
||
4990 | 927 |
|change str source| |
222 | 928 |
|
929 |
change := changeSet at:changeNr. |
|
930 |
change isNil ifTrue:[^nil]. |
|
4807 | 931 |
change isMethodDefinitionChange ifTrue:[ |
4430
665173b18b94
oops - streamforchange was wrong (exclas)
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
932 |
str := WriteStream on:''. |
665173b18b94
oops - streamforchange was wrong (exclas)
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
933 |
str nextPutChunkSeparator. |
665173b18b94
oops - streamforchange was wrong (exclas)
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
934 |
str nextPutAll:(change className , ' methodsFor:''' , change methodCategory , ''''). |
665173b18b94
oops - streamforchange was wrong (exclas)
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
935 |
str nextPutChunkSeparator. |
665173b18b94
oops - streamforchange was wrong (exclas)
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
936 |
str cr. |
665173b18b94
oops - streamforchange was wrong (exclas)
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
937 |
str nextPutAllAsChunk:change source. |
665173b18b94
oops - streamforchange was wrong (exclas)
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
938 |
str nextPutChunkSeparator. |
665173b18b94
oops - streamforchange was wrong (exclas)
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
939 |
str space. |
665173b18b94
oops - streamforchange was wrong (exclas)
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
940 |
str nextPutChunkSeparator. |
665173b18b94
oops - streamforchange was wrong (exclas)
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
941 |
str cr. |
4990 | 942 |
source := str contents |
943 |
] ifFalse:[ |
|
944 |
source := change source |
|
1474 | 945 |
]. |
4990 | 946 |
^ ReadStream on:source |
1474 | 947 |
|
948 |
"Modified: / 7.2.1998 / 19:52:44 / cg" |
|
30 | 949 |
! ! |
950 |
||
951 |
!ChangeSetBrowser methodsFor:'user actions'! |
|
952 |
||
4316 | 953 |
doInspectChange |
954 |
self withSelectedChangesDo:[:changeNr | |
|
955 |
(changeSet at:changeNr) inspect |
|
956 |
]. |
|
957 |
! |
|
958 |
||
30 | 959 |
doSaveBack |
960 |
anyChanges ifTrue:[ |
|
45 | 961 |
self saveBackChanges. |
962 |
self doUpdate |
|
30 | 963 |
] |
222 | 964 |
! |
965 |
||
966 |
doUpdate |
|
967 |
changeSet := OrderedCollection new. |
|
968 |
originalChangeSet notNil ifTrue:[ |
|
969 |
originalChangeSet do:[:aChange | |
|
970 |
changeSet add:aChange |
|
971 |
]. |
|
972 |
]. |
|
973 |
super doUpdate |
|
974 |
||
975 |
"Created: 3.12.1995 / 13:54:14 / cg" |
|
4942 | 976 |
! |
977 |
||
978 |
updateDiffViewFor:changeNr |
|
979 |
|change class selector oldMethod newSource oldSource| |
|
980 |
||
981 |
change := changeSet at:changeNr. |
|
982 |
change isMethodChange ifTrue:[ |
|
983 |
newSource := change source. |
|
984 |
class := change changeClass. |
|
985 |
class notNil ifTrue:[ |
|
986 |
selector := change changeSelector. |
|
987 |
selector notNil ifTrue:[ |
|
988 |
oldMethod := class compiledMethodAt:selector. |
|
989 |
oldMethod notNil ifTrue:[ |
|
990 |
oldSource := oldMethod source. |
|
991 |
diffView text1:(oldSource ? '') text2:(newSource ? ''). |
|
992 |
^ self. |
|
993 |
] |
|
994 |
]. |
|
995 |
] |
|
996 |
]. |
|
997 |
||
998 |
super updateDiffViewFor:changeNr. |
|
30 | 999 |
! ! |
222 | 1000 |
|
1001 |
!ChangeSetBrowser class methodsFor:'documentation'! |
|
1002 |
||
1003 |
version |
|
6766 | 1004 |
^ '$Header: /cvs/stx/stx/libtool/ChangeSetBrowser.st,v 1.45 2006-04-13 15:22:33 cg Exp $' |
222 | 1005 |
! ! |