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