author | Claus Gittinger <cg@exept.de> |
Thu, 10 Feb 2011 16:58:13 +0100 | |
changeset 9756 | 5a1787bbf85e |
parent 9180 | ea28dedc13aa |
child 10247 | 8517600df5c5 |
permissions | -rw-r--r-- |
2740
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
1 |
"{ Package: 'stx:libtool' }" |
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2 |
|
1545 | 3 |
ToolApplicationModel subclass:#NewChangesBrowser |
1546 | 4 |
instanceVariableNames:'changes changeFileName skipSignal changeFileTimestamp |
5 |
autoUpdateBlock filterCompletionBlock editingClassSource modified' |
|
1545 | 6 |
classVariableNames:'AutoUpdate CompressSnapshotInfo CategoryColumn DeltaInfoColumn |
7957 | 7 |
TypeColumn TimeStampColumn PositionsColumn PrivateAsSeparate |
8 |
ClassNameColumn ClassAndSelectorColumn SelectorColumn' |
|
1545 | 9 |
poolDictionaries:'' |
10 |
category:'Interface-Browsers' |
|
11 |
! |
|
12 |
||
13 |
Object subclass:#Change |
|
1568 | 14 |
instanceVariableNames:'delta string type timeStamp category chunk lastPosition position |
7957 | 15 |
className selector followUp' |
1545 | 16 |
classVariableNames:'' |
17 |
poolDictionaries:'' |
|
18 |
privateIn:NewChangesBrowser |
|
19 |
! |
|
20 |
||
21 |
!NewChangesBrowser class methodsFor:'documentation'! |
|
22 |
||
23 |
documentation |
|
24 |
" |
|
25 |
The future Changes Browser. |
|
26 |
||
27 |
[start with:] |
|
7957 | 28 |
NewChangesBrowser open |
29 |
NewChangesBrowser openOnFile:aFileName |
|
1545 | 30 |
|
31 |
[author:] |
|
7957 | 32 |
Thomas Zwick, eXept Software AG |
33 |
enhanced by Felix Madrid, eXept Software AG |
|
1545 | 34 |
" |
35 |
! ! |
|
36 |
||
37 |
!NewChangesBrowser class methodsFor:'instance creation'! |
|
38 |
||
1938 | 39 |
openOn:aFileName |
40 |
"opens a Changes Browser with the changes of the aFileName" |
|
41 |
||
42 |
^self openOnFile:aFileName |
|
43 |
||
44 |
"Created: / 17.10.1998 / 14:41:28 / cg" |
|
45 |
! |
|
46 |
||
1545 | 47 |
openOnFile:aFileName |
1546 | 48 |
"opens a Changes Browser with the changes of the aFileName" |
49 |
||
6288 | 50 |
^self new |
2250 | 51 |
changeFileName:aFileName; |
52 |
open |
|
1545 | 53 |
|
54 |
! ! |
|
55 |
||
56 |
!NewChangesBrowser class methodsFor:'accessing'! |
|
57 |
||
58 |
autoSelectNext |
|
1546 | 59 |
"returns true here, makes a Delete operation automatically |
1545 | 60 |
select the next change" |
61 |
||
62 |
^ true |
|
63 |
||
64 |
||
65 |
! |
|
66 |
||
67 |
label |
|
1546 | 68 |
"returns my label" |
1545 | 69 |
|
70 |
^'Changes Browser' |
|
71 |
! ! |
|
72 |
||
73 |
!NewChangesBrowser class methodsFor:'help specs'! |
|
74 |
||
7957 | 75 |
flyByHelpSpec |
1545 | 76 |
"This resource specification was automatically generated |
77 |
by the UIHelpTool of ST/X." |
|
78 |
||
79 |
"Do not manually edit this!! If it is corrupted, |
|
80 |
the UIHelpTool may not be able to read the specification." |
|
81 |
||
82 |
" |
|
6288 | 83 |
UIHelpTool openOnClass:NewChangesBrowser |
1545 | 84 |
" |
85 |
||
86 |
<resource: #help> |
|
87 |
||
7957 | 88 |
^super flyByHelpSpec addPairsFrom:#( |
1545 | 89 |
|
90 |
#applyAll |
|
1650 | 91 |
'Apply all changes.' |
1545 | 92 |
|
93 |
#applyForClassToEnd |
|
7957 | 94 |
'Apply changes which affect this class to the end.' |
1545 | 95 |
|
96 |
#applyFromLastSnapshot |
|
1650 | 97 |
'Apply changes from the last snapshot to the end.' |
1545 | 98 |
|
99 |
#applyLine |
|
100 |
'Apply the selected change.' |
|
101 |
||
102 |
#applyToEnd |
|
1650 | 103 |
'Apply all changes from the selected one to the end.' |
1545 | 104 |
|
1546 | 105 |
#deleteAll |
1650 | 106 |
'Deletes all changes.' |
1546 | 107 |
|
1545 | 108 |
#deleteCompress |
1650 | 109 |
'Deletes all obsolete changes.' |
1545 | 110 |
|
111 |
#deleteCompressForClass |
|
1650 | 112 |
'Deletes obsolete changes for this class, leaving the last one.' |
1545 | 113 |
|
114 |
#deleteForClassToEnd |
|
1650 | 115 |
'Deletes changes for this class from the selection to the end.' |
1545 | 116 |
|
117 |
#deleteLine |
|
1650 | 118 |
'Deletes the selected change.' |
1545 | 119 |
|
120 |
#deleteToEnd |
|
1650 | 121 |
'Deletes changes from the selected one to the end.' |
1545 | 122 |
|
1556 | 123 |
#fileLoad |
1650 | 124 |
'Opens a dialog for selecting and loading another changes file.' |
1545 | 125 |
|
126 |
#fileReload |
|
127 |
'Reloads the changes file (undo your modifications).' |
|
128 |
||
129 |
#fileSave |
|
1650 | 130 |
'Saves the list of changes into the current changes file.' |
1545 | 131 |
|
1556 | 132 |
#filterField |
1650 | 133 |
'Matching patterns filtering the changes (separate patterns by blanks).' |
1556 | 134 |
|
1545 | 135 |
#settingsAutoUpdate |
1650 | 136 |
'Toggle automatic update.' |
1545 | 137 |
|
138 |
#settingsColumns |
|
1650 | 139 |
'Configure which columns are shown in the list.' |
1545 | 140 |
|
141 |
#settingsColumnsCategory |
|
1650 | 142 |
'Toggle display of the changes category in the list.' |
1545 | 143 |
|
144 |
#settingsColumnsDeltaInfo |
|
1650 | 145 |
'Toggle display of the delta-info in the list.' |
1545 | 146 |
|
147 |
#settingsColumnsPosition |
|
1650 | 148 |
'Togle display of the changes file-position in the list.' |
1545 | 149 |
|
150 |
#settingsColumnsTimeStamp |
|
1650 | 151 |
'Toggle display of the changes time stamp in the list.' |
1545 | 152 |
|
153 |
#settingsColumnsType |
|
1650 | 154 |
'Toggle display of the change-type in the list.' |
1545 | 155 |
|
1546 | 156 |
#settingsPrivateAsSeparate |
1650 | 157 |
'Toggle if changes for private private are included when applying, deleting, or compressing for a class.' |
1546 | 158 |
|
1545 | 159 |
#testCompareWithCurrentVersion |
1650 | 160 |
'Opens a info dialog showing the difference between the changes code and the method current code.' |
1545 | 161 |
|
162 |
#testFindLastSnapshot |
|
7957 | 163 |
'Searches backward for the previous snapshot entry.' |
1545 | 164 |
|
165 |
#testFindNextSnapshot |
|
1650 | 166 |
'Searches forward for the next snapshot entry.' |
1545 | 167 |
|
168 |
) |
|
1650 | 169 |
|
170 |
"Modified: / 19.5.1998 / 17:59:39 / cg" |
|
7957 | 171 |
! |
172 |
||
173 |
helpSpec |
|
174 |
"This resource specification was automatically generated |
|
175 |
by the UIHelpTool of ST/X." |
|
176 |
||
177 |
"Do not manually edit this!! If it is corrupted, |
|
178 |
the UIHelpTool may not be able to read the specification." |
|
179 |
||
180 |
" |
|
181 |
UIHelpTool openOnClass:NewChangesBrowser |
|
182 |
" |
|
183 |
||
184 |
<resource: #help> |
|
185 |
||
186 |
^ super helpSpec addPairsFrom:#( |
|
187 |
||
188 |
#applyAll |
|
189 |
'Apply all changes.' |
|
190 |
||
191 |
#applyForClassToEnd |
|
192 |
'Apply changes to the end which affect this class.' |
|
193 |
||
194 |
#applyFromLastSnapshot |
|
195 |
'Apply changes from the last snapshot to the end.' |
|
196 |
||
197 |
#applyLine |
|
198 |
'Apply the selected change.' |
|
199 |
||
200 |
#applyToEnd |
|
201 |
'Apply all changes from the selected one to the end.' |
|
202 |
||
203 |
#deleteAll |
|
204 |
'Deletes all changes.' |
|
205 |
||
206 |
#deleteCompress |
|
207 |
'Deletes all obsolete changes.' |
|
208 |
||
209 |
#deleteCompressForClass |
|
210 |
'Deletes obsolete changes for this class, leaving the last one.' |
|
211 |
||
212 |
#deleteForClassToEnd |
|
213 |
'Deletes changes for this class from the selection to the end.' |
|
214 |
||
215 |
#deleteLine |
|
216 |
'Deletes the selected change.' |
|
217 |
||
218 |
#deleteToEnd |
|
219 |
'Deletes changes from the selected one to the end.' |
|
220 |
||
221 |
#fileLoad |
|
222 |
'Opens a dialog for selecting and loading another changes file.' |
|
223 |
||
224 |
#fileReload |
|
225 |
'Reloads the changes file (undo your modifications).' |
|
226 |
||
227 |
#fileSave |
|
228 |
'Saves the list of changes into the current changes file.' |
|
229 |
||
230 |
#filterField |
|
231 |
'Matching patterns filtering the changes (separate patterns by blanks).' |
|
232 |
||
233 |
#settingsAutoUpdate |
|
234 |
'Toggle automatic update.' |
|
235 |
||
236 |
#settingsColumns |
|
237 |
'Configure which columns are shown in the list.' |
|
238 |
||
239 |
#settingsColumnsCategory |
|
240 |
'Toggle display of the changes category in the list.' |
|
241 |
||
242 |
#settingsColumnsClassName |
|
243 |
'Toggle display of the className in the list.' |
|
244 |
||
245 |
#settingsColumnsDeltaInfo |
|
246 |
'Toggle display of the delta-info in the list.' |
|
247 |
||
248 |
#settingsColumnsPosition |
|
249 |
'Togle display of the changes file-position in the list.' |
|
250 |
||
251 |
#settingsColumnsTimeStamp |
|
252 |
'Toggle display of the changes time stamp in the list.' |
|
253 |
||
254 |
#settingsColumnsType |
|
255 |
'Toggle display of the change-type in the list.' |
|
256 |
||
257 |
#settingsPrivateAsSeparate |
|
258 |
'Toggle if changes for private private are included when applying, deleting, or compressing for a class.' |
|
259 |
||
260 |
#testCompareWithCurrentVersion |
|
261 |
'Opens a info dialog showing the difference between the changes code and the method current code.' |
|
262 |
||
263 |
#testFindLastSnapshot |
|
264 |
'Searches backward for the previous snapshot entry.' |
|
265 |
||
266 |
#testFindNextSnapshot |
|
267 |
'Searches forward for the next snapshot entry.' |
|
268 |
||
269 |
) |
|
1545 | 270 |
! ! |
271 |
||
272 |
!NewChangesBrowser class methodsFor:'image specs'! |
|
273 |
||
274 |
applyFromLastSnapshotIcon |
|
7957 | 275 |
^ self applyFromLastSnapshotIcon2 |
276 |
! |
|
277 |
||
278 |
applyFromLastSnapshotIcon1 |
|
1545 | 279 |
"This resource specification was automatically generated |
280 |
by the ImageEditor of ST/X." |
|
281 |
||
282 |
"Do not manually edit this!! If it is corrupted, |
|
283 |
the ImageEditor may not be able to read the specification." |
|
284 |
||
285 |
" |
|
7957 | 286 |
self applyFromLastSnapshotIcon inspect |
1545 | 287 |
ImageEditor openOnClass:self andSelector:#applyFromLastSnapshotIcon |
7957 | 288 |
Icon flushCachedIcons |
1545 | 289 |
" |
290 |
||
291 |
<resource: #image> |
|
292 |
||
293 |
^Icon |
|
7957 | 294 |
constantNamed:#'NewChangesBrowser class applyFromLastSnapshotIcon' |
295 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
296 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BH"H"H@@@@@@@@@H"H"H @@@@@@@@@@@@@B@@@@@@ |
|
297 |
@@;.;.; H@@@@@@@C.;.;.@@@@@@@@@@@@@@8@@N@@@@C?????C @@@N@@@O????<@@@8@@@@@@@@@C0@@@@8@@O????<O@@C @@@@?????0@@@@C @@@@@@ |
|
298 |
@O@@@N@@@@DQDQDP<@C @@@@@_??DQ@@@@@@@@@A????D@@@@@@@@@DQDQDP@@@@C @@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0@B@P@B@P@O?P@O?P@O?0@??@@??@@??LC?<\C?<\C?<8O?08O?10O?10??C ??[@??_@?<^@?<_@?<_@') ; yourself); yourself] |
|
3220 | 299 |
! |
1545 | 300 |
|
7957 | 301 |
applyFromLastSnapshotIcon2 |
1545 | 302 |
"This resource specification was automatically generated |
303 |
by the ImageEditor of ST/X." |
|
304 |
||
305 |
"Do not manually edit this!! If it is corrupted, |
|
306 |
the ImageEditor may not be able to read the specification." |
|
307 |
||
308 |
" |
|
7957 | 309 |
self applyFromLastSnapshotIcon1 inspect |
310 |
ImageEditor openOnClass:self andSelector:#applyFromLastSnapshotIcon1 |
|
311 |
Icon flushCachedIcons |
|
312 |
" |
|
313 |
||
314 |
<resource: #image> |
|
315 |
||
316 |
^Icon |
|
317 |
constantNamed:#'NewChangesBrowser class applyFromLastSnapshotIcon1' |
|
318 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
319 |
@@@BH@@@@@@QDQ<@@BH @@@@@AH"H@@@H"@@@@@@D"H H H"@@@@@@@RH"@"H"@@@@@@@AH"H@H"H@@@@@@@<@@@@BH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
320 |
@@;.;.; @@@@@@@@C.;.;.@@@@@@@@@@@@@@8@@N@@@@C?????C @@@N@@@O????<@@@8@@@@@@@@@C0@@@@8@@O????<O@@C @@@@?????0@@@@C @@@@@@ |
|
321 |
@O@@@N@@@@DQDQDP<@C @@@@@_??DQ@@@@@@@@@A????D@@@@@@@@@DQDQDP@@@@C @@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A@C<C@C<C@C<&@C<<@C<\@C<H@@@@?<@@?<@@?<LC?<\C?<\C?<8O?08O?10O?10??C ??[@??_@?<^@?<_@?<_@') ; yourself); yourself] |
|
322 |
! |
|
323 |
||
324 |
applyIcon |
|
325 |
^ self applyIcon2 |
|
326 |
! |
|
327 |
||
328 |
applyIcon1 |
|
329 |
"This resource specification was automatically generated |
|
330 |
by the ImageEditor of ST/X." |
|
331 |
||
332 |
"Do not manually edit this!! If it is corrupted, |
|
333 |
the ImageEditor may not be able to read the specification." |
|
334 |
||
335 |
" |
|
336 |
self applyIcon inspect |
|
1545 | 337 |
ImageEditor openOnClass:self andSelector:#applyIcon |
7957 | 338 |
Icon flushCachedIcons |
1545 | 339 |
" |
340 |
||
341 |
<resource: #image> |
|
342 |
||
343 |
^Icon |
|
7957 | 344 |
constantNamed:#'NewChangesBrowser class applyIcon' |
345 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
346 |
UUUUUUUPUUUUUU?PUUUUUU?[UUUUUW=PP@@@@C<QQUUU=_4PQUUU?_4VQ**U_?TPQUUUW?TPQUUUW=TXQ***U=TPQ**UUUTPQ*****TPQ***%UTPQ****)TP |
|
347 |
QUUUUUTPQUUUUUTUP@@@@@@PUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
348 |
@@@@@@@8@@@8@@A0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
349 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
350 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
351 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
352 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
353 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
354 |
! |
|
355 |
||
356 |
applyIcon2 |
|
357 |
"This resource specification was automatically generated |
|
358 |
by the ImageEditor of ST/X." |
|
359 |
||
360 |
"Do not manually edit this!! If it is corrupted, |
|
361 |
the ImageEditor may not be able to read the specification." |
|
362 |
||
363 |
" |
|
364 |
self applyIcon2 inspect |
|
365 |
ImageEditor openOnClass:self andSelector:#applyIcon2 |
|
366 |
Icon flushCachedIcons |
|
367 |
" |
|
368 |
||
369 |
<resource: #image> |
|
370 |
||
371 |
^Icon |
|
372 |
constantNamed:#'NewChangesBrowser class applyIcon2' |
|
373 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
374 |
DQDQDQDQDQDQP3PQDQDQDQDQDQECMADQDQDQDQDQECMADQDQDQEDPQDTL4DP@@@@@DL4@DL4@Q@QDQDQP3MAP3PADADQDQDTL3P3PPDPD"H"HQECL3MA@Q@Q |
|
375 |
DQDQDQP3MADADADQDQDQDTL4DPDPD"H"H"HQEDDQ@Q@RH"H!!DQDQDQDADAH"H"H"H"H"DPDPD"H"H"H!!DQDQ@Q@RH"H"H"H"HQDADADQDQDQDQDQDPDPDQDQ |
|
376 |
DQDQDQDQ@Q@@@@@@@@@@@@@ADQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDb') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0 85 85 85]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
377 |
@@@<@@@<@@A8@C!!8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
378 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
379 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
380 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
381 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
382 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
3220 | 383 |
! |
1545 | 384 |
|
385 |
applyToEndIcon |
|
386 |
"This resource specification was automatically generated |
|
387 |
by the ImageEditor of ST/X." |
|
388 |
||
389 |
"Do not manually edit this!! If it is corrupted, |
|
390 |
the ImageEditor may not be able to read the specification." |
|
391 |
||
392 |
" |
|
7957 | 393 |
self applyToEndIcon inspect |
1545 | 394 |
ImageEditor openOnClass:self andSelector:#applyToEndIcon |
7957 | 395 |
Icon flushCachedIcons |
1545 | 396 |
" |
397 |
||
398 |
<resource: #image> |
|
399 |
||
400 |
^Icon |
|
7957 | 401 |
constantNamed:#'NewChangesBrowser class applyToEndIcon' |
402 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
403 |
@@@DP@@@@@@@@@@@@DQ@@@@@@@@@@@@@QD@@@"H"H"@@Q@QD@@@BH"H"H@ADQD@@@@@@@@@ @@QDP@@BH"H"HB@@@DP@@@H"H"H @@@@@@@@@@@@@B@@@@@@ |
|
404 |
@@L3L3L0H@@@@@@@@3L3L3@@@@@@@@@@@@@@L@@B@@@@@3L3L3@0@@@B@@@CL3L3L@@@H@@@@@@@@@@0@@@@H@@ADQDQDC@@@ @@@@DQDQDP@@@@@ @@@@@@ |
|
405 |
@A@@@B@@@@DQDQDPD@@ @@@@@SL3DQ@@@@@@@@@AL3L3D@@@@@@@@@DQDQDP@@@@@ @@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A@@@CC?0CC?0&C?0<O?0\O?0HO?0@??@@??@@??LC?<\C?<\C?<8O?08O?10O?10??C ??[@??_@?<^@?<_@?<_@') ; yourself); yourself] |
|
3220 | 406 |
! |
1545 | 407 |
|
408 |
compressIcon |
|
409 |
"This resource specification was automatically generated |
|
410 |
by the ImageEditor of ST/X." |
|
411 |
||
412 |
"Do not manually edit this!! If it is corrupted, |
|
413 |
the ImageEditor may not be able to read the specification." |
|
414 |
||
415 |
" |
|
416 |
ImageEditor openOnClass:self andSelector:#compressIcon |
|
417 |
" |
|
418 |
||
419 |
<resource: #image> |
|
420 |
||
421 |
^Icon |
|
2250 | 422 |
constantNamed:#'NewChangesBrowser compressIcon' |
3220 | 423 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@????<@@@:***(@@@8@@@8@@@8@@@8@@@@@@@8@@@@@@@8A@@@@@@8@@:**0@8HC**+@@8@@@@@@@8H@@@@@@8@@@@@@@8@@@@@@@8@@@@@@@8@@C????8@@C****(@@@@@@@@H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 124 124 124 170 170 170 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@??0A??8A??8A??8A8A8G>A8@@A8G?98O?18_?!!8??A8@@A8G>A8@0A8C??8C??8C??8C??0@0@@D2@@G>@@D2@@') ; yourself); yourself] |
424 |
! |
|
1545 | 425 |
|
426 |
deleteIcon |
|
427 |
"This resource specification was automatically generated |
|
428 |
by the ImageEditor of ST/X." |
|
429 |
||
430 |
"Do not manually edit this!! If it is corrupted, |
|
431 |
the ImageEditor may not be able to read the specification." |
|
432 |
||
433 |
" |
|
434 |
ImageEditor openOnClass:self andSelector:#deleteIcon |
|
435 |
" |
|
436 |
||
437 |
<resource: #image> |
|
438 |
||
439 |
^Icon |
|
2250 | 440 |
constantNamed:#'NewChangesBrowser deleteIcon' |
3220 | 441 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@AUUUU@@OA??UU@@@AUUUU@@@AUUUU@B@A???U@H@A??5U@@@A???0@@@AUUUB@B@@@@@@@@@@@@@A@BK@@@@A_:@@@@@AO2G@@@@AL2@@@@@AL2C@@@@AL2@@@@@AL2@@@@@AL2H@@@@AL2@@@@@A\:@@@@@H_8 @@@@@@@H') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?<@_?<@_?<P_?<P_?<X_?<X_?<H_? H_?O<_?XL@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@G0') ; yourself); yourself] |
442 |
! |
|
1545 | 443 |
|
444 |
deleteToEndIcon |
|
445 |
"This resource specification was automatically generated |
|
446 |
by the ImageEditor of ST/X." |
|
447 |
||
448 |
"Do not manually edit this!! If it is corrupted, |
|
449 |
the ImageEditor may not be able to read the specification." |
|
450 |
||
451 |
" |
|
452 |
ImageEditor openOnClass:self andSelector:#deleteToEndIcon |
|
453 |
" |
|
454 |
||
455 |
<resource: #image> |
|
456 |
||
457 |
^Icon |
|
2250 | 458 |
constantNamed:#'NewChangesBrowser deleteToEndIcon' |
3220 | 459 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@B** @@O@B** @@@@@@@ @@@@??< @B@@??<@@H@@@@L@@@@EUUL@@@@G?U@B@B@G?=@@@@@EUU@A@BK@@@@A_:@@@@@AO2G@@@@AL2@@@@@AL2C@@@@AL2@@@@@AL2@@@@@AL2H@@@@AL2@@@@@A\:@@@@@H_8 @@@@@@@H') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C?0@C?0@C?0PO?0PO?0XO?0X??@H??@H??O<?<XL?<_<?<_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@G0') ; yourself); yourself] |
460 |
! |
|
1545 | 461 |
|
462 |
findLastSnapshotIcon |
|
463 |
"This resource specification was automatically generated |
|
464 |
by the ImageEditor of ST/X." |
|
465 |
||
466 |
"Do not manually edit this!! If it is corrupted, |
|
467 |
the ImageEditor may not be able to read the specification." |
|
468 |
||
469 |
" |
|
470 |
ImageEditor openOnClass:self andSelector:#findLastSnapshotIcon |
|
471 |
" |
|
472 |
||
473 |
<resource: #image> |
|
474 |
||
475 |
^Icon |
|
2250 | 476 |
constantNamed:#'NewChangesBrowser findLastSnapshotIcon' |
3220 | 477 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@EUUUW@A@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@F***(@A@F***(@M@F***(@H@F***(@@@F***(@@@F***(@I@L@@@@@@@@@@@@@A@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??B@@@B@C@B@G B@O0@@_8@@G @@G @@G @') ; yourself); yourself] |
478 |
! |
|
1545 | 479 |
|
480 |
findNextSnapshotIcon |
|
481 |
"This resource specification was automatically generated |
|
482 |
by the ImageEditor of ST/X." |
|
483 |
||
484 |
"Do not manually edit this!! If it is corrupted, |
|
485 |
the ImageEditor may not be able to read the specification." |
|
486 |
||
487 |
" |
|
488 |
ImageEditor openOnClass:self andSelector:#findNextSnapshotIcon |
|
489 |
" |
|
490 |
||
491 |
<resource: #image> |
|
492 |
||
493 |
^Icon |
|
2250 | 494 |
constantNamed:#'NewChangesBrowser findNextSnapshotIcon' |
3220 | 495 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@DA@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@B@@@@@@@@@@@@@@@E@@@@@@@@@EUUUW@N@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@V***(@H@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@L@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@G @@G @@G @@_8@@O0@@G @@C@@@@@@C??@C??@C??@C??@C??@C??BC??BC??BC??BC??@C??@C??@C??@C??@') ; yourself); yourself] |
7957 | 496 |
! |
497 |
||
498 |
findPreviousForClassIcon |
|
499 |
"This resource specification was automatically generated |
|
500 |
by the ImageEditor of ST/X." |
|
501 |
||
502 |
"Do not manually edit this!! If it is corrupted, |
|
503 |
the ImageEditor may not be able to read the specification." |
|
504 |
||
505 |
" |
|
506 |
self findPreviousForClassIcon inspect |
|
507 |
ImageEditor openOnClass:self andSelector:#findPreviousForClassIcon |
|
508 |
Icon flushCachedIcons |
|
509 |
" |
|
510 |
||
511 |
<resource: #image> |
|
512 |
||
513 |
^Icon |
|
514 |
constantNamed:#'NewChangesBrowser class findPreviousForClassIcon' |
|
515 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
516 |
@EUUUW@A@G???<@@@G???<@@@G???<@@@G???<@@@G???<@@@G???<@@@G???<@A@G???<@M@G???<@H@G???<@@@G???<@@@G???<@I@L@@@@@@@@@@@@@A |
|
517 |
@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??B@@@B@C@B@G B@O0@@_8@@G @@G @@G @') ; yourself); yourself] |
|
518 |
! |
|
519 |
||
520 |
findPreviousSnapshotIcon |
|
521 |
"This resource specification was automatically generated |
|
522 |
by the ImageEditor of ST/X." |
|
523 |
||
524 |
"Do not manually edit this!! If it is corrupted, |
|
525 |
the ImageEditor may not be able to read the specification." |
|
526 |
||
527 |
" |
|
528 |
self findPreviousSnapshotIcon inspect |
|
529 |
ImageEditor openOnClass:self andSelector:#findPreviousSnapshotIcon |
|
530 |
Icon flushCachedIcons |
|
531 |
" |
|
532 |
||
533 |
<resource: #image> |
|
534 |
||
535 |
^Icon |
|
536 |
constantNamed:#'NewChangesBrowser class findPreviousSnapshotIcon' |
|
537 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
538 |
@EUUUW@A@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@F***(@A@F***(@M@F***(@H@F***(@@@F***(@@@F***(@I@L@@@@@@@@@@@@@A |
|
539 |
@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??B@@@B@C@B@G B@O0@@_8@@G @@G @@G @') ; yourself); yourself] |
|
3220 | 540 |
! ! |
1545 | 541 |
|
542 |
!NewChangesBrowser class methodsFor:'interface specs'! |
|
543 |
||
544 |
windowSpec |
|
545 |
"This resource specification was automatically generated |
|
546 |
by the UIPainter of ST/X." |
|
547 |
||
548 |
"Do not manually edit this!! If it is corrupted, |
|
549 |
the UIPainter may not be able to read the specification." |
|
550 |
||
551 |
" |
|
552 |
UIPainter new openOnClass:NewChangesBrowser andSelector:#windowSpec |
|
553 |
NewChangesBrowser new openInterface:#windowSpec |
|
554 |
NewChangesBrowser open |
|
555 |
" |
|
556 |
||
557 |
<resource: #canvas> |
|
558 |
||
559 |
^ |
|
6288 | 560 |
|
1545 | 561 |
#(#FullSpec |
6288 | 562 |
#window: |
2250 | 563 |
#(#WindowSpec |
564 |
#name: 'Changes Browser' |
|
565 |
#layout: #(#LayoutFrame 53 0 92 0 687 0 583 0) |
|
566 |
#label: 'Changes Browser' |
|
567 |
#min: #(#Point 10 10) |
|
568 |
#max: #(#Point 1152 900) |
|
569 |
#bounds: #(#Rectangle 53 92 688 584) |
|
570 |
#menu: #menu |
|
571 |
#usePreferredExtent: false |
|
572 |
) |
|
6288 | 573 |
#component: |
2250 | 574 |
#(#SpecCollection |
6288 | 575 |
#collection: |
2250 | 576 |
#( |
577 |
#(#MenuPanelSpec |
|
578 |
#name: 'menuToolbarView' |
|
579 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
580 |
#menu: #menuToolbar |
|
581 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
|
582 |
#showSeparatingLines: true |
|
583 |
) |
|
584 |
#(#VariableVerticalPanelSpec |
|
585 |
#name: 'variableVerticalPanel1' |
|
586 |
#layout: #(#LayoutFrame 0 0.0 34 0 0 1.0 -26 1.0) |
|
6288 | 587 |
#component: |
2250 | 588 |
#(#SpecCollection |
6288 | 589 |
#collection: |
2250 | 590 |
#( |
591 |
#(#ViewSpec |
|
592 |
#name: 'Box1' |
|
6288 | 593 |
#component: |
2250 | 594 |
#(#SpecCollection |
6288 | 595 |
#collection: |
2250 | 596 |
#( |
597 |
#(#DataSetSpec |
|
598 |
#name: 'changesDataSetView' |
|
599 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -28 1.0) |
|
600 |
#model: #selectionOfChange |
|
601 |
#menu: #menuTable |
|
602 |
#hasHorizontalScrollBar: true |
|
603 |
#hasVerticalScrollBar: true |
|
604 |
#miniScrollerHorizontal: true |
|
605 |
#dataList: #listOfChanges |
|
606 |
#useIndex: false |
|
607 |
#has3Dsepartors: true |
|
608 |
#doubleClickSelector: #doBrowseClass |
|
609 |
#columnHolder: #listOfChangeColumns |
|
610 |
#valueChangeSelector: #changeSelected: |
|
611 |
) |
|
612 |
#(#ViewSpec |
|
613 |
#name: 'Box2' |
|
614 |
#layout: #(#LayoutFrame 0 0.0 -28 1 0 1.0 0 1.0) |
|
6288 | 615 |
#component: |
2250 | 616 |
#(#SpecCollection |
6288 | 617 |
#collection: |
2250 | 618 |
#( |
619 |
#(#LabelSpec |
|
620 |
#name: 'filterLabel' |
|
621 |
#layout: #(#AlignmentOrigin 37 0 13 0.0 1 0.5) |
|
622 |
#label: 'Filter:' |
|
623 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
|
624 |
#adjust: #left |
|
625 |
) |
|
626 |
#(#InputFieldSpec |
|
627 |
#name: 'filterField' |
|
628 |
#layout: #(#LayoutFrame 41 0.0 3 0 250 0 25 0) |
|
629 |
#activeHelpKey: #filterField |
|
630 |
#model: #valueOfFilter |
|
631 |
#immediateAccept: false |
|
632 |
) |
|
633 |
#(#ProgressIndicatorSpec |
|
634 |
#name: 'readProgressIndicator' |
|
635 |
#layout: #(#LayoutFrame 41 0 3 0 250 0 25 0) |
|
636 |
#model: #valueOfReadProgress |
|
637 |
#foregroundColor: #(#Color 0.0 60.0 60.0) |
|
638 |
) |
|
639 |
#(#ActionButtonSpec |
|
640 |
#name: 'allButton' |
|
641 |
#layout: #(#LayoutFrame 258 0.0 2 0.0 268 0 13 0) |
|
642 |
#label: ' ' |
|
643 |
#model: #doFilter: |
|
644 |
) |
|
645 |
#(#LabelSpec |
|
646 |
#name: 'allLabel' |
|
647 |
#layout: #(#LayoutFrame 273 0 0 0.0 310 0 14 0) |
|
648 |
#label: '= all' |
|
649 |
#translateLabel: true |
|
650 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
|
651 |
#adjust: #left |
|
652 |
) |
|
653 |
#(#ActionButtonSpec |
|
654 |
#name: 'methodChangesButton' |
|
655 |
#layout: #(#LayoutFrame 359 0.0 2 0.0 369 0 13 0) |
|
656 |
#label: ' ' |
|
657 |
#backgroundColor: #(#Color 100.0 100.0 100.0) |
|
658 |
#model: #doFilterType: |
|
659 |
#actionValue: 'method' |
|
660 |
) |
|
661 |
#(#LabelSpec |
|
662 |
#name: 'methodChangesLabel' |
|
663 |
#layout: #(#LayoutFrame 373 0 0 0.0 458 0 14 0) |
|
664 |
#label: '= method' |
|
665 |
#translateLabel: true |
|
666 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
|
667 |
#adjust: #left |
|
668 |
) |
|
669 |
#(#ActionButtonSpec |
|
670 |
#name: 'classChangesButton' |
|
671 |
#layout: #(#LayoutFrame 455 0.0 2 0.0 465 0 13 0) |
|
672 |
#label: ' ' |
|
673 |
#backgroundColor: #(#Color 50.0008 50.0008 50.0008) |
|
674 |
#model: #doFilterType: |
|
675 |
#actionValue: 'class' |
|
676 |
) |
|
677 |
#(#LabelSpec |
|
678 |
#name: 'classChangesLabel' |
|
679 |
#layout: #(#LayoutFrame 470 0 0 0.0 580 0 14 0) |
|
680 |
#label: '= class change' |
|
681 |
#translateLabel: true |
|
682 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
|
683 |
#adjust: #left |
|
684 |
) |
|
685 |
#(#ActionButtonSpec |
|
686 |
#name: 'snapshotButton' |
|
687 |
#layout: #(#LayoutFrame 258 0.0 16 0.0 268 0 27 0) |
|
688 |
#label: ' ' |
|
689 |
#backgroundColor: #(#Color 100.0 0.0 0.0) |
|
690 |
#model: #doFilterType: |
|
691 |
#actionValue: 'image' |
|
692 |
) |
|
693 |
#(#LabelSpec |
|
694 |
#name: 'snapshotLabel' |
|
695 |
#layout: #(#LayoutFrame 273 0 14 0.0 355 0 28 0) |
|
696 |
#label: '= snapshot' |
|
697 |
#translateLabel: true |
|
698 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
|
699 |
#adjust: #left |
|
700 |
) |
|
701 |
#(#ActionButtonSpec |
|
702 |
#name: 'fileInButton' |
|
703 |
#layout: #(#LayoutFrame 359 0.0 16 0.0 369 0 27 0) |
|
704 |
#label: ' ' |
|
705 |
#backgroundColor: #(#Color 0.0 80.0 80.0) |
|
706 |
#model: #doFilterSourceType: |
|
707 |
#actionValue: '* file*' |
|
708 |
) |
|
709 |
#(#LabelSpec |
|
710 |
#name: 'fileInLabel' |
|
711 |
#layout: #(#LayoutFrame 374 0 14 0.0 440 0 28 0) |
|
712 |
#label: '= fileIn' |
|
713 |
#translateLabel: true |
|
714 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
|
715 |
#adjust: #left |
|
716 |
) |
|
717 |
#(#ActionButtonSpec |
|
718 |
#name: 'checkInButton' |
|
719 |
#layout: #(#LayoutFrame 455 0.0 16 0.0 465 0 27 0) |
|
720 |
#label: ' ' |
|
721 |
#backgroundColor: #(#Color 0.0 0.0 100.0) |
|
722 |
#model: #doFilterSourceType: |
|
723 |
#actionValue: '* checkin*' |
|
724 |
) |
|
725 |
#(#LabelSpec |
|
726 |
#name: 'checkInLabel' |
|
727 |
#layout: #(#LayoutFrame 470 0 14 0.0 550 0 28 0) |
|
728 |
#label: '= checkIn' |
|
729 |
#translateLabel: true |
|
730 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
|
731 |
#adjust: #left |
|
732 |
) |
|
733 |
) |
|
734 |
) |
|
735 |
) |
|
736 |
) |
|
737 |
) |
|
738 |
) |
|
739 |
#(#WorkspaceSpec |
|
740 |
#name: 'changeTextEditor' |
|
741 |
#model: #valueOfChangeText |
|
742 |
#hasHorizontalScrollBar: true |
|
743 |
#hasVerticalScrollBar: true |
|
744 |
#miniScrollerHorizontal: true |
|
745 |
#isReadOnly: true |
|
746 |
) |
|
747 |
) |
|
748 |
) |
|
749 |
#handles: #(#Any 0.5 1.0) |
|
750 |
) |
|
751 |
#(#UISubSpecification |
|
752 |
#name: 'windowSpecForInfoBar' |
|
753 |
#layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
754 |
#majorKey: #ToolApplicationModel |
|
755 |
#minorKey: #windowSpecForInfoBar |
|
756 |
) |
|
757 |
) |
|
758 |
) |
|
1545 | 759 |
) |
1647 | 760 |
|
1653 | 761 |
"Modified: / 19.5.1998 / 18:58:47 / cg" |
1545 | 762 |
! ! |
763 |
||
764 |
!NewChangesBrowser class methodsFor:'list specs'! |
|
765 |
||
1641 | 766 |
tableColumnsForChangeAttributes |
767 |
"This resource specification was automatically generated |
|
768 |
by the DataSetBuilder of ST/X." |
|
769 |
||
770 |
"Do not manually edit this!! If it is corrupted, |
|
771 |
the DataSetBuilder may not be able to read the specification." |
|
772 |
||
773 |
" |
|
774 |
DataSetBuilder new openOnClass:NewChangesBrowser andSelector:#tableColumnsForChangeAttributes |
|
775 |
" |
|
776 |
||
777 |
<resource: #tableColumns> |
|
778 |
||
7957 | 779 |
^#( |
780 |
(DataSetColumnSpec |
|
781 |
labelButtonType: Button |
|
782 |
rendererType: rowSelector |
|
783 |
backgroundSelector: listColor |
|
784 |
showSelectionHighLighted: false |
|
785 |
) |
|
786 |
(DataSetColumnSpec |
|
787 |
label: 'Change' |
|
788 |
id: change |
|
789 |
labelAlignment: left |
|
790 |
labelButtonType: Button |
|
791 |
model: string |
|
792 |
canSelect: false |
|
1641 | 793 |
) |
7957 | 794 |
(DataSetColumnSpec |
795 |
label: 'Class' |
|
796 |
id: 'className' |
|
797 |
labelAlignment: left |
|
798 |
activeHelpKey: '' |
|
799 |
labelButtonType: Button |
|
800 |
model: className |
|
801 |
canSelect: false |
|
1641 | 802 |
) |
7957 | 803 |
(DataSetColumnSpec |
804 |
label: 'Selector' |
|
805 |
id: 'selector' |
|
806 |
labelAlignment: left |
|
807 |
activeHelpKey: '' |
|
808 |
labelButtonType: Button |
|
809 |
model: selector |
|
810 |
canSelect: false |
|
1641 | 811 |
) |
7957 | 812 |
(DataSetColumnSpec |
813 |
label: 'Category' |
|
814 |
id: category |
|
815 |
labelAlignment: left |
|
816 |
labelButtonType: Button |
|
817 |
model: category |
|
818 |
canSelect: false |
|
1641 | 819 |
) |
7957 | 820 |
(DataSetColumnSpec |
821 |
label: 'Delta Info' |
|
822 |
id: deltaInfo |
|
823 |
labelAlignment: left |
|
824 |
labelButtonType: Button |
|
825 |
model: delta |
|
826 |
canSelect: false |
|
1641 | 827 |
) |
7957 | 828 |
(DataSetColumnSpec |
829 |
label: 'Time Stamp' |
|
830 |
id: timeStamp |
|
831 |
labelAlignment: left |
|
832 |
labelButtonType: Button |
|
833 |
model: timeStamp |
|
834 |
canSelect: false |
|
1641 | 835 |
) |
7957 | 836 |
(DataSetColumnSpec |
837 |
label: 'Type' |
|
838 |
id: type |
|
839 |
labelAlignment: left |
|
840 |
labelButtonType: Button |
|
841 |
model: type |
|
842 |
canSelect: false |
|
1641 | 843 |
) |
7957 | 844 |
(DataSetColumnSpec |
845 |
label: 'Position' |
|
846 |
id: position |
|
847 |
labelAlignment: left |
|
848 |
labelButtonType: Button |
|
849 |
model: positions |
|
850 |
canSelect: false |
|
851 |
) |
|
852 |
) |
|
853 |
||
1545 | 854 |
! ! |
855 |
||
856 |
!NewChangesBrowser class methodsFor:'menu specs'! |
|
857 |
||
858 |
menu |
|
859 |
"This resource specification was automatically generated |
|
860 |
by the MenuEditor of ST/X." |
|
861 |
||
862 |
"Do not manually edit this!! If it is corrupted, |
|
863 |
the MenuEditor may not be able to read the specification." |
|
864 |
||
865 |
" |
|
866 |
MenuEditor new openOnClass:NewChangesBrowser andSelector:#menu |
|
867 |
(Menu new fromLiteralArrayEncoding:(NewChangesBrowser menu)) startUp |
|
868 |
" |
|
869 |
||
870 |
<resource: #menu> |
|
871 |
||
7957 | 872 |
^ |
873 |
#(Menu |
|
874 |
( |
|
875 |
(MenuItem |
|
876 |
activeHelpKey: file |
|
877 |
label: 'File' |
|
878 |
translateLabel: true |
|
879 |
submenu: |
|
880 |
(Menu |
|
881 |
( |
|
882 |
(MenuItem |
|
883 |
activeHelpKey: fileReload |
|
884 |
enabled: valueOfNotReading |
|
885 |
label: 'Reload' |
|
886 |
itemValue: doReload |
|
887 |
translateLabel: true |
|
888 |
) |
|
889 |
(MenuItem |
|
890 |
label: '-' |
|
891 |
) |
|
892 |
(MenuItem |
|
893 |
activeHelpKey: fileLoad |
|
894 |
enabled: valueOfNotSaving |
|
895 |
label: 'Load...' |
|
896 |
itemValue: doLoad |
|
897 |
translateLabel: true |
|
898 |
) |
|
899 |
(MenuItem |
|
900 |
label: '-' |
|
901 |
) |
|
902 |
(MenuItem |
|
903 |
activeHelpKey: fileSave |
|
904 |
enabled: valueOfNotReading |
|
905 |
label: 'Save' |
|
906 |
itemValue: doSave |
|
907 |
translateLabel: true |
|
908 |
) |
|
909 |
(MenuItem |
|
910 |
label: '-' |
|
911 |
) |
|
912 |
(MenuItem |
|
913 |
activeHelpKey: fileBrowseClass |
|
914 |
enabled: valueOfHavingChangeSelection |
|
915 |
label: 'Browse Class' |
|
916 |
itemValue: doBrowseClass |
|
917 |
translateLabel: true |
|
918 |
) |
|
919 |
(MenuItem |
|
920 |
label: '-' |
|
921 |
) |
|
922 |
(MenuItem |
|
923 |
activeHelpKey: fileExit |
|
924 |
enabled: valueOfNotSaving |
|
925 |
label: 'Exit' |
|
926 |
itemValue: closeRequest |
|
927 |
translateLabel: true |
|
928 |
) |
|
929 |
) |
|
930 |
nil |
|
931 |
nil |
|
932 |
) |
|
933 |
) |
|
934 |
(MenuItem |
|
935 |
label: 'Apply' |
|
936 |
translateLabel: true |
|
937 |
submenu: |
|
938 |
(Menu |
|
939 |
( |
|
940 |
(MenuItem |
|
941 |
activeHelpKey: applyLine |
|
942 |
enabled: valueOfHavingChangeSelection |
|
943 |
label: 'Change' |
|
944 |
itemValue: doApply |
|
945 |
translateLabel: true |
|
946 |
) |
|
947 |
(MenuItem |
|
948 |
label: '-' |
|
949 |
) |
|
950 |
(MenuItem |
|
951 |
activeHelpKey: applyAll |
|
952 |
enabled: valueOfNotReading |
|
953 |
label: 'All' |
|
954 |
itemValue: doApplyAll |
|
955 |
translateLabel: true |
|
956 |
) |
|
957 |
(MenuItem |
|
958 |
activeHelpKey: applyToEnd |
|
959 |
enabled: valueOfHavingSelection |
|
960 |
label: 'To End' |
|
961 |
itemValue: doApplyToEnd |
|
962 |
translateLabel: true |
|
963 |
) |
|
964 |
(MenuItem |
|
965 |
activeHelpKey: applyForClassToEnd |
|
966 |
enabled: valueOfHavingChangeSelection |
|
967 |
label: 'All for Class' |
|
968 |
itemValue: doApplyAllForClass |
|
969 |
translateLabel: true |
|
970 |
) |
|
971 |
(MenuItem |
|
972 |
activeHelpKey: applyForClassToEnd |
|
973 |
enabled: valueOfHavingChangeSelection |
|
974 |
label: 'For Class to End' |
|
975 |
itemValue: doApplyForClassToEnd |
|
976 |
translateLabel: true |
|
977 |
) |
|
978 |
(MenuItem |
|
979 |
label: '-' |
|
980 |
) |
|
981 |
(MenuItem |
|
982 |
activeHelpKey: applyFromLastSnapshot |
|
983 |
enabled: valueOfNotReading |
|
984 |
label: 'From Last Snapshot' |
|
985 |
itemValue: doApplyFromLastSnapshot |
|
986 |
translateLabel: true |
|
987 |
) |
|
988 |
) |
|
989 |
nil |
|
990 |
nil |
|
991 |
) |
|
992 |
) |
|
993 |
(MenuItem |
|
994 |
activeHelpKey: edit |
|
995 |
label: 'Delete' |
|
996 |
translateLabel: true |
|
997 |
submenu: |
|
998 |
(Menu |
|
999 |
( |
|
1000 |
(MenuItem |
|
1001 |
activeHelpKey: deleteLine |
|
1002 |
enabled: valueOfHavingSelection |
|
1003 |
label: 'Change' |
|
1004 |
itemValue: doDelete |
|
1005 |
translateLabel: true |
|
1006 |
) |
|
1007 |
(MenuItem |
|
1008 |
label: '-' |
|
1009 |
) |
|
1010 |
(MenuItem |
|
1011 |
activeHelpKey: deleteAll |
|
1012 |
enabled: valueOfNotReading |
|
1013 |
label: 'All' |
|
1014 |
itemValue: doDeleteAll |
|
1015 |
translateLabel: true |
|
1016 |
) |
|
1017 |
(MenuItem |
|
1018 |
activeHelpKey: deleteToEnd |
|
1019 |
enabled: valueOfHavingSelection |
|
1020 |
label: 'To End' |
|
1021 |
itemValue: doDeleteToEnd |
|
1022 |
translateLabel: true |
|
1023 |
) |
|
1024 |
(MenuItem |
|
1025 |
activeHelpKey: applyForClassToEnd |
|
1026 |
enabled: valueOfHavingChangeSelection |
|
1027 |
label: 'All for Class' |
|
1028 |
itemValue: doDeleteAllForClass |
|
1029 |
translateLabel: true |
|
1030 |
) |
|
1031 |
(MenuItem |
|
1032 |
activeHelpKey: deleteForClassToEnd |
|
1033 |
enabled: valueOfHavingChangeSelection |
|
1034 |
label: 'For Class to End' |
|
1035 |
itemValue: doDeleteForClassToEnd |
|
1036 |
translateLabel: true |
|
1037 |
) |
|
1038 |
(MenuItem |
|
1039 |
label: '-' |
|
1040 |
) |
|
1041 |
(MenuItem |
|
1042 |
activeHelpKey: deleteCompress |
|
1043 |
enabled: valueOfNotReading |
|
1044 |
label: 'Compress' |
|
1045 |
itemValue: doCompress |
|
1046 |
translateLabel: true |
|
1047 |
) |
|
1048 |
(MenuItem |
|
1049 |
activeHelpKey: deleteCompressForClass |
|
1050 |
enabled: valueOfHavingChangeSelection |
|
1051 |
label: 'Compress for Class' |
|
1052 |
itemValue: doCompressForClass |
|
1053 |
translateLabel: true |
|
1054 |
) |
|
1055 |
) |
|
1056 |
nil |
|
1057 |
nil |
|
1058 |
) |
|
1059 |
) |
|
1060 |
(MenuItem |
|
1061 |
activeHelpKey: test |
|
1062 |
label: 'Search' |
|
1063 |
translateLabel: true |
|
1064 |
submenu: |
|
1065 |
(Menu |
|
1066 |
( |
|
1067 |
(MenuItem |
|
1068 |
activeHelpKey: testFindPreviousSnapshot |
|
1069 |
enabled: valueOfHavingSelection |
|
1070 |
label: 'Find Previous Snapshot' |
|
1071 |
itemValue: doFindSnapshot: |
|
1072 |
translateLabel: true |
|
1073 |
argument: 'previous' |
|
1074 |
) |
|
1075 |
(MenuItem |
|
1076 |
activeHelpKey: testFindNextSnapshot |
|
1077 |
enabled: valueOfHavingSelection |
|
1078 |
label: 'Find Next Snapshot' |
|
1079 |
itemValue: doFindSnapshot: |
|
1080 |
translateLabel: true |
|
1081 |
argument: 'next' |
|
1082 |
) |
|
1083 |
(MenuItem |
|
1084 |
activeHelpKey: testFindLastSnapshot |
|
1085 |
enabled: valueOfHavingSelection |
|
1086 |
label: 'Find Last Snapshot' |
|
1087 |
itemValue: doFindSnapshot: |
|
1088 |
translateLabel: true |
|
1089 |
argument: 'last' |
|
1090 |
) |
|
1091 |
) |
|
1092 |
nil |
|
1093 |
nil |
|
1094 |
) |
|
1095 |
) |
|
1096 |
(MenuItem |
|
1097 |
activeHelpKey: test |
|
1098 |
label: 'Test' |
|
1099 |
translateLabel: true |
|
1100 |
submenu: |
|
1101 |
(Menu |
|
1102 |
( |
|
1103 |
(MenuItem |
|
1104 |
activeHelpKey: testCompareWithCurrentVersion |
|
1105 |
enabled: valueOfHavingChangeSelection |
|
1106 |
label: 'Compare with Current Version' |
|
1107 |
itemValue: doCompare |
|
1108 |
translateLabel: true |
|
1109 |
) |
|
1110 |
) |
|
1111 |
nil |
|
1112 |
nil |
|
1113 |
) |
|
1114 |
) |
|
1115 |
(MenuItem |
|
1116 |
activeHelpKey: settings |
|
1117 |
label: 'Settings' |
|
1118 |
translateLabel: true |
|
1119 |
submenu: |
|
1120 |
(Menu |
|
1121 |
( |
|
1122 |
(MenuItem |
|
1123 |
activeHelpKey: settingsAutoUpdate |
|
1124 |
enabled: valueOfNotReading |
|
1125 |
label: 'Auto Update' |
|
1126 |
translateLabel: true |
|
1127 |
indication: autoUpdateMode: |
|
1128 |
) |
|
1129 |
(MenuItem |
|
1130 |
label: '-' |
|
1131 |
) |
|
1132 |
(MenuItem |
|
1133 |
activeHelpKey: settingsPrivateAsSeparate |
|
1134 |
enabled: valueOfNotReading |
|
1135 |
label: 'Private Classes as Separate' |
|
1136 |
translateLabel: true |
|
1137 |
indication: privateAsSeparate: |
|
1138 |
) |
|
1139 |
(MenuItem |
|
1140 |
label: '-' |
|
1141 |
) |
|
1142 |
(MenuItem |
|
1143 |
activeHelpKey: settingsColumns |
|
1144 |
label: 'Columns' |
|
1145 |
translateLabel: true |
|
1146 |
submenu: |
|
1147 |
(Menu |
|
1148 |
( |
|
1149 |
(MenuItem |
|
1150 |
activeHelpKey: settingsColumnsClassName |
|
1151 |
label: 'Class' |
|
1152 |
translateLabel: true |
|
1153 |
isVisible: false |
|
1154 |
hideMenuOnActivated: false |
|
1155 |
indication: classNameColumn: |
|
1156 |
) |
|
1157 |
(MenuItem |
|
1158 |
activeHelpKey: settingsColumnsCategory |
|
1159 |
label: 'Selector' |
|
1160 |
translateLabel: true |
|
1161 |
isVisible: false |
|
1162 |
hideMenuOnActivated: false |
|
1163 |
indication: selectorColumn: |
|
1164 |
) |
|
1165 |
(MenuItem |
|
1166 |
activeHelpKey: settingsColumnsCategory |
|
1167 |
label: 'Category' |
|
1168 |
translateLabel: true |
|
1169 |
hideMenuOnActivated: false |
|
1170 |
indication: categoryColumn: |
|
1171 |
) |
|
1172 |
(MenuItem |
|
1173 |
activeHelpKey: settingsColumnsDeltaInfo |
|
1174 |
label: 'Delta Info' |
|
1175 |
translateLabel: true |
|
1176 |
hideMenuOnActivated: false |
|
1177 |
indication: deltaInfoColumn: |
|
1178 |
) |
|
1179 |
(MenuItem |
|
1180 |
activeHelpKey: settingsColumnsType |
|
1181 |
label: 'Type' |
|
1182 |
translateLabel: true |
|
1183 |
hideMenuOnActivated: false |
|
1184 |
indication: typeColumn: |
|
1185 |
) |
|
1186 |
(MenuItem |
|
1187 |
activeHelpKey: settingsColumnsTimeStamp |
|
1188 |
label: 'Time Stamp' |
|
1189 |
translateLabel: true |
|
1190 |
hideMenuOnActivated: false |
|
1191 |
indication: timeStampColumn: |
|
1192 |
) |
|
1193 |
(MenuItem |
|
1194 |
activeHelpKey: settingsColumnsPosition |
|
1195 |
label: 'Positions' |
|
1196 |
translateLabel: true |
|
1197 |
hideMenuOnActivated: false |
|
1198 |
indication: positionsColumn: |
|
1199 |
) |
|
1200 |
) |
|
1201 |
nil |
|
1202 |
nil |
|
1203 |
) |
|
1204 |
) |
|
1205 |
(MenuItem |
|
1206 |
label: '-' |
|
1207 |
) |
|
1208 |
(MenuItem |
|
1209 |
enabled: valueOfNotReading |
|
1210 |
label: 'Fonts' |
|
1211 |
translateLabel: true |
|
1212 |
submenuChannel: menuFont |
|
1213 |
) |
|
1214 |
) |
|
1215 |
nil |
|
1216 |
nil |
|
1217 |
) |
|
1218 |
) |
|
1219 |
(MenuItem |
|
1220 |
activeHelpKey: help |
|
1221 |
label: 'MENU_Help' |
|
1222 |
translateLabel: true |
|
1223 |
startGroup: conditionalRight |
|
1224 |
submenuChannel: menuHelp |
|
1225 |
) |
|
1226 |
) |
|
1227 |
nil |
|
1228 |
nil |
|
1545 | 1229 |
) |
1230 |
! |
|
1231 |
||
1232 |
menuTable |
|
1233 |
"This resource specification was automatically generated |
|
1234 |
by the MenuEditor of ST/X." |
|
1235 |
||
1236 |
"Do not manually edit this!! If it is corrupted, |
|
1237 |
the MenuEditor may not be able to read the specification." |
|
1238 |
||
1239 |
" |
|
1240 |
MenuEditor new openOnClass:NewChangesBrowser andSelector:#menuTable |
|
1241 |
(Menu new fromLiteralArrayEncoding:(NewChangesBrowser menuTable)) startUp |
|
1242 |
" |
|
1243 |
||
1244 |
<resource: #menu> |
|
1245 |
||
1246 |
^ |
|
6288 | 1247 |
|
1545 | 1248 |
#(#Menu |
6288 | 1249 |
|
2250 | 1250 |
#( |
1251 |
#(#MenuItem |
|
1252 |
#label: 'Apply' |
|
1253 |
#translateLabel: true |
|
1254 |
#value: #doApply |
|
1255 |
#activeHelpKey: #applyLine |
|
1256 |
#enabled: #valueOfHavingChangeSelection |
|
1257 |
) |
|
1258 |
#(#MenuItem |
|
1259 |
#label: 'Apply To End' |
|
1260 |
#translateLabel: true |
|
1261 |
#value: #doApplyToEnd |
|
1262 |
#activeHelpKey: #applyToEnd |
|
1263 |
#enabled: #valueOfHavingSelection |
|
1264 |
) |
|
1265 |
#(#MenuItem |
|
1266 |
#label: 'Apply All For Class' |
|
1267 |
#translateLabel: true |
|
1268 |
#value: #doApplyAllForClass |
|
1269 |
#activeHelpKey: #applyForClassToEnd |
|
1270 |
#enabled: #valueOfHavingChangeSelection |
|
1271 |
) |
|
1272 |
#(#MenuItem |
|
1273 |
#label: 'Apply For Class To End' |
|
1274 |
#translateLabel: true |
|
1275 |
#value: #doApplyForClassToEnd |
|
1276 |
#activeHelpKey: #applyForClassToEnd |
|
1277 |
#enabled: #valueOfHavingChangeSelection |
|
1278 |
) |
|
1279 |
#(#MenuItem |
|
1280 |
#label: '-' |
|
1281 |
) |
|
1282 |
#(#MenuItem |
|
1283 |
#label: 'Delete' |
|
1284 |
#translateLabel: true |
|
1285 |
#value: #doDelete |
|
1286 |
#activeHelpKey: #deleteLine |
|
1287 |
#enabled: #valueOfHavingSelection |
|
1288 |
) |
|
1289 |
#(#MenuItem |
|
1290 |
#label: 'Delete To End' |
|
1291 |
#translateLabel: true |
|
1292 |
#value: #doDeleteToEnd |
|
1293 |
#activeHelpKey: #deleteToEnd |
|
1294 |
#enabled: #valueOfHavingSelection |
|
1295 |
) |
|
1296 |
#(#MenuItem |
|
1297 |
#label: 'Delete All For Class' |
|
1298 |
#translateLabel: true |
|
1299 |
#value: #doDeleteAllForClass |
|
1300 |
#activeHelpKey: #applyForClassToEnd |
|
1301 |
#enabled: #valueOfHavingChangeSelection |
|
1302 |
) |
|
1303 |
#(#MenuItem |
|
1304 |
#label: 'Delete For Class To End' |
|
1305 |
#translateLabel: true |
|
1306 |
#value: #doDeleteForClassToEnd |
|
1307 |
#activeHelpKey: #deleteForClassToEnd |
|
1308 |
#enabled: #valueOfHavingChangeSelection |
|
1309 |
) |
|
1310 |
#(#MenuItem |
|
1311 |
#label: '-' |
|
1312 |
) |
|
1313 |
#(#MenuItem |
|
1314 |
#label: 'Browse Class' |
|
1315 |
#translateLabel: true |
|
1316 |
#value: #doBrowseClass |
|
1317 |
#activeHelpKey: #fileBrowseClass |
|
1318 |
#enabled: #valueOfHavingChangeSelection |
|
1319 |
) |
|
1320 |
#(#MenuItem |
|
1321 |
#label: '-' |
|
1322 |
) |
|
1323 |
#(#MenuItem |
|
1324 |
#label: 'Compress For Class' |
|
1325 |
#translateLabel: true |
|
1326 |
#value: #doCompressForClass |
|
1327 |
#activeHelpKey: #deleteCompressForClass |
|
1328 |
#enabled: #valueOfHavingChangeSelection |
|
1329 |
) |
|
1330 |
) nil |
|
1331 |
nil |
|
1545 | 1332 |
) |
1650 | 1333 |
|
1334 |
"Modified: / 19.5.1998 / 18:03:59 / cg" |
|
1545 | 1335 |
! |
1336 |
||
1337 |
menuToolbar |
|
1338 |
"This resource specification was automatically generated |
|
1339 |
by the MenuEditor of ST/X." |
|
1340 |
||
1341 |
"Do not manually edit this!! If it is corrupted, |
|
1342 |
the MenuEditor may not be able to read the specification." |
|
1343 |
||
1344 |
" |
|
1345 |
MenuEditor new openOnClass:NewChangesBrowser andSelector:#menuToolbar |
|
1346 |
(Menu new fromLiteralArrayEncoding:(NewChangesBrowser menuToolbar)) startUp |
|
1347 |
" |
|
1348 |
||
1349 |
<resource: #menu> |
|
1350 |
||
7957 | 1351 |
^ |
1352 |
#(Menu |
|
1353 |
( |
|
1354 |
(MenuItem |
|
1355 |
activeHelpKey: fileLoad |
|
1356 |
enabled: valueOfNotReading |
|
1357 |
label: 'Load' |
|
1358 |
itemValue: doLoad |
|
1359 |
translateLabel: true |
|
1360 |
isButton: true |
|
1361 |
labelImage: (ResourceRetriever XPToolbarIconLibrary loadFromFileIcon) |
|
1362 |
) |
|
1363 |
(MenuItem |
|
1364 |
activeHelpKey: fileSave |
|
1365 |
enabled: valueOfNotSaving |
|
1366 |
label: 'Save' |
|
1367 |
itemValue: doSave |
|
1368 |
translateLabel: true |
|
1369 |
isButton: true |
|
1370 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveToFileIcon) |
|
1371 |
) |
|
1372 |
(MenuItem |
|
1373 |
label: '-' |
|
1374 |
) |
|
1375 |
(MenuItem |
|
1376 |
activeHelpKey: applyLine |
|
1377 |
enabled: valueOfHavingChangeSelection |
|
1378 |
label: 'Apply' |
|
1379 |
itemValue: doApply |
|
1380 |
translateLabel: true |
|
1381 |
isButton: true |
|
1382 |
labelImage: (ResourceRetriever nil applyIcon) |
|
1383 |
) |
|
1384 |
(MenuItem |
|
1385 |
activeHelpKey: applyToEnd |
|
1386 |
enabled: valueOfHavingSelection |
|
1387 |
label: 'Apply To End' |
|
1388 |
itemValue: doApplyToEnd |
|
1389 |
translateLabel: true |
|
1390 |
isButton: true |
|
1391 |
labelImage: (ResourceRetriever nil applyToEndIcon) |
|
1392 |
) |
|
1393 |
(MenuItem |
|
1394 |
activeHelpKey: applyFromLastSnapshot |
|
1395 |
enabled: valueOfNotReading |
|
1396 |
label: 'Apply From Last Snapshot' |
|
1397 |
itemValue: doApplyFromLastSnapshot |
|
1398 |
translateLabel: true |
|
1399 |
isButton: true |
|
1400 |
labelImage: (ResourceRetriever nil applyFromLastSnapshotIcon) |
|
1401 |
) |
|
1402 |
(MenuItem |
|
1403 |
label: '-' |
|
1404 |
) |
|
1405 |
(MenuItem |
|
1406 |
activeHelpKey: deleteLine |
|
1407 |
enabled: valueOfHavingSelection |
|
1408 |
label: 'Delete' |
|
1409 |
itemValue: doDelete |
|
1410 |
translateLabel: true |
|
1411 |
isButton: true |
|
1412 |
labelImage: (ResourceRetriever nil deleteIcon) |
|
1413 |
) |
|
1414 |
(MenuItem |
|
1415 |
activeHelpKey: deleteToEnd |
|
1416 |
enabled: valueOfHavingSelection |
|
1417 |
label: 'Delete To End' |
|
1418 |
itemValue: doDeleteToEnd |
|
1419 |
translateLabel: true |
|
1420 |
isButton: true |
|
1421 |
labelImage: (ResourceRetriever nil deleteToEndIcon) |
|
1422 |
) |
|
1423 |
(MenuItem |
|
1424 |
activeHelpKey: deleteCompress |
|
1425 |
enabled: valueOfNotReading |
|
1426 |
label: 'Compress' |
|
1427 |
itemValue: doCompress |
|
1428 |
translateLabel: true |
|
1429 |
isButton: true |
|
1430 |
labelImage: (ResourceRetriever nil compressIcon) |
|
1431 |
) |
|
1432 |
(MenuItem |
|
1433 |
label: '-' |
|
1434 |
) |
|
1435 |
(MenuItem |
|
1436 |
activeHelpKey: testFindPreviousSnapshot |
|
1437 |
enabled: valueOfHavingSelection |
|
1438 |
label: 'Find Previous Snapshot' |
|
1439 |
itemValue: doFindSnapshot: |
|
1440 |
translateLabel: true |
|
1441 |
isButton: true |
|
1442 |
labelImage: (ResourceRetriever nil findPreviousSnapshotIcon) |
|
1443 |
argument: 'previous' |
|
1444 |
) |
|
1445 |
(MenuItem |
|
1446 |
activeHelpKey: testFindNextSnapshot |
|
1447 |
enabled: valueOfHavingSelection |
|
1448 |
label: 'Find Next Snapshot' |
|
1449 |
itemValue: doFindSnapshot: |
|
1450 |
translateLabel: true |
|
1451 |
isButton: true |
|
1452 |
labelImage: (ResourceRetriever nil findNextSnapshotIcon) |
|
1453 |
argument: 'next' |
|
1454 |
) |
|
1455 |
) |
|
1456 |
nil |
|
1457 |
nil |
|
1545 | 1458 |
) |
1459 |
! ! |
|
1460 |
||
1461 |
!NewChangesBrowser methodsFor:'accesssing - columns'! |
|
1462 |
||
1463 |
categoryColumn |
|
1546 | 1464 |
"returns whether the column for the category attribute of the changes is shown" |
1545 | 1465 |
|
1553 | 1466 |
^CategoryColumn ? (CategoryColumn := false) |
1545 | 1467 |
! |
1468 |
||
1469 |
categoryColumn: aBoolean |
|
1546 | 1470 |
"sets whether the column for the category attribute of the changes is shown" |
1545 | 1471 |
|
1653 | 1472 |
self changeColumn: #category add: (CategoryColumn := aBoolean) |
1473 |
||
1474 |
"Modified: / 19.5.1998 / 20:30:13 / cg" |
|
1545 | 1475 |
! |
1476 |
||
7957 | 1477 |
classAndSelectorColumn |
1478 |
"returns whether the column for the category attribute of the changes is shown" |
|
1479 |
||
1480 |
^ClassAndSelectorColumn ? (ClassAndSelectorColumn := false) |
|
1481 |
! |
|
1482 |
||
1483 |
classAndSelectorColumn: aBoolean |
|
1484 |
"sets whether the column for the category attribute of the changes is shown" |
|
1485 |
||
1486 |
self changeColumn: #classAndSelector add: (ClassAndSelectorColumn := aBoolean) |
|
1487 |
||
1488 |
"Modified: / 19.5.1998 / 20:30:13 / cg" |
|
1489 |
! |
|
1490 |
||
1491 |
classNameColumn |
|
1492 |
"returns whether the column for the category attribute of the changes is shown" |
|
1493 |
||
1494 |
^ClassNameColumn ? (ClassNameColumn := false) |
|
1495 |
! |
|
1496 |
||
1497 |
classNameColumn: aBoolean |
|
1498 |
"sets whether the column for the className attribute of the changes is shown" |
|
1499 |
||
1500 |
self changeColumn: #className add: (ClassNameColumn := aBoolean) |
|
1501 |
||
1502 |
"Modified: / 19.5.1998 / 20:30:13 / cg" |
|
1503 |
! |
|
1504 |
||
1545 | 1505 |
deltaInfoColumn |
1546 | 1506 |
"returns whether the column for the delta info attribute of the changes is shown" |
1545 | 1507 |
|
1508 |
^DeltaInfoColumn ? (DeltaInfoColumn := false) |
|
1509 |
! |
|
1510 |
||
1511 |
deltaInfoColumn: aBoolean |
|
1546 | 1512 |
"sets whether the column for the delta info attribute of the changes is shown; and updates" |
1513 |
||
1653 | 1514 |
self changeColumn: #deltaInfo add: (DeltaInfoColumn := aBoolean). |
1546 | 1515 |
(self window notNil and: [DeltaInfoColumn]) ifTrue: [self doReload] |
1653 | 1516 |
|
1517 |
"Modified: / 19.5.1998 / 20:30:21 / cg" |
|
1545 | 1518 |
! |
1519 |
||
1568 | 1520 |
positionsColumn |
1546 | 1521 |
"returns whether the column for the position attribute of the changes is shown" |
1545 | 1522 |
|
1568 | 1523 |
^PositionsColumn ? (PositionsColumn := false) |
1545 | 1524 |
! |
1525 |
||
1568 | 1526 |
positionsColumn: aBoolean |
1527 |
"sets whether the column for the positions attribute of the changes is shown" |
|
1528 |
||
1653 | 1529 |
self changeColumn: #position add: (PositionsColumn := aBoolean) |
1530 |
||
1531 |
"Modified: / 19.5.1998 / 20:30:37 / cg" |
|
1545 | 1532 |
! |
1533 |
||
7957 | 1534 |
selectorColumn |
1535 |
"returns whether the column for the category attribute of the changes is shown" |
|
1536 |
||
1537 |
^SelectorColumn ? (SelectorColumn := false) |
|
1538 |
! |
|
1539 |
||
1540 |
selectorColumn: aBoolean |
|
1541 |
"sets whether the column for the category attribute of the changes is shown" |
|
1542 |
||
1543 |
self changeColumn: #selector add: (SelectorColumn := aBoolean) |
|
1544 |
||
1545 |
"Modified: / 19.5.1998 / 20:30:13 / cg" |
|
1546 |
! |
|
1547 |
||
1545 | 1548 |
timeStampColumn |
1546 | 1549 |
"returns whether the column for the time stamp attribute of the changes is shown" |
1545 | 1550 |
|
1551 |
^TimeStampColumn ? (TimeStampColumn := false) |
|
1552 |
! |
|
1553 |
||
1554 |
timeStampColumn: aBoolean |
|
1546 | 1555 |
"sets whether the column for the time stamp attribute of the changes is shown" |
1545 | 1556 |
|
1653 | 1557 |
self changeColumn: #timeStamp add: (TimeStampColumn := aBoolean) |
1558 |
||
1559 |
"Modified: / 19.5.1998 / 20:30:42 / cg" |
|
1545 | 1560 |
! |
1561 |
||
1562 |
typeColumn |
|
1546 | 1563 |
"returns whether the column for the type attribute of the changes is shown" |
1545 | 1564 |
|
1565 |
^TypeColumn ? (TypeColumn := false) |
|
1566 |
! |
|
1567 |
||
1568 |
typeColumn: aBoolean |
|
1546 | 1569 |
"sets whether the column for the type attribute of the changes is shown" |
1545 | 1570 |
|
1653 | 1571 |
self changeColumn: #type add: (TypeColumn := aBoolean) |
1572 |
||
1573 |
"Modified: / 19.5.1998 / 20:30:46 / cg" |
|
1545 | 1574 |
! ! |
1575 |
||
1576 |
!NewChangesBrowser methodsFor:'accesssing - views'! |
|
1577 |
||
1568 | 1578 |
changeTextEditor |
1579 |
"returns the view of the changeTextEditor" |
|
1580 |
||
1581 |
^builder componentAt: #changeTextEditor |
|
1582 |
||
1583 |
||
1584 |
||
1585 |
! |
|
1586 |
||
1545 | 1587 |
filterField |
1546 | 1588 |
"returns the view of the filterField" |
1545 | 1589 |
|
1590 |
^builder componentAt: #filterField |
|
1591 |
||
1592 |
||
1593 |
||
1594 |
! |
|
1595 |
||
1596 |
filterLabel |
|
1546 | 1597 |
"returns the view of the filterLabel" |
1545 | 1598 |
|
1599 |
^builder componentAt: #filterLabel |
|
1600 |
||
1601 |
||
1602 |
||
1603 |
! |
|
1604 |
||
1605 |
readProgressIndicator |
|
1546 | 1606 |
"returns the view of the readProgressIndicator" |
1545 | 1607 |
|
1608 |
^builder componentAt: #readProgressIndicator |
|
1609 |
||
1610 |
||
1611 |
||
1612 |
! ! |
|
1613 |
||
1614 |
!NewChangesBrowser methodsFor:'aspects'! |
|
1615 |
||
1616 |
listOfChangeColumns |
|
1546 | 1617 |
"initializes (during the startup) and returns the value holder for the columns" |
1545 | 1618 |
|
1619 |
|holder| |
|
1620 |
(holder := builder bindingAt:#listOfChangeColumns) isNil ifTrue:[ |
|
7957 | 1621 |
builder aspectAt:#listOfChangeColumns put:(holder := List new). |
1622 |
self changeColumn: nil add: true. |
|
1623 |
self changeColumn: #change add: true. |
|
1624 |
||
1625 |
self classNameColumn: self classNameColumn. |
|
1626 |
self classAndSelectorColumn: self classAndSelectorColumn. |
|
1627 |
self selectorColumn: self selectorColumn. |
|
1628 |
self categoryColumn: self categoryColumn. |
|
1629 |
self timeStampColumn: self timeStampColumn. |
|
1630 |
self typeColumn: self typeColumn. |
|
2740
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
1631 |
"/ self deltaInfoColumn: self deltaInfoColumn. |
7957 | 1632 |
self positionsColumn: self positionsColumn. |
1545 | 1633 |
]. |
1634 |
^ holder |
|
1635 |
||
1653 | 1636 |
"Modified: / 19.5.1998 / 20:30:31 / cg" |
1545 | 1637 |
! |
1638 |
||
1639 |
listOfChanges |
|
1546 | 1640 |
"returns the value holder for the changes" |
1545 | 1641 |
|
6288 | 1642 |
|holder| |
1545 | 1643 |
(holder := builder bindingAt:#listOfChanges) isNil ifTrue:[ |
2250 | 1644 |
builder aspectAt:#listOfChanges put:(holder := List new) |
6288 | 1645 |
]. |
1545 | 1646 |
^ holder |
1647 |
! |
|
1648 |
||
1649 |
selectionOfChange |
|
1546 | 1650 |
"returns the value holder for the selected change" |
1545 | 1651 |
|
1652 |
|holder| |
|
1653 |
(holder := builder bindingAt:#selectionOfChange) isNil ifTrue:[ |
|
2250 | 1654 |
builder aspectAt:#selectionOfChange put:(holder := ValueHolder new). |
6288 | 1655 |
]. |
1545 | 1656 |
^ holder |
1657 |
! |
|
1658 |
||
1659 |
valueOfChangeText |
|
1546 | 1660 |
"returns the value holder for the source code of the selected change" |
1545 | 1661 |
|
1662 |
|holder| |
|
1663 |
(holder := builder bindingAt:#valueOfChangeText) isNil ifTrue:[ |
|
2250 | 1664 |
builder aspectAt:#valueOfChangeText put:(holder := ValueHolder new). |
1545 | 1665 |
]. |
1666 |
^ holder |
|
1667 |
! |
|
1668 |
||
1669 |
valueOfFilter |
|
1546 | 1670 |
"returns the value holder for the string of the filter" |
1545 | 1671 |
|
1672 |
|holder| |
|
1673 |
(holder := builder bindingAt:#valueOfFilter) isNil ifTrue:[ |
|
2250 | 1674 |
builder aspectAt:#valueOfFilter put:(holder := ValueHolder new). |
1675 |
holder addDependent: self |
|
1545 | 1676 |
]. |
1677 |
^ holder |
|
1678 |
! |
|
1679 |
||
1680 |
valueOfHavingChangeSelection |
|
1546 | 1681 |
"returns whether the selected change can be applied as value holder" |
1545 | 1682 |
|
1683 |
|holder| |
|
1684 |
(holder := builder bindingAt:#valueOfHavingChangeSelection) isNil ifTrue:[ |
|
2250 | 1685 |
builder aspectAt:#valueOfHavingChangeSelection put:(holder := false asValue). |
1545 | 1686 |
]. |
1687 |
^ holder |
|
1688 |
! |
|
1689 |
||
1690 |
valueOfHavingSelection |
|
1546 | 1691 |
"returns whether a change is selected as value holder" |
1545 | 1692 |
|
1693 |
|holder| |
|
1694 |
(holder := builder bindingAt:#valueOfHavingSelection) isNil ifTrue:[ |
|
2250 | 1695 |
builder aspectAt:#valueOfHavingSelection put:(holder := false asValue). |
1545 | 1696 |
]. |
1697 |
^ holder |
|
1698 |
! |
|
1699 |
||
1700 |
valueOfNotReading |
|
1546 | 1701 |
"returns whether it is not reading or compressing as value holder" |
1545 | 1702 |
|
1703 |
|holder| |
|
1704 |
(holder := builder bindingAt:#valueOfReading) isNil ifTrue:[ |
|
2250 | 1705 |
builder aspectAt:#valueOfReading put:(holder := true asValue). |
1545 | 1706 |
]. |
1707 |
^ holder |
|
1708 |
! |
|
1709 |
||
1568 | 1710 |
valueOfNotSaving |
1711 |
"returns whether it is not saving as value holder" |
|
1712 |
||
1713 |
|holder| |
|
1714 |
(holder := builder bindingAt:#valueOfNotSaving) isNil ifTrue:[ |
|
2250 | 1715 |
builder aspectAt:#valueOfNotSaving put:(holder := true asValue). |
1568 | 1716 |
]. |
1717 |
^ holder |
|
1718 |
! |
|
1719 |
||
1545 | 1720 |
valueOfReadProgress |
1546 | 1721 |
"returns the stage of reading or compressing as value holder" |
1545 | 1722 |
|
1723 |
|holder| |
|
1724 |
(holder := builder bindingAt:#valueOfReadProgress) isNil ifTrue:[ |
|
2250 | 1725 |
builder aspectAt:#valueOfReadProgress put:(holder := ValueHolder with: 0). |
1545 | 1726 |
]. |
1727 |
^ holder |
|
1728 |
! ! |
|
1729 |
||
1730 |
!NewChangesBrowser methodsFor:'callbacks'! |
|
1731 |
||
1732 |
changeSelected: lineNr |
|
1546 | 1733 |
"fetches the source code of the change and shows it in the codeView" |
1545 | 1734 |
|
1735 |
|aStream sawExcla chunk selectedRow changeNr| |
|
1736 |
||
1737 |
lineNr == 0 ifTrue: [^nil]. |
|
1738 |
changeNr := changes indexOf: (self listOfChanges at: lineNr). |
|
1739 |
aStream := self streamForChange: (changes at: changeNr). |
|
1740 |
aStream isNil ifTrue:[^ self]. |
|
1741 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
|
1742 |
chunk := aStream nextChunk. |
|
1743 |
sawExcla ifTrue:[ |
|
2250 | 1744 |
chunk := aStream nextChunk |
1545 | 1745 |
]. |
6288 | 1746 |
aStream close. |
1545 | 1747 |
self valueOfChangeText value:chunk. |
1748 |
||
1546 | 1749 |
self updateChannels |
1750 |
! ! |
|
1751 |
||
1752 |
!NewChangesBrowser methodsFor:'change & update'! |
|
1753 |
||
1754 |
update:something with:aParameter from:changedObject |
|
1755 |
"evaluates the filterCompletionBlock after returning the filter string" |
|
1756 |
||
1757 |
super update:something with:aParameter from:changedObject. |
|
1758 |
||
7957 | 1759 |
changedObject == self valueOfFilter ifTrue:[ |
1760 |
filterCompletionBlock value: changedObject value. |
|
1761 |
self listOfChanges size > 0 ifTrue: [self addToHistory: changedObject value -> #doFilter:] |
|
1568 | 1762 |
] |
1546 | 1763 |
! |
1764 |
||
1765 |
updateChannels |
|
1766 |
"updates my channels" |
|
1767 |
||
6288 | 1768 |
|change| |
1546 | 1769 |
(change := self selectionOfChange value) notNil |
1545 | 1770 |
ifTrue: |
1771 |
[ |
|
2250 | 1772 |
self valueOfHavingSelection value: true. |
6288 | 1773 |
self valueOfHavingChangeSelection value: |
2250 | 1774 |
((change type = 'method') or: [(change type = 'class')]) |
1546 | 1775 |
] |
1776 |
ifFalse: |
|
1777 |
[ |
|
2250 | 1778 |
self valueOfHavingSelection value: false. |
1779 |
self valueOfHavingChangeSelection value: false |
|
1545 | 1780 |
] |
1546 | 1781 |
|
1782 |
||
1783 |
||
1784 |
||
1785 |
||
1786 |
||
1545 | 1787 |
! ! |
1788 |
||
1789 |
!NewChangesBrowser methodsFor:'compiler interface'! |
|
1790 |
||
1791 |
wantChangeLog |
|
1792 |
"sent by the compiler to ask if a changeLog entry should |
|
1793 |
be written. Return false here." |
|
1794 |
||
1795 |
^ false |
|
1796 |
||
1797 |
||
1798 |
! ! |
|
1799 |
||
1568 | 1800 |
!NewChangesBrowser methodsFor:'error handling'! |
1801 |
||
1802 |
correctableError:aString position:relPos to:relEndPos from:aCompiler |
|
1803 |
"compiler notifys us of an error - this should really not happen since |
|
1804 |
changes ought to be correct (did someone edit the changes file ??). |
|
1805 |
Show the bad change in the codeView and let codeView hilight the error; |
|
1806 |
no corrections allowed here therefore return false" |
|
1807 |
||
1808 |
self error:aString position:relPos to:relEndPos from:aCompiler. |
|
1809 |
^ false |
|
1810 |
! |
|
1811 |
||
1812 |
error:aString position:relPos to:relEndPos from:aCompiler |
|
1813 |
"compiler notifys us of an error - this should really not happen since |
|
1814 |
changes ought to be correct (did someone edit the changes file ??). |
|
1815 |
Show the bad change in the codeView and let codeView hilight the error" |
|
1816 |
||
1817 |
|action| |
|
1818 |
||
1819 |
(skipSignal notNil) ifTrue:[ |
|
1820 |
||
7957 | 1821 |
self changeTextEditor highlightingErrorPosition:relPos to:relEndPos do:[ |
1822 |
|box| |
|
1823 |
||
1824 |
" |
|
1825 |
start dialog - make certain cleanup is done |
|
1826 |
" |
|
1827 |
action := OptionBox |
|
1828 |
request:aString |
|
1829 |
label:'Error' |
|
1830 |
image:(WarningBox iconBitmap) |
|
1831 |
buttonLabels:#('cancel' 'skip' 'continue') |
|
1832 |
values:#(#abort #skip #continue) |
|
1833 |
default:#continue. |
|
1834 |
]. |
|
1835 |
||
1836 |
action == #abort ifTrue:[ |
|
1837 |
Object abortSignal raise. |
|
1838 |
^ false |
|
1839 |
]. |
|
1840 |
action == #skip ifTrue:[ |
|
1841 |
skipSignal raise. |
|
1842 |
^ false |
|
1843 |
]. |
|
1844 |
^ false |
|
1568 | 1845 |
]. |
1846 |
^self changeTextEditor error:aString position:relPos to:relEndPos from:aCompiler |
|
1847 |
! |
|
1848 |
||
1849 |
warning:aString position:relPos to:relEndPos from:aCompiler |
|
1850 |
"compiler notifys us of a warning - ignore it" |
|
1851 |
||
1852 |
^ self |
|
1853 |
||
1854 |
! ! |
|
1855 |
||
1545 | 1856 |
!NewChangesBrowser methodsFor:'help'! |
1857 |
||
1858 |
defaultInfoLabel |
|
1546 | 1859 |
"returns the default label for the info bar" |
1545 | 1860 |
|
1861 |
changeFileName asFilename exists ifTrue: [^changeFileName]. |
|
1862 |
^'No change file name defined.' |
|
1863 |
||
1864 |
||
1865 |
||
7957 | 1866 |
! |
1867 |
||
1868 |
openDocumentation |
|
1869 |
self openHTMLDocument:'tools/cbrowser/TOP.html'. |
|
1545 | 1870 |
! ! |
1871 |
||
1872 |
!NewChangesBrowser methodsFor:'initialization'! |
|
1873 |
||
1874 |
initialize |
|
1546 | 1875 |
"initializes the instance variables" |
1545 | 1876 |
|
1877 |
super initialize. |
|
1878 |
||
1546 | 1879 |
changes := List new. |
6288 | 1880 |
self changeFileName: ObjectMemory nameForChanges. |
1881 |
AutoUpdate := AutoUpdate ? false. |
|
1546 | 1882 |
PrivateAsSeparate := PrivateAsSeparate ? false. |
1545 | 1883 |
|
1884 |
ObjectMemory addDependent:self. |
|
1885 |
! ! |
|
1886 |
||
1887 |
!NewChangesBrowser methodsFor:'menu modes'! |
|
1888 |
||
1889 |
autoUpdateMode |
|
1890 |
"returns whether autoUpdate is on/off" |
|
1891 |
||
1892 |
^AutoUpdate |
|
1893 |
||
1894 |
! |
|
1895 |
||
1896 |
autoUpdateMode: aMode |
|
1897 |
"sets the autoUpdate to aMode" |
|
1898 |
||
1899 |
AutoUpdate := aMode |
|
1900 |
||
1546 | 1901 |
! |
1902 |
||
1903 |
privateAsSeparate |
|
1904 |
"returns whether private classes are handled as separate changes" |
|
1905 |
||
1906 |
^PrivateAsSeparate |
|
1907 |
||
1908 |
! |
|
1909 |
||
1910 |
privateAsSeparate: aMode |
|
1911 |
"sets the PrivateAsSeparate to aMode" |
|
1912 |
||
1913 |
PrivateAsSeparate := aMode |
|
1914 |
||
1545 | 1915 |
! ! |
1916 |
||
1917 |
!NewChangesBrowser methodsFor:'private'! |
|
1918 |
||
1546 | 1919 |
applyChange:aChange |
1920 |
"applies aChange" |
|
1545 | 1921 |
|
1922 |
|aStream nm applyAction changeNr| |
|
1923 |
||
1546 | 1924 |
aStream := self streamForChange:aChange. |
1545 | 1925 |
aStream isNil ifTrue:[^ self]. |
1926 |
||
1546 | 1927 |
nm := self classNameOfChange:aChange. |
1545 | 1928 |
nm notNil ifTrue:[ |
2250 | 1929 |
|cls| |
1930 |
||
1931 |
cls := Smalltalk at:(nm asSymbol) ifAbsent:[]. |
|
1932 |
cls notNil ifTrue:[ |
|
1933 |
cls isLoaded ifFalse:[ |
|
1934 |
cls autoload |
|
1935 |
] |
|
1936 |
] |
|
1545 | 1937 |
]. |
1938 |
||
1939 |
applyAction := [ |
|
2250 | 1940 |
|sig| |
1941 |
||
1942 |
(skipSignal notNil) ifTrue:[ |
|
1943 |
sig := skipSignal |
|
1944 |
] ifFalse:[ |
|
1945 |
sig := Object abortSignal |
|
1946 |
]. |
|
1947 |
sig catch:[ |
|
1948 |
|reader doItChunk methodsForChunk| |
|
1949 |
||
1950 |
"/ a followup methodsFor: chunk... |
|
1951 |
aChange followUp ifTrue:[ |
|
1952 |
methodsForChunk := aChange chunk. |
|
1953 |
] ifFalse:[ |
|
1954 |
doItChunk := aStream nextChunk. "/ an empty chunk sometimes... |
|
1955 |
doItChunk notEmpty ifTrue:[ |
|
1956 |
Compiler evaluate:doItChunk notifying:self. |
|
1957 |
] ifFalse:[ |
|
1958 |
methodsForChunk := aStream nextChunk. "/ the real one |
|
1959 |
] |
|
1960 |
]. |
|
1961 |
methodsForChunk notNil ifTrue:[ |
|
1962 |
Class methodRedefinitionSignal handle:[:ex | |
|
1963 |
ex proceedWith:#keep |
|
1964 |
] do:[ |
|
1965 |
reader := Compiler evaluate:methodsForChunk notifying:self. |
|
1966 |
reader fileInFrom:aStream notifying:self passChunk:false single:true. |
|
1967 |
] |
|
1968 |
] |
|
1969 |
]. |
|
1545 | 1970 |
]. |
1971 |
||
1972 |
"/ |
|
1973 |
"/ if I am showing the changes file, dont update it |
|
1974 |
"/ |
|
1877
f0dbf0801e4d
care for pathName being the same, where the change-fileName is not
Claus Gittinger <cg@exept.de>
parents:
1798
diff
changeset
|
1975 |
changeFileName asFilename pathName = ObjectMemory nameForChanges asFilename pathName ifTrue:[ |
2250 | 1976 |
Class withoutUpdatingChangesDo:applyAction |
1545 | 1977 |
] ifFalse:[ |
2250 | 1978 |
applyAction value |
1545 | 1979 |
]. |
1980 |
aStream close |
|
1877
f0dbf0801e4d
care for pathName being the same, where the change-fileName is not
Claus Gittinger <cg@exept.de>
parents:
1798
diff
changeset
|
1981 |
|
f0dbf0801e4d
care for pathName being the same, where the change-fileName is not
Claus Gittinger <cg@exept.de>
parents:
1798
diff
changeset
|
1982 |
"Modified: / 8.9.1998 / 12:48:01 / cg" |
1545 | 1983 |
! |
1984 |
||
1546 | 1985 |
autoSelectChange:aChange |
1986 |
"selects aChange" |
|
1545 | 1987 |
|
6288 | 1988 |
self class autoSelectNext ifTrue:[ |
2250 | 1989 |
((self listOfChanges indexOf: aChange) <= self listOfChanges size) ifTrue:[ |
6288 | 1990 |
self selectionOfChange value: aChange. |
2250 | 1991 |
self changeSelected:(self listOfChanges indexOf: aChange). |
1992 |
self updateChannels. |
|
1993 |
^ self |
|
1994 |
] |
|
6288 | 1995 |
]. |
1546 | 1996 |
self updateChannels. |
1997 |
self unselectChange |
|
1569 | 1998 |
|
1545 | 1999 |
! |
2000 |
||
2001 |
autoSelectLast |
|
1546 | 2002 |
"selects the last change" |
2003 |
||
2004 |
self autoSelectChange: (self listOfChanges at: self listOfChanges size ifAbsent: nil). |
|
2005 |
self updateChannels. |
|
2006 |
||
1545 | 2007 |
! |
2008 |
||
1546 | 2009 |
autoSelectOrEnd:aChange |
2010 |
"selects aChange or the last" |
|
1545 | 2011 |
|
2012 |
|last| |
|
2013 |
||
2014 |
last := self listOfChanges size. |
|
6288 | 2015 |
aChange notNil ifTrue:[ |
2250 | 2016 |
self autoSelectChange:aChange |
1545 | 2017 |
] ifFalse:[ |
2250 | 2018 |
self selectionOfChange value: (self listOfChanges at: last ifAbsent: nil). |
2019 |
self changeSelected: last |
|
1546 | 2020 |
]. |
2021 |
self updateChannels |
|
1545 | 2022 |
! |
2023 |
||
1653 | 2024 |
changeColumn: aColumnId add: addOrRemove |
1546 | 2025 |
"adds or removes a attribute column to the table" |
1545 | 2026 |
|
1569 | 2027 |
|newListOfChangeColumns| |
2028 |
||
2029 |
newListOfChangeColumns := self listOfChangeColumns asOrderedCollection. |
|
7957 | 2030 |
addOrRemove ifTrue:[ |
2031 |
newListOfChangeColumns add: |
|
2032 |
((self class tableColumnsForChangeAttributes |
|
2033 |
collect: [:i| i decodeAsLiteralArray]) |
|
2034 |
detect: [:column| column id = aColumnId]) |
|
2035 |
] ifFalse:[ |
|
2036 |
newListOfChangeColumns remove: |
|
2037 |
(self listOfChangeColumns detect: [:column| column id = aColumnId] ifNone: nil) ifAbsent: nil |
|
1553 | 2038 |
]. |
1569 | 2039 |
self listOfChangeColumns contents: newListOfChangeColumns. |
1553 | 2040 |
self autoSelectLast |
1545 | 2041 |
|
1653 | 2042 |
"Modified: / 19.5.1998 / 20:32:53 / cg" |
1545 | 2043 |
! |
2044 |
||
1546 | 2045 |
changeFileName:aFileName |
2046 |
"sets the name of the file with the changes" |
|
2047 |
||
1938 | 2048 |
changeFileName := aFileName asFilename name. |
2049 |
"/ (Filename currentDirectory asAbsoluteFilename construct: aFileName) name. |
|
2050 |
||
2051 |
"Modified: / 17.10.1998 / 14:43:01 / cg" |
|
1546 | 2052 |
! |
2053 |
||
1545 | 2054 |
checkClassIsLoaded:aClass |
1546 | 2055 |
"returns true if aClass is loaded" |
1545 | 2056 |
|
2057 |
|cls| |
|
2058 |
aClass isMeta ifTrue:[ |
|
2250 | 2059 |
cls := aClass soleInstance |
1545 | 2060 |
] ifFalse:[ |
2250 | 2061 |
cls := aClass |
1545 | 2062 |
]. |
2063 |
cls isLoaded ifFalse:[ |
|
2250 | 2064 |
(self confirm:(cls name , ' is an autoloaded class.\I can only compare the methods texts if its loaded first.\\Load the class first ?') withCRs) |
2065 |
ifTrue:[ |
|
2066 |
cls autoload |
|
2067 |
] |
|
1545 | 2068 |
]. |
2069 |
^ cls isLoaded |
|
2070 |
! |
|
2071 |
||
2072 |
checkIfFileHasChanged |
|
1546 | 2073 |
"checks if changes file has changed" |
2074 |
||
2075 |
|f info| |
|
1545 | 2076 |
|
6288 | 2077 |
Processor removeTimedBlock:autoUpdateBlock. |
1545 | 2078 |
f := changeFileName asFilename. |
2079 |
(info := f info) isNil ifTrue:[ |
|
6288 | 2080 |
self newLabel:'unaccessable' |
1545 | 2081 |
] ifFalse:[ |
6288 | 2082 |
(info modificationTime) > changeFileTimestamp ifTrue:[ |
2083 |
self newLabel:'outdated'. |
|
2084 |
AutoUpdate ifTrue:[ |
|
2085 |
self doReload |
|
2086 |
] |
|
2087 |
] ifFalse:[ |
|
2088 |
self newLabel:'' |
|
2089 |
] |
|
1545 | 2090 |
]. |
2091 |
Processor addTimedBlock:autoUpdateBlock afterSeconds:5. |
|
2092 |
! |
|
2093 |
||
1546 | 2094 |
classNameOfChange:aChange |
6288 | 2095 |
"returns the classname of aChange |
1545 | 2096 |
(for classChanges (i.e. xxx class), the non-metaClassName (i.e. xxx) is returned)" |
2097 |
||
2098 |
|name| |
|
2099 |
||
1546 | 2100 |
name := self fullClassNameOfChange:aChange. |
1545 | 2101 |
name isNil ifTrue:[^ nil]. |
2102 |
(name endsWith:' class') ifTrue:[ |
|
2250 | 2103 |
^ name copyWithoutLast:6 |
1545 | 2104 |
]. |
2105 |
^ name |
|
2106 |
! |
|
2107 |
||
1546 | 2108 |
compareChange:aChange |
2109 |
"compares aChange with the current version" |
|
1545 | 2110 |
|
2111 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource |
|
2112 |
parser sel oldMethod outcome showDiff d t1 t2 selector isLoaded |
|
2113 |
method beep| |
|
2114 |
||
1546 | 2115 |
aStream := self streamForChange:aChange. |
1545 | 2116 |
aStream isNil ifTrue:[^ self]. |
2117 |
||
2118 |
showDiff := false. |
|
2119 |
||
1546 | 2120 |
aChange followUp ifFalse:[ |
2250 | 2121 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
2122 |
chunk := aStream nextChunk. |
|
1545 | 2123 |
] ifTrue:[ |
2250 | 2124 |
chunk := aChange chunk. |
2125 |
sawExcla := true. |
|
1545 | 2126 |
]. |
2127 |
||
2128 |
beep := false. |
|
2129 |
sawExcla ifFalse:[ |
|
2250 | 2130 |
outcome := 'Cannot compare this change\(i.e. this is not a method change)!!'. |
2131 |
||
2132 |
parseTree := Parser parseExpression:chunk. |
|
2133 |
(parseTree notNil and:[parseTree isMessage]) ifTrue:[ |
|
2134 |
((selector := parseTree selector) == #removeSelector:) ifTrue:[ |
|
2135 |
thisClass := (parseTree receiver evaluate). |
|
2136 |
thisClass isBehavior ifTrue:[ |
|
2137 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
2138 |
selector := (parseTree arg1 evaluate). |
|
2139 |
(thisClass includesSelector:selector) ifTrue:[ |
|
2140 |
outcome := 'Change removes the #' , selector , ' method from ' , thisClass name. |
|
2141 |
] ifFalse:[ |
|
2142 |
outcome := 'Change has no effect\(there is no method for #' , selector , ' in ' , thisClass name , ')' |
|
2143 |
] |
|
2144 |
] ifFalse:[ |
|
2145 |
beep := true. |
|
2146 |
outcome := 'Cannot compare this change (compare requires class to be loaded)!!'. |
|
2147 |
] |
|
2148 |
] |
|
2149 |
]. |
|
2150 |
selector == #category: ifTrue:[ |
|
2151 |
parseTree receiver isMessage ifTrue:[ |
|
2152 |
parseTree receiver selector == #compiledMethodAt: ifTrue:[ |
|
2153 |
(method := parseTree receiver evaluate) isMethod ifTrue:[ |
|
2154 |
method category = parseTree arg1 evaluate ifTrue:[ |
|
2155 |
outcome := 'Change has no effect\(same category)'. |
|
2156 |
] ifFalse:[ |
|
2157 |
outcome := 'Category is different (''' , method category , ''' vs. ''' , parseTree arg1 evaluate , ''')' |
|
2158 |
] |
|
2159 |
] ifFalse:[ |
|
2160 |
beep := true. |
|
2161 |
outcome := 'There is no such method!!' |
|
2162 |
] |
|
2163 |
] |
|
2164 |
] |
|
2165 |
] |
|
2166 |
] |
|
1545 | 2167 |
] ifTrue:[ |
2250 | 2168 |
parseTree := Parser parseExpression:chunk. |
6288 | 2169 |
(parseTree notNil |
2250 | 2170 |
and:[parseTree ~~ #Error |
2171 |
and:[parseTree isMessage]]) ifTrue:[ |
|
2172 |
(parseTree selector == #methodsFor:) ifTrue:[ |
|
2173 |
thisClass := (parseTree receiver evaluate). |
|
2174 |
thisClass isBehavior ifTrue:[ |
|
2175 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
|
2176 |
outcome := 'Cannot compare this change\(compare requires class to be loaded)!!'. |
|
2177 |
]. |
|
2178 |
||
2179 |
cat := parseTree arg1 evaluate. |
|
2180 |
newSource := aStream nextChunk. |
|
2181 |
||
2182 |
parser := Parser parseMethod:newSource in:thisClass. |
|
2183 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
2184 |
sel := parser selector. |
|
2185 |
oldMethod := thisClass compiledMethodAt:sel. |
|
2186 |
oldMethod notNil ifTrue:[ |
|
2187 |
(oldMethod category = cat) ifFalse:[ |
|
2188 |
Transcript showCR:'Category changed.'. |
|
2189 |
]. |
|
2190 |
oldSource := oldMethod source. |
|
2191 |
(oldSource = newSource) ifTrue:[ |
|
2192 |
outcome := 'Same source.' |
|
2193 |
] ifFalse:[ |
|
2194 |
oldSource isNil ifTrue:[ |
|
2195 |
beep := true. |
|
2196 |
outcome := 'No source for compare.' |
|
2197 |
] ifFalse:[ |
|
2198 |
"/ |
|
2199 |
"/ compare for tabulator <-> space changes |
|
2200 |
"/ before showing diff... |
|
2201 |
"/ |
|
2202 |
t1 := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
2203 |
t2 := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
2204 |
t1 = t2 ifTrue:[ |
|
2205 |
outcome := 'Same source.' |
|
2206 |
] ifFalse:[ |
|
2207 |
outcome := 'Source changed!!'. |
|
2208 |
showDiff := true. |
|
2209 |
||
2210 |
"/ |
|
2211 |
"/ check if only historyLine diffs |
|
2212 |
"/ |
|
6288 | 2213 |
(HistoryManager notNil |
2250 | 2214 |
and:[HistoryManager isActive]) ifTrue:[ |
2215 |
(HistoryManager withoutHistoryLines:newSource) |
|
2216 |
= |
|
2217 |
(HistoryManager withoutHistoryLines:oldSource) |
|
2218 |
ifTrue:[ |
|
2219 |
outcome := 'Same source (history only).'. |
|
2220 |
showDiff := false. |
|
2221 |
] |
|
2222 |
]. |
|
2223 |
] |
|
2224 |
] |
|
2225 |
] |
|
2226 |
] ifFalse:[ |
|
2227 |
isLoaded ifTrue:[ |
|
2228 |
beep := true. |
|
2229 |
outcome := 'Method does not exist!!' |
|
2230 |
] |
|
2231 |
] |
|
2232 |
] ifFalse:[ |
|
2233 |
outcome := 'Change unparsable!!' |
|
2234 |
]. |
|
2235 |
(showDiff and:[oldSource notNil and:[newSource notNil]]) ifTrue:[ |
|
6288 | 2236 |
d := DiffTextView |
2250 | 2237 |
openOn:oldSource label:'Current version (in image)' |
2238 |
and:newSource label:'Change version'. |
|
2239 |
d label:'method differences'. |
|
2240 |
] |
|
2241 |
] ifFalse:[ |
|
2242 |
beep := true. |
|
2243 |
outcome := 'Class does not exist!!' |
|
2244 |
] |
|
2245 |
] ifFalse:[ |
|
2246 |
beep := true. |
|
2247 |
outcome := 'Not comparable!!' |
|
2248 |
] |
|
2249 |
] ifFalse:[ |
|
2250 |
beep := true. |
|
2251 |
outcome := 'Not comparable!!' |
|
2252 |
] |
|
1545 | 2253 |
]. |
2254 |
aStream close. |
|
2255 |
showDiff ifFalse:[ |
|
2250 | 2256 |
beep ifTrue:[ |
2257 |
self warn:outcome withCRs. |
|
2258 |
] ifFalse:[ |
|
2259 |
self information:outcome withCRs. |
|
2260 |
] |
|
1545 | 2261 |
] |
2262 |
! |
|
2263 |
||
2264 |
compressForClass:aClassNameOrNil |
|
6288 | 2265 |
"compresses the list of changes; |
1545 | 2266 |
this replaces multiple method-changes by the last (i.e. the most recent) change. |
2267 |
If the class argument is nil, compress for all classes. |
|
2268 |
otherwise, only changes for that class are compressed." |
|
2269 |
||
6288 | 2270 |
|aStream searchIndex anyMore deleteSet index |
1545 | 2271 |
str snapshotProto snapshotPrefix snapshotNameIndex fileName| |
2272 |
||
2273 |
aStream := FileStream readonlyFileNamed:changeFileName. |
|
2274 |
aStream isNil ifTrue:[^ self]. |
|
2275 |
||
2276 |
aClassNameOrNil isNil ifTrue:[ |
|
2250 | 2277 |
self newLabel:'compressing...'. |
1545 | 2278 |
] ifFalse:[ |
2250 | 2279 |
self newLabel:'compressing for ' , aClassNameOrNil. |
1545 | 2280 |
]. |
2281 |
||
2282 |
CompressSnapshotInfo == true ifTrue:[ |
|
2250 | 2283 |
" |
2284 |
get a prototype snapshot record (to be independent of |
|
2285 |
the actual format .. |
|
2286 |
" |
|
2287 |
str := WriteStream on:String new. |
|
2288 |
Class addChangeRecordForSnapshot:'foo' to:str. |
|
2289 |
snapshotProto := str contents. |
|
2290 |
snapshotPrefix := snapshotProto copyTo:10. |
|
2291 |
snapshotNameIndex := snapshotProto findString:'foo'. |
|
1545 | 2292 |
]. |
2293 |
||
2294 |
self valueOfNotReading value: false. |
|
2295 |
self valueOfHavingSelection value: false. |
|
2296 |
self valueOfHavingChangeSelection value: false. |
|
2297 |
self valueOfReadProgress value: 0. |
|
2298 |
self readProgressIndicator raise. |
|
2299 |
self filterLabel label: 'Comp:'; redraw. |
|
2300 |
||
2301 |
self withExecuteCursorDo:[ |
|
2250 | 2302 |
|numChanges classes selectors types excla sawExcla |
2303 |
changeNr chunk aParseTree parseTreeChunk |
|
2304 |
thisClass thisSelector codeChunk codeParser |
|
2305 |
compressThis oldValue| |
|
2306 |
||
2307 |
numChanges := changes size. |
|
2308 |
classes := Array new:numChanges. |
|
2309 |
selectors := Array new:numChanges. |
|
2310 |
types := Array new:numChanges. |
|
2311 |
||
2312 |
"starting at the end, get the change class and change selector; |
|
2313 |
collect all in classes / selectors" |
|
2314 |
||
2315 |
changeNr := numChanges. |
|
2316 |
excla := aStream class chunkSeparator. |
|
2317 |
||
2318 |
[changeNr >= 1] whileTrue:[ |
|
2319 |
oldValue := self valueOfReadProgress value. |
|
2320 |
self valueOfReadProgress value: (100 - ((aStream position/aStream size) * 100) rounded). |
|
2321 |
oldValue ~~ self valueOfReadProgress value |
|
2322 |
ifTrue: [self readProgressIndicator redrawEdges;redraw]. |
|
2323 |
aStream position:(changes at: changeNr) position. |
|
2324 |
sawExcla := aStream peekFor:excla. |
|
2325 |
chunk := aStream nextChunk. |
|
2326 |
sawExcla ifTrue:[ |
|
2327 |
"optimize a bit if multiple methods for same category arrive" |
|
2328 |
(chunk = parseTreeChunk) ifFalse:[ |
|
2329 |
aParseTree := Parser parseExpression:chunk. |
|
2330 |
parseTreeChunk := chunk |
|
2331 |
]. |
|
6288 | 2332 |
(aParseTree notNil |
2333 |
and:[(aParseTree ~~ #Error) |
|
2250 | 2334 |
and:[aParseTree isMessage]]) ifTrue:[ |
2335 |
(aParseTree selector == #methodsFor:) ifTrue:[ |
|
2336 |
thisClass := (aParseTree receiver evaluate). |
|
2337 |
codeChunk := aStream nextChunk. |
|
6288 | 2338 |
codeParser := Parser |
2250 | 2339 |
parseMethodSpecification:codeChunk |
2340 |
in:thisClass |
|
2341 |
ignoreErrors:true |
|
2342 |
ignoreWarnings:true. |
|
2343 |
(codeParser notNil and:[codeParser ~~ #Error]) ifTrue:[ |
|
2344 |
selectors at:changeNr put:(codeParser selector). |
|
2345 |
classes at:changeNr put:thisClass. |
|
2346 |
types at:changeNr put:#methodsFor |
|
2347 |
] |
|
2348 |
] |
|
2349 |
] |
|
2350 |
] ifFalse:[ |
|
2351 |
aParseTree := Parser parseExpression:chunk. |
|
2352 |
parseTreeChunk := chunk. |
|
6288 | 2353 |
(aParseTree notNil |
2354 |
and:[(aParseTree ~~ #Error) |
|
2250 | 2355 |
and:[aParseTree isMessage]]) ifTrue:[ |
2356 |
(aParseTree selector == #removeSelector:) ifTrue:[ |
|
2357 |
selectors at:changeNr put:(aParseTree arg1 value ). |
|
2358 |
classes at:changeNr put:(aParseTree receiver evaluate). |
|
2359 |
types at:changeNr put:#removeSelector |
|
2360 |
] |
|
2361 |
] ifFalse:[ |
|
2362 |
CompressSnapshotInfo == true ifTrue:[ |
|
2363 |
(chunk startsWith:snapshotPrefix) ifTrue:[ |
|
2364 |
str := chunk readStream position:snapshotNameIndex. |
|
2365 |
fileName := str upTo:(Character space). |
|
2366 |
" |
|
2367 |
kludge to allow use of match-check below |
|
2368 |
" |
|
2369 |
selectors at:changeNr put:snapshotPrefix. |
|
2370 |
classes at:changeNr put:fileName. |
|
2371 |
] |
|
2372 |
] |
|
2373 |
] |
|
2374 |
]. |
|
2375 |
changeNr := changeNr - 1 |
|
2376 |
]. |
|
2377 |
aStream close. |
|
2378 |
||
6288 | 2379 |
"for all changes, look for another class/selector occurrence later |
2250 | 2380 |
in the list and, if there is one, add change number to the delete set" |
2381 |
||
2382 |
deleteSet := OrderedCollection new. |
|
2383 |
changeNr := 1. |
|
2384 |
[changeNr < changes size] whileTrue:[ |
|
2385 |
thisClass := classes at:changeNr. |
|
2386 |
||
2387 |
compressThis := false. |
|
2388 |
aClassNameOrNil isNil ifTrue:[ |
|
2389 |
compressThis := true |
|
2390 |
] ifFalse:[ |
|
2391 |
"/ skipping unloaded/unknown classes |
|
2392 |
thisClass isBehavior ifTrue:[ |
|
2393 |
thisClass isMeta ifTrue:[ |
|
6288 | 2394 |
compressThis := aClassNameOrNil = thisClass soleInstance name. |
2250 | 2395 |
] ifFalse:[ |
2396 |
compressThis := aClassNameOrNil = thisClass name. |
|
2397 |
(PrivateAsSeparate not and: [thisClass isPrivate]) |
|
2398 |
ifTrue:[compressThis := aClassNameOrNil = thisClass owningClass name] |
|
2399 |
] |
|
2400 |
] |
|
2401 |
]. |
|
2402 |
||
2403 |
compressThis ifTrue:[ |
|
2404 |
thisSelector := selectors at:changeNr. |
|
2405 |
searchIndex := changeNr. |
|
2406 |
anyMore := true. |
|
2407 |
[anyMore] whileTrue:[ |
|
2408 |
searchIndex := classes indexOf:thisClass |
|
2409 |
startingAt:(searchIndex + 1). |
|
2410 |
(searchIndex ~~ 0) ifTrue:[ |
|
2411 |
((selectors at:searchIndex) == thisSelector) ifTrue:[ |
|
2412 |
thisClass notNil ifTrue:[ |
|
2413 |
deleteSet add:changeNr. |
|
2414 |
anyMore := false |
|
2415 |
] |
|
2416 |
] |
|
2417 |
] ifFalse:[ |
|
6288 | 2418 |
anyMore := false |
2250 | 2419 |
] |
2420 |
]. |
|
2421 |
]. |
|
2422 |
||
2423 |
changeNr := changeNr + 1 |
|
2424 |
]. |
|
2425 |
||
2426 |
"finally delete what has been found" |
|
2427 |
||
2428 |
(deleteSet size > 0) ifTrue:[ |
|
2429 |
index := deleteSet size. |
|
2430 |
[index > 0] whileTrue:[ |
|
2431 |
self silentDeleteChange: (changes at: (deleteSet at:index)). |
|
2432 |
index := index - 1 |
|
2433 |
]. |
|
2434 |
self setChangeList |
|
2435 |
]. |
|
1545 | 2436 |
]. |
2437 |
self valueOfNotReading value: true. |
|
2438 |
self filterField raise. |
|
2439 |
self filterLabel label: 'Filter:'. |
|
2440 |
self newLabel: '' |
|
2441 |
! |
|
2442 |
||
2443 |
contractClass:className selector:selector to:maxLen |
|
2444 |
|s l| |
|
2445 |
||
2446 |
s := className , ' ', selector. |
|
2447 |
s size > maxLen ifTrue:[ |
|
2250 | 2448 |
l := maxLen - 1 - selector size max:20. |
2449 |
s := (className contractTo:l) , ' ' , selector. |
|
2450 |
||
2451 |
s size > maxLen ifTrue:[ |
|
2452 |
l := maxLen - 1 - className size max:20. |
|
2453 |
s := className , ' ', (selector contractTo:l). |
|
2454 |
||
2455 |
s size > maxLen ifTrue:[ |
|
2456 |
s := (className contractTo:(maxLen // 2 - 1)) , ' ' , (selector contractTo:maxLen // 2) |
|
2457 |
] |
|
2458 |
] |
|
1545 | 2459 |
]. |
2460 |
^ s |
|
2461 |
||
2462 |
! |
|
2463 |
||
2464 |
deleteChangesFrom:start to:stop |
|
1546 | 2465 |
"deletes a range of changes" |
1545 | 2466 |
|
6288 | 2467 |
self unselectChange. |
1545 | 2468 |
stop to:start by:-1 do:[:changeNr| |
2250 | 2469 |
self silentDeleteChange:(self listOfChanges at: changeNr) |
1546 | 2470 |
]. |
2471 |
self setChangeList |
|
1545 | 2472 |
! |
2473 |
||
1546 | 2474 |
fullClassNameOfChange:aChange |
6288 | 2475 |
"returns the full classname of aChange |
1545 | 2476 |
(for classChanges (i.e. xxx class), a string ending in ' class' is returned. |
6288 | 2477 |
- since parsing ascii methods is slow, keep result cached in |
1545 | 2478 |
changeClassNames for the next query" |
2479 |
||
2480 |
|chunk aParseTree recTree sel name arg1Tree isMeta prevMethodDefNr |
|
2481 |
words changeStream fullParseTree ownerTree ownerName oldDollarSetting| |
|
2482 |
||
1546 | 2483 |
aChange isNil ifTrue:[^ nil]. |
1545 | 2484 |
|
2485 |
" |
|
2486 |
first look, if not already known |
|
2487 |
" |
|
1546 | 2488 |
name := aChange className. |
1545 | 2489 |
name notNil ifTrue:[^ name]. |
2490 |
||
1546 | 2491 |
prevMethodDefNr := changes indexOf: aChange. |
1545 | 2492 |
[(changes at:prevMethodDefNr) followUp] whileTrue:[ |
2250 | 2493 |
prevMethodDefNr := prevMethodDefNr - 1. |
1545 | 2494 |
]. |
2495 |
||
2496 |
" |
|
2497 |
get the chunk |
|
2498 |
" |
|
2499 |
chunk := (changes at:prevMethodDefNr) chunk. |
|
2500 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
|
2501 |
||
2502 |
(chunk startsWith:'''---') ifTrue:[ |
|
2250 | 2503 |
words := chunk asCollectionOfWords. |
2504 |
words size > 2 ifTrue:[ |
|
2505 |
(words at:2) = 'checkin' ifTrue:[ |
|
2506 |
name := words at:3. |
|
2507 |
aChange className: name. |
|
2508 |
^ name |
|
2509 |
] |
|
2510 |
]. |
|
1545 | 2511 |
]. |
2512 |
||
2513 |
"/ fix it - otherwise, it cannot be parsed |
|
2514 |
(chunk endsWith:'primitiveDefinitions:') ifTrue:[ |
|
2250 | 2515 |
chunk := chunk , '''''' |
1545 | 2516 |
]. |
2517 |
(chunk endsWith:'primitiveFunctions:') ifTrue:[ |
|
2250 | 2518 |
chunk := chunk , '''''' |
1545 | 2519 |
]. |
2520 |
(chunk endsWith:'primitiveVariables:') ifTrue:[ |
|
2250 | 2521 |
chunk := chunk , '''''' |
1545 | 2522 |
]. |
2523 |
||
2524 |
" |
|
2525 |
use parser to construct a parseTree |
|
2526 |
" |
|
2527 |
oldDollarSetting := Parser allowDollarInIdentifier. |
|
2528 |
[ |
|
2250 | 2529 |
Parser allowDollarInIdentifier:true. |
2530 |
aParseTree := Parser parseExpression:chunk. |
|
1545 | 2531 |
] valueNowOrOnUnwindDo:[ |
2250 | 2532 |
Parser allowDollarInIdentifier:oldDollarSetting |
1545 | 2533 |
]. |
2534 |
||
2535 |
(aParseTree isNil or:[aParseTree == #Error]) ifTrue:[ |
|
2250 | 2536 |
^ nil "seems strange... (could be a comment)" |
1545 | 2537 |
]. |
2538 |
aParseTree isMessage ifFalse:[ |
|
2250 | 2539 |
^ nil "very strange... (whats that ?)" |
1545 | 2540 |
]. |
2541 |
||
2542 |
" |
|
2543 |
ask parser for selector |
|
2544 |
" |
|
2545 |
sel := aParseTree selector. |
|
2546 |
recTree := aParseTree receiver. |
|
2547 |
||
2548 |
" |
|
2549 |
is it a method-change, methodRemove or comment-change ? |
|
2550 |
" |
|
6288 | 2551 |
(#(#'methodsFor:' |
2552 |
#'privateMethodsFor:' |
|
2553 |
#'protectedMethodsFor:' |
|
2554 |
#'publicMethodsFor:' |
|
2555 |
#'removeSelector:' |
|
1545 | 2556 |
#'comment:' |
2557 |
#'primitiveDefinitions:' |
|
2558 |
#'primitiveFunctions:' |
|
2559 |
#'primitiveVariables:' |
|
2560 |
#'renameCategory:to:' |
|
2561 |
#'instanceVariableNames:' |
|
2562 |
) includes:sel) ifTrue:[ |
|
2250 | 2563 |
" |
2564 |
yes, the className is the receiver |
|
2565 |
" |
|
2566 |
(recTree notNil and:[recTree ~~ #Error]) ifTrue:[ |
|
2567 |
isMeta := false. |
|
2568 |
recTree isUnaryMessage ifTrue:[ |
|
2569 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
|
2570 |
"id class methodsFor:..." |
|
2571 |
recTree := recTree receiver. |
|
2572 |
isMeta := true. |
|
2573 |
]. |
|
2574 |
recTree isPrimary ifTrue:[ |
|
2575 |
name := recTree name. |
|
2576 |
isMeta ifTrue:[ |
|
2577 |
name := name , ' class'. |
|
2578 |
]. |
|
2579 |
aChange className: name. |
|
2580 |
^ name |
|
2581 |
] |
|
2582 |
]. |
|
2583 |
"more strange things" |
|
2584 |
^ nil |
|
1545 | 2585 |
]. |
2586 |
||
2587 |
" |
|
2588 |
is it a change in a class-description ? |
|
2589 |
" |
|
6288 | 2590 |
(('subclass:*' match:sel) |
1545 | 2591 |
or:[('variable*subclass:*' match:sel)]) ifTrue:[ |
2250 | 2592 |
"/ must parse the full changes text, to get |
2593 |
"/ privacy information. |
|
2594 |
||
2595 |
changeStream := self streamForChange:aChange. |
|
2596 |
changeStream notNil ifTrue:[ |
|
2597 |
chunk := changeStream nextChunk. |
|
2598 |
changeStream close. |
|
2599 |
fullParseTree := Parser parseExpression:chunk. |
|
2600 |
(fullParseTree isNil or:[fullParseTree == #Error]) ifTrue:[ |
|
2601 |
fullParseTree := nil |
|
2602 |
]. |
|
2603 |
fullParseTree isMessage ifFalse:[ |
|
2604 |
fullParseTree := nil |
|
2605 |
]. |
|
2606 |
"/ actually, the nil case cannot happen |
|
2607 |
fullParseTree notNil ifTrue:[ |
|
2608 |
aParseTree := fullParseTree. |
|
2609 |
sel := aParseTree selector. |
|
2610 |
]. |
|
2611 |
]. |
|
2612 |
||
2613 |
arg1Tree := aParseTree arg1. |
|
2614 |
(arg1Tree notNil and:[arg1Tree isConstant]) ifTrue:[ |
|
2615 |
name := arg1Tree value asString. |
|
2616 |
||
2617 |
"/ is it a private-class ? |
|
2618 |
('*privateIn:' match:sel) ifTrue:[ |
|
2619 |
ownerTree := aParseTree args last. |
|
2620 |
ownerName := ownerTree name asString. |
|
2621 |
name := ownerName , '::' , name |
|
2622 |
]. |
|
2623 |
aChange className: name. |
|
2624 |
^ name |
|
2625 |
]. |
|
2626 |
"very strange" |
|
2627 |
^ nil |
|
1545 | 2628 |
]. |
2629 |
||
2630 |
" |
|
2631 |
is it a class remove ? |
|
2632 |
" |
|
2633 |
(sel == #removeClass:) ifTrue:[ |
|
6288 | 2634 |
(recTree notNil |
2250 | 2635 |
and:[recTree ~~ #Error |
2636 |
and:[recTree isPrimary |
|
2637 |
and:[recTree name = 'Smalltalk']]]) ifTrue:[ |
|
2638 |
arg1Tree := aParseTree arg1. |
|
2639 |
(arg1Tree notNil and:[arg1Tree isPrimary]) ifTrue:[ |
|
2640 |
name := arg1Tree name. |
|
2641 |
aChange className: name. |
|
2642 |
^ name |
|
2643 |
]. |
|
2644 |
] |
|
1545 | 2645 |
]. |
2646 |
||
2647 |
" |
|
2648 |
is it a method category change ? |
|
2649 |
" |
|
2650 |
((sel == #category:) |
|
2651 |
or:[sel == #privacy:]) ifTrue:[ |
|
6288 | 2652 |
(recTree notNil |
2250 | 2653 |
and:[recTree ~~ #Error |
2654 |
and:[recTree isMessage |
|
2655 |
and:[recTree selector == #compiledMethodAt:]]]) ifTrue:[ |
|
2656 |
isMeta := false. |
|
2657 |
recTree := recTree receiver. |
|
2658 |
recTree isUnaryMessage ifTrue:[ |
|
2659 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
|
2660 |
"id class " |
|
2661 |
recTree := recTree receiver |
|
2662 |
]. |
|
2663 |
recTree isPrimary ifTrue:[ |
|
2664 |
isMeta ifTrue:[ |
|
2665 |
name := name , ' class'. |
|
2666 |
]. |
|
2667 |
name := recTree name. |
|
2668 |
aChange className: name. |
|
2669 |
^ name |
|
2670 |
] |
|
2671 |
] |
|
1545 | 2672 |
]. |
2673 |
^ nil |
|
2674 |
! |
|
2675 |
||
2676 |
newLabel:how |
|
1546 | 2677 |
"sets the label" |
1545 | 2678 |
|
2679 |
how size = 0 ifTrue: [^self window label:self class label]. |
|
1556 | 2680 |
self window label:self class label, ' (', how, ')' |
1545 | 2681 |
! |
2682 |
||
2683 |
readChangesFileInBackground:inBackground |
|
1546 | 2684 |
"reads the changes file, creates a list of header-lines (changeChunks) |
1545 | 2685 |
and a list of chunk-positions (changePositions). |
2686 |
Starting with 2.10.3, the entries are multi-col entries; |
|
2687 |
the cols are: |
|
7957 | 2688 |
1 delta (only if comparing) |
2689 |
'+' -> new method (w.r.t. current state) |
|
2690 |
'-' -> removed method (w.r.t. current state) |
|
2691 |
'?' -> class does not exist currently |
|
2692 |
'=' -> change is same as current methods source |
|
2693 |
2 class/selector |
|
2694 |
3 type of change |
|
2695 |
doit |
|
2696 |
method |
|
2697 |
category change |
|
2698 |
4 timestamp |
|
1545 | 2699 |
|
2700 |
since comparing slows down startup time, it is now disabled by |
|
2701 |
default and can be enabled via a toggle." |
|
2702 |
||
2740
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2703 |
|aStream maxLen i f v| |
1545 | 2704 |
|
2705 |
self valueOfNotReading value: false. |
|
2706 |
self valueOfHavingSelection value: false. |
|
2707 |
self valueOfHavingChangeSelection value: false. |
|
2708 |
||
2709 |
editingClassSource := false. |
|
2710 |
||
2711 |
maxLen := 60. |
|
2712 |
||
2713 |
f := changeFileName asFilename. |
|
2714 |
aStream := f readStream. |
|
2715 |
aStream isNil ifTrue:[^ nil]. |
|
2716 |
||
1653 | 2717 |
self newLabel:(resources string:'updating...'). |
1545 | 2718 |
|
2719 |
i := f info. |
|
2720 |
changeFileTimestamp := i modified. |
|
2721 |
||
2722 |
self valueOfReadProgress value: 0. |
|
2740
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2723 |
v := self readProgressIndicator. |
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2724 |
v notNil ifTrue:[v raise]. |
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2725 |
v := self filterLabel. |
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2726 |
v notNil ifTrue:[v label: 'Read:'; redraw]. |
1545 | 2727 |
|
2728 |
self withReadCursorDo:[ |
|
7957 | 2729 |
|myProcess myPriority| |
2730 |
||
2731 |
" |
|
2732 |
this is a time consuming operation (especially, if reading an |
|
2733 |
NFS-mounted directory; therefore lower my priority... |
|
2734 |
" |
|
2735 |
inBackground ifTrue:[ |
|
2736 |
myProcess := Processor activeProcess. |
|
2737 |
myPriority := myProcess priority. |
|
2738 |
myProcess priority:(Processor userBackgroundPriority). |
|
2739 |
]. |
|
2740 |
||
2741 |
[ |
|
2742 |
|excla timeStampInfo lastChange| |
|
2743 |
||
2744 |
excla := aStream class chunkSeparator. |
|
2745 |
||
2746 |
[aStream atEnd] whileFalse:[ |
|
2747 |
|change changeDelta changeString changeType changeCategory |
|
2748 |
line s l changeClass sawExcla category className selector |
|
2749 |
chunkText chunkPos sel oldValue| |
|
2750 |
||
2751 |
change := Change new. |
|
2752 |
" |
|
2753 |
get a chunk (separated by excla) |
|
2754 |
" |
|
2755 |
oldValue := self valueOfReadProgress value. |
|
2756 |
self valueOfReadProgress value: (((aStream position/aStream size) * 100) rounded). |
|
2740
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2757 |
"/ oldValue ~~ self valueOfReadProgress value |
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2758 |
"/ ifTrue: [self readProgressIndicator redrawEdges;redraw]. |
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2759 |
|
7957 | 2760 |
aStream skipSeparators. |
2761 |
chunkPos := aStream position. |
|
2762 |
||
2763 |
sawExcla := aStream peekFor:excla. |
|
2764 |
chunkText := aStream nextChunk. |
|
2765 |
chunkText notNil ifTrue:[ |
|
2766 |
|index headerLine cls| |
|
2767 |
||
2768 |
(chunkText startsWith:'''---- timestamp ') ifTrue:[ |
|
2769 |
timeStampInfo := (chunkText copyFrom:16 to:(chunkText size - 6)) withoutSpaces. |
|
2770 |
] ifFalse:[ |
|
2771 |
||
2772 |
" |
|
2773 |
only first line is saved in changeChunks... |
|
2774 |
" |
|
2775 |
index := chunkText indexOf:(Character cr). |
|
2776 |
(index ~~ 0) ifTrue:[ |
|
2777 |
chunkText := chunkText copyTo:(index - 1). |
|
2778 |
||
2779 |
"take care for comment changes - must still be a |
|
2780 |
valid expression for classNameOfChange: to work" |
|
2781 |
||
2782 |
(chunkText endsWith:'comment:''') ifTrue:[ |
|
2783 |
chunkText := chunkText , '...''' |
|
2784 |
]. |
|
2785 |
(chunkText endsWith:'primitiveDefinitions:''') ifTrue:[ |
|
2786 |
sel := 'primitiveDefinitions:'. |
|
2787 |
chunkText := chunkText copyWithoutLast:1 |
|
2788 |
]. |
|
2789 |
(chunkText endsWith:'primitiveVariables:''') ifTrue:[ |
|
2790 |
sel := 'primitiveVariables:'. |
|
2791 |
chunkText := chunkText copyWithoutLast:1 |
|
2792 |
]. |
|
2793 |
(chunkText endsWith:'primitiveFunctions:''') ifTrue:[ |
|
2794 |
sel := 'primitiveFunctions:'. |
|
2795 |
chunkText := chunkText copyWithoutLast:1 |
|
2796 |
]. |
|
2797 |
]. |
|
2798 |
||
2799 |
change chunk: chunkText. |
|
2800 |
change position: chunkPos. |
|
2801 |
lastChange notNil ifTrue: [lastChange lastPosition: chunkPos - 1]. |
|
2802 |
lastChange := change. |
|
2803 |
change timeStamp: timeStampInfo. |
|
2804 |
change followUp: false. |
|
2805 |
headerLine := nil. |
|
2806 |
changeDelta := ' '. |
|
2807 |
||
2808 |
sawExcla ifFalse:[ |
|
2809 |
(chunkText startsWith:'''---- snap') ifTrue:[ |
|
2810 |
changeType := ''. |
|
2811 |
headerLine := chunkText. |
|
2812 |
changeString := (chunkText contractTo:maxLen). |
|
2813 |
timeStampInfo := nil. |
|
2814 |
] ifFalse:[ |
|
2815 |
||
2816 |
|p cls| |
|
2817 |
||
2818 |
headerLine := chunkText , ' (doIt)'. |
|
2819 |
||
2820 |
" |
|
2821 |
first, assume doIt - then lets have a more detailed look... |
|
2822 |
" |
|
2823 |
((chunkText startsWith:'''---- file') |
|
2824 |
or:[(chunkText startsWith:'''---- check')]) ifTrue:[ |
|
2825 |
changeType := ''. |
|
2826 |
timeStampInfo := nil. |
|
2827 |
] ifFalse:[ |
|
2828 |
changeType := 'doIt'. |
|
2829 |
]. |
|
2830 |
changeString := (chunkText contractTo:maxLen). |
|
2831 |
||
2832 |
p := Parser parseExpression:chunkText inNameSpace:Smalltalk. |
|
2833 |
(p notNil |
|
2834 |
and:[p ~~ #Error |
|
2835 |
and:[p isMessage]]) ifTrue:[ |
|
2836 |
sel := p selector. |
|
2837 |
]. |
|
2838 |
(sel == #removeSelector:) ifTrue:[ |
|
2839 |
p receiver isUnaryMessage ifTrue:[ |
|
2840 |
cls := p receiver receiver name. |
|
2841 |
changeClass := (Smalltalk classNamed:cls) class. |
|
2842 |
cls := cls , ' class'. |
|
2843 |
] ifFalse:[ |
|
2844 |
cls := p receiver name. |
|
2845 |
changeClass := (Smalltalk classNamed:cls) |
|
2846 |
]. |
|
2847 |
sel := (p args at:1) evaluate. |
|
2848 |
||
2849 |
DeltaInfoColumn ifTrue:[ |
|
9180
ea28dedc13aa
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
9179
diff
changeset
|
2850 |
(changeClass isNil or:[changeClass isLoaded not or:[sel isNil]]) ifTrue:[ |
7957 | 2851 |
changeDelta := '?' |
2852 |
] ifFalse:[ |
|
2853 |
(changeClass implements:sel asSymbol) ifTrue:[ |
|
2854 |
changeDelta := '-'. |
|
2855 |
] |
|
2856 |
] |
|
2857 |
]. |
|
2858 |
changeType := 'remove'. |
|
2859 |
changeString := self contractClass:cls selector:sel to:maxLen. |
|
2860 |
className := cls. |
|
2861 |
selector := sel. |
|
2862 |
]. |
|
2863 |
(p notNil and:[p ~~ #Error |
|
2864 |
and:[p isMessage |
|
2865 |
and:[p receiver isMessage |
|
2866 |
and:[p receiver selector == #compiledMethodAt:]]]]) ifTrue:[ |
|
2867 |
p receiver receiver isUnaryMessage ifTrue:[ |
|
2868 |
cls := p receiver receiver receiver name. |
|
2869 |
changeClass := (Smalltalk classNamed:cls) class. |
|
2870 |
cls := cls , ' class'. |
|
2871 |
] ifFalse:[ |
|
2872 |
cls := p receiver receiver name. |
|
2873 |
changeClass := (Smalltalk classNamed:cls) |
|
2874 |
]. |
|
2875 |
(sel == #category:) ifTrue:[ |
|
2876 |
sel := (p receiver args at:1) evaluate. |
|
2877 |
changeType := '(category change)'. |
|
2878 |
changeString := self contractClass:cls selector:sel to:maxLen. |
|
2879 |
]. |
|
2880 |
(sel == #privacy:) ifTrue:[ |
|
2881 |
sel := (p receiver args at:1) evaluate. |
|
2882 |
changeType := 'privacy change'. |
|
2883 |
changeString := self contractClass:cls selector:sel to:maxLen. |
|
2884 |
]. |
|
2885 |
className := cls. |
|
2886 |
selector := sel. |
|
2887 |
]. |
|
2888 |
(#(#'subclass:' |
|
2889 |
#'variableSubclass:' |
|
2890 |
#'variableByteSubclass:' |
|
2891 |
#'variableWordSubclass:' |
|
2892 |
#'variableLongSubclass:' |
|
2893 |
#'variableFloatSubclass:' |
|
2894 |
#'variableDoubleSubclass:' |
|
2895 |
#'primitiveDefinitions:' |
|
2896 |
#'primitiveFunctions:' |
|
2897 |
#'primitiveVariables:' |
|
2898 |
) includes:sel) ifTrue:[ |
|
2899 |
changeType := 'class definition'. |
|
2900 |
]. |
|
2901 |
] |
|
2902 |
] ifTrue:[ |
|
9179
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2903 |
|done first p className2 cls text methodPos| |
7957 | 2904 |
|
2905 |
" |
|
2906 |
method definitions actually consist of |
|
2907 |
two (or more) chunks; skip next chunk(s) |
|
2908 |
up to an empty one. |
|
2909 |
The system only writes one chunk, |
|
2910 |
and we cannot handle more in this ChangesBrowser.... |
|
2911 |
" |
|
9179
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2912 |
className2 := nil. |
7957 | 2913 |
p := Parser parseExpression:chunkText inNameSpace:Smalltalk. |
2914 |
||
2915 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
|
2916 |
sel := p selector. |
|
2917 |
(sel == #methodsFor:) ifTrue:[ |
|
2918 |
p receiver isUnaryMessage ifTrue:[ |
|
9179
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2919 |
className2 := p receiver receiver name. |
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2920 |
changeClass := (Smalltalk classNamed:className2) class. |
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2921 |
className2 := className2 , ' class'. |
7957 | 2922 |
] ifFalse:[ |
9179
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2923 |
className2 := p receiver name. |
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2924 |
changeClass := Smalltalk classNamed:className2 |
7957 | 2925 |
]. |
2926 |
category := (p args at:1) evaluate. |
|
2927 |
]. |
|
2928 |
]. |
|
2929 |
||
2930 |
done := false. |
|
2931 |
first := true. |
|
2932 |
[done] whileFalse:[ |
|
2933 |
||
2934 |
changeDelta := ' '. |
|
2935 |
methodPos := aStream position. |
|
2936 |
||
2937 |
text := aStream nextChunk. |
|
2938 |
text isNil ifTrue:[ |
|
2939 |
done := true |
|
2940 |
] ifFalse:[ |
|
2941 |
done := text isEmpty |
|
2942 |
]. |
|
2943 |
done ifFalse:[ |
|
2944 |
first ifFalse:[ |
|
2945 |
change := Change new. |
|
2946 |
change chunk: chunkText. |
|
2947 |
change string:changeString. |
|
2948 |
change position: methodPos. |
|
9179
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2949 |
change className: className2. |
7957 | 2950 |
lastChange notNil ifTrue: [lastChange lastPosition: methodPos - 1]. |
2951 |
lastChange := change. |
|
2952 |
change timeStamp: timeStampInfo. |
|
2953 |
change followUp: true. |
|
2954 |
editingClassSource := true. |
|
2955 |
]. |
|
2956 |
||
2957 |
first := false. |
|
2958 |
" |
|
2959 |
try to find the selector |
|
2960 |
" |
|
2961 |
sel := nil. |
|
9179
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2962 |
className2 notNil ifTrue:[ |
7957 | 2963 |
p := Parser |
2964 |
parseMethodSpecification:text |
|
2965 |
in:nil |
|
2966 |
ignoreErrors:true |
|
2967 |
ignoreWarnings:true. |
|
2968 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
|
2969 |
sel := p selector. |
|
2970 |
] |
|
2971 |
]. |
|
2972 |
||
2973 |
sel isNil ifTrue:[ |
|
2974 |
changeString := (chunkText contractTo:maxLen). |
|
2975 |
changeType := 'change'. |
|
2976 |
headerLine := chunkText , ' (change)'. |
|
2977 |
] ifFalse:[ |
|
9179
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2978 |
changeString := self contractClass:className2 selector:sel to:maxLen. |
7957 | 2979 |
changeType := 'method definition'. |
2980 |
changeCategory := category. |
|
9179
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
2981 |
headerLine := className2 , ' ' , sel , ' ' , '(change category: ''' , category , ''')'. |
7957 | 2982 |
change selector:sel. |
2983 |
]. |
|
2984 |
||
2985 |
DeltaInfoColumn ifTrue:[ |
|
2986 |
changeClass isNil ifFalse:[ |
|
2987 |
changeClass isMeta ifTrue:[ |
|
2988 |
cls := changeClass soleInstance |
|
2989 |
] ifFalse:[ |
|
2990 |
cls := changeClass |
|
2991 |
]. |
|
2992 |
]. |
|
2993 |
||
9180
ea28dedc13aa
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
9179
diff
changeset
|
2994 |
(changeClass isNil or:[cls isLoaded not or:[sel isNil]]) ifTrue:[ |
7957 | 2995 |
changeDelta := '?' |
2996 |
] ifFalse:[ |
|
2997 |
(changeClass implements:sel asSymbol) ifFalse:[ |
|
2998 |
changeDelta := '+'. |
|
2999 |
] ifTrue:[ |
|
3000 |
|m currentText t1 t2| |
|
3001 |
||
3002 |
m := changeClass compiledMethodAt:sel asSymbol. |
|
3003 |
currentText := m source. |
|
3004 |
currentText notNil ifTrue:[ |
|
3005 |
text asString = currentText asString ifTrue:[ |
|
3006 |
changeDelta := '=' |
|
3007 |
] ifFalse:[ |
|
3008 |
t1 := currentText asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
3009 |
t2 := text asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
3010 |
t1 = t2 ifTrue:[ |
|
3011 |
changeDelta := '=' |
|
3012 |
] |
|
3013 |
] |
|
3014 |
] |
|
3015 |
] |
|
3016 |
] |
|
3017 |
]. |
|
3018 |
change delta:changeDelta. |
|
3019 |
change string:changeString. |
|
3020 |
change type:changeType. |
|
3021 |
change category: changeCategory. |
|
3022 |
change timeStamp:timeStampInfo. |
|
3023 |
changes add:change. |
|
3024 |
]. |
|
3025 |
changeString := nil. |
|
3026 |
headerLine := nil. |
|
3027 |
||
3028 |
] |
|
3029 |
]. |
|
3030 |
changeString notNil ifTrue:[ |
|
3031 |
change delta:changeDelta. |
|
3032 |
change string:changeString. |
|
3033 |
change type:changeType. |
|
3034 |
change timeStamp:timeStampInfo. |
|
3035 |
changes add:change. |
|
3036 |
||
3037 |
] ifFalse:[ |
|
3038 |
headerLine notNil ifTrue:[ |
|
3039 |
changes add: change. |
|
3040 |
] |
|
3041 |
] |
|
3042 |
] |
|
3043 |
]. |
|
3044 |
change lastPosition: aStream position. |
|
3045 |
]. |
|
3046 |
modified := false. |
|
3047 |
||
3048 |
] valueNowOrOnUnwindDo:[ |
|
3049 |
aStream close. |
|
3050 |
inBackground ifTrue:[myProcess priority:myPriority]. |
|
3051 |
]. |
|
1545 | 3052 |
]. |
3053 |
self setChangeList. |
|
3054 |
self valueOfNotReading value: true. |
|
3055 |
self filterField raise. |
|
3056 |
self filterLabel label: 'Filter:'. |
|
3057 |
||
1653 | 3058 |
self checkIfFileHasChanged. |
3059 |
||
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3060 |
"Modified: / 30.7.1998 / 11:39:58 / cg" |
1545 | 3061 |
! |
3062 |
||
1546 | 3063 |
selectorOfMethodChange:aChange |
3064 |
"returns the selector of the method change, or nil if it is not a method change" |
|
1545 | 3065 |
|
3066 |
|source parser sel| |
|
3067 |
||
1546 | 3068 |
source := self sourceOfMethodChange:aChange. |
1545 | 3069 |
source isNil ifTrue:[^ nil]. |
3070 |
||
6288 | 3071 |
parser := Parser |
3072 |
parseMethod:source |
|
3073 |
in:nil |
|
3074 |
ignoreErrors:true |
|
2250 | 3075 |
ignoreWarnings:true. |
1545 | 3076 |
|
3077 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
2250 | 3078 |
sel := parser selector. |
1545 | 3079 |
]. |
3080 |
^ sel |
|
3081 |
! |
|
3082 |
||
3083 |
setChangeList |
|
1546 | 3084 |
"sets the list of changes into the list for the table by evaluating filterCompletionBlock" |
3085 |
||
3086 |
self unselectChange. |
|
3087 |
filterCompletionBlock value: self valueOfFilter value. |
|
1545 | 3088 |
! |
3089 |
||
1546 | 3090 |
silentDeleteChange:aChange |
3091 |
"delete aChange do not update changeListView" |
|
1545 | 3092 |
|
6288 | 3093 |
modified := true. |
1545 | 3094 |
|
1546 | 3095 |
changes remove:aChange |
1545 | 3096 |
! |
3097 |
||
3098 |
silentDeleteChangesFor:aClassName from:start to:stop |
|
1546 | 3099 |
"deletes changes for aChange in the range [start,stop] |
3100 |
and returns the number of the deleted changes" |
|
3101 |
||
3102 |
|index numDeleted clsName| |
|
1545 | 3103 |
|
3104 |
numDeleted := 0. |
|
6288 | 3105 |
index := stop. |
1546 | 3106 |
[index >= start] whileTrue: |
6288 | 3107 |
[ |
2250 | 3108 |
((clsName := self classNameOfChange:(self listOfChanges at: index)) notNil and: |
3109 |
[(clsName = aClassName or: [PrivateAsSeparate not and: [(clsName upTo: $:) = aClassName]])]) |
|
3110 |
ifTrue: |
|
6288 | 3111 |
[ |
2250 | 3112 |
self silentDeleteChange:(self listOfChanges at: index). |
3113 |
numDeleted := numDeleted + 1. |
|
3114 |
]. |
|
3115 |
index := index - 1 |
|
1545 | 3116 |
]. |
3117 |
^ numDeleted |
|
3118 |
! |
|
3119 |
||
1546 | 3120 |
sourceOfMethodChange:aChange |
3121 |
"returns the source code of the method change, or nil if it is not a method change." |
|
1545 | 3122 |
|
3123 |
|aStream chunk sawExcla parseTree sourceChunk| |
|
3124 |
||
6288 | 3125 |
aStream := self streamForChange:aChange. |
1545 | 3126 |
aStream isNil ifTrue:[^ nil]. |
3127 |
||
1546 | 3128 |
aChange followUp ifFalse:[ |
2250 | 3129 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
3130 |
chunk := aStream nextChunk. |
|
1545 | 3131 |
] ifTrue:[ |
2250 | 3132 |
chunk := aChange chunk. |
3133 |
sawExcla := true. |
|
1545 | 3134 |
]. |
3135 |
||
3136 |
sawExcla ifTrue:[ |
|
2250 | 3137 |
parseTree := Parser parseExpression:chunk. |
3138 |
(parseTree notNil and:[parseTree isMessage]) ifTrue:[ |
|
3139 |
(parseTree selector == #methodsFor:) ifTrue:[ |
|
3140 |
sourceChunk := aStream nextChunk. |
|
3141 |
] |
|
3142 |
]. |
|
1545 | 3143 |
]. |
3144 |
aStream close. |
|
3145 |
^ sourceChunk |
|
3146 |
! |
|
3147 |
||
1546 | 3148 |
streamForChange:aChange |
3149 |
"returns the stream for aChange" |
|
1545 | 3150 |
|
3151 |
|aStream| |
|
3152 |
||
3153 |
aStream := FileStream readonlyFileNamed:changeFileName. |
|
3154 |
aStream isNil ifTrue:[^ nil]. |
|
1546 | 3155 |
aStream position:aChange position. |
1545 | 3156 |
^ aStream |
3157 |
||
3158 |
! |
|
3159 |
||
3160 |
unselectChange |
|
1546 | 3161 |
"unselects the current change" |
3162 |
||
3163 |
self selectionOfChange value: nil. |
|
3164 |
self valueOfChangeText value: nil |
|
3165 |
||
1545 | 3166 |
! |
3167 |
||
3168 |
withSelectedChangeDo:aBlock |
|
3169 |
"just a helper, check for a selected change and evaluate aBlock |
|
3170 |
with busy cursor" |
|
3171 |
||
3172 |
|change| |
|
3173 |
||
6288 | 3174 |
(change := self selectionOfChange value) notNil |
1545 | 3175 |
ifTrue:[ |
2250 | 3176 |
self withExecuteCursorDo:[aBlock value:change] |
1545 | 3177 |
] |
3178 |
! ! |
|
3179 |
||
3180 |
!NewChangesBrowser methodsFor:'startup / release'! |
|
3181 |
||
3182 |
closeRequest |
|
1546 | 3183 |
"asks for saving before closing" |
1545 | 3184 |
|
5395
ff5fc88d4a4b
Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents:
3220
diff
changeset
|
3185 |
self valueOfNotSaving value ifFalse: [^ self]. |
1545 | 3186 |
|
3187 |
modified ifTrue:[ |
|
7957 | 3188 |
(OptionBox |
3189 |
request:(resources string:'Change list was modified. Exit anyway?') withCRs |
|
3190 |
label:'Changes Browser' |
|
3191 |
image:(WarningBox iconBitmap) |
|
3192 |
buttonLabels:(resources array:#('Cancel' 'Discard Modifications and Exit')) |
|
3193 |
values:#(abort ignore) |
|
3194 |
default:#save |
|
3195 |
) == #abort ifTrue:[^ self]. |
|
1545 | 3196 |
]. |
3197 |
super closeRequest |
|
1656 | 3198 |
|
3199 |
"Modified: / 20.5.1998 / 03:53:47 / cg" |
|
1545 | 3200 |
! |
3201 |
||
3202 |
postOpenWith:aBuilder |
|
1546 | 3203 |
"starts reading the changes from the file and |
3204 |
builds entryCompletionBlock for the filterField before opening" |
|
1545 | 3205 |
|
3206 |
super postOpenWith:aBuilder. |
|
3207 |
||
6288 | 3208 |
builder namedComponents do: |
3209 |
[:aView| |
|
7957 | 3210 |
aView allSubViewsDo: |
3211 |
[:v| |
|
3212 |
v redraw |
|
3213 |
] |
|
1545 | 3214 |
]. |
3215 |
||
3216 |
autoUpdateBlock := [self checkIfFileHasChanged]. |
|
6288 | 3217 |
Processor addTimedBlock:autoUpdateBlock afterSeconds:5. |
1545 | 3218 |
self updateInfoLabel. |
3219 |
||
3220 |
self filterField entryCompletionBlock: |
|
3221 |
(filterCompletionBlock := [:value| |
|
7957 | 3222 |
|filter filters i changesCopy| |
3223 |
self unselectChange. |
|
3224 |
filter := self filterField contents. |
|
3225 |
(filters := filter asArrayOfSubstrings) size > 0 ifTrue:[ |
|
3226 |
changesCopy := changes copy. |
|
3227 |
i := 0. |
|
3228 |
filters do:[:filter| |
|
3229 |
i := i + 1. |
|
3230 |
changesCopy contents: |
|
3231 |
(changesCopy select: [:row| |
|
3232 |
filter match: (row string asArrayOfSubstrings at: i ifAbsent: [''''])]) |
|
3233 |
]. |
|
3234 |
self listOfChanges contents: changesCopy |
|
3235 |
] ifFalse:[ |
|
3236 |
self listOfChanges contents: changes |
|
3237 |
]. |
|
3238 |
self autoSelectLast. |
|
1546 | 3239 |
]). |
3240 |
||
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3241 |
Object errorSignal handle: [:ex | |
7957 | 3242 |
ex signal == HaltSignal ifTrue:[ |
3243 |
ex reject |
|
3244 |
]. |
|
3245 |
ex signal == MessageTracer breakpointSignal ifTrue:[ |
|
3246 |
ex reject |
|
3247 |
]. |
|
3248 |
self warn:'Error while reading changes file:\\' , ex errorString. |
|
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3249 |
] do: [ |
7957 | 3250 |
self readChangesFileInBackground:true |
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3251 |
]. |
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3252 |
|
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3253 |
"Modified: / 30.7.1998 / 11:37:51 / cg" |
1545 | 3254 |
! |
3255 |
||
3256 |
uninitialize |
|
1546 | 3257 |
"removes the autoUpdateBlock from the Processor and myself from the ObjectMemory" |
1545 | 3258 |
|
3259 |
Processor removeTimedBlock:autoUpdateBlock. |
|
3260 |
ObjectMemory removeDependent:self |
|
3261 |
! ! |
|
3262 |
||
3263 |
!NewChangesBrowser methodsFor:'user actions'! |
|
3264 |
||
3265 |
doApply |
|
1546 | 3266 |
"applies the selected change" |
1545 | 3267 |
|
3268 |
self withSelectedChangeDo:[:change| |
|
2250 | 3269 |
skipSignal := nil. |
3270 |
self applyChange:change. |
|
3271 |
self autoSelectChange: (self listOfChanges at: (self listOfChanges indexOf: change) + 1 ifAbsent: [^self autoSelectLast]) |
|
1545 | 3272 |
] |
3273 |
! |
|
3274 |
||
3275 |
doApplyAll |
|
1546 | 3276 |
"applies all changes" |
1545 | 3277 |
|
3278 |
self withExecuteCursorDo:[ |
|
2250 | 3279 |
|change| |
3280 |
self unselectChange. |
|
3281 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
3282 |
1 to:self listOfChanges size do:[:changeNr | |
|
3283 |
self selectionOfChange value:(change := self listOfChanges at: changeNr). |
|
3284 |
self applyChange:change |
|
3285 |
]. |
|
3286 |
self autoSelectLast |
|
1545 | 3287 |
] |
3288 |
||
3289 |
! |
|
3290 |
||
1546 | 3291 |
doApplyAllForClass |
3292 |
"applies all changes having the same class like the selected one" |
|
3293 |
||
3294 |
self doApplyForClassToEndFrom: 1 |
|
3295 |
||
3296 |
||
3297 |
! |
|
3298 |
||
1545 | 3299 |
doApplyForClassToEnd |
1546 | 3300 |
"applies all changes having the same class like the selected one from the selected to the end" |
3301 |
||
3302 |
self doApplyForClassToEndFrom: (self listOfChanges indexOf: self selectionOfChange value) |
|
3303 |
! |
|
3304 |
||
3305 |
doApplyForClassToEndFrom: start |
|
3306 |
"applies changes with same class like the selected one from start to end" |
|
1545 | 3307 |
|
3308 |
self withSelectedChangeDo:[:change| |
|
2250 | 3309 |
|classNameToApply thisClassName lastChange change2| |
6288 | 3310 |
(classNameToApply := self classNameOfChange:change) notNil |
2250 | 3311 |
ifTrue: |
6288 | 3312 |
[ |
2250 | 3313 |
self unselectChange. |
3314 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
3315 |
start to:self listOfChanges size do: |
|
3316 |
[:changeNr| |
|
3317 |
change2 := self listOfChanges at: changeNr. |
|
3318 |
((thisClassName := self classNameOfChange:change2) notNil and: |
|
3319 |
[thisClassName = classNameToApply or: |
|
3320 |
[PrivateAsSeparate not and: [(thisClassName upTo: $:) = classNameToApply]]]) |
|
3321 |
ifTrue: |
|
6288 | 3322 |
[ |
2250 | 3323 |
self selectionOfChange value: change2. |
3324 |
self applyChange:change2. |
|
3325 |
lastChange := change2 |
|
3326 |
] |
|
3327 |
]. |
|
3328 |
self autoSelectChange:lastChange. |
|
3329 |
] |
|
1545 | 3330 |
] |
3331 |
||
3332 |
! |
|
3333 |
||
3334 |
doApplyFromLastSnapshot |
|
1546 | 3335 |
"applies all changes made since the last snapshot" |
1545 | 3336 |
|
3337 |
self autoSelectLast. |
|
3338 |
(self doFindSnapshot: 'last') ifTrue: [self doApplyToEnd] |
|
3339 |
! |
|
3340 |
||
3341 |
doApplyToEnd |
|
1546 | 3342 |
"applies all changes from selected one to be end" |
1545 | 3343 |
|
3344 |
self withSelectedChangeDo:[:change| |
|
2250 | 3345 |
self unselectChange. |
3346 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
3347 |
(self listOfChanges indexOf: change) to: self listOfChanges size do:[:changeNr| |
|
3348 |
self selectionOfChange value:(self listOfChanges at: changeNr). |
|
3349 |
self applyChange:(self listOfChanges at: changeNr) |
|
3350 |
]. |
|
3351 |
self autoSelectChange:self listOfChanges last |
|
1545 | 3352 |
] |
3353 |
||
3354 |
! |
|
3355 |
||
3356 |
doBrowseClass |
|
1546 | 3357 |
"opens a System Browser on the class of a change (and selector)" |
1545 | 3358 |
|
3359 |
|className cls isMeta| |
|
3360 |
||
3361 |
className := self fullClassNameOfChange:self selectionOfChange value. |
|
3362 |
className notNil ifTrue:[ |
|
6288 | 3363 |
isMeta := false. |
3364 |
(className endsWith:' class') ifTrue:[ |
|
3365 |
className := className copyWithoutLast:6. |
|
3366 |
isMeta := true. |
|
3367 |
]. |
|
3368 |
(cls := Smalltalk classNamed:className) notNil ifTrue:[ |
|
3369 |
isMeta ifTrue:[cls := cls class]. |
|
3370 |
cls browserClass |
|
3371 |
openInClass:cls |
|
3372 |
selector:(self selectorOfMethodChange:self selectionOfChange value) |
|
3373 |
] |
|
1545 | 3374 |
] |
3375 |
||
3220 | 3376 |
"Modified: / 26.9.2001 / 17:35:50 / cg" |
1545 | 3377 |
! |
3378 |
||
3379 |
doCompare |
|
1546 | 3380 |
"compares a change with the current system version" |
1545 | 3381 |
|
3382 |
|change| |
|
3383 |
||
3384 |
(change := self selectionOfChange value) notNil ifTrue:[ |
|
2250 | 3385 |
self withExecuteCursorDo:[self compareChange:change] |
1545 | 3386 |
]. |
3387 |
self newLabel:'' |
|
3388 |
! |
|
3389 |
||
3390 |
doCompress |
|
1546 | 3391 |
"compresses the changes, i.e. replaces multiple changes by the last change" |
1545 | 3392 |
|
3393 |
|changesSizeBefore| |
|
1546 | 3394 |
(changesSizeBefore := changes size) == 0 ifTrue: [^self warn: 'Nothing to compress!!']. |
1545 | 3395 |
self setChangeList. |
3396 |
self unselectChange. |
|
3397 |
self compressForClass:nil. |
|
6288 | 3398 |
self setChangeList. |
1545 | 3399 |
self updateInfoLabel. |
3400 |
||
6288 | 3401 |
self information: |
2250 | 3402 |
'Compression Rate: ', (((changesSizeBefore - changes size)/changesSizeBefore) * 100) rounded printString, '%\' withCRs, |
3403 |
'Obsolete Changes: ', (changesSizeBefore - changes size) printString, ' from ', changesSizeBefore printString |
|
1545 | 3404 |
|
3405 |
||
3406 |
||
3407 |
||
3408 |
! |
|
3409 |
||
3410 |
doCompressForClass |
|
1546 | 3411 |
"compresses changes for the selected class. |
1545 | 3412 |
this replaces multiple method-changes by the last (i.e. the most recent) change." |
3413 |
||
3414 |
self withSelectedChangeDo:[:change| |
|
2250 | 3415 |
| classNameToCompress | |
3416 |
||
3417 |
(classNameToCompress := self classNameOfChange:change) notNil ifTrue:[ |
|
3418 |
self compressForClass:classNameToCompress. |
|
3419 |
filterCompletionBlock value: self valueOfFilter value. |
|
3420 |
self autoSelectLast |
|
3421 |
] |
|
1545 | 3422 |
] |
3423 |
||
3424 |
! |
|
3425 |
||
3426 |
doDelete |
|
1546 | 3427 |
"deletes the selected change" |
1545 | 3428 |
|
3429 |
|change selectionIndex| |
|
3430 |
||
3431 |
(change := self selectionOfChange value) notNil ifTrue:[ |
|
2250 | 3432 |
selectionIndex := self listOfChanges indexOf: change. |
3433 |
self unselectChange. |
|
3434 |
self silentDeleteChange:change. |
|
3435 |
self listOfChanges remove:change. |
|
3436 |
self autoSelectOrEnd: (self listOfChanges at: selectionIndex ifAbsent: [nil]). |
|
1545 | 3437 |
] |
1546 | 3438 |
! |
3439 |
||
3440 |
doDeleteAll |
|
3441 |
"deletes all changes" |
|
3442 |
||
3443 |
self deleteChangesFrom:1 to: self listOfChanges size. |
|
3444 |
self autoSelectOrEnd: nil |
|
3445 |
||
3446 |
! |
|
3447 |
||
3448 |
doDeleteAllForClass |
|
3449 |
"deletes all changes having the same class like the selected one" |
|
3450 |
||
3451 |
self doDeleteForClassToEndFrom: 1 |
|
1545 | 3452 |
|
3453 |
! |
|
3454 |
||
3455 |
doDeleteForClassToEnd |
|
1546 | 3456 |
"deletes all changes having the same class like the selected one from the selected to the end" |
3457 |
||
3458 |
self withSelectedChangeDo:[:change| |
|
2250 | 3459 |
self doDeleteForClassToEndFrom: (self listOfChanges indexOf: change) |
1546 | 3460 |
] |
3461 |
||
3462 |
||
3463 |
! |
|
3464 |
||
3465 |
doDeleteForClassToEndFrom: start |
|
3466 |
"deletes changes with same class like the selected one from start to end" |
|
1545 | 3467 |
|
3468 |
self withSelectedChangeDo:[:change| |
|
2250 | 3469 |
|classNameToDelete| |
3470 |
(classNameToDelete := self classNameOfChange:change) notNil ifTrue:[ |
|
3471 |
self unselectChange. |
|
6288 | 3472 |
self silentDeleteChangesFor:classNameToDelete |
2250 | 3473 |
from:start |
3474 |
to:self listOfChanges size. |
|
3475 |
self setChangeList. |
|
3476 |
self autoSelectOrEnd: nil |
|
3477 |
] |
|
1546 | 3478 |
]. |
3479 |
||
1545 | 3480 |
|
3481 |
||
3482 |
! |
|
3483 |
||
3484 |
doDeleteToEnd |
|
1546 | 3485 |
"deletes all changes from selected one to be end" |
1545 | 3486 |
|
3487 |
|changeNr| |
|
3488 |
||
3489 |
changeNr := (self listOfChanges indexOf: self selectionOfChange value). |
|
3490 |
changeNr ~~ 0 ifTrue:[ |
|
2250 | 3491 |
self deleteChangesFrom:changeNr to: self listOfChanges size. |
3492 |
self unselectChange. |
|
3493 |
self autoSelectOrEnd: nil |
|
1545 | 3494 |
] |
3495 |
||
3496 |
! |
|
3497 |
||
1568 | 3498 |
doFilter: aFilterString |
3499 |
"filter the changes with aFilterString" |
|
3500 |
||
1569 | 3501 |
self selectionOfChange value: nil. |
1568 | 3502 |
self valueOfFilter value: aFilterString withoutNotifying: self. |
3503 |
self valueOfFilter changed. |
|
3504 |
self autoSelectLast |
|
3505 |
! |
|
3506 |
||
1644 | 3507 |
doFilterSourceType: aFilterStringTypeString |
3508 |
"filter the source changes with aFilterStringTypeString" |
|
1568 | 3509 |
|
1569 | 3510 |
self selectionOfChange value: nil. |
3511 |
self listOfChanges contents: #(). |
|
3512 |
self valueOfFilter value: '' withoutNotifying: self. |
|
1644 | 3513 |
self listOfChanges contents: (changes select: [:change| change type = 'source' and: [aFilterStringTypeString match: change string]]). |
3514 |
self autoSelectLast |
|
1568 | 3515 |
|
3516 |
! |
|
3517 |
||
3518 |
doFilterType: aFilterTypeString |
|
3519 |
"filter the changes with aFilterTypeString" |
|
3520 |
||
1569 | 3521 |
self selectionOfChange value: nil. |
3522 |
self valueOfFilter value: '' withoutNotifying: self. |
|
1568 | 3523 |
self listOfChanges contents: (changes select: [:change| change type = aFilterTypeString]). |
3524 |
self autoSelectLast |
|
3525 |
||
3526 |
! |
|
3527 |
||
1545 | 3528 |
doFindSnapshot: what |
7957 | 3529 |
"finds the last made snapshot and selects it. what is one of last, prvious or next" |
1545 | 3530 |
|
1887 | 3531 |
|snapshotNr snapshotFound| |
3532 |
||
7957 | 3533 |
(self listOfChanges contains: [:change| change type = 'image']) ifFalse: [ |
3534 |
self warn: 'No snapshot found!!'. |
|
3535 |
^ false. |
|
3536 |
]. |
|
1545 | 3537 |
|
3538 |
self withSelectedChangeDo:[:change| |
|
7957 | 3539 |
what = 'last' ifTrue:[ |
3540 |
snapshotNr := self listOfChanges size+1. |
|
3541 |
] ifFalse:[ |
|
3542 |
snapshotNr := self listOfChanges indexOf: change. |
|
3543 |
]. |
|
3544 |
||
3545 |
snapshotFound := false. |
|
3546 |
[snapshotNr > 0 and: [snapshotFound not]] whileTrue:[ |
|
3547 |
(what = 'last' or:[what = 'previous']) ifTrue:[ |
|
3548 |
snapshotNr := snapshotNr - 1. |
|
3549 |
snapshotNr == 0 ifTrue: [snapshotNr := self listOfChanges size]. |
|
3550 |
] ifFalse:[ |
|
3551 |
snapshotNr := snapshotNr + 1. |
|
3552 |
snapshotNr > self listOfChanges size ifTrue: [snapshotNr := 1]. |
|
3553 |
]. |
|
3554 |
(self listOfChanges at: snapshotNr ifAbsent: [^self autoSelectChange: (what = 'last' ifTrue: [self listOfChanges last] ifFalse: [self listOfChanges first])]) type = 'image' |
|
3555 |
ifTrue:[ |
|
3556 |
snapshotFound := true. |
|
3557 |
self autoSelectChange:(self listOfChanges at: snapshotNr) |
|
3558 |
] |
|
3559 |
] |
|
1887 | 3560 |
]. |
3561 |
||
7957 | 3562 |
^ snapshotFound |
1545 | 3563 |
! |
3564 |
||
1556 | 3565 |
doLoad |
1546 | 3566 |
"opens a dialog for loading changes from a file" |
1545 | 3567 |
|
3568 |
|fileName| |
|
3569 |
(fileName := |
|
2250 | 3570 |
(FileSelectionBrowser |
3571 |
request: 'Load Changes List' |
|
3572 |
fileName: changeFileName |
|
3573 |
withFileFilters: #('c*'))) notNil |
|
1545 | 3574 |
ifTrue: |
3575 |
[ |
|
2250 | 3576 |
changeFileName := fileName. |
3577 |
changes removeAll. |
|
3578 |
self readChangesFileInBackground:true. |
|
3579 |
self unselectChange. |
|
3580 |
Processor addTimedBlock:autoUpdateBlock afterSeconds:5. |
|
3581 |
self updateInfoLabel. |
|
3582 |
self autoSelectLast |
|
1545 | 3583 |
] |
3584 |
! |
|
3585 |
||
3586 |
doReload |
|
1546 | 3587 |
"reloads the changes from the file" |
1545 | 3588 |
|
3589 |
changes removeAll. |
|
3590 |
self unselectChange. |
|
3591 |
self readChangesFileInBackground:true. |
|
3592 |
self autoSelectLast |
|
3593 |
||
3594 |
! |
|
3595 |
||
3596 |
doSave |
|
3597 |
"write back the changes file. To avoid problems when the disk is full |
|
6288 | 3598 |
or a crash occurs while writing (well, or someone kills us), |
1545 | 3599 |
first write the stuff to a new temporary file. If this works ok, |
3600 |
rename the old change-file to a .bak file and finally rename the |
|
6288 | 3601 |
tempfile back to the change-file. |
1545 | 3602 |
That way, if anything happens, either the original file is left unchanged, |
3603 |
or we have at least a backup of the previous change file." |
|
3604 |
||
6288 | 3605 |
|inStream outStream tempfile stamp f| |
1545 | 3606 |
|
3607 |
self valueOfNotReading value ifFalse: [^nil]. |
|
3608 |
||
3609 |
editingClassSource ifTrue:[ |
|
2250 | 3610 |
(self confirm:'You are editing a classes sourceFile (not a changeFile) !!\Are you certain, you want to overwrite it ?' withCRs) |
3611 |
ifFalse:[ |
|
3612 |
^ false |
|
3613 |
] |
|
1545 | 3614 |
]. |
3615 |
||
3616 |
tempfile := Filename newTemporaryIn:nil. |
|
3617 |
tempfile exists ifTrue:[tempfile remove]. |
|
3618 |
||
3619 |
outStream := tempfile writeStream. |
|
3620 |
outStream isNil ifTrue:[ |
|
2250 | 3621 |
self warn:'Cannot create temporary file in current directory.'. |
3622 |
^ false |
|
1545 | 3623 |
]. |
3624 |
||
3625 |
inStream := FileStream readonlyFileNamed:changeFileName. |
|
3626 |
inStream isNil ifTrue:[^ false]. |
|
3627 |
||
3628 |
self withCursor:(Cursor write) do:[ |
|
2250 | 3629 |
|excla sawExcla done first chunk |
3630 |
nChanges "{Class:SmallInteger}" | |
|
3631 |
||
3632 |
Stream writeErrorSignal handle:[:ex | |
|
3633 |
self warn:('Could not update the changes file.\\' , ex errorString) withCRs. |
|
3634 |
^ false |
|
3635 |
] do:[ |
|
3636 |
||
3637 |
self valueOfNotSaving value: false. |
|
3638 |
||
3639 |
excla := inStream class chunkSeparator. |
|
3640 |
nChanges := changes size. |
|
3641 |
||
6288 | 3642 |
1 to:nChanges do:[:index | |
2250 | 3643 |
inStream position: (changes at: index) position. |
3644 |
sawExcla := inStream peekFor:excla. |
|
3645 |
chunk := inStream nextChunk. |
|
3646 |
||
3647 |
(chunk notNil |
|
3648 |
and:[(chunk startsWith:'''---- snap') not]) ifTrue:[ |
|
3649 |
(stamp := (changes at:index) timeStamp) notNil ifTrue:[ |
|
3650 |
outStream nextPutAll:'''---- timestamp ' , stamp , ' ----'''. |
|
3651 |
outStream nextPut:excla; cr. |
|
3652 |
]. |
|
3653 |
]. |
|
3654 |
||
6288 | 3655 |
sawExcla ifTrue:[ |
3656 |
outStream nextPut:excla. |
|
2250 | 3657 |
outStream nextChunkPut:chunk. |
3658 |
outStream cr; cr. |
|
3659 |
||
3660 |
" |
|
3661 |
a method-definition chunk - skip followups |
|
3662 |
" |
|
3663 |
done := false. |
|
3664 |
first := true. |
|
3665 |
[done] whileFalse:[ |
|
3666 |
chunk := inStream nextChunk. |
|
3667 |
chunk isNil ifTrue:[ |
|
3668 |
outStream cr; cr. |
|
3669 |
done := true |
|
3670 |
] ifFalse:[ |
|
3671 |
chunk isEmpty ifTrue:[ |
|
3672 |
outStream space; nextChunkPut:chunk; cr; cr. |
|
3673 |
done := true. |
|
3674 |
] ifFalse:[ |
|
3675 |
first ifFalse:[ |
|
3676 |
outStream cr; cr. |
|
3677 |
]. |
|
3678 |
outStream nextChunkPut:chunk. |
|
3679 |
]. |
|
3680 |
]. |
|
3681 |
first := false. |
|
3682 |
]. |
|
3683 |
] ifFalse:[ |
|
3684 |
outStream nextChunkPut:chunk. |
|
3685 |
outStream cr |
|
3686 |
] |
|
3687 |
]. |
|
3688 |
outStream close. |
|
3689 |
inStream close. |
|
3690 |
]. |
|
3691 |
||
3692 |
f := changeFileName asFilename. |
|
3693 |
f renameTo:(f withSuffix:'bak'). |
|
3694 |
tempfile renameTo:changeFileName. |
|
3695 |
self doReload. |
|
3696 |
modified := false. |
|
3697 |
self valueOfNotSaving value: true. |
|
1545 | 3698 |
]. |
3699 |
^ true |
|
3700 |
||
3701 |
||
3702 |
! ! |
|
3703 |
||
3704 |
!NewChangesBrowser::Change methodsFor:'accessing'! |
|
3705 |
||
3706 |
category |
|
3707 |
||
3708 |
^category |
|
3709 |
! |
|
3710 |
||
3711 |
category: aValue |
|
3712 |
||
3713 |
category := aValue |
|
3714 |
! |
|
3715 |
||
3716 |
chunk |
|
3717 |
||
3718 |
^chunk |
|
3719 |
! |
|
3720 |
||
3721 |
chunk: aValue |
|
3722 |
||
3723 |
chunk := aValue |
|
3724 |
! |
|
3725 |
||
3726 |
className |
|
3727 |
||
3728 |
^className |
|
3729 |
! |
|
3730 |
||
3731 |
className: aValue |
|
3732 |
||
3733 |
className := aValue |
|
3734 |
! |
|
3735 |
||
3736 |
delta |
|
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3737 |
|cls| |
1545 | 3738 |
|
3739 |
delta size = 0 ifTrue: [^'']. |
|
3740 |
delta = '=' ifTrue: [^'Current']. |
|
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3741 |
delta = '?' ifTrue: [ |
2250 | 3742 |
(className notNil and:[className knownAsSymbol]) ifTrue:[ |
3743 |
(cls := Smalltalk at:className asSymbol ifAbsent:nil) notNil ifTrue:[ |
|
3744 |
cls isBehavior ifTrue:[ |
|
3745 |
cls isLoaded ifFalse:[ |
|
3746 |
^ 'Not loaded' |
|
3747 |
] |
|
3748 |
] |
|
3749 |
] |
|
3750 |
]. |
|
3751 |
^'No class' |
|
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3752 |
]. |
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3753 |
delta = '-' ifTrue: [^'Remove']. |
1545 | 3754 |
delta = '+' ifTrue: [^'New']. |
3755 |
^delta |
|
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3756 |
|
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3757 |
"Modified: / 29.7.1998 / 23:08:10 / cg" |
1545 | 3758 |
! |
3759 |
||
3760 |
delta: aValue |
|
3761 |
||
3762 |
delta := aValue |
|
3763 |
! |
|
3764 |
||
3765 |
followUp |
|
3766 |
||
3767 |
^followUp |
|
3768 |
! |
|
3769 |
||
3770 |
followUp: aValue |
|
3771 |
||
3772 |
followUp := aValue |
|
3773 |
! |
|
3774 |
||
1568 | 3775 |
lastPosition: aValue |
3776 |
||
3777 |
lastPosition := aValue |
|
3778 |
! |
|
3779 |
||
1545 | 3780 |
listColor |
7957 | 3781 |
((string size < 3) or:[(string at: 3) ~~ $-]) ifTrue:[ |
3782 |
(self type = 'class') ifTrue: [^Color gray]. |
|
3783 |
^ Color white |
|
1545 | 3784 |
]. |
3785 |
||
3786 |
(string includesMatchString: '---- s') ifTrue: [^Color red]. |
|
3787 |
(string includesMatchString: '---- f') ifTrue: [^Color cyan: 100 magenta: 20 yellow: 20]. |
|
3788 |
(string includesMatchString: '---- c') ifTrue: [^Color blue]. |
|
3789 |
||
3790 |
^Color white |
|
3791 |
! |
|
3792 |
||
3793 |
position |
|
3794 |
||
3795 |
^position |
|
3796 |
! |
|
3797 |
||
3798 |
position: aValue |
|
3799 |
||
3800 |
position := aValue |
|
3801 |
! |
|
3802 |
||
1568 | 3803 |
positions |
3804 |
||
3805 |
^position printString, ' - ', lastPosition printString |
|
3806 |
! |
|
3807 |
||
7957 | 3808 |
selector |
3809 |
^ selector |
|
3810 |
! |
|
3811 |
||
3812 |
selector:something |
|
3813 |
selector := something. |
|
3814 |
! |
|
3815 |
||
1545 | 3816 |
string |
3817 |
||
3818 |
^string |
|
3819 |
! |
|
3820 |
||
3821 |
string: aValue |
|
3822 |
||
3823 |
string := aValue |
|
3824 |
! |
|
3825 |
||
3826 |
timeStamp |
|
3827 |
||
3828 |
^timeStamp |
|
3829 |
! |
|
3830 |
||
3831 |
timeStamp: aValue |
|
3832 |
||
3833 |
timeStamp := aValue |
|
3834 |
! |
|
3835 |
||
3836 |
type |
|
3837 |
||
3838 |
(type = 'doIt' or: [type = 'remove']) ifTrue: [^'class']. |
|
3839 |
(type size = 0) ifTrue: [(string includesMatchString: '---- s') ifTrue: [^'image'] ifFalse: [^'source']]. |
|
3840 |
(self category = nil) ifTrue: [^'class']. |
|
3841 |
^'method' |
|
3842 |
! |
|
3843 |
||
3844 |
type: aValue |
|
3845 |
||
3846 |
type := aValue |
|
3847 |
! ! |
|
3848 |
||
3849 |
!NewChangesBrowser class methodsFor:'documentation'! |
|
3850 |
||
3851 |
version |
|
9180
ea28dedc13aa
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
9179
diff
changeset
|
3852 |
^ '$Header: /cvs/stx/stx/libtool/NewChangesBrowser.st,v 1.32 2009-11-04 15:44:32 cg Exp $' |
9179
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
3853 |
! |
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
3854 |
|
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
3855 |
version_CVS |
9180
ea28dedc13aa
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
9179
diff
changeset
|
3856 |
^ '$Header: /cvs/stx/stx/libtool/NewChangesBrowser.st,v 1.32 2009-11-04 15:44:32 cg Exp $' |
1545 | 3857 |
! ! |