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