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