author | Claus Gittinger <cg@exept.de> |
Wed, 26 Sep 2001 12:00:58 +0200 | |
changeset 3212 | 495a04425f30 |
parent 3205 | 83631369b396 |
child 3224 | b2f3a2a0bc80 |
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 |
|
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
49 |
^ ((self new label:'ChangeSet Browser') changeSet:ChangeSet current) open |
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
50 |
! |
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
51 |
|
40 | 52 |
openOn:aChangeSet |
2862
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
53 |
"create a changes browser on a change set" |
30 | 54 |
|
45 | 55 |
^ ((self new label:'ChangeSet Browser') changeSet:aChangeSet) open |
30 | 56 |
! ! |
57 |
||
1470 | 58 |
!ChangeSetBrowser class methodsFor:'defaults'! |
59 |
||
60 |
defaultLabel |
|
61 |
^ 'ChangeSet Browser' |
|
62 |
||
63 |
"Created: / 6.2.1998 / 13:25:47 / cg" |
|
64 |
! ! |
|
65 |
||
3203 | 66 |
!ChangeSetBrowser class methodsFor:'menu specs'! |
67 |
||
68 |
menuSpec |
|
69 |
"This resource specification was automatically generated |
|
70 |
by the MenuEditor of ST/X." |
|
71 |
||
72 |
"Do not manually edit this!! If it is corrupted, |
|
73 |
the MenuEditor may not be able to read the specification." |
|
74 |
||
75 |
" |
|
76 |
MenuEditor new openOnClass:ChangeSetBrowser andSelector:#menuSpec |
|
77 |
(Menu new fromLiteralArrayEncoding:(ChangeSetBrowser menuSpec)) startUp |
|
78 |
" |
|
79 |
||
80 |
<resource: #menu> |
|
81 |
||
82 |
^ |
|
83 |
#(#Menu |
|
84 |
#( |
|
85 |
#(#MenuItem |
|
86 |
#label: 'File' |
|
87 |
#translateLabel: true |
|
88 |
#submenu: |
|
89 |
#(#Menu |
|
90 |
#( |
|
91 |
#(#MenuItem |
|
92 |
#label: 'Compress' |
|
93 |
#translateLabel: true |
|
94 |
#isVisible: #notEditingClassSource |
|
95 |
#value: #doCompress |
|
96 |
) |
|
97 |
#(#MenuItem |
|
98 |
#label: 'Compress for Class' |
|
99 |
#translateLabel: true |
|
100 |
#isVisible: #notEditingClassSource |
|
101 |
#value: #doCompressClass |
|
102 |
#enabled: #hasSelection |
|
103 |
) |
|
104 |
#(#MenuItem |
|
105 |
#label: 'Compare and Compress' |
|
106 |
#translateLabel: true |
|
107 |
#isVisible: #notEditingClassSource |
|
108 |
#value: #doCompareAndCompress |
|
109 |
) |
|
110 |
#(#MenuItem |
|
111 |
#label: '-' |
|
112 |
#isVisible: #notEditingClassSource |
|
113 |
) |
|
114 |
#(#MenuItem |
|
115 |
#label: 'Fileout && Delete all Changes for Class' |
|
116 |
#translateLabel: true |
|
117 |
#isVisible: #notEditingClassSource |
|
118 |
#value: #doFileoutAndDeleteClassAll |
|
119 |
#enabled: #hasSelection |
|
120 |
) |
|
121 |
#(#MenuItem |
|
122 |
#label: 'CheckIn && Delete all Changes for Class' |
|
123 |
#translateLabel: true |
|
124 |
#isVisible: #notEditingClassSource |
|
125 |
#value: #doCheckinAndDeleteClassAll |
|
126 |
#enabled: #hasSelection |
|
127 |
) |
|
128 |
#(#MenuItem |
|
129 |
#label: '-' |
|
130 |
#isVisible: #notEditingClassSource |
|
131 |
) |
|
132 |
#(#MenuItem |
|
133 |
#label: 'Save in...' |
|
134 |
#translateLabel: true |
|
135 |
#value: #doSave |
|
136 |
#enabled: #hasSelection |
|
137 |
) |
|
138 |
#(#MenuItem |
|
139 |
#label: 'Save to End in...' |
|
140 |
#translateLabel: true |
|
141 |
#value: #doSaveRest |
|
142 |
#enabled: #hasSelection |
|
143 |
) |
|
144 |
#(#MenuItem |
|
145 |
#label: 'Save for Class to End in...' |
|
146 |
#translateLabel: true |
|
147 |
#value: #doSaveClassRest |
|
148 |
#enabled: #hasSelection |
|
149 |
) |
|
150 |
#(#MenuItem |
|
151 |
#label: 'Save All for Class in...' |
|
152 |
#translateLabel: true |
|
153 |
#value: #doSaveClassAll |
|
154 |
#enabled: #hasSelection |
|
155 |
) |
|
156 |
#(#MenuItem |
|
157 |
#label: '-' |
|
158 |
) |
|
159 |
#(#MenuItem |
|
160 |
#label: 'Saveback ChangeSet' |
|
161 |
#translateLabel: true |
|
162 |
#value: #doSaveBack |
|
163 |
) |
|
164 |
#(#MenuItem |
|
165 |
#label: '-' |
|
166 |
) |
|
167 |
#(#MenuItem |
|
168 |
#label: 'Update' |
|
169 |
#translateLabel: true |
|
170 |
#value: #doUpdate |
|
171 |
) |
|
172 |
#(#MenuItem |
|
173 |
#label: '-' |
|
174 |
) |
|
175 |
#(#MenuItem |
|
176 |
#label: 'Exit' |
|
177 |
#translateLabel: true |
|
178 |
#value: #menuExit |
|
179 |
) |
|
180 |
) |
|
181 |
nil |
|
182 |
nil |
|
183 |
) |
|
184 |
) |
|
185 |
#(#MenuItem |
|
186 |
#label: 'Search' |
|
187 |
#translateLabel: true |
|
188 |
#submenu: |
|
189 |
#(#Menu |
|
190 |
#( |
|
191 |
#(#MenuItem |
|
192 |
#label: 'Class...' |
|
193 |
#translateLabel: true |
|
194 |
#value: #findClass |
|
195 |
) |
|
196 |
#(#MenuItem |
|
197 |
#label: 'Previous for Class' |
|
198 |
#translateLabel: true |
|
199 |
#value: #findPreviousForClass |
|
200 |
#enabled: #hasSelection |
|
201 |
) |
|
202 |
#(#MenuItem |
|
203 |
#label: 'Next for Class' |
|
204 |
#translateLabel: true |
|
205 |
#value: #findNextForClass |
|
206 |
#enabled: #hasSelection |
|
207 |
) |
|
208 |
#(#MenuItem |
|
209 |
#label: '-' |
|
210 |
) |
|
211 |
#(#MenuItem |
|
212 |
#label: 'Selector...' |
|
213 |
#translateLabel: true |
|
214 |
#value: #findSelector |
|
215 |
) |
|
216 |
#(#MenuItem |
|
217 |
#label: 'Previous for Selector' |
|
218 |
#translateLabel: true |
|
219 |
#value: #findPreviousForSelector |
|
220 |
#enabled: #hasSelection |
|
221 |
) |
|
222 |
#(#MenuItem |
|
223 |
#label: 'Next for Selector' |
|
224 |
#translateLabel: true |
|
225 |
#value: #findNextForSelector |
|
226 |
#enabled: #hasSelection |
|
227 |
) |
|
228 |
#(#MenuItem |
|
229 |
#label: '-' |
|
230 |
) |
|
231 |
#(#MenuItem |
|
232 |
#label: 'String...' |
|
233 |
#translateLabel: true |
|
234 |
#value: #findString |
|
235 |
) |
|
236 |
#(#MenuItem |
|
237 |
#label: 'Previous with String' |
|
238 |
#translateLabel: true |
|
239 |
#value: #findPreviousForString |
|
240 |
#enabled: #hasSelection |
|
241 |
) |
|
242 |
#(#MenuItem |
|
243 |
#label: 'Next with String' |
|
244 |
#translateLabel: true |
|
245 |
#value: #findNextForString |
|
246 |
#enabled: #hasSelection |
|
247 |
) |
|
248 |
#(#MenuItem |
|
249 |
#label: '-' |
|
250 |
) |
|
251 |
#(#MenuItem |
|
252 |
#label: 'Previous Snapshot' |
|
253 |
#translateLabel: true |
|
254 |
#value: #findPreviousSnapshot |
|
255 |
#enabled: #hasSelection |
|
256 |
) |
|
257 |
#(#MenuItem |
|
258 |
#label: 'Next Snapshot' |
|
259 |
#translateLabel: true |
|
260 |
#value: #findNextSnapshot |
|
261 |
#enabled: #hasSelection |
|
262 |
) |
|
263 |
) |
|
264 |
nil |
|
265 |
nil |
|
266 |
) |
|
267 |
) |
|
268 |
#(#MenuItem |
|
269 |
#label: 'Change' |
|
270 |
#translateLabel: true |
|
271 |
#submenu: |
|
272 |
#(#Menu |
|
273 |
#( |
|
274 |
#(#MenuItem |
|
275 |
#label: 'Apply' |
|
276 |
#translateLabel: true |
|
277 |
#value: #doApply |
|
278 |
#enabled: #hasSelection |
|
279 |
) |
|
280 |
#(#MenuItem |
|
281 |
#label: 'Apply to End' |
|
282 |
#translateLabel: true |
|
283 |
#value: #doApplyRest |
|
284 |
#enabled: #hasSelection |
|
285 |
) |
|
286 |
#(#MenuItem |
|
287 |
#label: 'Apply for Class to End' |
|
288 |
#translateLabel: true |
|
289 |
#value: #doApplyClassRest |
|
290 |
#enabled: #hasSelection |
|
291 |
) |
|
292 |
#(#MenuItem |
|
293 |
#label: 'Apply All' |
|
294 |
#translateLabel: true |
|
295 |
#value: #doApplyAll |
|
296 |
) |
|
297 |
#(#MenuItem |
|
298 |
#label: '-' |
|
299 |
) |
|
300 |
#(#MenuItem |
|
301 |
#label: 'Delete' |
|
302 |
#translateLabel: true |
|
303 |
#value: #doDelete |
|
304 |
#enabled: #hasSelection |
|
305 |
) |
|
306 |
#(#MenuItem |
|
307 |
#label: 'Delete to End' |
|
308 |
#translateLabel: true |
|
309 |
#value: #doDeleteRest |
|
310 |
#enabled: #hasSelection |
|
311 |
) |
|
312 |
#(#MenuItem |
|
313 |
#label: 'Delete for Class to End' |
|
314 |
#translateLabel: true |
|
315 |
#value: #doDeleteClassRest |
|
316 |
#enabled: #hasSelection |
|
317 |
) |
|
318 |
#(#MenuItem |
|
319 |
#label: 'Delete for Class from Begin' |
|
320 |
#translateLabel: true |
|
321 |
#value: #doDeleteClassFromBeginning |
|
322 |
#enabled: #hasSelection |
|
323 |
) |
|
324 |
#(#MenuItem |
|
325 |
#label: 'Delete All for Class' |
|
326 |
#translateLabel: true |
|
327 |
#value: #doDeleteClassAll |
|
328 |
#enabled: #hasSelection |
|
329 |
) |
|
330 |
#(#MenuItem |
|
331 |
#label: 'Delete All for Class && its Private Classes' |
|
332 |
#translateLabel: true |
|
333 |
#value: #doDeleteClassAndPrivateClassesAll |
|
334 |
#enabled: #hasSelection |
|
335 |
) |
|
336 |
#(#MenuItem |
|
337 |
#label: '-' |
|
338 |
) |
|
339 |
#(#MenuItem |
|
340 |
#label: 'Compare with Current' |
|
341 |
#translateLabel: true |
|
342 |
#value: #doCompare |
|
343 |
#enabled: #hasSelection |
|
344 |
) |
|
345 |
#(#MenuItem |
|
346 |
#label: 'Browse' |
|
347 |
#translateLabel: true |
|
348 |
#value: #doBrowse |
|
349 |
#enabled: #hasSelection |
|
350 |
) |
|
351 |
#(#MenuItem |
|
352 |
#label: '-' |
|
353 |
) |
|
354 |
#(#MenuItem |
|
355 |
#label: 'Make Change a Patch' |
|
356 |
#translateLabel: true |
|
357 |
#value: #doMakePatch |
|
358 |
#enabled: #hasSelection |
|
359 |
) |
|
360 |
) |
|
361 |
nil |
|
362 |
nil |
|
363 |
) |
|
364 |
) |
|
365 |
#(#MenuItem |
|
366 |
#label: 'Settings' |
|
367 |
#translateLabel: true |
|
368 |
#submenu: |
|
369 |
#(#Menu |
|
370 |
#( |
|
371 |
#(#MenuItem |
|
372 |
#label: 'Auto Compare' |
|
373 |
#translateLabel: true |
|
374 |
#indication: #autoCompare |
|
375 |
) |
|
376 |
#(#MenuItem |
|
377 |
#label: 'Auto Update' |
|
378 |
#translateLabel: true |
|
379 |
#indication: #autoUpdate |
|
380 |
) |
|
381 |
#(#MenuItem |
|
382 |
#label: '-' |
|
383 |
) |
|
384 |
#(#MenuItem |
|
385 |
#label: 'Apply in Original NameSpace' |
|
386 |
#translateLabel: true |
|
387 |
#indication: #applyInOriginalNameSpace |
|
388 |
) |
|
389 |
) |
|
390 |
nil |
|
391 |
nil |
|
392 |
) |
|
393 |
) |
|
394 |
#(#MenuItem |
|
395 |
#label: 'Help' |
|
396 |
#translateLabel: true |
|
397 |
#startGroup: #right |
|
398 |
#submenu: |
|
399 |
#(#Menu |
|
400 |
#( |
|
401 |
#(#MenuItem |
|
402 |
#label: 'ChangesBrowser Documentation' |
|
403 |
#translateLabel: true |
|
404 |
#value: #openHTMLDocument: |
|
405 |
#argument: 'tools/cbrowser/TOP.html' |
|
406 |
) |
|
3205 | 407 |
#(#MenuItem |
408 |
#label: '-' |
|
409 |
) |
|
410 |
#(#MenuItem |
|
411 |
#label: 'About ChangesBrowser...' |
|
412 |
#translateLabel: true |
|
413 |
#value: #openAboutThisApplication |
|
414 |
) |
|
3203 | 415 |
) |
416 |
nil |
|
417 |
nil |
|
418 |
) |
|
419 |
) |
|
420 |
) |
|
421 |
nil |
|
422 |
nil |
|
423 |
) |
|
424 |
! ! |
|
425 |
||
30 | 426 |
!ChangeSetBrowser methodsFor:'initialize / release'! |
427 |
||
224 | 428 |
changeListMenu |
3203 | 429 |
<resource: #programMenu > |
430 |
||
431 |
|items| |
|
30 | 432 |
|
3203 | 433 |
items := #( |
434 |
('Apply' doApply) |
|
435 |
('Apply to End' doApplyRest) |
|
436 |
('Apply All changes' doApplyAll) |
|
437 |
('-' ) |
|
438 |
('Delete' doDelete) |
|
439 |
('Delete to End' doDeleteRest) |
|
440 |
('Delete for Class to End' doDeleteClassRest) |
|
441 |
('Delete All for Class' doDeleteClassAll) |
|
442 |
('-' ) |
|
443 |
"/ ('compress' doCompress) |
|
444 |
('Compare with Current' doCompare) |
|
445 |
('-' ) |
|
446 |
('Make Change a Patch' doMakePatch) |
|
447 |
"/ ('update sourcefile from change' doMakePermanent) |
|
448 |
('-' ) |
|
449 |
('Saveback ChangeSet' doSaveBack) |
|
450 |
('-' ) |
|
451 |
('Update' doUpdate) |
|
452 |
). |
|
224 | 453 |
|
454 |
^ PopUpMenu |
|
3203 | 455 |
itemList:items |
456 |
resources:resources |
|
224 | 457 |
|
458 |
"Created: 3.12.1995 / 18:06:35 / cg" |
|
459 |
"Modified: 3.12.1995 / 18:13:06 / cg" |
|
30 | 460 |
! ! |
461 |
||
2862
ae3f14623d62
default open is on the current changeSet
Claus Gittinger <cg@exept.de>
parents:
1474
diff
changeset
|
462 |
!ChangeSetBrowser methodsFor:'private'! |
1474 | 463 |
|
464 |
applyChange:changeNr |
|
465 |
"fileIn a change" |
|
466 |
||
467 |
|nm applyAction| |
|
468 |
||
469 |
nm := self classNameOfChange:changeNr. |
|
470 |
nm notNil ifTrue:[ |
|
471 |
|cls| |
|
472 |
||
473 |
cls := Smalltalk at:(nm asSymbol) ifAbsent:[]. |
|
474 |
cls notNil ifTrue:[ |
|
475 |
cls isLoaded ifFalse:[ |
|
476 |
cls autoload |
|
477 |
] |
|
478 |
] |
|
479 |
]. |
|
480 |
||
481 |
changeNrProcessed := changeNr. |
|
482 |
||
483 |
applyAction := [ |
|
484 |
|sig| |
|
485 |
||
486 |
(skipSignal notNil) ifTrue:[ |
|
487 |
sig := skipSignal |
|
488 |
] ifFalse:[ |
|
489 |
sig := Object abortSignal |
|
490 |
]. |
|
491 |
sig catch:[ |
|
492 |
(changeSet at:changeNr) applyChange. |
|
493 |
]. |
|
494 |
changeNrProcessed := nil. |
|
495 |
]. |
|
496 |
||
497 |
"/ |
|
498 |
"/ if I am showing the changes file, dont update it |
|
499 |
"/ |
|
500 |
changeFileName = ObjectMemory nameForChanges ifTrue:[ |
|
501 |
Class withoutUpdatingChangesDo:applyAction |
|
502 |
] ifFalse:[ |
|
503 |
applyAction value |
|
504 |
]. |
|
505 |
||
506 |
"Created: / 7.2.1998 / 19:32:35 / cg" |
|
507 |
"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
|
508 |
! |
30 | 509 |
|
1470 | 510 |
changeIsFollowupMethodChange:changeNr |
511 |
^ false |
|
512 |
||
513 |
"Created: / 6.2.1998 / 13:04:59 / cg" |
|
1474 | 514 |
"Modified: / 7.2.1998 / 19:28:52 / cg" |
1470 | 515 |
! |
516 |
||
30 | 517 |
changeSet:aChangeSet |
518 |
originalChangeSet := aChangeSet. |
|
519 |
changeSet := OrderedCollection new. |
|
106 | 520 |
originalChangeSet notNil ifTrue:[ |
521 |
originalChangeSet do:[:aChange | |
|
522 |
changeSet add:aChange |
|
523 |
]. |
|
30 | 524 |
]. |
525 |
! |
|
526 |
||
222 | 527 |
checkIfFileHasChanged |
528 |
Processor removeTimedBlock:checkBlock. |
|
529 |
changeSet size ~= originalChangeSet size ifTrue:[ |
|
530 |
self newLabel:'(outdated)'. |
|
3203 | 531 |
autoUpdate value ifTrue:[ |
222 | 532 |
self doUpdate |
533 |
] |
|
534 |
] ifFalse:[ |
|
535 |
self newLabel:'' |
|
536 |
]. |
|
537 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
|
538 |
||
539 |
"Created: 3.12.1995 / 13:52:30 / cg" |
|
540 |
"Modified: 3.12.1995 / 14:15:06 / cg" |
|
541 |
! |
|
542 |
||
224 | 543 |
classNameOfChange:nr |
1474 | 544 |
^ (changeSet at:nr) className |
224 | 545 |
|
1474 | 546 |
"Created: / 3.12.1995 / 18:15:56 / cg" |
547 |
"Modified: / 7.2.1998 / 19:24:29 / cg" |
|
224 | 548 |
! |
549 |
||
1470 | 550 |
fullClassNameOfChange:nr |
551 |
^ (changeSet at:nr) className |
|
552 |
||
553 |
"Created: / 6.2.1998 / 13:02:25 / cg" |
|
554 |
"Modified: / 6.2.1998 / 13:07:02 / cg" |
|
555 |
! |
|
556 |
||
3203 | 557 |
isChangeSetBrowser |
558 |
^ true |
|
559 |
! |
|
560 |
||
224 | 561 |
numberOfChanges |
562 |
^ changeSet size |
|
563 |
||
564 |
"Created: 3.12.1995 / 18:15:56 / cg" |
|
565 |
! |
|
566 |
||
222 | 567 |
queryCloseText |
568 |
^ 'Quit without updating changeSet ?' |
|
569 |
! |
|
570 |
||
45 | 571 |
readChangesFileInBackground:dummy |
30 | 572 |
"read the changeSet, create a list of header-lines" |
573 |
||
574 |
changeSet size == 0 ifTrue:[^ nil]. |
|
575 |
||
224 | 576 |
self newLabel:'updating ...'. |
30 | 577 |
self withCursor:(Cursor read) do:[ |
45 | 578 |
changeChunks := OrderedCollection new. |
579 |
changeHeaderLines := OrderedCollection new. |
|
30 | 580 |
|
45 | 581 |
changeSet do:[:aChange | |
582 |
changeChunks add:(aChange printString). |
|
583 |
changeHeaderLines add:(aChange printString) |
|
584 |
]. |
|
585 |
changeClassNames := OrderedCollection new:(changeChunks size). |
|
586 |
anyChanges := false |
|
224 | 587 |
]. |
588 |
self newLabel:''. |
|
589 |
||
590 |
"Created: 3.12.1995 / 18:02:39 / cg" |
|
30 | 591 |
! |
592 |
||
593 |
saveBackChanges |
|
594 |
"save back the change set" |
|
595 |
||
596 |
[originalChangeSet isEmpty] whileFalse:[ |
|
45 | 597 |
originalChangeSet removeLast |
30 | 598 |
]. |
599 |
changeSet do:[:aChange | |
|
45 | 600 |
originalChangeSet add:aChange |
30 | 601 |
] |
602 |
! |
|
603 |
||
1470 | 604 |
selectorOfMethodChange:changeNr |
605 |
^ (changeSet at:changeNr) selector |
|
606 |
||
607 |
"Created: / 6.2.1998 / 13:28:20 / cg" |
|
608 |
"Modified: / 6.2.1998 / 13:29:59 / cg" |
|
609 |
! |
|
610 |
||
30 | 611 |
silentDeleteChange:changeNr |
612 |
"delete a change do not update changeListView" |
|
613 |
||
1474 | 614 |
changeSet removeIndex:changeNr. |
615 |
super silentDeleteChange:changeNr. |
|
616 |
||
617 |
"Created: / 3.12.1995 / 18:14:17 / cg" |
|
618 |
"Modified: / 7.2.1998 / 19:57:57 / cg" |
|
619 |
! |
|
224 | 620 |
|
1474 | 621 |
silentDeleteInternalChange:changeNr |
622 |
"delete a change do not update changeListView" |
|
623 |
||
624 |
changeSet removeIndex:changeNr. |
|
625 |
super silentDeleteInternalChange:changeNr. |
|
626 |
||
627 |
"Modified: / 7.2.1998 / 19:44:45 / cg" |
|
628 |
"Created: / 7.2.1998 / 19:58:02 / cg" |
|
222 | 629 |
! |
630 |
||
631 |
streamForChange:changeNr |
|
632 |
"answer a stream for change" |
|
633 |
||
1474 | 634 |
|change s| |
222 | 635 |
|
636 |
change := changeSet at:changeNr. |
|
637 |
change isNil ifTrue:[^nil]. |
|
1474 | 638 |
change isMethodChange ifTrue:[ |
639 |
s := '!!' , change className , |
|
640 |
' methodsFor:''' , change methodCategory , '''!!\' withCRs , |
|
641 |
change source , '\' withCRs , '!! !!\' withCRs. |
|
642 |
^ ReadStream on:s |
|
643 |
]. |
|
222 | 644 |
^ ReadStream on:(change source) |
1474 | 645 |
|
646 |
"Modified: / 7.2.1998 / 19:52:44 / cg" |
|
30 | 647 |
! ! |
648 |
||
649 |
!ChangeSetBrowser methodsFor:'user actions'! |
|
650 |
||
651 |
doSaveBack |
|
652 |
anyChanges ifTrue:[ |
|
45 | 653 |
self saveBackChanges. |
654 |
self doUpdate |
|
30 | 655 |
] |
222 | 656 |
! |
657 |
||
658 |
doUpdate |
|
659 |
changeSet := OrderedCollection new. |
|
660 |
originalChangeSet notNil ifTrue:[ |
|
661 |
originalChangeSet do:[:aChange | |
|
662 |
changeSet add:aChange |
|
663 |
]. |
|
664 |
]. |
|
665 |
super doUpdate |
|
666 |
||
667 |
"Created: 3.12.1995 / 13:54:14 / cg" |
|
30 | 668 |
! ! |
222 | 669 |
|
670 |
!ChangeSetBrowser class methodsFor:'documentation'! |
|
671 |
||
672 |
version |
|
3212 | 673 |
^ '$Header: /cvs/stx/stx/libtool/ChangeSetBrowser.st,v 1.17 2001-09-26 10:00:58 cg Exp $' |
222 | 674 |
! ! |