author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 29 Jan 2012 12:53:39 +0000 | |
branch | jv |
changeset 12123 | 4bde08cebd48 |
parent 10584 | 26c11c692527 |
child 12125 | 0c49a3b13e43 |
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 |
label: 'File' |
|
877 |
translateLabel: true |
|
878 |
submenu: |
|
879 |
(Menu |
|
880 |
( |
|
881 |
(MenuItem |
|
882 |
activeHelpKey: fileReload |
|
883 |
enabled: valueOfNotReading |
|
884 |
label: 'Reload' |
|
885 |
itemValue: doReload |
|
886 |
translateLabel: true |
|
887 |
) |
|
888 |
(MenuItem |
|
889 |
label: '-' |
|
890 |
) |
|
891 |
(MenuItem |
|
892 |
activeHelpKey: fileLoad |
|
893 |
enabled: valueOfNotSaving |
|
894 |
label: 'Load...' |
|
895 |
itemValue: doLoad |
|
896 |
translateLabel: true |
|
897 |
) |
|
898 |
(MenuItem |
|
899 |
label: '-' |
|
900 |
) |
|
901 |
(MenuItem |
|
902 |
activeHelpKey: fileSave |
|
903 |
enabled: valueOfNotReading |
|
904 |
label: 'Save' |
|
905 |
itemValue: doSave |
|
906 |
translateLabel: true |
|
907 |
) |
|
908 |
(MenuItem |
|
909 |
label: '-' |
|
910 |
) |
|
911 |
(MenuItem |
|
912 |
activeHelpKey: fileBrowseClass |
|
913 |
enabled: valueOfHavingChangeSelection |
|
914 |
label: 'Browse Class' |
|
915 |
itemValue: doBrowseClass |
|
916 |
translateLabel: true |
|
917 |
) |
|
918 |
(MenuItem |
|
919 |
label: '-' |
|
920 |
) |
|
921 |
(MenuItem |
|
922 |
activeHelpKey: fileExit |
|
923 |
enabled: valueOfNotSaving |
|
924 |
label: 'Exit' |
|
925 |
itemValue: closeRequest |
|
926 |
translateLabel: true |
|
927 |
) |
|
928 |
) |
|
929 |
nil |
|
930 |
nil |
|
931 |
) |
|
932 |
) |
|
933 |
(MenuItem |
|
934 |
label: 'Apply' |
|
935 |
translateLabel: true |
|
936 |
submenu: |
|
937 |
(Menu |
|
938 |
( |
|
939 |
(MenuItem |
|
940 |
activeHelpKey: applyLine |
|
941 |
enabled: valueOfHavingChangeSelection |
|
942 |
label: 'Change' |
|
943 |
itemValue: doApply |
|
944 |
translateLabel: true |
|
945 |
) |
|
946 |
(MenuItem |
|
947 |
label: '-' |
|
948 |
) |
|
949 |
(MenuItem |
|
950 |
activeHelpKey: applyAll |
|
951 |
enabled: valueOfNotReading |
|
952 |
label: 'All' |
|
953 |
itemValue: doApplyAll |
|
954 |
translateLabel: true |
|
955 |
) |
|
956 |
(MenuItem |
|
957 |
activeHelpKey: applyToEnd |
|
958 |
enabled: valueOfHavingSelection |
|
959 |
label: 'To End' |
|
960 |
itemValue: doApplyToEnd |
|
961 |
translateLabel: true |
|
962 |
) |
|
963 |
(MenuItem |
|
964 |
activeHelpKey: applyForClassToEnd |
|
965 |
enabled: valueOfHavingChangeSelection |
|
966 |
label: 'All for Class' |
|
967 |
itemValue: doApplyAllForClass |
|
968 |
translateLabel: true |
|
969 |
) |
|
970 |
(MenuItem |
|
971 |
activeHelpKey: applyForClassToEnd |
|
972 |
enabled: valueOfHavingChangeSelection |
|
973 |
label: 'For Class to End' |
|
974 |
itemValue: doApplyForClassToEnd |
|
975 |
translateLabel: true |
|
976 |
) |
|
977 |
(MenuItem |
|
978 |
label: '-' |
|
979 |
) |
|
980 |
(MenuItem |
|
981 |
activeHelpKey: applyFromLastSnapshot |
|
982 |
enabled: valueOfNotReading |
|
983 |
label: 'From Last Snapshot' |
|
984 |
itemValue: doApplyFromLastSnapshot |
|
985 |
translateLabel: true |
|
986 |
) |
|
987 |
) |
|
988 |
nil |
|
989 |
nil |
|
990 |
) |
|
991 |
) |
|
992 |
(MenuItem |
|
993 |
label: 'Delete' |
|
994 |
translateLabel: true |
|
995 |
submenu: |
|
996 |
(Menu |
|
997 |
( |
|
998 |
(MenuItem |
|
999 |
activeHelpKey: deleteLine |
|
1000 |
enabled: valueOfHavingSelection |
|
1001 |
label: 'Change' |
|
1002 |
itemValue: doDelete |
|
1003 |
translateLabel: true |
|
1004 |
) |
|
1005 |
(MenuItem |
|
1006 |
label: '-' |
|
1007 |
) |
|
1008 |
(MenuItem |
|
1009 |
activeHelpKey: deleteAll |
|
1010 |
enabled: valueOfNotReading |
|
1011 |
label: 'All' |
|
1012 |
itemValue: doDeleteAll |
|
1013 |
translateLabel: true |
|
1014 |
) |
|
1015 |
(MenuItem |
|
1016 |
activeHelpKey: deleteToEnd |
|
1017 |
enabled: valueOfHavingSelection |
|
1018 |
label: 'To End' |
|
1019 |
itemValue: doDeleteToEnd |
|
1020 |
translateLabel: true |
|
1021 |
) |
|
1022 |
(MenuItem |
|
1023 |
activeHelpKey: applyForClassToEnd |
|
1024 |
enabled: valueOfHavingChangeSelection |
|
1025 |
label: 'All for Class' |
|
1026 |
itemValue: doDeleteAllForClass |
|
1027 |
translateLabel: true |
|
1028 |
) |
|
1029 |
(MenuItem |
|
1030 |
activeHelpKey: deleteForClassToEnd |
|
1031 |
enabled: valueOfHavingChangeSelection |
|
1032 |
label: 'For Class to End' |
|
1033 |
itemValue: doDeleteForClassToEnd |
|
1034 |
translateLabel: true |
|
1035 |
) |
|
1036 |
(MenuItem |
|
1037 |
label: '-' |
|
1038 |
) |
|
1039 |
(MenuItem |
|
1040 |
activeHelpKey: deleteCompress |
|
1041 |
enabled: valueOfNotReading |
|
1042 |
label: 'Compress' |
|
1043 |
itemValue: doCompress |
|
1044 |
translateLabel: true |
|
1045 |
) |
|
1046 |
(MenuItem |
|
1047 |
activeHelpKey: deleteCompressForClass |
|
1048 |
enabled: valueOfHavingChangeSelection |
|
1049 |
label: 'Compress for Class' |
|
1050 |
itemValue: doCompressForClass |
|
1051 |
translateLabel: true |
|
1052 |
) |
|
1053 |
) |
|
1054 |
nil |
|
1055 |
nil |
|
1056 |
) |
|
1057 |
) |
|
1058 |
(MenuItem |
|
1059 |
label: 'Search' |
|
1060 |
translateLabel: true |
|
1061 |
submenu: |
|
1062 |
(Menu |
|
1063 |
( |
|
1064 |
(MenuItem |
|
1065 |
activeHelpKey: testFindPreviousSnapshot |
|
1066 |
enabled: valueOfHavingSelection |
|
1067 |
label: 'Find Previous Snapshot' |
|
1068 |
itemValue: doFindSnapshot: |
|
1069 |
translateLabel: true |
|
1070 |
argument: 'previous' |
|
1071 |
) |
|
1072 |
(MenuItem |
|
1073 |
activeHelpKey: testFindNextSnapshot |
|
1074 |
enabled: valueOfHavingSelection |
|
1075 |
label: 'Find Next Snapshot' |
|
1076 |
itemValue: doFindSnapshot: |
|
1077 |
translateLabel: true |
|
1078 |
argument: 'next' |
|
1079 |
) |
|
1080 |
(MenuItem |
|
1081 |
activeHelpKey: testFindLastSnapshot |
|
1082 |
enabled: valueOfHavingSelection |
|
1083 |
label: 'Find Last Snapshot' |
|
1084 |
itemValue: doFindSnapshot: |
|
1085 |
translateLabel: true |
|
1086 |
argument: 'last' |
|
1087 |
) |
|
1088 |
) |
|
1089 |
nil |
|
1090 |
nil |
|
1091 |
) |
|
1092 |
) |
|
1093 |
(MenuItem |
|
1094 |
label: 'Test' |
|
1095 |
translateLabel: true |
|
1096 |
submenu: |
|
1097 |
(Menu |
|
1098 |
( |
|
1099 |
(MenuItem |
|
1100 |
activeHelpKey: testCompareWithCurrentVersion |
|
1101 |
enabled: valueOfHavingChangeSelection |
|
1102 |
label: 'Compare with Current Version' |
|
1103 |
itemValue: doCompare |
|
1104 |
translateLabel: true |
|
1105 |
) |
|
1106 |
) |
|
1107 |
nil |
|
1108 |
nil |
|
1109 |
) |
|
1110 |
) |
|
1111 |
(MenuItem |
|
1112 |
label: 'Settings' |
|
1113 |
translateLabel: true |
|
1114 |
submenu: |
|
1115 |
(Menu |
|
1116 |
( |
|
1117 |
(MenuItem |
|
1118 |
activeHelpKey: settingsAutoUpdate |
|
1119 |
enabled: valueOfNotReading |
|
1120 |
label: 'Auto Update' |
|
1121 |
translateLabel: true |
|
1122 |
indication: autoUpdateMode: |
|
1123 |
) |
|
1124 |
(MenuItem |
|
1125 |
label: '-' |
|
1126 |
) |
|
1127 |
(MenuItem |
|
1128 |
activeHelpKey: settingsPrivateAsSeparate |
|
1129 |
enabled: valueOfNotReading |
|
1130 |
label: 'Private Classes as Separate' |
|
1131 |
translateLabel: true |
|
1132 |
indication: privateAsSeparate: |
|
1133 |
) |
|
1134 |
(MenuItem |
|
1135 |
label: '-' |
|
1136 |
) |
|
1137 |
(MenuItem |
|
1138 |
activeHelpKey: settingsColumns |
|
1139 |
label: 'Columns' |
|
1140 |
translateLabel: true |
|
1141 |
submenu: |
|
1142 |
(Menu |
|
1143 |
( |
|
1144 |
(MenuItem |
|
1145 |
activeHelpKey: settingsColumnsClassName |
|
1146 |
label: 'Class' |
|
1147 |
translateLabel: true |
|
1148 |
isVisible: false |
|
1149 |
hideMenuOnActivated: false |
|
1150 |
indication: classNameColumn: |
|
1151 |
) |
|
1152 |
(MenuItem |
|
1153 |
activeHelpKey: settingsColumnsCategory |
|
1154 |
label: 'Selector' |
|
1155 |
translateLabel: true |
|
1156 |
isVisible: false |
|
1157 |
hideMenuOnActivated: false |
|
1158 |
indication: selectorColumn: |
|
1159 |
) |
|
1160 |
(MenuItem |
|
1161 |
activeHelpKey: settingsColumnsCategory |
|
1162 |
label: 'Category' |
|
1163 |
translateLabel: true |
|
1164 |
hideMenuOnActivated: false |
|
1165 |
indication: categoryColumn: |
|
1166 |
) |
|
1167 |
(MenuItem |
|
1168 |
activeHelpKey: settingsColumnsDeltaInfo |
|
1169 |
label: 'Delta Info' |
|
1170 |
translateLabel: true |
|
1171 |
hideMenuOnActivated: false |
|
1172 |
indication: deltaInfoColumn: |
|
1173 |
) |
|
1174 |
(MenuItem |
|
1175 |
activeHelpKey: settingsColumnsType |
|
1176 |
label: 'Type' |
|
1177 |
translateLabel: true |
|
1178 |
hideMenuOnActivated: false |
|
1179 |
indication: typeColumn: |
|
1180 |
) |
|
1181 |
(MenuItem |
|
1182 |
activeHelpKey: settingsColumnsTimeStamp |
|
1183 |
label: 'Time Stamp' |
|
1184 |
translateLabel: true |
|
1185 |
hideMenuOnActivated: false |
|
1186 |
indication: timeStampColumn: |
|
1187 |
) |
|
1188 |
(MenuItem |
|
1189 |
activeHelpKey: settingsColumnsPosition |
|
1190 |
label: 'Positions' |
|
1191 |
translateLabel: true |
|
1192 |
hideMenuOnActivated: false |
|
1193 |
indication: positionsColumn: |
|
1194 |
) |
|
1195 |
) |
|
1196 |
nil |
|
1197 |
nil |
|
1198 |
) |
|
1199 |
) |
|
1200 |
(MenuItem |
|
1201 |
label: '-' |
|
1202 |
) |
|
1203 |
(MenuItem |
|
1204 |
enabled: valueOfNotReading |
|
1205 |
label: 'Fonts' |
|
1206 |
translateLabel: true |
|
1207 |
submenuChannel: menuFont |
|
1208 |
) |
|
1209 |
) |
|
1210 |
nil |
|
1211 |
nil |
|
1212 |
) |
|
1213 |
) |
|
1214 |
(MenuItem |
|
1215 |
label: 'MENU_Help' |
|
1216 |
translateLabel: true |
|
1217 |
startGroup: conditionalRight |
|
1218 |
submenuChannel: menuHelp |
|
1219 |
) |
|
1220 |
) |
|
1221 |
nil |
|
1222 |
nil |
|
1545 | 1223 |
) |
1224 |
! |
|
1225 |
||
1226 |
menuTable |
|
1227 |
"This resource specification was automatically generated |
|
1228 |
by the MenuEditor of ST/X." |
|
1229 |
||
1230 |
"Do not manually edit this!! If it is corrupted, |
|
1231 |
the MenuEditor may not be able to read the specification." |
|
1232 |
||
1233 |
" |
|
1234 |
MenuEditor new openOnClass:NewChangesBrowser andSelector:#menuTable |
|
1235 |
(Menu new fromLiteralArrayEncoding:(NewChangesBrowser menuTable)) startUp |
|
1236 |
" |
|
1237 |
||
1238 |
<resource: #menu> |
|
1239 |
||
1240 |
^ |
|
6288 | 1241 |
|
1545 | 1242 |
#(#Menu |
6288 | 1243 |
|
2250 | 1244 |
#( |
1245 |
#(#MenuItem |
|
1246 |
#label: 'Apply' |
|
1247 |
#translateLabel: true |
|
1248 |
#value: #doApply |
|
1249 |
#activeHelpKey: #applyLine |
|
1250 |
#enabled: #valueOfHavingChangeSelection |
|
1251 |
) |
|
1252 |
#(#MenuItem |
|
1253 |
#label: 'Apply To End' |
|
1254 |
#translateLabel: true |
|
1255 |
#value: #doApplyToEnd |
|
1256 |
#activeHelpKey: #applyToEnd |
|
1257 |
#enabled: #valueOfHavingSelection |
|
1258 |
) |
|
1259 |
#(#MenuItem |
|
1260 |
#label: 'Apply All For Class' |
|
1261 |
#translateLabel: true |
|
1262 |
#value: #doApplyAllForClass |
|
1263 |
#activeHelpKey: #applyForClassToEnd |
|
1264 |
#enabled: #valueOfHavingChangeSelection |
|
1265 |
) |
|
1266 |
#(#MenuItem |
|
1267 |
#label: 'Apply For Class To End' |
|
1268 |
#translateLabel: true |
|
1269 |
#value: #doApplyForClassToEnd |
|
1270 |
#activeHelpKey: #applyForClassToEnd |
|
1271 |
#enabled: #valueOfHavingChangeSelection |
|
1272 |
) |
|
1273 |
#(#MenuItem |
|
1274 |
#label: '-' |
|
1275 |
) |
|
1276 |
#(#MenuItem |
|
1277 |
#label: 'Delete' |
|
1278 |
#translateLabel: true |
|
1279 |
#value: #doDelete |
|
1280 |
#activeHelpKey: #deleteLine |
|
1281 |
#enabled: #valueOfHavingSelection |
|
1282 |
) |
|
1283 |
#(#MenuItem |
|
1284 |
#label: 'Delete To End' |
|
1285 |
#translateLabel: true |
|
1286 |
#value: #doDeleteToEnd |
|
1287 |
#activeHelpKey: #deleteToEnd |
|
1288 |
#enabled: #valueOfHavingSelection |
|
1289 |
) |
|
1290 |
#(#MenuItem |
|
1291 |
#label: 'Delete All For Class' |
|
1292 |
#translateLabel: true |
|
1293 |
#value: #doDeleteAllForClass |
|
1294 |
#activeHelpKey: #applyForClassToEnd |
|
1295 |
#enabled: #valueOfHavingChangeSelection |
|
1296 |
) |
|
1297 |
#(#MenuItem |
|
1298 |
#label: 'Delete For Class To End' |
|
1299 |
#translateLabel: true |
|
1300 |
#value: #doDeleteForClassToEnd |
|
1301 |
#activeHelpKey: #deleteForClassToEnd |
|
1302 |
#enabled: #valueOfHavingChangeSelection |
|
1303 |
) |
|
1304 |
#(#MenuItem |
|
1305 |
#label: '-' |
|
1306 |
) |
|
1307 |
#(#MenuItem |
|
1308 |
#label: 'Browse Class' |
|
1309 |
#translateLabel: true |
|
1310 |
#value: #doBrowseClass |
|
1311 |
#activeHelpKey: #fileBrowseClass |
|
1312 |
#enabled: #valueOfHavingChangeSelection |
|
1313 |
) |
|
1314 |
#(#MenuItem |
|
1315 |
#label: '-' |
|
1316 |
) |
|
1317 |
#(#MenuItem |
|
1318 |
#label: 'Compress For Class' |
|
1319 |
#translateLabel: true |
|
1320 |
#value: #doCompressForClass |
|
1321 |
#activeHelpKey: #deleteCompressForClass |
|
1322 |
#enabled: #valueOfHavingChangeSelection |
|
1323 |
) |
|
1324 |
) nil |
|
1325 |
nil |
|
1545 | 1326 |
) |
1650 | 1327 |
|
1328 |
"Modified: / 19.5.1998 / 18:03:59 / cg" |
|
1545 | 1329 |
! |
1330 |
||
1331 |
menuToolbar |
|
1332 |
"This resource specification was automatically generated |
|
1333 |
by the MenuEditor of ST/X." |
|
1334 |
||
1335 |
"Do not manually edit this!! If it is corrupted, |
|
1336 |
the MenuEditor may not be able to read the specification." |
|
1337 |
||
1338 |
" |
|
1339 |
MenuEditor new openOnClass:NewChangesBrowser andSelector:#menuToolbar |
|
1340 |
(Menu new fromLiteralArrayEncoding:(NewChangesBrowser menuToolbar)) startUp |
|
1341 |
" |
|
1342 |
||
1343 |
<resource: #menu> |
|
1344 |
||
7957 | 1345 |
^ |
1346 |
#(Menu |
|
1347 |
( |
|
1348 |
(MenuItem |
|
1349 |
activeHelpKey: fileLoad |
|
1350 |
enabled: valueOfNotReading |
|
1351 |
label: 'Load' |
|
1352 |
itemValue: doLoad |
|
1353 |
translateLabel: true |
|
1354 |
isButton: true |
|
1355 |
labelImage: (ResourceRetriever XPToolbarIconLibrary loadFromFileIcon) |
|
1356 |
) |
|
1357 |
(MenuItem |
|
1358 |
activeHelpKey: fileSave |
|
1359 |
enabled: valueOfNotSaving |
|
1360 |
label: 'Save' |
|
1361 |
itemValue: doSave |
|
1362 |
translateLabel: true |
|
1363 |
isButton: true |
|
1364 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveToFileIcon) |
|
1365 |
) |
|
1366 |
(MenuItem |
|
1367 |
label: '-' |
|
1368 |
) |
|
1369 |
(MenuItem |
|
1370 |
activeHelpKey: applyLine |
|
1371 |
enabled: valueOfHavingChangeSelection |
|
1372 |
label: 'Apply' |
|
1373 |
itemValue: doApply |
|
1374 |
translateLabel: true |
|
1375 |
isButton: true |
|
1376 |
labelImage: (ResourceRetriever nil applyIcon) |
|
1377 |
) |
|
1378 |
(MenuItem |
|
1379 |
activeHelpKey: applyToEnd |
|
1380 |
enabled: valueOfHavingSelection |
|
1381 |
label: 'Apply To End' |
|
1382 |
itemValue: doApplyToEnd |
|
1383 |
translateLabel: true |
|
1384 |
isButton: true |
|
1385 |
labelImage: (ResourceRetriever nil applyToEndIcon) |
|
1386 |
) |
|
1387 |
(MenuItem |
|
1388 |
activeHelpKey: applyFromLastSnapshot |
|
1389 |
enabled: valueOfNotReading |
|
1390 |
label: 'Apply From Last Snapshot' |
|
1391 |
itemValue: doApplyFromLastSnapshot |
|
1392 |
translateLabel: true |
|
1393 |
isButton: true |
|
1394 |
labelImage: (ResourceRetriever nil applyFromLastSnapshotIcon) |
|
1395 |
) |
|
1396 |
(MenuItem |
|
1397 |
label: '-' |
|
1398 |
) |
|
1399 |
(MenuItem |
|
1400 |
activeHelpKey: deleteLine |
|
1401 |
enabled: valueOfHavingSelection |
|
1402 |
label: 'Delete' |
|
1403 |
itemValue: doDelete |
|
1404 |
translateLabel: true |
|
1405 |
isButton: true |
|
1406 |
labelImage: (ResourceRetriever nil deleteIcon) |
|
1407 |
) |
|
1408 |
(MenuItem |
|
1409 |
activeHelpKey: deleteToEnd |
|
1410 |
enabled: valueOfHavingSelection |
|
1411 |
label: 'Delete To End' |
|
1412 |
itemValue: doDeleteToEnd |
|
1413 |
translateLabel: true |
|
1414 |
isButton: true |
|
1415 |
labelImage: (ResourceRetriever nil deleteToEndIcon) |
|
1416 |
) |
|
1417 |
(MenuItem |
|
1418 |
activeHelpKey: deleteCompress |
|
1419 |
enabled: valueOfNotReading |
|
1420 |
label: 'Compress' |
|
1421 |
itemValue: doCompress |
|
1422 |
translateLabel: true |
|
1423 |
isButton: true |
|
1424 |
labelImage: (ResourceRetriever nil compressIcon) |
|
1425 |
) |
|
1426 |
(MenuItem |
|
1427 |
label: '-' |
|
1428 |
) |
|
1429 |
(MenuItem |
|
1430 |
activeHelpKey: testFindPreviousSnapshot |
|
1431 |
enabled: valueOfHavingSelection |
|
1432 |
label: 'Find Previous Snapshot' |
|
1433 |
itemValue: doFindSnapshot: |
|
1434 |
translateLabel: true |
|
1435 |
isButton: true |
|
1436 |
labelImage: (ResourceRetriever nil findPreviousSnapshotIcon) |
|
1437 |
argument: 'previous' |
|
1438 |
) |
|
1439 |
(MenuItem |
|
1440 |
activeHelpKey: testFindNextSnapshot |
|
1441 |
enabled: valueOfHavingSelection |
|
1442 |
label: 'Find Next Snapshot' |
|
1443 |
itemValue: doFindSnapshot: |
|
1444 |
translateLabel: true |
|
1445 |
isButton: true |
|
1446 |
labelImage: (ResourceRetriever nil findNextSnapshotIcon) |
|
1447 |
argument: 'next' |
|
1448 |
) |
|
1449 |
) |
|
1450 |
nil |
|
1451 |
nil |
|
1545 | 1452 |
) |
1453 |
! ! |
|
1454 |
||
1455 |
!NewChangesBrowser methodsFor:'accesssing - columns'! |
|
1456 |
||
1457 |
categoryColumn |
|
1546 | 1458 |
"returns whether the column for the category attribute of the changes is shown" |
1545 | 1459 |
|
1553 | 1460 |
^CategoryColumn ? (CategoryColumn := false) |
1545 | 1461 |
! |
1462 |
||
1463 |
categoryColumn: aBoolean |
|
1546 | 1464 |
"sets whether the column for the category attribute of the changes is shown" |
1545 | 1465 |
|
1653 | 1466 |
self changeColumn: #category add: (CategoryColumn := aBoolean) |
1467 |
||
1468 |
"Modified: / 19.5.1998 / 20:30:13 / cg" |
|
1545 | 1469 |
! |
1470 |
||
7957 | 1471 |
classAndSelectorColumn |
1472 |
"returns whether the column for the category attribute of the changes is shown" |
|
1473 |
||
1474 |
^ClassAndSelectorColumn ? (ClassAndSelectorColumn := false) |
|
1475 |
! |
|
1476 |
||
1477 |
classAndSelectorColumn: aBoolean |
|
1478 |
"sets whether the column for the category attribute of the changes is shown" |
|
1479 |
||
1480 |
self changeColumn: #classAndSelector add: (ClassAndSelectorColumn := aBoolean) |
|
1481 |
||
1482 |
"Modified: / 19.5.1998 / 20:30:13 / cg" |
|
1483 |
! |
|
1484 |
||
1485 |
classNameColumn |
|
1486 |
"returns whether the column for the category attribute of the changes is shown" |
|
1487 |
||
1488 |
^ClassNameColumn ? (ClassNameColumn := false) |
|
1489 |
! |
|
1490 |
||
1491 |
classNameColumn: aBoolean |
|
1492 |
"sets whether the column for the className attribute of the changes is shown" |
|
1493 |
||
1494 |
self changeColumn: #className add: (ClassNameColumn := aBoolean) |
|
1495 |
||
1496 |
"Modified: / 19.5.1998 / 20:30:13 / cg" |
|
1497 |
! |
|
1498 |
||
1545 | 1499 |
deltaInfoColumn |
1546 | 1500 |
"returns whether the column for the delta info attribute of the changes is shown" |
1545 | 1501 |
|
1502 |
^DeltaInfoColumn ? (DeltaInfoColumn := false) |
|
1503 |
! |
|
1504 |
||
1505 |
deltaInfoColumn: aBoolean |
|
1546 | 1506 |
"sets whether the column for the delta info attribute of the changes is shown; and updates" |
1507 |
||
1653 | 1508 |
self changeColumn: #deltaInfo add: (DeltaInfoColumn := aBoolean). |
1546 | 1509 |
(self window notNil and: [DeltaInfoColumn]) ifTrue: [self doReload] |
1653 | 1510 |
|
1511 |
"Modified: / 19.5.1998 / 20:30:21 / cg" |
|
1545 | 1512 |
! |
1513 |
||
1568 | 1514 |
positionsColumn |
1546 | 1515 |
"returns whether the column for the position attribute of the changes is shown" |
1545 | 1516 |
|
1568 | 1517 |
^PositionsColumn ? (PositionsColumn := false) |
1545 | 1518 |
! |
1519 |
||
1568 | 1520 |
positionsColumn: aBoolean |
1521 |
"sets whether the column for the positions attribute of the changes is shown" |
|
1522 |
||
1653 | 1523 |
self changeColumn: #position add: (PositionsColumn := aBoolean) |
1524 |
||
1525 |
"Modified: / 19.5.1998 / 20:30:37 / cg" |
|
1545 | 1526 |
! |
1527 |
||
7957 | 1528 |
selectorColumn |
1529 |
"returns whether the column for the category attribute of the changes is shown" |
|
1530 |
||
1531 |
^SelectorColumn ? (SelectorColumn := false) |
|
1532 |
! |
|
1533 |
||
1534 |
selectorColumn: aBoolean |
|
1535 |
"sets whether the column for the category attribute of the changes is shown" |
|
1536 |
||
1537 |
self changeColumn: #selector add: (SelectorColumn := aBoolean) |
|
1538 |
||
1539 |
"Modified: / 19.5.1998 / 20:30:13 / cg" |
|
1540 |
! |
|
1541 |
||
1545 | 1542 |
timeStampColumn |
1546 | 1543 |
"returns whether the column for the time stamp attribute of the changes is shown" |
1545 | 1544 |
|
1545 |
^TimeStampColumn ? (TimeStampColumn := false) |
|
1546 |
! |
|
1547 |
||
1548 |
timeStampColumn: aBoolean |
|
1546 | 1549 |
"sets whether the column for the time stamp attribute of the changes is shown" |
1545 | 1550 |
|
1653 | 1551 |
self changeColumn: #timeStamp add: (TimeStampColumn := aBoolean) |
1552 |
||
1553 |
"Modified: / 19.5.1998 / 20:30:42 / cg" |
|
1545 | 1554 |
! |
1555 |
||
1556 |
typeColumn |
|
1546 | 1557 |
"returns whether the column for the type attribute of the changes is shown" |
1545 | 1558 |
|
1559 |
^TypeColumn ? (TypeColumn := false) |
|
1560 |
! |
|
1561 |
||
1562 |
typeColumn: aBoolean |
|
1546 | 1563 |
"sets whether the column for the type attribute of the changes is shown" |
1545 | 1564 |
|
1653 | 1565 |
self changeColumn: #type add: (TypeColumn := aBoolean) |
1566 |
||
1567 |
"Modified: / 19.5.1998 / 20:30:46 / cg" |
|
1545 | 1568 |
! ! |
1569 |
||
1570 |
!NewChangesBrowser methodsFor:'accesssing - views'! |
|
1571 |
||
1568 | 1572 |
changeTextEditor |
1573 |
"returns the view of the changeTextEditor" |
|
1574 |
||
1575 |
^builder componentAt: #changeTextEditor |
|
1576 |
||
1577 |
||
1578 |
||
1579 |
! |
|
1580 |
||
1545 | 1581 |
filterField |
1546 | 1582 |
"returns the view of the filterField" |
1545 | 1583 |
|
1584 |
^builder componentAt: #filterField |
|
1585 |
||
1586 |
||
1587 |
||
1588 |
! |
|
1589 |
||
1590 |
filterLabel |
|
1546 | 1591 |
"returns the view of the filterLabel" |
1545 | 1592 |
|
1593 |
^builder componentAt: #filterLabel |
|
1594 |
||
1595 |
||
1596 |
||
1597 |
! |
|
1598 |
||
1599 |
readProgressIndicator |
|
1546 | 1600 |
"returns the view of the readProgressIndicator" |
1545 | 1601 |
|
1602 |
^builder componentAt: #readProgressIndicator |
|
1603 |
||
1604 |
||
1605 |
||
1606 |
! ! |
|
1607 |
||
1608 |
!NewChangesBrowser methodsFor:'aspects'! |
|
1609 |
||
1610 |
listOfChangeColumns |
|
1546 | 1611 |
"initializes (during the startup) and returns the value holder for the columns" |
1545 | 1612 |
|
1613 |
|holder| |
|
1614 |
(holder := builder bindingAt:#listOfChangeColumns) isNil ifTrue:[ |
|
7957 | 1615 |
builder aspectAt:#listOfChangeColumns put:(holder := List new). |
1616 |
self changeColumn: nil add: true. |
|
1617 |
self changeColumn: #change add: true. |
|
1618 |
||
1619 |
self classNameColumn: self classNameColumn. |
|
1620 |
self classAndSelectorColumn: self classAndSelectorColumn. |
|
1621 |
self selectorColumn: self selectorColumn. |
|
1622 |
self categoryColumn: self categoryColumn. |
|
1623 |
self timeStampColumn: self timeStampColumn. |
|
1624 |
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
|
1625 |
"/ self deltaInfoColumn: self deltaInfoColumn. |
7957 | 1626 |
self positionsColumn: self positionsColumn. |
1545 | 1627 |
]. |
1628 |
^ holder |
|
1629 |
||
1653 | 1630 |
"Modified: / 19.5.1998 / 20:30:31 / cg" |
1545 | 1631 |
! |
1632 |
||
1633 |
listOfChanges |
|
1546 | 1634 |
"returns the value holder for the changes" |
1545 | 1635 |
|
6288 | 1636 |
|holder| |
1545 | 1637 |
(holder := builder bindingAt:#listOfChanges) isNil ifTrue:[ |
2250 | 1638 |
builder aspectAt:#listOfChanges put:(holder := List new) |
6288 | 1639 |
]. |
1545 | 1640 |
^ holder |
1641 |
! |
|
1642 |
||
1643 |
selectionOfChange |
|
1546 | 1644 |
"returns the value holder for the selected change" |
1545 | 1645 |
|
1646 |
|holder| |
|
1647 |
(holder := builder bindingAt:#selectionOfChange) isNil ifTrue:[ |
|
2250 | 1648 |
builder aspectAt:#selectionOfChange put:(holder := ValueHolder new). |
6288 | 1649 |
]. |
1545 | 1650 |
^ holder |
1651 |
! |
|
1652 |
||
1653 |
valueOfChangeText |
|
1546 | 1654 |
"returns the value holder for the source code of the selected change" |
1545 | 1655 |
|
1656 |
|holder| |
|
1657 |
(holder := builder bindingAt:#valueOfChangeText) isNil ifTrue:[ |
|
2250 | 1658 |
builder aspectAt:#valueOfChangeText put:(holder := ValueHolder new). |
1545 | 1659 |
]. |
1660 |
^ holder |
|
1661 |
! |
|
1662 |
||
1663 |
valueOfFilter |
|
1546 | 1664 |
"returns the value holder for the string of the filter" |
1545 | 1665 |
|
1666 |
|holder| |
|
1667 |
(holder := builder bindingAt:#valueOfFilter) isNil ifTrue:[ |
|
2250 | 1668 |
builder aspectAt:#valueOfFilter put:(holder := ValueHolder new). |
1669 |
holder addDependent: self |
|
1545 | 1670 |
]. |
1671 |
^ holder |
|
1672 |
! |
|
1673 |
||
1674 |
valueOfHavingChangeSelection |
|
1546 | 1675 |
"returns whether the selected change can be applied as value holder" |
1545 | 1676 |
|
1677 |
|holder| |
|
1678 |
(holder := builder bindingAt:#valueOfHavingChangeSelection) isNil ifTrue:[ |
|
2250 | 1679 |
builder aspectAt:#valueOfHavingChangeSelection put:(holder := false asValue). |
1545 | 1680 |
]. |
1681 |
^ holder |
|
1682 |
! |
|
1683 |
||
1684 |
valueOfHavingSelection |
|
1546 | 1685 |
"returns whether a change is selected as value holder" |
1545 | 1686 |
|
1687 |
|holder| |
|
1688 |
(holder := builder bindingAt:#valueOfHavingSelection) isNil ifTrue:[ |
|
2250 | 1689 |
builder aspectAt:#valueOfHavingSelection put:(holder := false asValue). |
1545 | 1690 |
]. |
1691 |
^ holder |
|
1692 |
! |
|
1693 |
||
1694 |
valueOfNotReading |
|
1546 | 1695 |
"returns whether it is not reading or compressing as value holder" |
1545 | 1696 |
|
1697 |
|holder| |
|
1698 |
(holder := builder bindingAt:#valueOfReading) isNil ifTrue:[ |
|
2250 | 1699 |
builder aspectAt:#valueOfReading put:(holder := true asValue). |
1545 | 1700 |
]. |
1701 |
^ holder |
|
1702 |
! |
|
1703 |
||
1568 | 1704 |
valueOfNotSaving |
1705 |
"returns whether it is not saving as value holder" |
|
1706 |
||
1707 |
|holder| |
|
1708 |
(holder := builder bindingAt:#valueOfNotSaving) isNil ifTrue:[ |
|
2250 | 1709 |
builder aspectAt:#valueOfNotSaving put:(holder := true asValue). |
1568 | 1710 |
]. |
1711 |
^ holder |
|
1712 |
! |
|
1713 |
||
1545 | 1714 |
valueOfReadProgress |
1546 | 1715 |
"returns the stage of reading or compressing as value holder" |
1545 | 1716 |
|
1717 |
|holder| |
|
1718 |
(holder := builder bindingAt:#valueOfReadProgress) isNil ifTrue:[ |
|
2250 | 1719 |
builder aspectAt:#valueOfReadProgress put:(holder := ValueHolder with: 0). |
1545 | 1720 |
]. |
1721 |
^ holder |
|
1722 |
! ! |
|
1723 |
||
1724 |
!NewChangesBrowser methodsFor:'callbacks'! |
|
1725 |
||
1726 |
changeSelected: lineNr |
|
1546 | 1727 |
"fetches the source code of the change and shows it in the codeView" |
1545 | 1728 |
|
1729 |
|aStream sawExcla chunk selectedRow changeNr| |
|
1730 |
||
1731 |
lineNr == 0 ifTrue: [^nil]. |
|
1732 |
changeNr := changes indexOf: (self listOfChanges at: lineNr). |
|
1733 |
aStream := self streamForChange: (changes at: changeNr). |
|
1734 |
aStream isNil ifTrue:[^ self]. |
|
1735 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
|
1736 |
chunk := aStream nextChunk. |
|
1737 |
sawExcla ifTrue:[ |
|
2250 | 1738 |
chunk := aStream nextChunk |
1545 | 1739 |
]. |
6288 | 1740 |
aStream close. |
1545 | 1741 |
self valueOfChangeText value:chunk. |
1742 |
||
1546 | 1743 |
self updateChannels |
1744 |
! ! |
|
1745 |
||
1746 |
!NewChangesBrowser methodsFor:'change & update'! |
|
1747 |
||
1748 |
update:something with:aParameter from:changedObject |
|
1749 |
"evaluates the filterCompletionBlock after returning the filter string" |
|
1750 |
||
1751 |
super update:something with:aParameter from:changedObject. |
|
1752 |
||
7957 | 1753 |
changedObject == self valueOfFilter ifTrue:[ |
1754 |
filterCompletionBlock value: changedObject value. |
|
1755 |
self listOfChanges size > 0 ifTrue: [self addToHistory: changedObject value -> #doFilter:] |
|
1568 | 1756 |
] |
1546 | 1757 |
! |
1758 |
||
1759 |
updateChannels |
|
1760 |
"updates my channels" |
|
1761 |
||
6288 | 1762 |
|change| |
1546 | 1763 |
(change := self selectionOfChange value) notNil |
1545 | 1764 |
ifTrue: |
1765 |
[ |
|
2250 | 1766 |
self valueOfHavingSelection value: true. |
6288 | 1767 |
self valueOfHavingChangeSelection value: |
2250 | 1768 |
((change type = 'method') or: [(change type = 'class')]) |
1546 | 1769 |
] |
1770 |
ifFalse: |
|
1771 |
[ |
|
2250 | 1772 |
self valueOfHavingSelection value: false. |
1773 |
self valueOfHavingChangeSelection value: false |
|
1545 | 1774 |
] |
1546 | 1775 |
|
1776 |
||
1777 |
||
1778 |
||
1779 |
||
1780 |
||
1545 | 1781 |
! ! |
1782 |
||
1783 |
!NewChangesBrowser methodsFor:'compiler interface'! |
|
1784 |
||
10247 | 1785 |
correctableSelectorWarning:aText position:smallInteger1 to:smallInteger2 from:aByteCodeCompiler |
1786 |
||
1787 |
^false |
|
1788 |
||
1789 |
"Created: / 16-11-2010 / 16:04:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1790 |
! |
|
1791 |
||
1792 |
correctableWarning:aText position:smallInteger1 to:smallInteger2 from:aByteCodeCompiler |
|
1793 |
||
1794 |
^false |
|
1795 |
||
1796 |
"Created: / 16-11-2010 / 16:03:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1797 |
! |
|
1798 |
||
1545 | 1799 |
wantChangeLog |
1800 |
"sent by the compiler to ask if a changeLog entry should |
|
1801 |
be written. Return false here." |
|
1802 |
||
1803 |
^ false |
|
1804 |
||
1805 |
||
1806 |
! ! |
|
1807 |
||
1568 | 1808 |
!NewChangesBrowser methodsFor:'error handling'! |
1809 |
||
1810 |
correctableError:aString position:relPos to:relEndPos from:aCompiler |
|
1811 |
"compiler notifys us of an error - this should really not happen since |
|
1812 |
changes ought to be correct (did someone edit the changes file ??). |
|
1813 |
Show the bad change in the codeView and let codeView hilight the error; |
|
1814 |
no corrections allowed here therefore return false" |
|
1815 |
||
1816 |
self error:aString position:relPos to:relEndPos from:aCompiler. |
|
1817 |
^ false |
|
1818 |
! |
|
1819 |
||
1820 |
error:aString position:relPos to:relEndPos from:aCompiler |
|
1821 |
"compiler notifys us of an error - this should really not happen since |
|
1822 |
changes ought to be correct (did someone edit the changes file ??). |
|
1823 |
Show the bad change in the codeView and let codeView hilight the error" |
|
1824 |
||
1825 |
|action| |
|
1826 |
||
1827 |
(skipSignal notNil) ifTrue:[ |
|
1828 |
||
7957 | 1829 |
self changeTextEditor highlightingErrorPosition:relPos to:relEndPos do:[ |
1830 |
|box| |
|
1831 |
||
1832 |
" |
|
1833 |
start dialog - make certain cleanup is done |
|
1834 |
" |
|
1835 |
action := OptionBox |
|
1836 |
request:aString |
|
1837 |
label:'Error' |
|
1838 |
image:(WarningBox iconBitmap) |
|
1839 |
buttonLabels:#('cancel' 'skip' 'continue') |
|
1840 |
values:#(#abort #skip #continue) |
|
1841 |
default:#continue. |
|
1842 |
]. |
|
1843 |
||
1844 |
action == #abort ifTrue:[ |
|
1845 |
Object abortSignal raise. |
|
1846 |
^ false |
|
1847 |
]. |
|
1848 |
action == #skip ifTrue:[ |
|
1849 |
skipSignal raise. |
|
1850 |
^ false |
|
1851 |
]. |
|
1852 |
^ false |
|
1568 | 1853 |
]. |
1854 |
^self changeTextEditor error:aString position:relPos to:relEndPos from:aCompiler |
|
1855 |
! |
|
1856 |
||
10247 | 1857 |
unusedVariableWarning:aText position:smallInteger1 to:smallInteger2 from:aByteCodeCompiler |
1858 |
||
1859 |
^false |
|
1860 |
||
1861 |
"Created: / 24-02-2011 / 22:00:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1862 |
! |
|
1863 |
||
1568 | 1864 |
warning:aString position:relPos to:relEndPos from:aCompiler |
1865 |
"compiler notifys us of a warning - ignore it" |
|
1866 |
||
1867 |
^ self |
|
1868 |
||
1869 |
! ! |
|
1870 |
||
1545 | 1871 |
!NewChangesBrowser methodsFor:'help'! |
1872 |
||
1873 |
defaultInfoLabel |
|
1546 | 1874 |
"returns the default label for the info bar" |
1545 | 1875 |
|
1876 |
changeFileName asFilename exists ifTrue: [^changeFileName]. |
|
1877 |
^'No change file name defined.' |
|
1878 |
||
1879 |
||
1880 |
||
7957 | 1881 |
! |
1882 |
||
1883 |
openDocumentation |
|
1884 |
self openHTMLDocument:'tools/cbrowser/TOP.html'. |
|
1545 | 1885 |
! ! |
1886 |
||
1887 |
!NewChangesBrowser methodsFor:'initialization'! |
|
1888 |
||
1889 |
initialize |
|
1546 | 1890 |
"initializes the instance variables" |
1545 | 1891 |
|
1892 |
super initialize. |
|
1893 |
||
1546 | 1894 |
changes := List new. |
6288 | 1895 |
self changeFileName: ObjectMemory nameForChanges. |
1896 |
AutoUpdate := AutoUpdate ? false. |
|
1546 | 1897 |
PrivateAsSeparate := PrivateAsSeparate ? false. |
1545 | 1898 |
|
1899 |
ObjectMemory addDependent:self. |
|
1900 |
! ! |
|
1901 |
||
1902 |
!NewChangesBrowser methodsFor:'menu modes'! |
|
1903 |
||
1904 |
autoUpdateMode |
|
1905 |
"returns whether autoUpdate is on/off" |
|
1906 |
||
1907 |
^AutoUpdate |
|
1908 |
||
1909 |
! |
|
1910 |
||
1911 |
autoUpdateMode: aMode |
|
1912 |
"sets the autoUpdate to aMode" |
|
1913 |
||
1914 |
AutoUpdate := aMode |
|
1915 |
||
1546 | 1916 |
! |
1917 |
||
1918 |
privateAsSeparate |
|
1919 |
"returns whether private classes are handled as separate changes" |
|
1920 |
||
1921 |
^PrivateAsSeparate |
|
1922 |
||
1923 |
! |
|
1924 |
||
1925 |
privateAsSeparate: aMode |
|
1926 |
"sets the PrivateAsSeparate to aMode" |
|
1927 |
||
1928 |
PrivateAsSeparate := aMode |
|
1929 |
||
1545 | 1930 |
! ! |
1931 |
||
1932 |
!NewChangesBrowser methodsFor:'private'! |
|
1933 |
||
1546 | 1934 |
applyChange:aChange |
1935 |
"applies aChange" |
|
1545 | 1936 |
|
1937 |
|aStream nm applyAction changeNr| |
|
1938 |
||
1546 | 1939 |
aStream := self streamForChange:aChange. |
1545 | 1940 |
aStream isNil ifTrue:[^ self]. |
1941 |
||
1546 | 1942 |
nm := self classNameOfChange:aChange. |
1545 | 1943 |
nm notNil ifTrue:[ |
2250 | 1944 |
|cls| |
1945 |
||
1946 |
cls := Smalltalk at:(nm asSymbol) ifAbsent:[]. |
|
1947 |
cls notNil ifTrue:[ |
|
1948 |
cls isLoaded ifFalse:[ |
|
1949 |
cls autoload |
|
1950 |
] |
|
1951 |
] |
|
1545 | 1952 |
]. |
1953 |
||
1954 |
applyAction := [ |
|
2250 | 1955 |
|sig| |
1956 |
||
1957 |
(skipSignal notNil) ifTrue:[ |
|
1958 |
sig := skipSignal |
|
1959 |
] ifFalse:[ |
|
1960 |
sig := Object abortSignal |
|
1961 |
]. |
|
1962 |
sig catch:[ |
|
1963 |
|reader doItChunk methodsForChunk| |
|
1964 |
||
1965 |
"/ a followup methodsFor: chunk... |
|
1966 |
aChange followUp ifTrue:[ |
|
1967 |
methodsForChunk := aChange chunk. |
|
1968 |
] ifFalse:[ |
|
1969 |
doItChunk := aStream nextChunk. "/ an empty chunk sometimes... |
|
1970 |
doItChunk notEmpty ifTrue:[ |
|
1971 |
Compiler evaluate:doItChunk notifying:self. |
|
1972 |
] ifFalse:[ |
|
1973 |
methodsForChunk := aStream nextChunk. "/ the real one |
|
1974 |
] |
|
1975 |
]. |
|
1976 |
methodsForChunk notNil ifTrue:[ |
|
1977 |
Class methodRedefinitionSignal handle:[:ex | |
|
1978 |
ex proceedWith:#keep |
|
1979 |
] do:[ |
|
1980 |
reader := Compiler evaluate:methodsForChunk notifying:self. |
|
1981 |
reader fileInFrom:aStream notifying:self passChunk:false single:true. |
|
1982 |
] |
|
1983 |
] |
|
1984 |
]. |
|
1545 | 1985 |
]. |
1986 |
||
1987 |
"/ |
|
1988 |
"/ if I am showing the changes file, dont update it |
|
1989 |
"/ |
|
1877
f0dbf0801e4d
care for pathName being the same, where the change-fileName is not
Claus Gittinger <cg@exept.de>
parents:
1798
diff
changeset
|
1990 |
changeFileName asFilename pathName = ObjectMemory nameForChanges asFilename pathName ifTrue:[ |
2250 | 1991 |
Class withoutUpdatingChangesDo:applyAction |
1545 | 1992 |
] ifFalse:[ |
2250 | 1993 |
applyAction value |
1545 | 1994 |
]. |
1995 |
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
|
1996 |
|
f0dbf0801e4d
care for pathName being the same, where the change-fileName is not
Claus Gittinger <cg@exept.de>
parents:
1798
diff
changeset
|
1997 |
"Modified: / 8.9.1998 / 12:48:01 / cg" |
1545 | 1998 |
! |
1999 |
||
1546 | 2000 |
autoSelectChange:aChange |
2001 |
"selects aChange" |
|
1545 | 2002 |
|
6288 | 2003 |
self class autoSelectNext ifTrue:[ |
2250 | 2004 |
((self listOfChanges indexOf: aChange) <= self listOfChanges size) ifTrue:[ |
6288 | 2005 |
self selectionOfChange value: aChange. |
2250 | 2006 |
self changeSelected:(self listOfChanges indexOf: aChange). |
2007 |
self updateChannels. |
|
2008 |
^ self |
|
2009 |
] |
|
6288 | 2010 |
]. |
1546 | 2011 |
self updateChannels. |
2012 |
self unselectChange |
|
1569 | 2013 |
|
1545 | 2014 |
! |
2015 |
||
2016 |
autoSelectLast |
|
1546 | 2017 |
"selects the last change" |
2018 |
||
2019 |
self autoSelectChange: (self listOfChanges at: self listOfChanges size ifAbsent: nil). |
|
2020 |
self updateChannels. |
|
2021 |
||
1545 | 2022 |
! |
2023 |
||
1546 | 2024 |
autoSelectOrEnd:aChange |
2025 |
"selects aChange or the last" |
|
1545 | 2026 |
|
2027 |
|last| |
|
2028 |
||
2029 |
last := self listOfChanges size. |
|
6288 | 2030 |
aChange notNil ifTrue:[ |
2250 | 2031 |
self autoSelectChange:aChange |
1545 | 2032 |
] ifFalse:[ |
2250 | 2033 |
self selectionOfChange value: (self listOfChanges at: last ifAbsent: nil). |
2034 |
self changeSelected: last |
|
1546 | 2035 |
]. |
2036 |
self updateChannels |
|
1545 | 2037 |
! |
2038 |
||
1653 | 2039 |
changeColumn: aColumnId add: addOrRemove |
1546 | 2040 |
"adds or removes a attribute column to the table" |
1545 | 2041 |
|
1569 | 2042 |
|newListOfChangeColumns| |
2043 |
||
2044 |
newListOfChangeColumns := self listOfChangeColumns asOrderedCollection. |
|
7957 | 2045 |
addOrRemove ifTrue:[ |
2046 |
newListOfChangeColumns add: |
|
2047 |
((self class tableColumnsForChangeAttributes |
|
2048 |
collect: [:i| i decodeAsLiteralArray]) |
|
2049 |
detect: [:column| column id = aColumnId]) |
|
2050 |
] ifFalse:[ |
|
2051 |
newListOfChangeColumns remove: |
|
2052 |
(self listOfChangeColumns detect: [:column| column id = aColumnId] ifNone: nil) ifAbsent: nil |
|
1553 | 2053 |
]. |
1569 | 2054 |
self listOfChangeColumns contents: newListOfChangeColumns. |
1553 | 2055 |
self autoSelectLast |
1545 | 2056 |
|
1653 | 2057 |
"Modified: / 19.5.1998 / 20:32:53 / cg" |
1545 | 2058 |
! |
2059 |
||
1546 | 2060 |
changeFileName:aFileName |
2061 |
"sets the name of the file with the changes" |
|
2062 |
||
1938 | 2063 |
changeFileName := aFileName asFilename name. |
2064 |
"/ (Filename currentDirectory asAbsoluteFilename construct: aFileName) name. |
|
2065 |
||
2066 |
"Modified: / 17.10.1998 / 14:43:01 / cg" |
|
1546 | 2067 |
! |
2068 |
||
1545 | 2069 |
checkClassIsLoaded:aClass |
1546 | 2070 |
"returns true if aClass is loaded" |
1545 | 2071 |
|
2072 |
|cls| |
|
10584
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
2073 |
|
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
2074 |
cls := aClass theNonMetaclass. |
1545 | 2075 |
cls isLoaded ifFalse:[ |
10584
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
2076 |
(self confirm:(cls name , ' is an autoloaded class.\I can only compare the methods texts if its loaded first.\\Load the class first ?') withCRs) |
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
2077 |
ifTrue:[ |
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
2078 |
cls autoload |
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
2079 |
] |
1545 | 2080 |
]. |
2081 |
^ cls isLoaded |
|
10584
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
2082 |
|
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
2083 |
"Modified: / 18-08-2011 / 09:51:39 / cg" |
1545 | 2084 |
! |
2085 |
||
2086 |
checkIfFileHasChanged |
|
1546 | 2087 |
"checks if changes file has changed" |
2088 |
||
2089 |
|f info| |
|
1545 | 2090 |
|
6288 | 2091 |
Processor removeTimedBlock:autoUpdateBlock. |
1545 | 2092 |
f := changeFileName asFilename. |
2093 |
(info := f info) isNil ifTrue:[ |
|
6288 | 2094 |
self newLabel:'unaccessable' |
1545 | 2095 |
] ifFalse:[ |
6288 | 2096 |
(info modificationTime) > changeFileTimestamp ifTrue:[ |
2097 |
self newLabel:'outdated'. |
|
2098 |
AutoUpdate ifTrue:[ |
|
2099 |
self doReload |
|
2100 |
] |
|
2101 |
] ifFalse:[ |
|
2102 |
self newLabel:'' |
|
2103 |
] |
|
1545 | 2104 |
]. |
2105 |
Processor addTimedBlock:autoUpdateBlock afterSeconds:5. |
|
2106 |
! |
|
2107 |
||
10583
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2108 |
classNameAndClassFromNode:aTreeNode |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2109 |
|rcvr className changeClass| |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2110 |
|
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2111 |
rcvr := aTreeNode receiver. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2112 |
rcvr isUnaryMessage ifTrue:[ |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2113 |
self assert:(rcvr selector = 'class'). |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2114 |
|
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2115 |
className := rcvr receiver name. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2116 |
SourceCodeManagerError |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2117 |
handle:[:ex | ] |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2118 |
do:[ changeClass := (Smalltalk classNamed:className) class ]. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2119 |
className := className , ' class'. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2120 |
^ className -> changeClass |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2121 |
]. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2122 |
|
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2123 |
(rcvr type == #Nil) ifTrue:[ |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2124 |
^ 'nil' -> nil |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2125 |
]. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2126 |
|
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2127 |
className := rcvr name. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2128 |
SourceCodeManagerError |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2129 |
handle:[:ex | ] |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2130 |
do:[ changeClass := Smalltalk classNamed:className ]. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2131 |
^ className -> changeClass |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2132 |
|
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2133 |
"Created: / 18-08-2011 / 09:38:37 / cg" |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2134 |
! |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2135 |
|
1546 | 2136 |
classNameOfChange:aChange |
6288 | 2137 |
"returns the classname of aChange |
1545 | 2138 |
(for classChanges (i.e. xxx class), the non-metaClassName (i.e. xxx) is returned)" |
2139 |
||
2140 |
|name| |
|
2141 |
||
1546 | 2142 |
name := self fullClassNameOfChange:aChange. |
1545 | 2143 |
name isNil ifTrue:[^ nil]. |
2144 |
(name endsWith:' class') ifTrue:[ |
|
2250 | 2145 |
^ name copyWithoutLast:6 |
1545 | 2146 |
]. |
2147 |
^ name |
|
2148 |
! |
|
2149 |
||
1546 | 2150 |
compareChange:aChange |
2151 |
"compares aChange with the current version" |
|
1545 | 2152 |
|
2153 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource |
|
2154 |
parser sel oldMethod outcome showDiff d t1 t2 selector isLoaded |
|
2155 |
method beep| |
|
2156 |
||
1546 | 2157 |
aStream := self streamForChange:aChange. |
1545 | 2158 |
aStream isNil ifTrue:[^ self]. |
2159 |
||
2160 |
showDiff := false. |
|
2161 |
||
1546 | 2162 |
aChange followUp ifFalse:[ |
2250 | 2163 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
2164 |
chunk := aStream nextChunk. |
|
1545 | 2165 |
] ifTrue:[ |
2250 | 2166 |
chunk := aChange chunk. |
2167 |
sawExcla := true. |
|
1545 | 2168 |
]. |
2169 |
||
2170 |
beep := false. |
|
2171 |
sawExcla ifFalse:[ |
|
2250 | 2172 |
outcome := 'Cannot compare this change\(i.e. this is not a method change)!!'. |
2173 |
||
2174 |
parseTree := Parser parseExpression:chunk. |
|
2175 |
(parseTree notNil and:[parseTree isMessage]) ifTrue:[ |
|
2176 |
((selector := parseTree selector) == #removeSelector:) ifTrue:[ |
|
2177 |
thisClass := (parseTree receiver evaluate). |
|
2178 |
thisClass isBehavior ifTrue:[ |
|
2179 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
2180 |
selector := (parseTree arg1 evaluate). |
|
2181 |
(thisClass includesSelector:selector) ifTrue:[ |
|
2182 |
outcome := 'Change removes the #' , selector , ' method from ' , thisClass name. |
|
2183 |
] ifFalse:[ |
|
2184 |
outcome := 'Change has no effect\(there is no method for #' , selector , ' in ' , thisClass name , ')' |
|
2185 |
] |
|
2186 |
] ifFalse:[ |
|
2187 |
beep := true. |
|
2188 |
outcome := 'Cannot compare this change (compare requires class to be loaded)!!'. |
|
2189 |
] |
|
2190 |
] |
|
2191 |
]. |
|
2192 |
selector == #category: ifTrue:[ |
|
2193 |
parseTree receiver isMessage ifTrue:[ |
|
2194 |
parseTree receiver selector == #compiledMethodAt: ifTrue:[ |
|
2195 |
(method := parseTree receiver evaluate) isMethod ifTrue:[ |
|
2196 |
method category = parseTree arg1 evaluate ifTrue:[ |
|
2197 |
outcome := 'Change has no effect\(same category)'. |
|
2198 |
] ifFalse:[ |
|
2199 |
outcome := 'Category is different (''' , method category , ''' vs. ''' , parseTree arg1 evaluate , ''')' |
|
2200 |
] |
|
2201 |
] ifFalse:[ |
|
2202 |
beep := true. |
|
2203 |
outcome := 'There is no such method!!' |
|
2204 |
] |
|
2205 |
] |
|
2206 |
] |
|
2207 |
] |
|
2208 |
] |
|
1545 | 2209 |
] ifTrue:[ |
2250 | 2210 |
parseTree := Parser parseExpression:chunk. |
6288 | 2211 |
(parseTree notNil |
2250 | 2212 |
and:[parseTree ~~ #Error |
2213 |
and:[parseTree isMessage]]) ifTrue:[ |
|
2214 |
(parseTree selector == #methodsFor:) ifTrue:[ |
|
2215 |
thisClass := (parseTree receiver evaluate). |
|
2216 |
thisClass isBehavior ifTrue:[ |
|
2217 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
|
2218 |
outcome := 'Cannot compare this change\(compare requires class to be loaded)!!'. |
|
2219 |
]. |
|
2220 |
||
2221 |
cat := parseTree arg1 evaluate. |
|
2222 |
newSource := aStream nextChunk. |
|
2223 |
||
2224 |
parser := Parser parseMethod:newSource in:thisClass. |
|
2225 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
2226 |
sel := parser selector. |
|
2227 |
oldMethod := thisClass compiledMethodAt:sel. |
|
2228 |
oldMethod notNil ifTrue:[ |
|
2229 |
(oldMethod category = cat) ifFalse:[ |
|
2230 |
Transcript showCR:'Category changed.'. |
|
2231 |
]. |
|
2232 |
oldSource := oldMethod source. |
|
2233 |
(oldSource = newSource) ifTrue:[ |
|
2234 |
outcome := 'Same source.' |
|
2235 |
] ifFalse:[ |
|
2236 |
oldSource isNil ifTrue:[ |
|
2237 |
beep := true. |
|
2238 |
outcome := 'No source for compare.' |
|
2239 |
] ifFalse:[ |
|
2240 |
"/ |
|
2241 |
"/ compare for tabulator <-> space changes |
|
2242 |
"/ before showing diff... |
|
2243 |
"/ |
|
2244 |
t1 := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
2245 |
t2 := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
2246 |
t1 = t2 ifTrue:[ |
|
2247 |
outcome := 'Same source.' |
|
2248 |
] ifFalse:[ |
|
2249 |
outcome := 'Source changed!!'. |
|
2250 |
showDiff := true. |
|
2251 |
||
2252 |
"/ |
|
2253 |
"/ check if only historyLine diffs |
|
2254 |
"/ |
|
6288 | 2255 |
(HistoryManager notNil |
2250 | 2256 |
and:[HistoryManager isActive]) ifTrue:[ |
2257 |
(HistoryManager withoutHistoryLines:newSource) |
|
2258 |
= |
|
2259 |
(HistoryManager withoutHistoryLines:oldSource) |
|
2260 |
ifTrue:[ |
|
2261 |
outcome := 'Same source (history only).'. |
|
2262 |
showDiff := false. |
|
2263 |
] |
|
2264 |
]. |
|
2265 |
] |
|
2266 |
] |
|
2267 |
] |
|
2268 |
] ifFalse:[ |
|
2269 |
isLoaded ifTrue:[ |
|
2270 |
beep := true. |
|
2271 |
outcome := 'Method does not exist!!' |
|
2272 |
] |
|
2273 |
] |
|
2274 |
] ifFalse:[ |
|
2275 |
outcome := 'Change unparsable!!' |
|
2276 |
]. |
|
2277 |
(showDiff and:[oldSource notNil and:[newSource notNil]]) ifTrue:[ |
|
6288 | 2278 |
d := DiffTextView |
2250 | 2279 |
openOn:oldSource label:'Current version (in image)' |
2280 |
and:newSource label:'Change version'. |
|
2281 |
d label:'method differences'. |
|
2282 |
] |
|
2283 |
] ifFalse:[ |
|
2284 |
beep := true. |
|
2285 |
outcome := 'Class does not exist!!' |
|
2286 |
] |
|
2287 |
] ifFalse:[ |
|
2288 |
beep := true. |
|
2289 |
outcome := 'Not comparable!!' |
|
2290 |
] |
|
2291 |
] ifFalse:[ |
|
2292 |
beep := true. |
|
2293 |
outcome := 'Not comparable!!' |
|
2294 |
] |
|
1545 | 2295 |
]. |
2296 |
aStream close. |
|
2297 |
showDiff ifFalse:[ |
|
2250 | 2298 |
beep ifTrue:[ |
2299 |
self warn:outcome withCRs. |
|
2300 |
] ifFalse:[ |
|
2301 |
self information:outcome withCRs. |
|
2302 |
] |
|
1545 | 2303 |
] |
2304 |
! |
|
2305 |
||
2306 |
compressForClass:aClassNameOrNil |
|
6288 | 2307 |
"compresses the list of changes; |
1545 | 2308 |
this replaces multiple method-changes by the last (i.e. the most recent) change. |
2309 |
If the class argument is nil, compress for all classes. |
|
2310 |
otherwise, only changes for that class are compressed." |
|
2311 |
||
6288 | 2312 |
|aStream searchIndex anyMore deleteSet index |
1545 | 2313 |
str snapshotProto snapshotPrefix snapshotNameIndex fileName| |
2314 |
||
2315 |
aStream := FileStream readonlyFileNamed:changeFileName. |
|
2316 |
aStream isNil ifTrue:[^ self]. |
|
2317 |
||
2318 |
aClassNameOrNil isNil ifTrue:[ |
|
2250 | 2319 |
self newLabel:'compressing...'. |
1545 | 2320 |
] ifFalse:[ |
2250 | 2321 |
self newLabel:'compressing for ' , aClassNameOrNil. |
1545 | 2322 |
]. |
2323 |
||
2324 |
CompressSnapshotInfo == true ifTrue:[ |
|
2250 | 2325 |
" |
2326 |
get a prototype snapshot record (to be independent of |
|
2327 |
the actual format .. |
|
2328 |
" |
|
2329 |
str := WriteStream on:String new. |
|
2330 |
Class addChangeRecordForSnapshot:'foo' to:str. |
|
2331 |
snapshotProto := str contents. |
|
2332 |
snapshotPrefix := snapshotProto copyTo:10. |
|
2333 |
snapshotNameIndex := snapshotProto findString:'foo'. |
|
1545 | 2334 |
]. |
2335 |
||
2336 |
self valueOfNotReading value: false. |
|
2337 |
self valueOfHavingSelection value: false. |
|
2338 |
self valueOfHavingChangeSelection value: false. |
|
2339 |
self valueOfReadProgress value: 0. |
|
2340 |
self readProgressIndicator raise. |
|
2341 |
self filterLabel label: 'Comp:'; redraw. |
|
2342 |
||
2343 |
self withExecuteCursorDo:[ |
|
2250 | 2344 |
|numChanges classes selectors types excla sawExcla |
2345 |
changeNr chunk aParseTree parseTreeChunk |
|
2346 |
thisClass thisSelector codeChunk codeParser |
|
2347 |
compressThis oldValue| |
|
2348 |
||
2349 |
numChanges := changes size. |
|
2350 |
classes := Array new:numChanges. |
|
2351 |
selectors := Array new:numChanges. |
|
2352 |
types := Array new:numChanges. |
|
2353 |
||
2354 |
"starting at the end, get the change class and change selector; |
|
2355 |
collect all in classes / selectors" |
|
2356 |
||
2357 |
changeNr := numChanges. |
|
2358 |
excla := aStream class chunkSeparator. |
|
2359 |
||
2360 |
[changeNr >= 1] whileTrue:[ |
|
2361 |
oldValue := self valueOfReadProgress value. |
|
2362 |
self valueOfReadProgress value: (100 - ((aStream position/aStream size) * 100) rounded). |
|
2363 |
oldValue ~~ self valueOfReadProgress value |
|
2364 |
ifTrue: [self readProgressIndicator redrawEdges;redraw]. |
|
2365 |
aStream position:(changes at: changeNr) position. |
|
2366 |
sawExcla := aStream peekFor:excla. |
|
2367 |
chunk := aStream nextChunk. |
|
2368 |
sawExcla ifTrue:[ |
|
2369 |
"optimize a bit if multiple methods for same category arrive" |
|
2370 |
(chunk = parseTreeChunk) ifFalse:[ |
|
2371 |
aParseTree := Parser parseExpression:chunk. |
|
2372 |
parseTreeChunk := chunk |
|
2373 |
]. |
|
6288 | 2374 |
(aParseTree notNil |
2375 |
and:[(aParseTree ~~ #Error) |
|
2250 | 2376 |
and:[aParseTree isMessage]]) ifTrue:[ |
2377 |
(aParseTree selector == #methodsFor:) ifTrue:[ |
|
2378 |
thisClass := (aParseTree receiver evaluate). |
|
2379 |
codeChunk := aStream nextChunk. |
|
6288 | 2380 |
codeParser := Parser |
2250 | 2381 |
parseMethodSpecification:codeChunk |
2382 |
in:thisClass |
|
2383 |
ignoreErrors:true |
|
2384 |
ignoreWarnings:true. |
|
2385 |
(codeParser notNil and:[codeParser ~~ #Error]) ifTrue:[ |
|
2386 |
selectors at:changeNr put:(codeParser selector). |
|
2387 |
classes at:changeNr put:thisClass. |
|
2388 |
types at:changeNr put:#methodsFor |
|
2389 |
] |
|
2390 |
] |
|
2391 |
] |
|
2392 |
] ifFalse:[ |
|
2393 |
aParseTree := Parser parseExpression:chunk. |
|
2394 |
parseTreeChunk := chunk. |
|
6288 | 2395 |
(aParseTree notNil |
2396 |
and:[(aParseTree ~~ #Error) |
|
2250 | 2397 |
and:[aParseTree isMessage]]) ifTrue:[ |
2398 |
(aParseTree selector == #removeSelector:) ifTrue:[ |
|
2399 |
selectors at:changeNr put:(aParseTree arg1 value ). |
|
2400 |
classes at:changeNr put:(aParseTree receiver evaluate). |
|
2401 |
types at:changeNr put:#removeSelector |
|
2402 |
] |
|
2403 |
] ifFalse:[ |
|
2404 |
CompressSnapshotInfo == true ifTrue:[ |
|
2405 |
(chunk startsWith:snapshotPrefix) ifTrue:[ |
|
2406 |
str := chunk readStream position:snapshotNameIndex. |
|
2407 |
fileName := str upTo:(Character space). |
|
2408 |
" |
|
2409 |
kludge to allow use of match-check below |
|
2410 |
" |
|
2411 |
selectors at:changeNr put:snapshotPrefix. |
|
2412 |
classes at:changeNr put:fileName. |
|
2413 |
] |
|
2414 |
] |
|
2415 |
] |
|
2416 |
]. |
|
2417 |
changeNr := changeNr - 1 |
|
2418 |
]. |
|
2419 |
aStream close. |
|
2420 |
||
6288 | 2421 |
"for all changes, look for another class/selector occurrence later |
2250 | 2422 |
in the list and, if there is one, add change number to the delete set" |
2423 |
||
2424 |
deleteSet := OrderedCollection new. |
|
2425 |
changeNr := 1. |
|
2426 |
[changeNr < changes size] whileTrue:[ |
|
2427 |
thisClass := classes at:changeNr. |
|
2428 |
||
2429 |
compressThis := false. |
|
2430 |
aClassNameOrNil isNil ifTrue:[ |
|
2431 |
compressThis := true |
|
2432 |
] ifFalse:[ |
|
2433 |
"/ skipping unloaded/unknown classes |
|
2434 |
thisClass isBehavior ifTrue:[ |
|
2435 |
thisClass isMeta ifTrue:[ |
|
6288 | 2436 |
compressThis := aClassNameOrNil = thisClass soleInstance name. |
2250 | 2437 |
] ifFalse:[ |
2438 |
compressThis := aClassNameOrNil = thisClass name. |
|
2439 |
(PrivateAsSeparate not and: [thisClass isPrivate]) |
|
2440 |
ifTrue:[compressThis := aClassNameOrNil = thisClass owningClass name] |
|
2441 |
] |
|
2442 |
] |
|
2443 |
]. |
|
2444 |
||
2445 |
compressThis ifTrue:[ |
|
2446 |
thisSelector := selectors at:changeNr. |
|
2447 |
searchIndex := changeNr. |
|
2448 |
anyMore := true. |
|
2449 |
[anyMore] whileTrue:[ |
|
2450 |
searchIndex := classes indexOf:thisClass |
|
2451 |
startingAt:(searchIndex + 1). |
|
2452 |
(searchIndex ~~ 0) ifTrue:[ |
|
2453 |
((selectors at:searchIndex) == thisSelector) ifTrue:[ |
|
2454 |
thisClass notNil ifTrue:[ |
|
2455 |
deleteSet add:changeNr. |
|
2456 |
anyMore := false |
|
2457 |
] |
|
2458 |
] |
|
2459 |
] ifFalse:[ |
|
6288 | 2460 |
anyMore := false |
2250 | 2461 |
] |
2462 |
]. |
|
2463 |
]. |
|
2464 |
||
2465 |
changeNr := changeNr + 1 |
|
2466 |
]. |
|
2467 |
||
2468 |
"finally delete what has been found" |
|
2469 |
||
2470 |
(deleteSet size > 0) ifTrue:[ |
|
2471 |
index := deleteSet size. |
|
2472 |
[index > 0] whileTrue:[ |
|
2473 |
self silentDeleteChange: (changes at: (deleteSet at:index)). |
|
2474 |
index := index - 1 |
|
2475 |
]. |
|
2476 |
self setChangeList |
|
2477 |
]. |
|
1545 | 2478 |
]. |
2479 |
self valueOfNotReading value: true. |
|
2480 |
self filterField raise. |
|
2481 |
self filterLabel label: 'Filter:'. |
|
2482 |
self newLabel: '' |
|
2483 |
! |
|
2484 |
||
2485 |
contractClass:className selector:selector to:maxLen |
|
2486 |
|s l| |
|
2487 |
||
2488 |
s := className , ' ', selector. |
|
2489 |
s size > maxLen ifTrue:[ |
|
2250 | 2490 |
l := maxLen - 1 - selector size max:20. |
2491 |
s := (className contractTo:l) , ' ' , selector. |
|
2492 |
||
2493 |
s size > maxLen ifTrue:[ |
|
2494 |
l := maxLen - 1 - className size max:20. |
|
2495 |
s := className , ' ', (selector contractTo:l). |
|
2496 |
||
2497 |
s size > maxLen ifTrue:[ |
|
2498 |
s := (className contractTo:(maxLen // 2 - 1)) , ' ' , (selector contractTo:maxLen // 2) |
|
2499 |
] |
|
2500 |
] |
|
1545 | 2501 |
]. |
2502 |
^ s |
|
2503 |
||
2504 |
! |
|
2505 |
||
2506 |
deleteChangesFrom:start to:stop |
|
1546 | 2507 |
"deletes a range of changes" |
1545 | 2508 |
|
6288 | 2509 |
self unselectChange. |
1545 | 2510 |
stop to:start by:-1 do:[:changeNr| |
2250 | 2511 |
self silentDeleteChange:(self listOfChanges at: changeNr) |
1546 | 2512 |
]. |
2513 |
self setChangeList |
|
1545 | 2514 |
! |
2515 |
||
1546 | 2516 |
fullClassNameOfChange:aChange |
6288 | 2517 |
"returns the full classname of aChange |
1545 | 2518 |
(for classChanges (i.e. xxx class), a string ending in ' class' is returned. |
6288 | 2519 |
- since parsing ascii methods is slow, keep result cached in |
1545 | 2520 |
changeClassNames for the next query" |
2521 |
||
2522 |
|chunk aParseTree recTree sel name arg1Tree isMeta prevMethodDefNr |
|
2523 |
words changeStream fullParseTree ownerTree ownerName oldDollarSetting| |
|
2524 |
||
1546 | 2525 |
aChange isNil ifTrue:[^ nil]. |
1545 | 2526 |
|
2527 |
" |
|
2528 |
first look, if not already known |
|
2529 |
" |
|
1546 | 2530 |
name := aChange className. |
1545 | 2531 |
name notNil ifTrue:[^ name]. |
2532 |
||
1546 | 2533 |
prevMethodDefNr := changes indexOf: aChange. |
1545 | 2534 |
[(changes at:prevMethodDefNr) followUp] whileTrue:[ |
2250 | 2535 |
prevMethodDefNr := prevMethodDefNr - 1. |
1545 | 2536 |
]. |
2537 |
||
2538 |
" |
|
2539 |
get the chunk |
|
2540 |
" |
|
2541 |
chunk := (changes at:prevMethodDefNr) chunk. |
|
2542 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
|
2543 |
||
2544 |
(chunk startsWith:'''---') ifTrue:[ |
|
2250 | 2545 |
words := chunk asCollectionOfWords. |
2546 |
words size > 2 ifTrue:[ |
|
2547 |
(words at:2) = 'checkin' ifTrue:[ |
|
2548 |
name := words at:3. |
|
2549 |
aChange className: name. |
|
2550 |
^ name |
|
2551 |
] |
|
2552 |
]. |
|
1545 | 2553 |
]. |
2554 |
||
2555 |
"/ fix it - otherwise, it cannot be parsed |
|
2556 |
(chunk endsWith:'primitiveDefinitions:') ifTrue:[ |
|
2250 | 2557 |
chunk := chunk , '''''' |
1545 | 2558 |
]. |
2559 |
(chunk endsWith:'primitiveFunctions:') ifTrue:[ |
|
2250 | 2560 |
chunk := chunk , '''''' |
1545 | 2561 |
]. |
2562 |
(chunk endsWith:'primitiveVariables:') ifTrue:[ |
|
2250 | 2563 |
chunk := chunk , '''''' |
1545 | 2564 |
]. |
2565 |
||
2566 |
" |
|
2567 |
use parser to construct a parseTree |
|
2568 |
" |
|
2569 |
oldDollarSetting := Parser allowDollarInIdentifier. |
|
2570 |
[ |
|
2250 | 2571 |
Parser allowDollarInIdentifier:true. |
2572 |
aParseTree := Parser parseExpression:chunk. |
|
1545 | 2573 |
] valueNowOrOnUnwindDo:[ |
2250 | 2574 |
Parser allowDollarInIdentifier:oldDollarSetting |
1545 | 2575 |
]. |
2576 |
||
2577 |
(aParseTree isNil or:[aParseTree == #Error]) ifTrue:[ |
|
2250 | 2578 |
^ nil "seems strange... (could be a comment)" |
1545 | 2579 |
]. |
2580 |
aParseTree isMessage ifFalse:[ |
|
2250 | 2581 |
^ nil "very strange... (whats that ?)" |
1545 | 2582 |
]. |
2583 |
||
2584 |
" |
|
2585 |
ask parser for selector |
|
2586 |
" |
|
2587 |
sel := aParseTree selector. |
|
2588 |
recTree := aParseTree receiver. |
|
2589 |
||
2590 |
" |
|
2591 |
is it a method-change, methodRemove or comment-change ? |
|
2592 |
" |
|
6288 | 2593 |
(#(#'methodsFor:' |
2594 |
#'privateMethodsFor:' |
|
2595 |
#'protectedMethodsFor:' |
|
2596 |
#'publicMethodsFor:' |
|
2597 |
#'removeSelector:' |
|
1545 | 2598 |
#'comment:' |
2599 |
#'primitiveDefinitions:' |
|
2600 |
#'primitiveFunctions:' |
|
2601 |
#'primitiveVariables:' |
|
2602 |
#'renameCategory:to:' |
|
2603 |
#'instanceVariableNames:' |
|
2604 |
) includes:sel) ifTrue:[ |
|
2250 | 2605 |
" |
2606 |
yes, the className is the receiver |
|
2607 |
" |
|
2608 |
(recTree notNil and:[recTree ~~ #Error]) ifTrue:[ |
|
2609 |
isMeta := false. |
|
2610 |
recTree isUnaryMessage ifTrue:[ |
|
2611 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
|
2612 |
"id class methodsFor:..." |
|
2613 |
recTree := recTree receiver. |
|
2614 |
isMeta := true. |
|
2615 |
]. |
|
2616 |
recTree isPrimary ifTrue:[ |
|
2617 |
name := recTree name. |
|
2618 |
isMeta ifTrue:[ |
|
2619 |
name := name , ' class'. |
|
2620 |
]. |
|
2621 |
aChange className: name. |
|
2622 |
^ name |
|
2623 |
] |
|
2624 |
]. |
|
2625 |
"more strange things" |
|
2626 |
^ nil |
|
1545 | 2627 |
]. |
2628 |
||
2629 |
" |
|
2630 |
is it a change in a class-description ? |
|
2631 |
" |
|
6288 | 2632 |
(('subclass:*' match:sel) |
1545 | 2633 |
or:[('variable*subclass:*' match:sel)]) ifTrue:[ |
2250 | 2634 |
"/ must parse the full changes text, to get |
2635 |
"/ privacy information. |
|
2636 |
||
2637 |
changeStream := self streamForChange:aChange. |
|
2638 |
changeStream notNil ifTrue:[ |
|
2639 |
chunk := changeStream nextChunk. |
|
2640 |
changeStream close. |
|
2641 |
fullParseTree := Parser parseExpression:chunk. |
|
2642 |
(fullParseTree isNil or:[fullParseTree == #Error]) ifTrue:[ |
|
2643 |
fullParseTree := nil |
|
2644 |
]. |
|
2645 |
fullParseTree isMessage ifFalse:[ |
|
2646 |
fullParseTree := nil |
|
2647 |
]. |
|
2648 |
"/ actually, the nil case cannot happen |
|
2649 |
fullParseTree notNil ifTrue:[ |
|
2650 |
aParseTree := fullParseTree. |
|
2651 |
sel := aParseTree selector. |
|
2652 |
]. |
|
2653 |
]. |
|
2654 |
||
2655 |
arg1Tree := aParseTree arg1. |
|
2656 |
(arg1Tree notNil and:[arg1Tree isConstant]) ifTrue:[ |
|
2657 |
name := arg1Tree value asString. |
|
2658 |
||
2659 |
"/ is it a private-class ? |
|
2660 |
('*privateIn:' match:sel) ifTrue:[ |
|
2661 |
ownerTree := aParseTree args last. |
|
2662 |
ownerName := ownerTree name asString. |
|
2663 |
name := ownerName , '::' , name |
|
2664 |
]. |
|
2665 |
aChange className: name. |
|
2666 |
^ name |
|
2667 |
]. |
|
2668 |
"very strange" |
|
2669 |
^ nil |
|
1545 | 2670 |
]. |
2671 |
||
2672 |
" |
|
2673 |
is it a class remove ? |
|
2674 |
" |
|
2675 |
(sel == #removeClass:) ifTrue:[ |
|
6288 | 2676 |
(recTree notNil |
2250 | 2677 |
and:[recTree ~~ #Error |
2678 |
and:[recTree isPrimary |
|
2679 |
and:[recTree name = 'Smalltalk']]]) ifTrue:[ |
|
2680 |
arg1Tree := aParseTree arg1. |
|
2681 |
(arg1Tree notNil and:[arg1Tree isPrimary]) ifTrue:[ |
|
2682 |
name := arg1Tree name. |
|
2683 |
aChange className: name. |
|
2684 |
^ name |
|
2685 |
]. |
|
2686 |
] |
|
1545 | 2687 |
]. |
2688 |
||
2689 |
" |
|
2690 |
is it a method category change ? |
|
2691 |
" |
|
2692 |
((sel == #category:) |
|
2693 |
or:[sel == #privacy:]) ifTrue:[ |
|
6288 | 2694 |
(recTree notNil |
2250 | 2695 |
and:[recTree ~~ #Error |
2696 |
and:[recTree isMessage |
|
2697 |
and:[recTree selector == #compiledMethodAt:]]]) ifTrue:[ |
|
2698 |
isMeta := false. |
|
2699 |
recTree := recTree receiver. |
|
2700 |
recTree isUnaryMessage ifTrue:[ |
|
2701 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
|
2702 |
"id class " |
|
2703 |
recTree := recTree receiver |
|
2704 |
]. |
|
2705 |
recTree isPrimary ifTrue:[ |
|
2706 |
isMeta ifTrue:[ |
|
2707 |
name := name , ' class'. |
|
2708 |
]. |
|
2709 |
name := recTree name. |
|
2710 |
aChange className: name. |
|
2711 |
^ name |
|
2712 |
] |
|
2713 |
] |
|
1545 | 2714 |
]. |
2715 |
^ nil |
|
2716 |
! |
|
2717 |
||
2718 |
newLabel:how |
|
1546 | 2719 |
"sets the label" |
1545 | 2720 |
|
2721 |
how size = 0 ifTrue: [^self window label:self class label]. |
|
1556 | 2722 |
self window label:self class label, ' (', how, ')' |
1545 | 2723 |
! |
2724 |
||
2725 |
readChangesFileInBackground:inBackground |
|
1546 | 2726 |
"reads the changes file, creates a list of header-lines (changeChunks) |
1545 | 2727 |
and a list of chunk-positions (changePositions). |
2728 |
Starting with 2.10.3, the entries are multi-col entries; |
|
10583
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2729 |
the cols are: |
7957 | 2730 |
1 delta (only if comparing) |
2731 |
'+' -> new method (w.r.t. current state) |
|
2732 |
'-' -> removed method (w.r.t. current state) |
|
2733 |
'?' -> class does not exist currently |
|
2734 |
'=' -> change is same as current methods source |
|
2735 |
2 class/selector |
|
2736 |
3 type of change |
|
2737 |
doit |
|
2738 |
method |
|
2739 |
category change |
|
2740 |
4 timestamp |
|
1545 | 2741 |
|
2742 |
since comparing slows down startup time, it is now disabled by |
|
2743 |
default and can be enabled via a toggle." |
|
2744 |
||
2740
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2745 |
|aStream maxLen i f v| |
1545 | 2746 |
|
2747 |
self valueOfNotReading value: false. |
|
2748 |
self valueOfHavingSelection value: false. |
|
2749 |
self valueOfHavingChangeSelection value: false. |
|
2750 |
||
2751 |
editingClassSource := false. |
|
2752 |
||
2753 |
maxLen := 60. |
|
2754 |
||
2755 |
f := changeFileName asFilename. |
|
2756 |
aStream := f readStream. |
|
2757 |
aStream isNil ifTrue:[^ nil]. |
|
2758 |
||
1653 | 2759 |
self newLabel:(resources string:'updating...'). |
1545 | 2760 |
|
2761 |
i := f info. |
|
10247 | 2762 |
changeFileTimestamp := i modificationTime. |
1545 | 2763 |
|
2764 |
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
|
2765 |
v := self readProgressIndicator. |
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2766 |
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
|
2767 |
v := self filterLabel. |
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2768 |
v notNil ifTrue:[v label: 'Read:'; redraw]. |
1545 | 2769 |
|
2770 |
self withReadCursorDo:[ |
|
7957 | 2771 |
|myProcess myPriority| |
2772 |
||
2773 |
" |
|
2774 |
this is a time consuming operation (especially, if reading an |
|
2775 |
NFS-mounted directory; therefore lower my priority... |
|
2776 |
" |
|
2777 |
inBackground ifTrue:[ |
|
2778 |
myProcess := Processor activeProcess. |
|
2779 |
myPriority := myProcess priority. |
|
2780 |
myProcess priority:(Processor userBackgroundPriority). |
|
2781 |
]. |
|
2782 |
||
2783 |
[ |
|
2784 |
|excla timeStampInfo lastChange| |
|
2785 |
||
2786 |
excla := aStream class chunkSeparator. |
|
2787 |
||
2788 |
[aStream atEnd] whileFalse:[ |
|
2789 |
|change changeDelta changeString changeType changeCategory |
|
10583
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2790 |
line s l classAndName changeClass sawExcla category className selector |
7957 | 2791 |
chunkText chunkPos sel oldValue| |
2792 |
||
2793 |
change := Change new. |
|
2794 |
" |
|
2795 |
get a chunk (separated by excla) |
|
2796 |
" |
|
2797 |
oldValue := self valueOfReadProgress value. |
|
2798 |
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
|
2799 |
"/ oldValue ~~ self valueOfReadProgress value |
6b8666356abb
oops - dont try to redraw components which are not there
Claus Gittinger <cg@exept.de>
parents:
2250
diff
changeset
|
2800 |
"/ 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
|
2801 |
|
7957 | 2802 |
aStream skipSeparators. |
2803 |
chunkPos := aStream position. |
|
2804 |
||
2805 |
sawExcla := aStream peekFor:excla. |
|
2806 |
chunkText := aStream nextChunk. |
|
2807 |
chunkText notNil ifTrue:[ |
|
2808 |
|index headerLine cls| |
|
2809 |
||
2810 |
(chunkText startsWith:'''---- timestamp ') ifTrue:[ |
|
2811 |
timeStampInfo := (chunkText copyFrom:16 to:(chunkText size - 6)) withoutSpaces. |
|
2812 |
] ifFalse:[ |
|
2813 |
||
2814 |
" |
|
2815 |
only first line is saved in changeChunks... |
|
2816 |
" |
|
2817 |
index := chunkText indexOf:(Character cr). |
|
2818 |
(index ~~ 0) ifTrue:[ |
|
2819 |
chunkText := chunkText copyTo:(index - 1). |
|
2820 |
||
2821 |
"take care for comment changes - must still be a |
|
2822 |
valid expression for classNameOfChange: to work" |
|
2823 |
||
2824 |
(chunkText endsWith:'comment:''') ifTrue:[ |
|
2825 |
chunkText := chunkText , '...''' |
|
2826 |
]. |
|
2827 |
(chunkText endsWith:'primitiveDefinitions:''') ifTrue:[ |
|
2828 |
sel := 'primitiveDefinitions:'. |
|
2829 |
chunkText := chunkText copyWithoutLast:1 |
|
2830 |
]. |
|
2831 |
(chunkText endsWith:'primitiveVariables:''') ifTrue:[ |
|
2832 |
sel := 'primitiveVariables:'. |
|
2833 |
chunkText := chunkText copyWithoutLast:1 |
|
2834 |
]. |
|
2835 |
(chunkText endsWith:'primitiveFunctions:''') ifTrue:[ |
|
2836 |
sel := 'primitiveFunctions:'. |
|
2837 |
chunkText := chunkText copyWithoutLast:1 |
|
2838 |
]. |
|
2839 |
]. |
|
2840 |
||
2841 |
change chunk: chunkText. |
|
2842 |
change position: chunkPos. |
|
2843 |
lastChange notNil ifTrue: [lastChange lastPosition: chunkPos - 1]. |
|
2844 |
lastChange := change. |
|
2845 |
change timeStamp: timeStampInfo. |
|
2846 |
change followUp: false. |
|
2847 |
headerLine := nil. |
|
2848 |
changeDelta := ' '. |
|
2849 |
||
2850 |
sawExcla ifFalse:[ |
|
2851 |
(chunkText startsWith:'''---- snap') ifTrue:[ |
|
2852 |
changeType := ''. |
|
2853 |
headerLine := chunkText. |
|
2854 |
changeString := (chunkText contractTo:maxLen). |
|
2855 |
timeStampInfo := nil. |
|
2856 |
] ifFalse:[ |
|
2857 |
||
2858 |
|p cls| |
|
2859 |
||
2860 |
headerLine := chunkText , ' (doIt)'. |
|
2861 |
||
2862 |
" |
|
2863 |
first, assume doIt - then lets have a more detailed look... |
|
2864 |
" |
|
2865 |
((chunkText startsWith:'''---- file') |
|
2866 |
or:[(chunkText startsWith:'''---- check')]) ifTrue:[ |
|
2867 |
changeType := ''. |
|
2868 |
timeStampInfo := nil. |
|
2869 |
] ifFalse:[ |
|
2870 |
changeType := 'doIt'. |
|
2871 |
]. |
|
2872 |
changeString := (chunkText contractTo:maxLen). |
|
2873 |
||
2874 |
p := Parser parseExpression:chunkText inNameSpace:Smalltalk. |
|
2875 |
(p notNil |
|
2876 |
and:[p ~~ #Error |
|
2877 |
and:[p isMessage]]) ifTrue:[ |
|
2878 |
sel := p selector. |
|
2879 |
]. |
|
2880 |
(sel == #removeSelector:) ifTrue:[ |
|
10583
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2881 |
classAndName := self classNameAndClassFromNode:p. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2882 |
cls := classAndName key. changeClass := classAndName value. |
7957 | 2883 |
sel := (p args at:1) evaluate. |
2884 |
||
2885 |
DeltaInfoColumn ifTrue:[ |
|
10247 | 2886 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
7957 | 2887 |
changeDelta := '?' |
2888 |
] ifFalse:[ |
|
2889 |
(changeClass implements:sel asSymbol) ifTrue:[ |
|
2890 |
changeDelta := '-'. |
|
2891 |
] |
|
2892 |
] |
|
2893 |
]. |
|
2894 |
changeType := 'remove'. |
|
2895 |
changeString := self contractClass:cls selector:sel to:maxLen. |
|
2896 |
className := cls. |
|
2897 |
selector := sel. |
|
2898 |
]. |
|
2899 |
(p notNil and:[p ~~ #Error |
|
2900 |
and:[p isMessage |
|
2901 |
and:[p receiver isMessage |
|
2902 |
and:[p receiver selector == #compiledMethodAt:]]]]) ifTrue:[ |
|
10583
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2903 |
classAndName := self classNameAndClassFromNode:p receiver. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2904 |
cls := classAndName key. changeClass := classAndName value. |
7957 | 2905 |
(sel == #category:) ifTrue:[ |
2906 |
sel := (p receiver args at:1) evaluate. |
|
2907 |
changeType := '(category change)'. |
|
2908 |
changeString := self contractClass:cls selector:sel to:maxLen. |
|
2909 |
]. |
|
2910 |
(sel == #privacy:) ifTrue:[ |
|
2911 |
sel := (p receiver args at:1) evaluate. |
|
2912 |
changeType := 'privacy change'. |
|
2913 |
changeString := self contractClass:cls selector:sel to:maxLen. |
|
2914 |
]. |
|
2915 |
className := cls. |
|
2916 |
selector := sel. |
|
2917 |
]. |
|
2918 |
(#(#'subclass:' |
|
2919 |
#'variableSubclass:' |
|
2920 |
#'variableByteSubclass:' |
|
2921 |
#'variableWordSubclass:' |
|
2922 |
#'variableLongSubclass:' |
|
2923 |
#'variableFloatSubclass:' |
|
2924 |
#'variableDoubleSubclass:' |
|
2925 |
#'primitiveDefinitions:' |
|
2926 |
#'primitiveFunctions:' |
|
2927 |
#'primitiveVariables:' |
|
2928 |
) includes:sel) ifTrue:[ |
|
2929 |
changeType := 'class definition'. |
|
2930 |
]. |
|
2931 |
] |
|
2932 |
] ifTrue:[ |
|
10247 | 2933 |
|done first p className cls text methodPos| |
7957 | 2934 |
|
2935 |
" |
|
2936 |
method definitions actually consist of |
|
2937 |
two (or more) chunks; skip next chunk(s) |
|
2938 |
up to an empty one. |
|
2939 |
The system only writes one chunk, |
|
2940 |
and we cannot handle more in this ChangesBrowser.... |
|
2941 |
" |
|
10247 | 2942 |
className := nil. |
7957 | 2943 |
p := Parser parseExpression:chunkText inNameSpace:Smalltalk. |
2944 |
||
2945 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
|
2946 |
sel := p selector. |
|
2947 |
(sel == #methodsFor:) ifTrue:[ |
|
10583
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2948 |
classAndName := self classNameAndClassFromNode:p. |
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
2949 |
className := classAndName key. changeClass := classAndName value. |
7957 | 2950 |
category := (p args at:1) evaluate. |
2951 |
]. |
|
2952 |
]. |
|
2953 |
||
2954 |
done := false. |
|
2955 |
first := true. |
|
2956 |
[done] whileFalse:[ |
|
2957 |
||
2958 |
changeDelta := ' '. |
|
2959 |
methodPos := aStream position. |
|
2960 |
||
2961 |
text := aStream nextChunk. |
|
2962 |
text isNil ifTrue:[ |
|
2963 |
done := true |
|
2964 |
] ifFalse:[ |
|
2965 |
done := text isEmpty |
|
2966 |
]. |
|
2967 |
done ifFalse:[ |
|
2968 |
first ifFalse:[ |
|
2969 |
change := Change new. |
|
2970 |
change chunk: chunkText. |
|
2971 |
change string:changeString. |
|
2972 |
change position: methodPos. |
|
10247 | 2973 |
change className: className. |
7957 | 2974 |
lastChange notNil ifTrue: [lastChange lastPosition: methodPos - 1]. |
2975 |
lastChange := change. |
|
2976 |
change timeStamp: timeStampInfo. |
|
2977 |
change followUp: true. |
|
2978 |
editingClassSource := true. |
|
2979 |
]. |
|
2980 |
||
2981 |
first := false. |
|
2982 |
" |
|
2983 |
try to find the selector |
|
2984 |
" |
|
2985 |
sel := nil. |
|
10247 | 2986 |
className notNil ifTrue:[ |
7957 | 2987 |
p := Parser |
2988 |
parseMethodSpecification:text |
|
2989 |
in:nil |
|
2990 |
ignoreErrors:true |
|
2991 |
ignoreWarnings:true. |
|
2992 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
|
2993 |
sel := p selector. |
|
2994 |
] |
|
2995 |
]. |
|
2996 |
||
2997 |
sel isNil ifTrue:[ |
|
2998 |
changeString := (chunkText contractTo:maxLen). |
|
2999 |
changeType := 'change'. |
|
3000 |
headerLine := chunkText , ' (change)'. |
|
3001 |
] ifFalse:[ |
|
10247 | 3002 |
changeString := self contractClass:className selector:sel to:maxLen. |
7957 | 3003 |
changeType := 'method definition'. |
3004 |
changeCategory := category. |
|
10247 | 3005 |
headerLine := className , ' ' , sel , ' ' , '(change category: ''' , category , ''')'. |
7957 | 3006 |
change selector:sel. |
3007 |
]. |
|
3008 |
||
3009 |
DeltaInfoColumn ifTrue:[ |
|
3010 |
changeClass isNil ifFalse:[ |
|
10583
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
3011 |
cls := changeClass theNonMetaclass |
7957 | 3012 |
]. |
3013 |
||
10247 | 3014 |
(changeClass isNil or:[cls isLoaded not]) ifTrue:[ |
7957 | 3015 |
changeDelta := '?' |
3016 |
] ifFalse:[ |
|
3017 |
(changeClass implements:sel asSymbol) ifFalse:[ |
|
3018 |
changeDelta := '+'. |
|
3019 |
] ifTrue:[ |
|
3020 |
|m currentText t1 t2| |
|
3021 |
||
3022 |
m := changeClass compiledMethodAt:sel asSymbol. |
|
3023 |
currentText := m source. |
|
3024 |
currentText notNil ifTrue:[ |
|
3025 |
text asString = currentText asString ifTrue:[ |
|
3026 |
changeDelta := '=' |
|
3027 |
] ifFalse:[ |
|
3028 |
t1 := currentText asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
3029 |
t2 := text asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
3030 |
t1 = t2 ifTrue:[ |
|
3031 |
changeDelta := '=' |
|
3032 |
] |
|
3033 |
] |
|
3034 |
] |
|
3035 |
] |
|
3036 |
] |
|
3037 |
]. |
|
3038 |
change delta:changeDelta. |
|
3039 |
change string:changeString. |
|
3040 |
change type:changeType. |
|
3041 |
change category: changeCategory. |
|
3042 |
change timeStamp:timeStampInfo. |
|
3043 |
changes add:change. |
|
3044 |
]. |
|
3045 |
changeString := nil. |
|
3046 |
headerLine := nil. |
|
3047 |
||
3048 |
] |
|
3049 |
]. |
|
3050 |
changeString notNil ifTrue:[ |
|
3051 |
change delta:changeDelta. |
|
3052 |
change string:changeString. |
|
3053 |
change type:changeType. |
|
3054 |
change timeStamp:timeStampInfo. |
|
3055 |
changes add:change. |
|
3056 |
||
3057 |
] ifFalse:[ |
|
3058 |
headerLine notNil ifTrue:[ |
|
3059 |
changes add: change. |
|
3060 |
] |
|
3061 |
] |
|
3062 |
] |
|
3063 |
]. |
|
3064 |
change lastPosition: aStream position. |
|
3065 |
]. |
|
3066 |
modified := false. |
|
3067 |
||
3068 |
] valueNowOrOnUnwindDo:[ |
|
3069 |
aStream close. |
|
3070 |
inBackground ifTrue:[myProcess priority:myPriority]. |
|
3071 |
]. |
|
1545 | 3072 |
]. |
10247 | 3073 |
changes removeLast. |
1545 | 3074 |
self setChangeList. |
3075 |
self valueOfNotReading value: true. |
|
3076 |
self filterField raise. |
|
3077 |
self filterLabel label: 'Filter:'. |
|
3078 |
||
1653 | 3079 |
self checkIfFileHasChanged. |
3080 |
||
10247 | 3081 |
"Modified: / 16-11-2010 / 15:52:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10583
e2411142dc0c
added: #classNameAndClassFromNode:
Claus Gittinger <cg@exept.de>
parents:
10247
diff
changeset
|
3082 |
"Modified: / 18-08-2011 / 09:45:23 / cg" |
1545 | 3083 |
! |
3084 |
||
1546 | 3085 |
selectorOfMethodChange:aChange |
3086 |
"returns the selector of the method change, or nil if it is not a method change" |
|
1545 | 3087 |
|
3088 |
|source parser sel| |
|
3089 |
||
1546 | 3090 |
source := self sourceOfMethodChange:aChange. |
1545 | 3091 |
source isNil ifTrue:[^ nil]. |
3092 |
||
6288 | 3093 |
parser := Parser |
3094 |
parseMethod:source |
|
3095 |
in:nil |
|
3096 |
ignoreErrors:true |
|
2250 | 3097 |
ignoreWarnings:true. |
1545 | 3098 |
|
3099 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
2250 | 3100 |
sel := parser selector. |
1545 | 3101 |
]. |
3102 |
^ sel |
|
3103 |
! |
|
3104 |
||
3105 |
setChangeList |
|
1546 | 3106 |
"sets the list of changes into the list for the table by evaluating filterCompletionBlock" |
3107 |
||
3108 |
self unselectChange. |
|
3109 |
filterCompletionBlock value: self valueOfFilter value. |
|
1545 | 3110 |
! |
3111 |
||
1546 | 3112 |
silentDeleteChange:aChange |
3113 |
"delete aChange do not update changeListView" |
|
1545 | 3114 |
|
6288 | 3115 |
modified := true. |
1545 | 3116 |
|
1546 | 3117 |
changes remove:aChange |
1545 | 3118 |
! |
3119 |
||
3120 |
silentDeleteChangesFor:aClassName from:start to:stop |
|
1546 | 3121 |
"deletes changes for aChange in the range [start,stop] |
3122 |
and returns the number of the deleted changes" |
|
3123 |
||
3124 |
|index numDeleted clsName| |
|
1545 | 3125 |
|
3126 |
numDeleted := 0. |
|
6288 | 3127 |
index := stop. |
1546 | 3128 |
[index >= start] whileTrue: |
6288 | 3129 |
[ |
2250 | 3130 |
((clsName := self classNameOfChange:(self listOfChanges at: index)) notNil and: |
3131 |
[(clsName = aClassName or: [PrivateAsSeparate not and: [(clsName upTo: $:) = aClassName]])]) |
|
3132 |
ifTrue: |
|
6288 | 3133 |
[ |
2250 | 3134 |
self silentDeleteChange:(self listOfChanges at: index). |
3135 |
numDeleted := numDeleted + 1. |
|
3136 |
]. |
|
3137 |
index := index - 1 |
|
1545 | 3138 |
]. |
3139 |
^ numDeleted |
|
3140 |
! |
|
3141 |
||
1546 | 3142 |
sourceOfMethodChange:aChange |
3143 |
"returns the source code of the method change, or nil if it is not a method change." |
|
1545 | 3144 |
|
3145 |
|aStream chunk sawExcla parseTree sourceChunk| |
|
3146 |
||
6288 | 3147 |
aStream := self streamForChange:aChange. |
1545 | 3148 |
aStream isNil ifTrue:[^ nil]. |
3149 |
||
1546 | 3150 |
aChange followUp ifFalse:[ |
2250 | 3151 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
3152 |
chunk := aStream nextChunk. |
|
1545 | 3153 |
] ifTrue:[ |
2250 | 3154 |
chunk := aChange chunk. |
3155 |
sawExcla := true. |
|
1545 | 3156 |
]. |
3157 |
||
3158 |
sawExcla ifTrue:[ |
|
2250 | 3159 |
parseTree := Parser parseExpression:chunk. |
3160 |
(parseTree notNil and:[parseTree isMessage]) ifTrue:[ |
|
3161 |
(parseTree selector == #methodsFor:) ifTrue:[ |
|
3162 |
sourceChunk := aStream nextChunk. |
|
3163 |
] |
|
3164 |
]. |
|
1545 | 3165 |
]. |
3166 |
aStream close. |
|
3167 |
^ sourceChunk |
|
3168 |
! |
|
3169 |
||
1546 | 3170 |
streamForChange:aChange |
3171 |
"returns the stream for aChange" |
|
1545 | 3172 |
|
3173 |
|aStream| |
|
3174 |
||
3175 |
aStream := FileStream readonlyFileNamed:changeFileName. |
|
3176 |
aStream isNil ifTrue:[^ nil]. |
|
1546 | 3177 |
aStream position:aChange position. |
1545 | 3178 |
^ aStream |
3179 |
||
3180 |
! |
|
3181 |
||
3182 |
unselectChange |
|
1546 | 3183 |
"unselects the current change" |
3184 |
||
3185 |
self selectionOfChange value: nil. |
|
3186 |
self valueOfChangeText value: nil |
|
3187 |
||
1545 | 3188 |
! |
3189 |
||
3190 |
withSelectedChangeDo:aBlock |
|
3191 |
"just a helper, check for a selected change and evaluate aBlock |
|
3192 |
with busy cursor" |
|
3193 |
||
3194 |
|change| |
|
3195 |
||
6288 | 3196 |
(change := self selectionOfChange value) notNil |
1545 | 3197 |
ifTrue:[ |
2250 | 3198 |
self withExecuteCursorDo:[aBlock value:change] |
1545 | 3199 |
] |
3200 |
! ! |
|
3201 |
||
3202 |
!NewChangesBrowser methodsFor:'startup / release'! |
|
3203 |
||
3204 |
closeRequest |
|
1546 | 3205 |
"asks for saving before closing" |
1545 | 3206 |
|
5395
ff5fc88d4a4b
Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents:
3220
diff
changeset
|
3207 |
self valueOfNotSaving value ifFalse: [^ self]. |
1545 | 3208 |
|
10247 | 3209 |
modified == true ifTrue:[ |
7957 | 3210 |
(OptionBox |
3211 |
request:(resources string:'Change list was modified. Exit anyway?') withCRs |
|
3212 |
label:'Changes Browser' |
|
3213 |
image:(WarningBox iconBitmap) |
|
3214 |
buttonLabels:(resources array:#('Cancel' 'Discard Modifications and Exit')) |
|
3215 |
values:#(abort ignore) |
|
3216 |
default:#save |
|
3217 |
) == #abort ifTrue:[^ self]. |
|
1545 | 3218 |
]. |
3219 |
super closeRequest |
|
1656 | 3220 |
|
10247 | 3221 |
"Modified: / 20-05-1998 / 03:53:47 / cg" |
3222 |
"Modified: / 08-04-2011 / 10:22:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1545 | 3223 |
! |
3224 |
||
3225 |
postOpenWith:aBuilder |
|
1546 | 3226 |
"starts reading the changes from the file and |
3227 |
builds entryCompletionBlock for the filterField before opening" |
|
1545 | 3228 |
|
3229 |
super postOpenWith:aBuilder. |
|
3230 |
||
6288 | 3231 |
builder namedComponents do: |
3232 |
[:aView| |
|
7957 | 3233 |
aView allSubViewsDo: |
3234 |
[:v| |
|
3235 |
v redraw |
|
3236 |
] |
|
1545 | 3237 |
]. |
3238 |
||
3239 |
autoUpdateBlock := [self checkIfFileHasChanged]. |
|
6288 | 3240 |
Processor addTimedBlock:autoUpdateBlock afterSeconds:5. |
1545 | 3241 |
self updateInfoLabel. |
3242 |
||
3243 |
self filterField entryCompletionBlock: |
|
3244 |
(filterCompletionBlock := [:value| |
|
7957 | 3245 |
|filter filters i changesCopy| |
3246 |
self unselectChange. |
|
3247 |
filter := self filterField contents. |
|
3248 |
(filters := filter asArrayOfSubstrings) size > 0 ifTrue:[ |
|
3249 |
changesCopy := changes copy. |
|
3250 |
i := 0. |
|
3251 |
filters do:[:filter| |
|
3252 |
i := i + 1. |
|
3253 |
changesCopy contents: |
|
3254 |
(changesCopy select: [:row| |
|
3255 |
filter match: (row string asArrayOfSubstrings at: i ifAbsent: [''''])]) |
|
3256 |
]. |
|
3257 |
self listOfChanges contents: changesCopy |
|
3258 |
] ifFalse:[ |
|
3259 |
self listOfChanges contents: changes |
|
3260 |
]. |
|
3261 |
self autoSelectLast. |
|
1546 | 3262 |
]). |
3263 |
||
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3264 |
Object errorSignal handle: [:ex | |
7957 | 3265 |
ex signal == HaltSignal ifTrue:[ |
3266 |
ex reject |
|
3267 |
]. |
|
3268 |
ex signal == MessageTracer breakpointSignal ifTrue:[ |
|
3269 |
ex reject |
|
3270 |
]. |
|
3271 |
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
|
3272 |
] do: [ |
7957 | 3273 |
self readChangesFileInBackground:true |
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3274 |
]. |
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3275 |
|
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3276 |
"Modified: / 30.7.1998 / 11:37:51 / cg" |
1545 | 3277 |
! |
3278 |
||
3279 |
uninitialize |
|
1546 | 3280 |
"removes the autoUpdateBlock from the Processor and myself from the ObjectMemory" |
1545 | 3281 |
|
3282 |
Processor removeTimedBlock:autoUpdateBlock. |
|
3283 |
ObjectMemory removeDependent:self |
|
3284 |
! ! |
|
3285 |
||
3286 |
!NewChangesBrowser methodsFor:'user actions'! |
|
3287 |
||
3288 |
doApply |
|
1546 | 3289 |
"applies the selected change" |
1545 | 3290 |
|
3291 |
self withSelectedChangeDo:[:change| |
|
2250 | 3292 |
skipSignal := nil. |
3293 |
self applyChange:change. |
|
3294 |
self autoSelectChange: (self listOfChanges at: (self listOfChanges indexOf: change) + 1 ifAbsent: [^self autoSelectLast]) |
|
1545 | 3295 |
] |
3296 |
! |
|
3297 |
||
3298 |
doApplyAll |
|
1546 | 3299 |
"applies all changes" |
1545 | 3300 |
|
3301 |
self withExecuteCursorDo:[ |
|
2250 | 3302 |
|change| |
3303 |
self unselectChange. |
|
3304 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
3305 |
1 to:self listOfChanges size do:[:changeNr | |
|
3306 |
self selectionOfChange value:(change := self listOfChanges at: changeNr). |
|
3307 |
self applyChange:change |
|
3308 |
]. |
|
3309 |
self autoSelectLast |
|
1545 | 3310 |
] |
3311 |
||
3312 |
! |
|
3313 |
||
1546 | 3314 |
doApplyAllForClass |
3315 |
"applies all changes having the same class like the selected one" |
|
3316 |
||
3317 |
self doApplyForClassToEndFrom: 1 |
|
3318 |
||
3319 |
||
3320 |
! |
|
3321 |
||
1545 | 3322 |
doApplyForClassToEnd |
1546 | 3323 |
"applies all changes having the same class like the selected one from the selected to the end" |
3324 |
||
3325 |
self doApplyForClassToEndFrom: (self listOfChanges indexOf: self selectionOfChange value) |
|
3326 |
! |
|
3327 |
||
3328 |
doApplyForClassToEndFrom: start |
|
3329 |
"applies changes with same class like the selected one from start to end" |
|
1545 | 3330 |
|
3331 |
self withSelectedChangeDo:[:change| |
|
2250 | 3332 |
|classNameToApply thisClassName lastChange change2| |
6288 | 3333 |
(classNameToApply := self classNameOfChange:change) notNil |
2250 | 3334 |
ifTrue: |
6288 | 3335 |
[ |
2250 | 3336 |
self unselectChange. |
3337 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
3338 |
start to:self listOfChanges size do: |
|
3339 |
[:changeNr| |
|
3340 |
change2 := self listOfChanges at: changeNr. |
|
3341 |
((thisClassName := self classNameOfChange:change2) notNil and: |
|
3342 |
[thisClassName = classNameToApply or: |
|
3343 |
[PrivateAsSeparate not and: [(thisClassName upTo: $:) = classNameToApply]]]) |
|
3344 |
ifTrue: |
|
6288 | 3345 |
[ |
2250 | 3346 |
self selectionOfChange value: change2. |
3347 |
self applyChange:change2. |
|
3348 |
lastChange := change2 |
|
3349 |
] |
|
3350 |
]. |
|
3351 |
self autoSelectChange:lastChange. |
|
3352 |
] |
|
1545 | 3353 |
] |
3354 |
||
3355 |
! |
|
3356 |
||
3357 |
doApplyFromLastSnapshot |
|
1546 | 3358 |
"applies all changes made since the last snapshot" |
1545 | 3359 |
|
3360 |
self autoSelectLast. |
|
3361 |
(self doFindSnapshot: 'last') ifTrue: [self doApplyToEnd] |
|
3362 |
! |
|
3363 |
||
3364 |
doApplyToEnd |
|
1546 | 3365 |
"applies all changes from selected one to be end" |
1545 | 3366 |
|
3367 |
self withSelectedChangeDo:[:change| |
|
2250 | 3368 |
self unselectChange. |
3369 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
3370 |
(self listOfChanges indexOf: change) to: self listOfChanges size do:[:changeNr| |
|
3371 |
self selectionOfChange value:(self listOfChanges at: changeNr). |
|
3372 |
self applyChange:(self listOfChanges at: changeNr) |
|
3373 |
]. |
|
3374 |
self autoSelectChange:self listOfChanges last |
|
1545 | 3375 |
] |
3376 |
||
3377 |
! |
|
3378 |
||
3379 |
doBrowseClass |
|
1546 | 3380 |
"opens a System Browser on the class of a change (and selector)" |
1545 | 3381 |
|
3382 |
|className cls isMeta| |
|
3383 |
||
3384 |
className := self fullClassNameOfChange:self selectionOfChange value. |
|
3385 |
className notNil ifTrue:[ |
|
6288 | 3386 |
isMeta := false. |
3387 |
(className endsWith:' class') ifTrue:[ |
|
3388 |
className := className copyWithoutLast:6. |
|
3389 |
isMeta := true. |
|
3390 |
]. |
|
3391 |
(cls := Smalltalk classNamed:className) notNil ifTrue:[ |
|
3392 |
isMeta ifTrue:[cls := cls class]. |
|
3393 |
cls browserClass |
|
3394 |
openInClass:cls |
|
3395 |
selector:(self selectorOfMethodChange:self selectionOfChange value) |
|
3396 |
] |
|
1545 | 3397 |
] |
3398 |
||
3220 | 3399 |
"Modified: / 26.9.2001 / 17:35:50 / cg" |
1545 | 3400 |
! |
3401 |
||
3402 |
doCompare |
|
1546 | 3403 |
"compares a change with the current system version" |
1545 | 3404 |
|
3405 |
|change| |
|
3406 |
||
3407 |
(change := self selectionOfChange value) notNil ifTrue:[ |
|
2250 | 3408 |
self withExecuteCursorDo:[self compareChange:change] |
1545 | 3409 |
]. |
3410 |
self newLabel:'' |
|
3411 |
! |
|
3412 |
||
3413 |
doCompress |
|
1546 | 3414 |
"compresses the changes, i.e. replaces multiple changes by the last change" |
1545 | 3415 |
|
3416 |
|changesSizeBefore| |
|
1546 | 3417 |
(changesSizeBefore := changes size) == 0 ifTrue: [^self warn: 'Nothing to compress!!']. |
1545 | 3418 |
self setChangeList. |
3419 |
self unselectChange. |
|
3420 |
self compressForClass:nil. |
|
6288 | 3421 |
self setChangeList. |
1545 | 3422 |
self updateInfoLabel. |
3423 |
||
6288 | 3424 |
self information: |
2250 | 3425 |
'Compression Rate: ', (((changesSizeBefore - changes size)/changesSizeBefore) * 100) rounded printString, '%\' withCRs, |
3426 |
'Obsolete Changes: ', (changesSizeBefore - changes size) printString, ' from ', changesSizeBefore printString |
|
1545 | 3427 |
|
3428 |
||
3429 |
||
3430 |
||
3431 |
! |
|
3432 |
||
3433 |
doCompressForClass |
|
1546 | 3434 |
"compresses changes for the selected class. |
1545 | 3435 |
this replaces multiple method-changes by the last (i.e. the most recent) change." |
3436 |
||
3437 |
self withSelectedChangeDo:[:change| |
|
2250 | 3438 |
| classNameToCompress | |
3439 |
||
3440 |
(classNameToCompress := self classNameOfChange:change) notNil ifTrue:[ |
|
3441 |
self compressForClass:classNameToCompress. |
|
3442 |
filterCompletionBlock value: self valueOfFilter value. |
|
3443 |
self autoSelectLast |
|
3444 |
] |
|
1545 | 3445 |
] |
3446 |
||
3447 |
! |
|
3448 |
||
3449 |
doDelete |
|
1546 | 3450 |
"deletes the selected change" |
1545 | 3451 |
|
3452 |
|change selectionIndex| |
|
3453 |
||
3454 |
(change := self selectionOfChange value) notNil ifTrue:[ |
|
2250 | 3455 |
selectionIndex := self listOfChanges indexOf: change. |
3456 |
self unselectChange. |
|
3457 |
self silentDeleteChange:change. |
|
3458 |
self listOfChanges remove:change. |
|
3459 |
self autoSelectOrEnd: (self listOfChanges at: selectionIndex ifAbsent: [nil]). |
|
1545 | 3460 |
] |
1546 | 3461 |
! |
3462 |
||
3463 |
doDeleteAll |
|
3464 |
"deletes all changes" |
|
3465 |
||
3466 |
self deleteChangesFrom:1 to: self listOfChanges size. |
|
3467 |
self autoSelectOrEnd: nil |
|
3468 |
||
3469 |
! |
|
3470 |
||
3471 |
doDeleteAllForClass |
|
3472 |
"deletes all changes having the same class like the selected one" |
|
3473 |
||
3474 |
self doDeleteForClassToEndFrom: 1 |
|
1545 | 3475 |
|
3476 |
! |
|
3477 |
||
3478 |
doDeleteForClassToEnd |
|
1546 | 3479 |
"deletes all changes having the same class like the selected one from the selected to the end" |
3480 |
||
3481 |
self withSelectedChangeDo:[:change| |
|
2250 | 3482 |
self doDeleteForClassToEndFrom: (self listOfChanges indexOf: change) |
1546 | 3483 |
] |
3484 |
||
3485 |
||
3486 |
! |
|
3487 |
||
3488 |
doDeleteForClassToEndFrom: start |
|
3489 |
"deletes changes with same class like the selected one from start to end" |
|
1545 | 3490 |
|
3491 |
self withSelectedChangeDo:[:change| |
|
2250 | 3492 |
|classNameToDelete| |
3493 |
(classNameToDelete := self classNameOfChange:change) notNil ifTrue:[ |
|
3494 |
self unselectChange. |
|
6288 | 3495 |
self silentDeleteChangesFor:classNameToDelete |
2250 | 3496 |
from:start |
3497 |
to:self listOfChanges size. |
|
3498 |
self setChangeList. |
|
3499 |
self autoSelectOrEnd: nil |
|
3500 |
] |
|
1546 | 3501 |
]. |
3502 |
||
1545 | 3503 |
|
3504 |
||
3505 |
! |
|
3506 |
||
3507 |
doDeleteToEnd |
|
1546 | 3508 |
"deletes all changes from selected one to be end" |
1545 | 3509 |
|
3510 |
|changeNr| |
|
3511 |
||
3512 |
changeNr := (self listOfChanges indexOf: self selectionOfChange value). |
|
3513 |
changeNr ~~ 0 ifTrue:[ |
|
2250 | 3514 |
self deleteChangesFrom:changeNr to: self listOfChanges size. |
3515 |
self unselectChange. |
|
3516 |
self autoSelectOrEnd: nil |
|
1545 | 3517 |
] |
3518 |
||
3519 |
! |
|
3520 |
||
1568 | 3521 |
doFilter: aFilterString |
3522 |
"filter the changes with aFilterString" |
|
3523 |
||
1569 | 3524 |
self selectionOfChange value: nil. |
1568 | 3525 |
self valueOfFilter value: aFilterString withoutNotifying: self. |
3526 |
self valueOfFilter changed. |
|
3527 |
self autoSelectLast |
|
3528 |
! |
|
3529 |
||
1644 | 3530 |
doFilterSourceType: aFilterStringTypeString |
3531 |
"filter the source changes with aFilterStringTypeString" |
|
1568 | 3532 |
|
1569 | 3533 |
self selectionOfChange value: nil. |
3534 |
self listOfChanges contents: #(). |
|
3535 |
self valueOfFilter value: '' withoutNotifying: self. |
|
1644 | 3536 |
self listOfChanges contents: (changes select: [:change| change type = 'source' and: [aFilterStringTypeString match: change string]]). |
3537 |
self autoSelectLast |
|
1568 | 3538 |
|
3539 |
! |
|
3540 |
||
3541 |
doFilterType: aFilterTypeString |
|
3542 |
"filter the changes with aFilterTypeString" |
|
3543 |
||
1569 | 3544 |
self selectionOfChange value: nil. |
3545 |
self valueOfFilter value: '' withoutNotifying: self. |
|
1568 | 3546 |
self listOfChanges contents: (changes select: [:change| change type = aFilterTypeString]). |
3547 |
self autoSelectLast |
|
3548 |
||
3549 |
! |
|
3550 |
||
1545 | 3551 |
doFindSnapshot: what |
7957 | 3552 |
"finds the last made snapshot and selects it. what is one of last, prvious or next" |
1545 | 3553 |
|
1887 | 3554 |
|snapshotNr snapshotFound| |
3555 |
||
7957 | 3556 |
(self listOfChanges contains: [:change| change type = 'image']) ifFalse: [ |
3557 |
self warn: 'No snapshot found!!'. |
|
3558 |
^ false. |
|
3559 |
]. |
|
1545 | 3560 |
|
3561 |
self withSelectedChangeDo:[:change| |
|
7957 | 3562 |
what = 'last' ifTrue:[ |
3563 |
snapshotNr := self listOfChanges size+1. |
|
3564 |
] ifFalse:[ |
|
3565 |
snapshotNr := self listOfChanges indexOf: change. |
|
3566 |
]. |
|
3567 |
||
3568 |
snapshotFound := false. |
|
3569 |
[snapshotNr > 0 and: [snapshotFound not]] whileTrue:[ |
|
3570 |
(what = 'last' or:[what = 'previous']) ifTrue:[ |
|
3571 |
snapshotNr := snapshotNr - 1. |
|
3572 |
snapshotNr == 0 ifTrue: [snapshotNr := self listOfChanges size]. |
|
3573 |
] ifFalse:[ |
|
3574 |
snapshotNr := snapshotNr + 1. |
|
3575 |
snapshotNr > self listOfChanges size ifTrue: [snapshotNr := 1]. |
|
3576 |
]. |
|
3577 |
(self listOfChanges at: snapshotNr ifAbsent: [^self autoSelectChange: (what = 'last' ifTrue: [self listOfChanges last] ifFalse: [self listOfChanges first])]) type = 'image' |
|
3578 |
ifTrue:[ |
|
3579 |
snapshotFound := true. |
|
3580 |
self autoSelectChange:(self listOfChanges at: snapshotNr) |
|
3581 |
] |
|
3582 |
] |
|
1887 | 3583 |
]. |
3584 |
||
7957 | 3585 |
^ snapshotFound |
1545 | 3586 |
! |
3587 |
||
1556 | 3588 |
doLoad |
1546 | 3589 |
"opens a dialog for loading changes from a file" |
1545 | 3590 |
|
3591 |
|fileName| |
|
3592 |
(fileName := |
|
10247 | 3593 |
" |
3594 |
FileSelectionBrowser |
|
3595 |
request: 'Load Changes List' |
|
3596 |
fileName: changeFileName |
|
3597 |
withFileFilters: #('c*'))" |
|
3598 |
Dialog |
|
3599 |
requestFileName:'Load Changes List' |
|
3600 |
default: changeFileName |
|
3601 |
pattern:'*.chg;*.st' |
|
3602 |
) notNil |
|
3603 |
||
1545 | 3604 |
ifTrue: |
3605 |
[ |
|
10247 | 3606 |
changeFileName := fileName. |
3607 |
changes removeAll. |
|
3608 |
self readChangesFileInBackground:true. |
|
3609 |
self unselectChange. |
|
3610 |
Processor addTimedBlock:autoUpdateBlock afterSeconds:5. |
|
3611 |
self updateInfoLabel. |
|
3612 |
self autoSelectLast |
|
1545 | 3613 |
] |
10247 | 3614 |
|
3615 |
"Modified: / 11-10-2010 / 20:35:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1545 | 3616 |
! |
3617 |
||
3618 |
doReload |
|
1546 | 3619 |
"reloads the changes from the file" |
1545 | 3620 |
|
3621 |
changes removeAll. |
|
3622 |
self unselectChange. |
|
3623 |
self readChangesFileInBackground:true. |
|
3624 |
self autoSelectLast |
|
3625 |
||
3626 |
! |
|
3627 |
||
3628 |
doSave |
|
3629 |
"write back the changes file. To avoid problems when the disk is full |
|
6288 | 3630 |
or a crash occurs while writing (well, or someone kills us), |
1545 | 3631 |
first write the stuff to a new temporary file. If this works ok, |
3632 |
rename the old change-file to a .bak file and finally rename the |
|
6288 | 3633 |
tempfile back to the change-file. |
1545 | 3634 |
That way, if anything happens, either the original file is left unchanged, |
3635 |
or we have at least a backup of the previous change file." |
|
3636 |
||
6288 | 3637 |
|inStream outStream tempfile stamp f| |
1545 | 3638 |
|
3639 |
self valueOfNotReading value ifFalse: [^nil]. |
|
3640 |
||
3641 |
editingClassSource ifTrue:[ |
|
2250 | 3642 |
(self confirm:'You are editing a classes sourceFile (not a changeFile) !!\Are you certain, you want to overwrite it ?' withCRs) |
3643 |
ifFalse:[ |
|
3644 |
^ false |
|
3645 |
] |
|
1545 | 3646 |
]. |
3647 |
||
3648 |
tempfile := Filename newTemporaryIn:nil. |
|
3649 |
tempfile exists ifTrue:[tempfile remove]. |
|
3650 |
||
3651 |
outStream := tempfile writeStream. |
|
3652 |
outStream isNil ifTrue:[ |
|
2250 | 3653 |
self warn:'Cannot create temporary file in current directory.'. |
3654 |
^ false |
|
1545 | 3655 |
]. |
3656 |
||
3657 |
inStream := FileStream readonlyFileNamed:changeFileName. |
|
3658 |
inStream isNil ifTrue:[^ false]. |
|
3659 |
||
3660 |
self withCursor:(Cursor write) do:[ |
|
2250 | 3661 |
|excla sawExcla done first chunk |
3662 |
nChanges "{Class:SmallInteger}" | |
|
3663 |
||
3664 |
Stream writeErrorSignal handle:[:ex | |
|
3665 |
self warn:('Could not update the changes file.\\' , ex errorString) withCRs. |
|
3666 |
^ false |
|
3667 |
] do:[ |
|
3668 |
||
3669 |
self valueOfNotSaving value: false. |
|
3670 |
||
3671 |
excla := inStream class chunkSeparator. |
|
3672 |
nChanges := changes size. |
|
3673 |
||
6288 | 3674 |
1 to:nChanges do:[:index | |
2250 | 3675 |
inStream position: (changes at: index) position. |
3676 |
sawExcla := inStream peekFor:excla. |
|
3677 |
chunk := inStream nextChunk. |
|
3678 |
||
3679 |
(chunk notNil |
|
3680 |
and:[(chunk startsWith:'''---- snap') not]) ifTrue:[ |
|
3681 |
(stamp := (changes at:index) timeStamp) notNil ifTrue:[ |
|
3682 |
outStream nextPutAll:'''---- timestamp ' , stamp , ' ----'''. |
|
3683 |
outStream nextPut:excla; cr. |
|
3684 |
]. |
|
3685 |
]. |
|
3686 |
||
6288 | 3687 |
sawExcla ifTrue:[ |
3688 |
outStream nextPut:excla. |
|
2250 | 3689 |
outStream nextChunkPut:chunk. |
3690 |
outStream cr; cr. |
|
3691 |
||
3692 |
" |
|
3693 |
a method-definition chunk - skip followups |
|
3694 |
" |
|
3695 |
done := false. |
|
3696 |
first := true. |
|
3697 |
[done] whileFalse:[ |
|
3698 |
chunk := inStream nextChunk. |
|
3699 |
chunk isNil ifTrue:[ |
|
3700 |
outStream cr; cr. |
|
3701 |
done := true |
|
3702 |
] ifFalse:[ |
|
3703 |
chunk isEmpty ifTrue:[ |
|
3704 |
outStream space; nextChunkPut:chunk; cr; cr. |
|
3705 |
done := true. |
|
3706 |
] ifFalse:[ |
|
3707 |
first ifFalse:[ |
|
3708 |
outStream cr; cr. |
|
3709 |
]. |
|
3710 |
outStream nextChunkPut:chunk. |
|
3711 |
]. |
|
3712 |
]. |
|
3713 |
first := false. |
|
3714 |
]. |
|
3715 |
] ifFalse:[ |
|
3716 |
outStream nextChunkPut:chunk. |
|
3717 |
outStream cr |
|
3718 |
] |
|
3719 |
]. |
|
3720 |
outStream close. |
|
3721 |
inStream close. |
|
3722 |
]. |
|
3723 |
||
3724 |
f := changeFileName asFilename. |
|
3725 |
f renameTo:(f withSuffix:'bak'). |
|
3726 |
tempfile renameTo:changeFileName. |
|
3727 |
self doReload. |
|
3728 |
modified := false. |
|
3729 |
self valueOfNotSaving value: true. |
|
1545 | 3730 |
]. |
3731 |
^ true |
|
3732 |
||
3733 |
||
3734 |
! ! |
|
3735 |
||
3736 |
!NewChangesBrowser::Change methodsFor:'accessing'! |
|
3737 |
||
3738 |
category |
|
3739 |
||
3740 |
^category |
|
3741 |
! |
|
3742 |
||
3743 |
category: aValue |
|
3744 |
||
3745 |
category := aValue |
|
3746 |
! |
|
3747 |
||
3748 |
chunk |
|
3749 |
||
3750 |
^chunk |
|
3751 |
! |
|
3752 |
||
3753 |
chunk: aValue |
|
3754 |
||
3755 |
chunk := aValue |
|
3756 |
! |
|
3757 |
||
3758 |
className |
|
3759 |
||
3760 |
^className |
|
3761 |
! |
|
3762 |
||
3763 |
className: aValue |
|
3764 |
||
3765 |
className := aValue |
|
3766 |
! |
|
3767 |
||
3768 |
delta |
|
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3769 |
|cls| |
1545 | 3770 |
|
3771 |
delta size = 0 ifTrue: [^'']. |
|
3772 |
delta = '=' ifTrue: [^'Current']. |
|
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3773 |
delta = '?' ifTrue: [ |
2250 | 3774 |
(className notNil and:[className knownAsSymbol]) ifTrue:[ |
3775 |
(cls := Smalltalk at:className asSymbol ifAbsent:nil) notNil ifTrue:[ |
|
3776 |
cls isBehavior ifTrue:[ |
|
3777 |
cls isLoaded ifFalse:[ |
|
3778 |
^ 'Not loaded' |
|
3779 |
] |
|
3780 |
] |
|
3781 |
] |
|
3782 |
]. |
|
3783 |
^'No class' |
|
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3784 |
]. |
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3785 |
delta = '-' ifTrue: [^'Remove']. |
1545 | 3786 |
delta = '+' ifTrue: [^'New']. |
3787 |
^delta |
|
1771
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3788 |
|
6d6c2bde9615
dont catch halts and breakpoints while reading;
Claus Gittinger <cg@exept.de>
parents:
1712
diff
changeset
|
3789 |
"Modified: / 29.7.1998 / 23:08:10 / cg" |
1545 | 3790 |
! |
3791 |
||
3792 |
delta: aValue |
|
3793 |
||
3794 |
delta := aValue |
|
3795 |
! |
|
3796 |
||
3797 |
followUp |
|
3798 |
||
3799 |
^followUp |
|
3800 |
! |
|
3801 |
||
3802 |
followUp: aValue |
|
3803 |
||
3804 |
followUp := aValue |
|
3805 |
! |
|
3806 |
||
1568 | 3807 |
lastPosition: aValue |
3808 |
||
3809 |
lastPosition := aValue |
|
3810 |
! |
|
3811 |
||
1545 | 3812 |
listColor |
7957 | 3813 |
((string size < 3) or:[(string at: 3) ~~ $-]) ifTrue:[ |
3814 |
(self type = 'class') ifTrue: [^Color gray]. |
|
3815 |
^ Color white |
|
1545 | 3816 |
]. |
3817 |
||
3818 |
(string includesMatchString: '---- s') ifTrue: [^Color red]. |
|
3819 |
(string includesMatchString: '---- f') ifTrue: [^Color cyan: 100 magenta: 20 yellow: 20]. |
|
3820 |
(string includesMatchString: '---- c') ifTrue: [^Color blue]. |
|
3821 |
||
3822 |
^Color white |
|
3823 |
! |
|
3824 |
||
3825 |
position |
|
3826 |
||
3827 |
^position |
|
3828 |
! |
|
3829 |
||
3830 |
position: aValue |
|
3831 |
||
3832 |
position := aValue |
|
3833 |
! |
|
3834 |
||
1568 | 3835 |
positions |
3836 |
||
3837 |
^position printString, ' - ', lastPosition printString |
|
3838 |
! |
|
3839 |
||
7957 | 3840 |
selector |
3841 |
^ selector |
|
3842 |
! |
|
3843 |
||
3844 |
selector:something |
|
3845 |
selector := something. |
|
3846 |
! |
|
3847 |
||
1545 | 3848 |
string |
3849 |
||
3850 |
^string |
|
3851 |
! |
|
3852 |
||
3853 |
string: aValue |
|
3854 |
||
3855 |
string := aValue |
|
3856 |
! |
|
3857 |
||
3858 |
timeStamp |
|
3859 |
||
3860 |
^timeStamp |
|
3861 |
! |
|
3862 |
||
3863 |
timeStamp: aValue |
|
3864 |
||
3865 |
timeStamp := aValue |
|
3866 |
! |
|
3867 |
||
3868 |
type |
|
3869 |
||
3870 |
(type = 'doIt' or: [type = 'remove']) ifTrue: [^'class']. |
|
3871 |
(type size = 0) ifTrue: [(string includesMatchString: '---- s') ifTrue: [^'image'] ifFalse: [^'source']]. |
|
3872 |
(self category = nil) ifTrue: [^'class']. |
|
3873 |
^'method' |
|
3874 |
! |
|
3875 |
||
3876 |
type: aValue |
|
3877 |
||
3878 |
type := aValue |
|
3879 |
! ! |
|
3880 |
||
3881 |
!NewChangesBrowser class methodsFor:'documentation'! |
|
3882 |
||
10584
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
3883 |
version |
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10584
diff
changeset
|
3884 |
^ '$Id: NewChangesBrowser.st 7816 2011-08-18 08:03:34Z vranyj1 $' |
10584
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
3885 |
! |
26c11c692527
changed: #checkClassIsLoaded:
Claus Gittinger <cg@exept.de>
parents:
10583
diff
changeset
|
3886 |
|
9179
20f04cffb483
changed: #readChangesFileInBackground:
Claus Gittinger <cg@exept.de>
parents:
7957
diff
changeset
|
3887 |
version_CVS |
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10584
diff
changeset
|
3888 |
^ '§Header: /cvs/stx/stx/libtool/NewChangesBrowser.st,v 1.35 2011/08/18 07:51:53 cg Exp §' |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10584
diff
changeset
|
3889 |
! ! |