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