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