author | Claus Gittinger <cg@exept.de> |
Mon, 24 Aug 1998 14:35:47 +0200 | |
changeset 1848 | 61054ff3d470 |
parent 1833 | c9b1a30b326d |
child 1996 | e229ecc9f839 |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1990 by Claus Gittinger |
45 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
StandardSystemView subclass:#ChangesBrowser |
|
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
14 |
instanceVariableNames:'changeListView codeView changeFileName changeChunks |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
15 |
changePositions changeClassNames changeHeaderLines |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
16 |
changeIsFollowupMethodChange anyChanges changeNrShown |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
17 |
changeNrProcessed skipSignal compareChanges compareCheckBox |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
18 |
changeFileSize changeFileTimestamp checkBlock changeTimeStamps |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
19 |
tabSpec autoUpdate editingClassSource lastSearchType' |
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
20 |
classVariableNames:'CompressSnapshotInfo' |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
21 |
poolDictionaries:'' |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
22 |
category:'Interface-Browsers' |
0 | 23 |
! |
24 |
||
761 | 25 |
!ChangesBrowser class methodsFor:'documentation'! |
29 | 26 |
|
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1990 by Claus Gittinger |
|
45 | 30 |
All Rights Reserved |
0 | 31 |
|
29 | 32 |
This software is furnished under a license and may be used |
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! |
|
40 |
||
41 |
documentation |
|
42 |
" |
|
43 |
this implements a browser for the changes-file. |
|
44 |
See the extra document 'doc/misc/cbrowser.doc' for how to use this browser. |
|
45 |
||
46 |
written jan 90 by claus |
|
51 | 47 |
|
508 | 48 |
[Class variables:] |
1378 | 49 |
CompressSnapshotInfo if true (the default), snapshot entries |
50 |
are also compressed in the compress function. |
|
51 |
Some users prefer them to be not compressed. |
|
52 |
Set it to false for this. |
|
58 | 53 |
|
51 | 54 |
Notice: |
1378 | 55 |
this needs a total rewrite, to build up a changeSet from the file |
56 |
(which did not exist when the ChangesBrowser was originally written) |
|
57 |
and manipulate that changeSet. |
|
58 |
||
59 |
This way, we get a browser for any upcoming incore changeSets for |
|
60 |
free. Also, this will put the chunk analyzation code into Change and |
|
61 |
subclasses (where it belongs) and give a better encapsulation and |
|
62 |
overall structure. Do not take this as an example for good style ;-) |
|
508 | 63 |
|
64 |
[author:] |
|
1378 | 65 |
Claus Gittinger |
508 | 66 |
|
67 |
[start with:] |
|
1378 | 68 |
ChangesBrowser open |
1359 | 69 |
|
70 |
[see also:] |
|
1378 | 71 |
( Using the ChangesBrowser :html: tools/cbrowser/TOP.html ) |
1359 | 72 |
|
29 | 73 |
" |
74 |
! ! |
|
0 | 75 |
|
761 | 76 |
!ChangesBrowser class methodsFor:'instance creation'! |
45 | 77 |
|
78 |
new |
|
79 |
"create a new changes browser" |
|
80 |
||
1470 | 81 |
^ super |
82 |
label:(self defaultLabel) |
|
83 |
icon:(self defaultIcon) |
|
84 |
||
85 |
"Modified: / 6.2.1998 / 13:25:18 / cg" |
|
45 | 86 |
! |
87 |
||
88 |
openOn:aFileName |
|
89 |
"create c changes browser on a change file" |
|
90 |
||
1470 | 91 |
^ ((self new label:(self defaultLabel , ': ', aFileName)) |
92 |
changeFileName:aFileName) open |
|
93 |
||
94 |
"Modified: / 6.2.1998 / 13:27:19 / cg" |
|
45 | 95 |
! ! |
96 |
||
761 | 97 |
!ChangesBrowser class methodsFor:'behavior'! |
0 | 98 |
|
99 |
autoSelectNext |
|
100 |
"returning true here, makes a Delete operation automatically |
|
101 |
select the next change" |
|
102 |
||
103 |
^ true |
|
104 |
! ! |
|
105 |
||
761 | 106 |
!ChangesBrowser class methodsFor:'defaults'! |
0 | 107 |
|
489 | 108 |
defaultIcon |
1153 | 109 |
"return the browsers default window icon" |
110 |
||
111 |
<resource: #style (#ICON #ICON_FILE)> |
|
112 |
||
113 |
|nm i| |
|
114 |
||
115 |
(i := DefaultIcon) isNil ifTrue:[ |
|
1378 | 116 |
i := self classResources at:'ICON' default:nil. |
117 |
i isNil ifTrue:[ |
|
118 |
nm := ClassResources at:'ICON_FILE' default:'CBrowser.xbm'. |
|
119 |
i := Image fromFile:nm resolution:100. |
|
120 |
i isNil ifTrue:[ |
|
121 |
i := Image fromFile:('bitmaps/' , nm) resolution:100. |
|
122 |
i isNil ifTrue:[ |
|
123 |
i := StandardSystemView defaultIcon |
|
124 |
] |
|
125 |
] |
|
126 |
]. |
|
127 |
i notNil ifTrue:[ |
|
128 |
DefaultIcon := i := i on:Display |
|
129 |
] |
|
1084 | 130 |
]. |
131 |
^ i |
|
132 |
||
1153 | 133 |
"Modified: 19.3.1997 / 20:48:34 / ca" |
134 |
"Modified: 18.4.1997 / 15:16:24 / cg" |
|
489 | 135 |
! |
136 |
||
73 | 137 |
defaultLabel |
138 |
^ 'Changes Browser' |
|
28 | 139 |
! ! |
140 |
||
202 | 141 |
!ChangesBrowser methodsFor:'compiler interface'! |
142 |
||
143 |
wantChangeLog |
|
144 |
"sent by the compiler to ask if a changeLog entry should |
|
145 |
be written. Return false here." |
|
146 |
||
147 |
^ false |
|
148 |
! ! |
|
149 |
||
150 |
!ChangesBrowser methodsFor:'error handling'! |
|
151 |
||
152 |
correctableError:aString position:relPos to:relEndPos from:aCompiler |
|
153 |
"compiler notifys us of an error - this should really not happen since |
|
154 |
changes ought to be correct (did someone edit the changes file ??). |
|
155 |
Show the bad change in the codeView and let codeView hilight the error; |
|
156 |
no corrections allowed here therefore return false" |
|
157 |
||
158 |
self error:aString position:relPos to:relEndPos from:aCompiler. |
|
159 |
^ false |
|
160 |
! |
|
161 |
||
162 |
error:aString position:relPos to:relEndPos from:aCompiler |
|
163 |
"compiler notifys us of an error - this should really not happen since |
|
164 |
changes ought to be correct (did someone edit the changes file ??). |
|
165 |
Show the bad change in the codeView and let codeView hilight the error" |
|
166 |
||
167 |
|action| |
|
168 |
||
169 |
(changeNrProcessed ~~ changeNrShown) ifTrue:[ |
|
1378 | 170 |
self changeSelection:changeNrProcessed |
202 | 171 |
]. |
172 |
(skipSignal notNil) ifTrue:[ |
|
173 |
||
1378 | 174 |
codeView highlightingErrorPosition:relPos to:relEndPos do:[ |
175 |
|box| |
|
176 |
||
177 |
" |
|
178 |
start dialog - make certain cleanup is done |
|
179 |
" |
|
180 |
action := OptionBox |
|
181 |
request:aString |
|
182 |
label:'Error' |
|
183 |
form:(WarningBox iconBitmap) |
|
184 |
buttonLabels:#('cancel' 'skip' 'continue') |
|
185 |
values:#(#abort #skip #continue) |
|
186 |
default:#continue. |
|
187 |
]. |
|
188 |
||
189 |
action == #abort ifTrue:[ |
|
190 |
Object abortSignal raise. |
|
191 |
^ false |
|
192 |
]. |
|
193 |
action == #skip ifTrue:[ |
|
194 |
skipSignal raise. |
|
195 |
^ false |
|
196 |
]. |
|
197 |
^ false |
|
202 | 198 |
]. |
199 |
^ codeView error:aString position:relPos to:relEndPos from:aCompiler |
|
373 | 200 |
|
201 |
"Modified: 20.2.1996 / 20:47:59 / cg" |
|
202 | 202 |
! |
203 |
||
204 |
warning:aString position:relPos to:relEndPos from:aCompiler |
|
205 |
"compiler notifys us of a warning - ignore it" |
|
206 |
||
207 |
^ self |
|
208 |
! ! |
|
209 |
||
210 |
!ChangesBrowser methodsFor:'event handling '! |
|
211 |
||
212 |
handlesKeyPress:key inView:view |
|
213 |
"this method is reached via delegation: are we prepared to handle |
|
214 |
a keyPress in some other view ?" |
|
215 |
||
1127 | 216 |
<resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)> |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
217 |
|
202 | 218 |
view == changeListView ifTrue:[ |
1378 | 219 |
(key == #Delete |
220 |
or:[key == #BackSpace |
|
221 |
or:[key == #Accept |
|
222 |
or:[key == #Find |
|
223 |
or:[key == #FindPrev |
|
224 |
or:[key == #FindNext]]]]]) ifTrue:[^ true]. |
|
202 | 225 |
]. |
226 |
^ false |
|
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
227 |
|
1127 | 228 |
"Modified: 8.4.1997 / 11:01:42 / cg" |
0 | 229 |
! |
230 |
||
202 | 231 |
keyPress:key x:x y:y view:view |
232 |
"this method is reached via delegation from the changeListView" |
|
233 |
||
1127 | 234 |
<resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)> |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
235 |
|
202 | 236 |
(key == #Delete or:[key == #BackSpace]) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
237 |
self doDelete. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
238 |
^ self |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
239 |
]. |
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
240 |
(key == #Accept) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
241 |
self doApply. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
242 |
^ self |
202 | 243 |
]. |
1127 | 244 |
(key == #Find) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
245 |
self findClass. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
246 |
^ self |
1127 | 247 |
]. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
248 |
(key == #FindPrev) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
249 |
self findPrevious. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
250 |
^ self |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
251 |
]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
252 |
(key == #FindNext) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
253 |
self findNext. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
254 |
^ self |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
255 |
]. |
202 | 256 |
changeListView keyPress:key x:x y:y |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
257 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
258 |
"Modified: / 18.6.1998 / 22:15:36 / cg" |
202 | 259 |
! ! |
260 |
||
261 |
!ChangesBrowser methodsFor:'help '! |
|
262 |
||
263 |
helpTextFor:aComponent |
|
264 |
|s| |
|
265 |
||
266 |
aComponent == codeView ifTrue:[ |
|
267 |
s := 'HELP_CODEVIEW' |
|
268 |
]. |
|
269 |
aComponent == changeListView ifTrue:[ |
|
270 |
s := 'HELP_CHANGELIST' |
|
271 |
]. |
|
272 |
((aComponent == compareCheckBox) |
|
273 |
or:[aComponent superView == compareCheckBox]) ifTrue:[ |
|
274 |
s := 'HELP_CHECK_COMPARE' |
|
275 |
]. |
|
276 |
s notNil ifTrue:[ |
|
277 |
^ resources string:s |
|
278 |
]. |
|
279 |
^ nil |
|
394 | 280 |
! |
281 |
||
282 |
showActivity:someMessage |
|
502 | 283 |
"some activityNotification to be forwarded to the user; |
284 |
show it in the windows title area here." |
|
285 |
||
394 | 286 |
self label:someMessage |
287 |
||
288 |
"Created: 24.2.1996 / 19:35:42 / cg" |
|
502 | 289 |
"Modified: 23.4.1996 / 21:39:36 / cg" |
202 | 290 |
! ! |
291 |
||
292 |
!ChangesBrowser methodsFor:'initialize / release'! |
|
293 |
||
294 |
changeListMenu |
|
586 | 295 |
<resource: #keyboard ( #Accept #Delete ) > |
1359 | 296 |
<resource: #programMenu > |
586 | 297 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
298 |
|items m| |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
299 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
300 |
self sensor ctrlDown ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
301 |
lastSearchType == #selector ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
302 |
items := #( |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
303 |
('search class' findClass #Find ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
304 |
('next for this class' findNextForClass ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
305 |
('previous for this class' findPreviousForClass ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
306 |
('-' ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
307 |
('search selector' findSelector ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
308 |
('next with this selector' findNextForSelector #FindNext ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
309 |
('previous with this selector' findPreviousForSelector #FindPrev ) |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
310 |
('-' ) |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
311 |
('next snapshot' findNextSnapshot ) |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
312 |
('previous snapshot' findPreviousSnapshot ) |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
313 |
). |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
314 |
] ifFalse:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
315 |
items := #( |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
316 |
('search class' findClass #Find ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
317 |
('next for this class' findNextForClass #FindNext ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
318 |
('previous for this class' findPreviousForClass #FindPrev ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
319 |
('-' ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
320 |
('search selector' findSelector ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
321 |
('next with this selector' findNextForSelector ) |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
322 |
('previous with this selector' findPreviousForSelector ) |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
323 |
('-' ) |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
324 |
('next snapshot' findNextSnapshot ) |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
325 |
('previous snapshot' findPreviousSnapshot ) |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
326 |
). |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
327 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
328 |
^ PopUpMenu itemList:items resources:resources. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
329 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
330 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
331 |
items := #( |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
332 |
('apply' doApply Accept) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
333 |
('apply to end' doApplyRest ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
334 |
('apply for class to end' doApplyClassRest ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
335 |
('apply all' doApplyAll ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
336 |
('-' ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
337 |
('delete' doDelete Delete) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
338 |
('delete to end' doDeleteRest ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
339 |
('delete for class to end' doDeleteClassRest ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
340 |
('delete for class from begin' doDeleteClassFromBeginning ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
341 |
('delete all for class' doDeleteClassAll ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
342 |
('-' ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
343 |
('compress' doCompress ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
344 |
('compress for class' doCompressClass ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
345 |
('compare with current version' doCompare ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
346 |
('browse' doBrowse ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
347 |
('-' ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
348 |
('make change a patch' doMakePatch ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
349 |
). |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
350 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
351 |
editingClassSource ifFalse:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
352 |
items := items , #( |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
353 |
('fileout & delete all for class' doFileoutAndDeleteClassAll ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
354 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
355 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
356 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
357 |
items := items , #( |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
358 |
('-' ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
359 |
('save in ...' doSave ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
360 |
('save to end in ...' doSaveRest ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
361 |
('save for class to end in ...' doSaveClassRest ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
362 |
('save all for class in ...' doSaveClassAll ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
363 |
('-' ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
364 |
). |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
365 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
366 |
editingClassSource ifTrue:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
367 |
items := items , #( |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
368 |
('writeback classFile' doWriteBack ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
369 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
370 |
] ifFalse:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
371 |
items := items , #( |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
372 |
('writeback changeFile' doWriteBack ) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
373 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
374 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
375 |
|
1833
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
376 |
items := items , #( |
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
377 |
('-' ) |
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
378 |
('update view' doUpdate ) |
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
379 |
). |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
380 |
|
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
381 |
m := PopUpMenu itemList:items resources:resources. |
202 | 382 |
|
255 | 383 |
"/ |
384 |
"/ disable those that require a selected entry |
|
385 |
"/ |
|
202 | 386 |
changeListView hasSelection ifFalse:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
387 |
m disableAll:#(doApply doApplyClassRest doApplyRest doDelete doDeleteRest doDeleteClassRest |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
388 |
doDeleteClassFromBeginning doDeleteClassAll |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
389 |
doCompare doCompressClass doMakePatch doSaveChangeInFile doMakePermanent |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
390 |
doSave doSaveRest doSaveClassAll doSaveClassRest doBrowse doFileoutAndDeleteClassAll) |
1368 | 391 |
] ifTrue:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
392 |
(self classNameOfChange:(changeListView selection)) isNil ifTrue:[ |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
393 |
m disableAll:#(doApplyClassRest doDeleteClassRest |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
394 |
doDeleteClassFromBeginning doDeleteClassAll |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
395 |
doCompressClass |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
396 |
doSaveClassAll doSaveClassRest doBrowse doFileoutAndDeleteClassAll) |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
397 |
] |
255 | 398 |
]. |
399 |
||
400 |
"/ |
|
401 |
"/ disable those that do not make sense with autoUpdate |
|
402 |
"/ ('cause this would be overwritten by next update operation) |
|
403 |
"/ |
|
404 |
||
405 |
autoUpdate ifTrue:[ |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
406 |
m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll doCompress |
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
407 |
doFileoutAndDeleteClassAll doWriteBack) |
202 | 408 |
]. |
409 |
^ m |
|
410 |
||
1359 | 411 |
"Modified: / 6.9.1995 / 17:14:22 / claus" |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
412 |
"Modified: / 22.8.1998 / 15:50:17 / cg" |
202 | 413 |
! |
414 |
||
415 |
compare:aBoolean |
|
416 |
"sent from the compare-toggle" |
|
73 | 417 |
|
202 | 418 |
aBoolean ~~ compareChanges ifTrue:[ |
1378 | 419 |
compareChanges := aBoolean. |
420 |
compareChanges ifTrue:[ |
|
421 |
tabSpec positions:#(0 0.15 5 8.5 ). |
|
422 |
self doUpdate |
|
423 |
] ifFalse:[ |
|
424 |
"/ |
|
425 |
"/ set tabs to hide compare-column |
|
426 |
"/ |
|
427 |
tabSpec positions:#(-1 0 5 8.5 ). |
|
428 |
changeListView invalidate. "/ clear; redraw. |
|
429 |
] |
|
202 | 430 |
] |
431 |
||
584
3f49ec1318ef
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
577
diff
changeset
|
432 |
"Modified: 29.5.1996 / 16:12:19 / cg" |
202 | 433 |
! |
434 |
||
435 |
focusSequence |
|
436 |
^ Array with:changeListView with:codeView |
|
437 |
! |
|
438 |
||
439 |
initialize |
|
221 | 440 |
|panel v upperFrame buttonPanel autoUpdateCheckBox| |
202 | 441 |
|
442 |
super initialize. |
|
443 |
||
444 |
changeFileName := ObjectMemory nameForChanges. "/ 'changes'. |
|
445 |
compareChanges := false. |
|
221 | 446 |
autoUpdate := false. |
447 |
||
1099
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
448 |
" |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
449 |
checkBlock is executed by the Processor. |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
450 |
We use #pushEvent: to perform the update |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
451 |
in our windowgroups process. |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
452 |
" |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
453 |
checkBlock := [self pushEvent:#checkIfFileHasChanged]. |
202 | 454 |
|
455 |
panel := VariableVerticalPanel origin:(0.0 @ 0.0) |
|
1471 | 456 |
corner:(1.0 @ 1.0) |
457 |
borderWidth:0 |
|
458 |
in:self. |
|
202 | 459 |
|
460 |
upperFrame := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.3) in:panel. |
|
461 |
||
462 |
v := HVScrollableView for:SelectionInListView miniScrollerH:true in:upperFrame. |
|
463 |
v origin:(0.0 @ 0.0) corner:(0.8 @ 1.0). |
|
464 |
changeListView := v scrolledView. |
|
465 |
changeListView delegate:self. |
|
466 |
changeListView menuHolder:self; menuPerformer:self; menuMessage:#changeListMenu. |
|
1471 | 467 |
changeListView doubleClickAction:[:line | self doubleClickOnChange:line]. |
202 | 468 |
|
469 |
buttonPanel := VerticalPanelView in:upperFrame. |
|
470 |
buttonPanel origin:(0.8 @ 0.0) corner:(1.0 @ 1.0). |
|
221 | 471 |
buttonPanel verticalLayout:#topSpace; horizontalLayout:#leftSpace. |
202 | 472 |
|
473 |
compareCheckBox := CheckBox new. |
|
474 |
compareCheckBox label:(resources string:'compare'). |
|
475 |
compareCheckBox action:[:val | self compare:val]. |
|
476 |
buttonPanel addSubView:compareCheckBox. |
|
477 |
||
221 | 478 |
autoUpdateCheckBox := CheckBox new. |
479 |
autoUpdateCheckBox label:(resources string:'auto update'). |
|
480 |
autoUpdateCheckBox action:[:val | self autoUpdate:val]. |
|
481 |
buttonPanel addSubView:autoUpdateCheckBox. |
|
482 |
||
202 | 483 |
v := HVScrollableView for:CodeView miniScrollerH:true miniScrollerV:false in:panel. |
484 |
v origin:(0.0 @ 0.3) corner:(1.0 @ 1.0). |
|
485 |
codeView := v scrolledView. |
|
486 |
codeView readOnly. |
|
487 |
||
488 |
anyChanges := false. |
|
489 |
ObjectMemory addDependent:self. "to get shutdown-update" |
|
490 |
||
491 |
tabSpec := TabulatorSpecification new. |
|
492 |
tabSpec unit:#inch. |
|
493 |
tabSpec positions:#(-1 0 5 8.5 ). |
|
494 |
" +/- cls>>sel type info" |
|
495 |
tabSpec align: #(#left #left #left #left). |
|
496 |
||
1471 | 497 |
"Modified: / 27.3.1997 / 11:07:07 / stefan" |
498 |
"Modified: / 6.2.1998 / 13:08:16 / cg" |
|
202 | 499 |
! |
500 |
||
1246
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
501 |
postRealize |
202 | 502 |
self readChangesFileInBackground:true. |
503 |
self setChangeList. |
|
504 |
changeListView action:[:lineNr | self changeSelection:lineNr]. |
|
505 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
|
1246
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
506 |
|
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
507 |
"Created: 24.7.1997 / 18:06:12 / cg" |
202 | 508 |
! |
509 |
||
627 | 510 |
update:what with:aParameter from:changedObject |
202 | 511 |
|box| |
512 |
||
513 |
(what == #aboutToExit) ifTrue:[ |
|
1378 | 514 |
" |
515 |
smalltalk is about to shut down - |
|
516 |
- if change list was modified, ask user and save if requested. |
|
517 |
" |
|
518 |
anyChanges ifTrue:[ |
|
519 |
self raiseDeiconified. |
|
520 |
||
521 |
box := YesNoBox new. |
|
522 |
box title:(resources at:'changefile has not been updated from the modified changelist.\\Update before exiting ?') withCRs. |
|
523 |
box okText:(resources at:'update') noText:(resources at:'don''t update'). |
|
524 |
box yesAction:[self writeBackChanges] |
|
525 |
noAction:[]. |
|
526 |
box showAtPointer. |
|
527 |
box destroy |
|
528 |
]. |
|
529 |
^ self |
|
202 | 530 |
]. |
531 |
super update:what |
|
627 | 532 |
|
533 |
"Created: 15.6.1996 / 15:26:30 / cg" |
|
917 | 534 |
"Modified: 7.1.1997 / 23:03:47 / cg" |
202 | 535 |
! ! |
536 |
||
537 |
!ChangesBrowser methodsFor:'private'! |
|
538 |
||
539 |
appendChange:changeNr toFile:fileName |
|
540 |
"append change to a file. return true if ok." |
|
541 |
||
542 |
|aStream outStream chunk sawExcla separator| |
|
543 |
||
544 |
outStream := FileStream oldFileNamed:fileName. |
|
545 |
outStream isNil ifTrue:[ |
|
1472 | 546 |
outStream isNil ifTrue:[ |
547 |
outStream := FileStream newFileNamed:fileName. |
|
548 |
outStream isNil ifTrue:[ |
|
549 |
self warn:'cannot update file ''%1''' with:fileName. |
|
550 |
^ false |
|
551 |
] |
|
552 |
] |
|
73 | 553 |
]. |
202 | 554 |
|
555 |
outStream setToEnd. |
|
556 |
||
557 |
aStream := self streamForChange:changeNr. |
|
558 |
aStream isNil ifTrue:[ |
|
1472 | 559 |
self warn:'oops cannot read change'. |
560 |
^ false |
|
202 | 561 |
]. |
73 | 562 |
|
202 | 563 |
separator := aStream class chunkSeparator. |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
564 |
|
1472 | 565 |
(self changeIsFollowupMethodChange:changeNr) ifTrue:[ |
566 |
sawExcla := true. |
|
567 |
chunk := changeChunks at:changeNr |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
568 |
] ifFalse:[ |
1472 | 569 |
sawExcla := aStream peekFor:separator. |
570 |
chunk := aStream nextChunk. |
|
202 | 571 |
]. |
572 |
sawExcla ifTrue:[ |
|
1472 | 573 |
outStream nextPut:separator |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
574 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
575 |
outStream nextChunkPut:chunk; cr. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
576 |
sawExcla ifTrue:[ |
1472 | 577 |
chunk := aStream nextChunk. |
578 |
outStream nextChunkPut:chunk; space |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
579 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
580 |
sawExcla ifTrue:[ |
1472 | 581 |
outStream nextPut:separator |
202 | 582 |
]. |
583 |
outStream cr. |
|
584 |
aStream close. |
|
585 |
outStream close. |
|
586 |
^ true |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
587 |
|
1472 | 588 |
"Modified: / 6.2.1998 / 13:03:54 / cg" |
73 | 589 |
! |
590 |
||
51 | 591 |
applyChange:changeNr |
592 |
"fileIn a change" |
|
593 |
||
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
594 |
|aStream nm applyAction| |
45 | 595 |
|
51 | 596 |
aStream := self streamForChange:changeNr. |
597 |
aStream isNil ifTrue:[^ self]. |
|
598 |
||
599 |
nm := self classNameOfChange:changeNr. |
|
600 |
nm notNil ifTrue:[ |
|
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
601 |
|cls| |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
602 |
|
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
603 |
cls := Smalltalk at:(nm asSymbol) ifAbsent:[]. |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
604 |
cls notNil ifTrue:[ |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
605 |
cls isLoaded ifFalse:[ |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
606 |
cls autoload |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
607 |
] |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
608 |
] |
51 | 609 |
]. |
45 | 610 |
|
51 | 611 |
changeNrProcessed := changeNr. |
45 | 612 |
|
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
613 |
applyAction := [ |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
614 |
|sig| |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
615 |
|
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
616 |
(skipSignal notNil) ifTrue:[ |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
617 |
sig := skipSignal |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
618 |
] ifFalse:[ |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
619 |
sig := Object abortSignal |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
620 |
]. |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
621 |
sig catch:[ |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
622 |
|reader doItChunk methodsForChunk| |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
623 |
|
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
624 |
"/ a followup methodsFor: chunk ... |
1472 | 625 |
(self changeIsFollowupMethodChange:changeNr) ifTrue:[ |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
626 |
methodsForChunk := (changeChunks at:changeNr). |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
627 |
] ifFalse:[ |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
628 |
doItChunk := aStream nextChunk. "/ an empty chunk sometimes ... |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
629 |
doItChunk notEmpty ifTrue:[ |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
630 |
Compiler evaluate:doItChunk notifying:self. |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
631 |
] ifFalse:[ |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
632 |
methodsForChunk := aStream nextChunk. "/ the real one |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
633 |
] |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
634 |
]. |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
635 |
methodsForChunk notNil ifTrue:[ |
1594
834765de8cb5
no need for handler of methodRedefSignal; #keep is now the default.
Claus Gittinger <cg@exept.de>
parents:
1566
diff
changeset
|
636 |
reader := Compiler evaluate:methodsForChunk notifying:self. |
834765de8cb5
no need for handler of methodRedefSignal; #keep is now the default.
Claus Gittinger <cg@exept.de>
parents:
1566
diff
changeset
|
637 |
reader fileInFrom:aStream notifying:self passChunk:false single:true. |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
638 |
] |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
639 |
]. |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
640 |
changeNrProcessed := nil. |
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
641 |
]. |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
642 |
|
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
643 |
"/ |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
644 |
"/ if I am showing the changes file, dont update it |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
645 |
"/ |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
646 |
changeFileName = ObjectMemory nameForChanges ifTrue:[ |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
647 |
Class withoutUpdatingChangesDo:applyAction |
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
648 |
] ifFalse:[ |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
649 |
applyAction value |
45 | 650 |
]. |
132 | 651 |
aStream close |
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
652 |
|
1473 | 653 |
"Modified: / 7.2.1998 / 19:56:34 / cg" |
45 | 654 |
! |
655 |
||
202 | 656 |
autoSelect:changeNr |
657 |
"select a change" |
|
73 | 658 |
|
202 | 659 |
self class autoSelectNext ifTrue:[ |
1648 | 660 |
(changeNr <= self numberOfChanges) ifTrue:[ |
661 |
changeListView setSelection:changeNr. |
|
662 |
self changeSelection:changeNr. |
|
663 |
^ self |
|
664 |
] |
|
202 | 665 |
]. |
666 |
self clearCodeView. |
|
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
667 |
changeListView setSelection:nil. |
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
668 |
|
1648 | 669 |
"Modified: / 18.5.1998 / 14:26:43 / cg" |
73 | 670 |
! |
671 |
||
202 | 672 |
autoSelectLast |
673 |
"select the last change" |
|
0 | 674 |
|
223
d451e2badbd1
fixed handling of primitive def/var/function changes
Claus Gittinger <cg@exept.de>
parents:
221
diff
changeset
|
675 |
self autoSelect:(self numberOfChanges) |
202 | 676 |
! |
107 | 677 |
|
202 | 678 |
autoSelectOrEnd:changeNr |
679 |
"select the next change or the last" |
|
680 |
||
681 |
|last| |
|
50 | 682 |
|
223
d451e2badbd1
fixed handling of primitive def/var/function changes
Claus Gittinger <cg@exept.de>
parents:
221
diff
changeset
|
683 |
last := self numberOfChanges. |
202 | 684 |
changeNr < last ifTrue:[ |
1378 | 685 |
self autoSelect:changeNr |
133 | 686 |
] ifFalse:[ |
1378 | 687 |
changeListView setSelection:last . |
688 |
self changeSelection:last. |
|
202 | 689 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
690 |
|
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
691 |
"Modified: 25.5.1996 / 12:26:17 / cg" |
202 | 692 |
! |
133 | 693 |
|
202 | 694 |
changeFileName:aFileName |
695 |
changeFileName := aFileName |
|
133 | 696 |
! |
697 |
||
1470 | 698 |
changeIsFollowupMethodChange:changeNr |
699 |
^ changeIsFollowupMethodChange at:changeNr |
|
700 |
||
701 |
"Created: / 6.2.1998 / 13:03:39 / cg" |
|
702 |
! |
|
703 |
||
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
704 |
checkClassIsLoaded:aClass |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
705 |
|cls| |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
706 |
|
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
707 |
aClass isMeta ifTrue:[ |
1378 | 708 |
cls := aClass soleInstance |
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
709 |
] ifFalse:[ |
1378 | 710 |
cls := aClass |
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
711 |
]. |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
712 |
cls isLoaded ifFalse:[ |
1378 | 713 |
(self confirm:(cls name , ' is an autoloaded class.\I can only compare the methods texts if its loaded first.\\Load the class first ?') withCRs) |
714 |
ifTrue:[ |
|
715 |
cls autoload |
|
716 |
] |
|
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
717 |
]. |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
718 |
^ cls isLoaded |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
719 |
|
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
720 |
"Created: 12.12.1995 / 14:04:39 / cg" |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
721 |
"Modified: 12.12.1995 / 14:11:05 / cg" |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
722 |
! |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
723 |
|
133 | 724 |
checkIfFileHasChanged |
725 |
|f info | |
|
726 |
||
727 |
Processor removeTimedBlock:checkBlock. |
|
728 |
f := changeFileName asFilename. |
|
729 |
(info := f info) isNil ifTrue:[ |
|
1378 | 730 |
self newLabel:'(unaccessable)' |
133 | 731 |
] ifFalse:[ |
1378 | 732 |
(info modified) > changeFileTimestamp ifTrue:[ |
733 |
self newLabel:'(outdated)'. |
|
734 |
autoUpdate ifTrue:[ |
|
735 |
self doUpdate |
|
736 |
] |
|
737 |
] ifFalse:[ |
|
738 |
self newLabel:'' |
|
739 |
] |
|
133 | 740 |
]. |
741 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
|
742 |
||
743 |
"Created: 8.9.1995 / 19:30:19 / claus" |
|
744 |
"Modified: 8.9.1995 / 19:38:18 / claus" |
|
829
b6b0be2e14af
changes for new return from OS>>infoOf:
Claus Gittinger <cg@exept.de>
parents:
761
diff
changeset
|
745 |
"Modified: 1.11.1996 / 20:22:56 / cg" |
133 | 746 |
! |
747 |
||
255 | 748 |
classNameOfChange:changeNr |
749 |
"return the classname of a change |
|
750 |
(for classChanges (i.e. xxx class), the non-metaClassName (i.e. xxx) is returned)" |
|
751 |
||
752 |
|name| |
|
753 |
||
754 |
name := self fullClassNameOfChange:changeNr. |
|
755 |
name isNil ifTrue:[^ nil]. |
|
756 |
(name endsWith:' class') ifTrue:[ |
|
757 |
^ name copyWithoutLast:6 |
|
758 |
]. |
|
759 |
^ name |
|
760 |
||
761 |
"Modified: 6.12.1995 / 17:06:31 / cg" |
|
762 |
! |
|
763 |
||
764 |
clearCodeView |
|
765 |
self unselect "changeListView deselect". |
|
766 |
codeView contents:nil. |
|
767 |
changeNrShown := nil |
|
768 |
! |
|
769 |
||
770 |
compareChange:changeNr |
|
771 |
"compare a change with current version" |
|
772 |
||
773 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
724
diff
changeset
|
774 |
parser sel oldMethod outcome showDiff d t1 t2 selector isLoaded |
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
775 |
method beep sClass thisClassSym| |
255 | 776 |
|
777 |
aStream := self streamForChange:changeNr. |
|
778 |
aStream isNil ifTrue:[^ self]. |
|
779 |
||
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
780 |
showDiff := false. |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
781 |
|
1472 | 782 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
783 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
|
784 |
chunk := aStream nextChunk. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
785 |
] ifTrue:[ |
1472 | 786 |
chunk := (changeChunks at:changeNr). |
787 |
sawExcla := true. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
788 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
789 |
|
761 | 790 |
beep := false. |
255 | 791 |
sawExcla ifFalse:[ |
1472 | 792 |
outcome := 'cannot compare this change\\(i.e. this is not a method change).'. |
793 |
||
794 |
parseTree := Parser parseExpression:chunk. |
|
795 |
(parseTree notNil and:[parseTree isMessage]) ifTrue:[ |
|
796 |
((selector := parseTree selector) == #removeSelector:) ifTrue:[ |
|
797 |
thisClass := (parseTree receiver evaluate). |
|
798 |
thisClass isBehavior ifTrue:[ |
|
799 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
800 |
selector := (parseTree arg1 evaluate). |
|
801 |
(thisClass includesSelector:selector) ifTrue:[ |
|
802 |
outcome := 'change removes the #' , selector , ' method from ' , thisClass name. |
|
803 |
] ifFalse:[ |
|
804 |
outcome := 'change has no effect\\(there is no method for #' , selector , ' in ' , thisClass name , ')' |
|
805 |
] |
|
806 |
] ifFalse:[ |
|
807 |
beep := true. |
|
808 |
outcome := 'cannot compare this change (compare requires class to be loaded).'. |
|
809 |
] |
|
810 |
] |
|
811 |
]. |
|
812 |
selector == #category: ifTrue:[ |
|
813 |
parseTree receiver isMessage ifTrue:[ |
|
814 |
parseTree receiver selector == #compiledMethodAt: ifTrue:[ |
|
815 |
(method := parseTree receiver evaluate) isMethod ifTrue:[ |
|
816 |
method category = parseTree arg1 evaluate ifTrue:[ |
|
817 |
outcome := 'change has no effect\\(same category)'. |
|
818 |
] ifFalse:[ |
|
819 |
outcome := 'category is different (''' , method category , ''' vs. ''' , parseTree arg1 evaluate , ''')' |
|
820 |
] |
|
821 |
] ifFalse:[ |
|
822 |
beep := true. |
|
823 |
outcome := 'there is no such method' |
|
824 |
] |
|
825 |
] |
|
826 |
] |
|
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
827 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
828 |
selector == #subclass:instanceVariableNames:classVariableNames:poolDictionaries:category: ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
829 |
sClass := (parseTree receiver evaluate). |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
830 |
sClass isBehavior ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
831 |
(self checkClassIsLoaded:sClass) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
832 |
thisClassSym := (parseTree arguments at:1) evaluate. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
833 |
thisClass := Smalltalk at:thisClassSym ifAbsent:nil. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
834 |
thisClass notNil ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
835 |
thisClass instanceVariableString = (parseTree arguments at:2) evaluate ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
836 |
thisClass classVariableString = (parseTree arguments at:3) evaluate ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
837 |
((thisClass sharedPools size == 0) and:[(parseTree arguments at:4) evaluate = '']) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
838 |
thisClass category = (parseTree arguments at:5) evaluate ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
839 |
outcome := 'change has no effect\\(same definition)'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
840 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
841 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
842 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
843 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
844 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
845 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
846 |
] |
1472 | 847 |
] |
848 |
] |
|
255 | 849 |
] ifTrue:[ |
1472 | 850 |
parseTree := Parser parseExpression:chunk. |
851 |
(parseTree notNil |
|
852 |
and:[parseTree ~~ #Error |
|
853 |
and:[parseTree isMessage]]) ifTrue:[ |
|
854 |
(parseTree selector == #methodsFor:) ifTrue:[ |
|
855 |
thisClass := (parseTree receiver evaluate). |
|
856 |
thisClass isBehavior ifTrue:[ |
|
857 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
|
858 |
outcome := 'cannot compare this change\\(compare requires class to be loaded).'. |
|
859 |
]. |
|
860 |
||
861 |
cat := parseTree arg1 evaluate. |
|
862 |
newSource := aStream nextChunk. |
|
863 |
||
864 |
parser := Parser parseMethod:newSource in:thisClass. |
|
865 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
866 |
sel := parser selector. |
|
867 |
oldMethod := thisClass compiledMethodAt:sel. |
|
868 |
oldMethod notNil ifTrue:[ |
|
869 |
(oldMethod category = cat) ifFalse:[ |
|
870 |
Transcript showCR:'category changed.'. |
|
871 |
]. |
|
872 |
oldSource := oldMethod source. |
|
873 |
(oldSource = newSource) ifTrue:[ |
|
874 |
outcome := 'same source' |
|
875 |
] ifFalse:[ |
|
876 |
oldSource isNil ifTrue:[ |
|
877 |
beep := true. |
|
878 |
outcome := 'no source for compare.' |
|
879 |
] ifFalse:[ |
|
880 |
"/ |
|
881 |
"/ compare for tabulator <-> space changes |
|
882 |
"/ before showing diff ... |
|
883 |
"/ |
|
884 |
t1 := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
885 |
t2 := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
886 |
t1 = t2 ifTrue:[ |
|
887 |
outcome := 'same source' |
|
888 |
] ifFalse:[ |
|
889 |
outcome := 'source changed.'. |
|
890 |
showDiff := true. |
|
891 |
||
892 |
"/ |
|
893 |
"/ check if only historyLine diffs |
|
894 |
"/ |
|
895 |
(HistoryManager notNil |
|
896 |
and:[HistoryManager isActive]) ifTrue:[ |
|
897 |
(HistoryManager withoutHistoryLines:newSource) |
|
898 |
= |
|
899 |
(HistoryManager withoutHistoryLines:oldSource) |
|
900 |
ifTrue:[ |
|
901 |
outcome := 'same source (history only)'. |
|
902 |
showDiff := false. |
|
903 |
] |
|
904 |
]. |
|
905 |
] |
|
906 |
] |
|
907 |
] |
|
908 |
] ifFalse:[ |
|
909 |
isLoaded ifTrue:[ |
|
910 |
beep := true. |
|
911 |
outcome := 'method does not exist.' |
|
912 |
] |
|
913 |
] |
|
914 |
] ifFalse:[ |
|
915 |
outcome := 'change unparsable.' |
|
916 |
]. |
|
917 |
(showDiff and:[oldSource notNil and:[newSource notNil]]) ifTrue:[ |
|
918 |
d := DiffTextView |
|
1622 | 919 |
openOn:oldSource label:(resources string:'current version (in image)') |
920 |
and:newSource label:(resources string:'change version'). |
|
1472 | 921 |
d label:'method differences'. |
922 |
] |
|
923 |
] ifFalse:[ |
|
924 |
beep := true. |
|
925 |
outcome := 'class does not exist.' |
|
926 |
] |
|
927 |
] ifFalse:[ |
|
928 |
beep := true. |
|
929 |
outcome := 'not comparable.' |
|
930 |
] |
|
931 |
] ifFalse:[ |
|
932 |
beep := true. |
|
933 |
outcome := 'not comparable.' |
|
934 |
] |
|
255 | 935 |
]. |
936 |
aStream close. |
|
937 |
showDiff ifFalse:[ |
|
1622 | 938 |
outcome := (resources string:outcome) withCRs. |
1472 | 939 |
beep ifTrue:[ |
1622 | 940 |
self warn:outcome. |
1472 | 941 |
] ifFalse:[ |
1622 | 942 |
self information:outcome. |
1472 | 943 |
] |
553 | 944 |
"/ Transcript showCR:outcome. |
255 | 945 |
]. |
946 |
||
1472 | 947 |
"Created: / 24.11.1995 / 14:30:46 / cg" |
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
948 |
"Modified: / 6.7.1998 / 17:07:47 / cg" |
255 | 949 |
! |
950 |
||
1359 | 951 |
compressForClass:aClassNameOrNil |
952 |
"compress the change-set; |
|
953 |
this replaces multiple method-changes by the last (i.e. the most recent) change. |
|
954 |
If the class argument is nil, compress for all classes. |
|
955 |
otherwise, only changes for that class are compressed." |
|
956 |
||
957 |
|aStream searchIndex anyMore deleteSet index |
|
958 |
str snapshotProto snapshotPrefix snapshotNameIndex fileName| |
|
959 |
||
960 |
aStream := FileStream readonlyFileNamed:changeFileName. |
|
961 |
aStream isNil ifTrue:[^ self]. |
|
962 |
||
963 |
aClassNameOrNil isNil ifTrue:[ |
|
1378 | 964 |
self newLabel:'compressing ...'. |
1359 | 965 |
] ifFalse:[ |
1378 | 966 |
self newLabel:'compressing for ' , aClassNameOrNil. |
1359 | 967 |
]. |
968 |
||
969 |
CompressSnapshotInfo == true ifTrue:[ |
|
1378 | 970 |
" |
971 |
get a prototype snapshot record (to be independent of |
|
972 |
the actual format .. |
|
973 |
" |
|
974 |
str := WriteStream on:String new. |
|
975 |
Class addChangeRecordForSnapshot:'foo' to:str. |
|
976 |
snapshotProto := str contents. |
|
977 |
snapshotPrefix := snapshotProto copyTo:10. |
|
978 |
snapshotNameIndex := snapshotProto findString:'foo'. |
|
1359 | 979 |
]. |
980 |
||
981 |
self withExecuteCursorDo:[ |
|
1378 | 982 |
|numChanges classes selectors types excla sawExcla |
983 |
changeNr chunk aParseTree parseTreeChunk |
|
984 |
thisClass thisSelector codeChunk codeParser |
|
985 |
compressThis| |
|
986 |
||
987 |
numChanges := self numberOfChanges. |
|
988 |
classes := Array new:numChanges. |
|
989 |
selectors := Array new:numChanges. |
|
990 |
types := Array new:numChanges. |
|
991 |
||
992 |
"starting at the end, get the change class and change selector; |
|
993 |
collect all in classes / selectors" |
|
994 |
||
995 |
changeNr := numChanges. |
|
996 |
excla := aStream class chunkSeparator. |
|
997 |
||
998 |
[changeNr >= 1] whileTrue:[ |
|
999 |
aStream position:(changePositions at:changeNr). |
|
1000 |
sawExcla := aStream peekFor:excla. |
|
1001 |
chunk := aStream nextChunk. |
|
1002 |
sawExcla ifTrue:[ |
|
1003 |
"optimize a bit if multiple methods for same category arrive" |
|
1004 |
(chunk = parseTreeChunk) ifFalse:[ |
|
1005 |
aParseTree := Parser parseExpression:chunk. |
|
1006 |
parseTreeChunk := chunk |
|
1007 |
]. |
|
1008 |
(aParseTree notNil |
|
1009 |
and:[(aParseTree ~~ #Error) |
|
1010 |
and:[aParseTree isMessage]]) ifTrue:[ |
|
1011 |
(aParseTree selector == #methodsFor:) ifTrue:[ |
|
1012 |
thisClass := (aParseTree receiver evaluate). |
|
1013 |
codeChunk := aStream nextChunk. |
|
1014 |
codeParser := Parser |
|
1015 |
parseMethodSpecification:codeChunk |
|
1016 |
in:thisClass |
|
1017 |
ignoreErrors:true |
|
1018 |
ignoreWarnings:true. |
|
1019 |
(codeParser notNil and:[codeParser ~~ #Error]) ifTrue:[ |
|
1020 |
selectors at:changeNr put:(codeParser selector). |
|
1021 |
classes at:changeNr put:thisClass. |
|
1022 |
types at:changeNr put:#methodsFor |
|
1023 |
] |
|
1024 |
] |
|
1025 |
] |
|
1026 |
] ifFalse:[ |
|
1027 |
aParseTree := Parser parseExpression:chunk. |
|
1028 |
parseTreeChunk := chunk. |
|
1029 |
(aParseTree notNil |
|
1030 |
and:[(aParseTree ~~ #Error) |
|
1031 |
and:[aParseTree isMessage]]) ifTrue:[ |
|
1032 |
(aParseTree selector == #removeSelector:) ifTrue:[ |
|
1033 |
selectors at:changeNr put:(aParseTree arg1 value ). |
|
1034 |
classes at:changeNr put:(aParseTree receiver evaluate). |
|
1035 |
types at:changeNr put:#removeSelector |
|
1036 |
] |
|
1037 |
] ifFalse:[ |
|
1038 |
CompressSnapshotInfo == true ifTrue:[ |
|
1039 |
(chunk startsWith:snapshotPrefix) ifTrue:[ |
|
1040 |
str := chunk readStream position:snapshotNameIndex. |
|
1041 |
fileName := str upTo:(Character space). |
|
1042 |
" |
|
1043 |
kludge to allow use of match-check below |
|
1044 |
" |
|
1045 |
selectors at:changeNr put:snapshotPrefix. |
|
1046 |
classes at:changeNr put:fileName. |
|
1047 |
] |
|
1048 |
] |
|
1049 |
] |
|
1050 |
]. |
|
1051 |
changeNr := changeNr - 1 |
|
1052 |
]. |
|
1053 |
aStream close. |
|
1054 |
||
1055 |
"for all changes, look for another class/selector occurence later |
|
1056 |
in the list and, if there is one, add change number to the delete set" |
|
1057 |
||
1058 |
deleteSet := OrderedCollection new. |
|
1059 |
changeNr := 1. |
|
1060 |
[changeNr < self numberOfChanges] whileTrue:[ |
|
1061 |
thisClass := classes at:changeNr. |
|
1062 |
||
1063 |
compressThis := false. |
|
1064 |
aClassNameOrNil isNil ifTrue:[ |
|
1065 |
compressThis := true |
|
1066 |
] ifFalse:[ |
|
1067 |
"/ skipping unloaded/unknown classes |
|
1068 |
thisClass isBehavior ifTrue:[ |
|
1069 |
thisClass isMeta ifTrue:[ |
|
1070 |
compressThis := aClassNameOrNil = thisClass soleInstance name. |
|
1071 |
] ifFalse:[ |
|
1072 |
compressThis := aClassNameOrNil = thisClass name |
|
1073 |
] |
|
1074 |
] |
|
1075 |
]. |
|
1076 |
||
1077 |
compressThis ifTrue:[ |
|
1078 |
thisSelector := selectors at:changeNr. |
|
1079 |
searchIndex := changeNr. |
|
1080 |
anyMore := true. |
|
1081 |
[anyMore] whileTrue:[ |
|
1082 |
searchIndex := classes indexOf:thisClass |
|
1083 |
startingAt:(searchIndex + 1). |
|
1084 |
(searchIndex ~~ 0) ifTrue:[ |
|
1085 |
((selectors at:searchIndex) == thisSelector) ifTrue:[ |
|
1086 |
thisClass notNil ifTrue:[ |
|
1087 |
deleteSet add:changeNr. |
|
1088 |
anyMore := false |
|
1089 |
] |
|
1090 |
] |
|
1091 |
] ifFalse:[ |
|
1092 |
anyMore := false |
|
1093 |
] |
|
1094 |
]. |
|
1095 |
]. |
|
1096 |
||
1097 |
changeNr := changeNr + 1 |
|
1098 |
]. |
|
1099 |
||
1100 |
"finally delete what has been found" |
|
1101 |
||
1102 |
(deleteSet size > 0) ifTrue:[ |
|
1103 |
changeListView setSelection:nil. |
|
1104 |
index := deleteSet size. |
|
1105 |
[index > 0] whileTrue:[ |
|
1106 |
self silentDeleteChange:(deleteSet at:index). |
|
1107 |
index := index - 1 |
|
1108 |
]. |
|
1109 |
self setChangeList. |
|
1110 |
" |
|
1111 |
scroll back a bit, if we are left way behind the list |
|
1112 |
" |
|
1113 |
changeListView firstLineShown > self numberOfChanges ifTrue:[ |
|
1114 |
changeListView makeLineVisible:self numberOfChanges |
|
1115 |
]. |
|
1116 |
self clearCodeView |
|
1117 |
] |
|
1359 | 1118 |
]. |
1119 |
self newLabel:''. |
|
1120 |
||
1121 |
"Created: / 29.10.1997 / 01:02:44 / cg" |
|
1122 |
"Modified: / 29.10.1997 / 01:26:59 / cg" |
|
1123 |
! |
|
1124 |
||
255 | 1125 |
contractClass:className selector:selector to:maxLen |
1126 |
|s l| |
|
1127 |
||
1128 |
s := className , ' ', selector. |
|
1129 |
s size > maxLen ifTrue:[ |
|
1130 |
l := maxLen - 1 - selector size max:20. |
|
1131 |
s := (className contractTo:l) , ' ' , selector. |
|
1132 |
||
1133 |
s size > maxLen ifTrue:[ |
|
1134 |
l := maxLen - 1 - className size max:20. |
|
1135 |
s := className , ' ', (selector contractTo:l). |
|
1136 |
||
1137 |
s size > maxLen ifTrue:[ |
|
1138 |
s := (className contractTo:(maxLen // 2 - 1)) , ' ' , (selector contractTo:maxLen // 2) |
|
1139 |
] |
|
1140 |
] |
|
1141 |
]. |
|
1142 |
^ s |
|
1143 |
! |
|
1144 |
||
1145 |
deleteChange:changeNr |
|
1146 |
"delete a change" |
|
1147 |
||
1148 |
self deleteChangesFrom:changeNr to:changeNr |
|
1149 |
! |
|
1150 |
||
1151 |
deleteChangesFrom:start to:stop |
|
1152 |
"delete a range of changes" |
|
1153 |
||
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
1154 |
changeListView setSelection:nil. |
255 | 1155 |
stop to:start by:-1 do:[:changeNr | |
1648 | 1156 |
self silentDeleteInternalChange:changeNr. |
1157 |
changeListView removeIndex:changeNr. |
|
255 | 1158 |
]. |
744
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1159 |
|
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
1160 |
"/ changeListView contentsChanged. |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
1161 |
"/ changeListView redrawFromLine:start. |
255 | 1162 |
|
744
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1163 |
"/ self setChangeList |
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1164 |
|
1648 | 1165 |
"Modified: / 18.5.1998 / 14:22:27 / cg" |
255 | 1166 |
! |
1167 |
||
241
9366ced0db42
doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents:
226
diff
changeset
|
1168 |
fullClassNameOfChange:changeNr |
9366ced0db42
doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents:
226
diff
changeset
|
1169 |
"return the full classname of a change |
9366ced0db42
doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents:
226
diff
changeset
|
1170 |
(for classChanges (i.e. xxx class), a string ending in ' class' is returned. |
202 | 1171 |
- since parsing ascii methods is slow, keep result cached in |
1172 |
changeClassNames for the next query" |
|
1173 |
||
958
942fbe2a9806
can now extract className from a checkin-chunk
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1174 |
|chunk aParseTree recTree sel name arg1Tree isMeta prevMethodDefNr |
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1175 |
words changeStream fullParseTree ownerTree ownerName oldDollarSetting| |
202 | 1176 |
|
1177 |
changeNr isNil ifTrue:[^ nil]. |
|
1178 |
||
1179 |
" |
|
1180 |
first look, if not already known |
|
1181 |
" |
|
1182 |
name := changeClassNames at:changeNr. |
|
1183 |
name notNil ifTrue:[^ name]. |
|
1184 |
||
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1185 |
prevMethodDefNr := changeNr. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1186 |
[changeIsFollowupMethodChange at:prevMethodDefNr] whileTrue:[ |
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1187 |
prevMethodDefNr := prevMethodDefNr - 1. |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1188 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1189 |
|
202 | 1190 |
" |
1191 |
get the chunk |
|
1192 |
" |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1193 |
chunk := changeChunks at:prevMethodDefNr. |
202 | 1194 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
1195 |
||
958
942fbe2a9806
can now extract className from a checkin-chunk
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1196 |
(chunk startsWith:'''---') ifTrue:[ |
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1197 |
words := chunk asCollectionOfWords. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1198 |
words size > 2 ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1199 |
(words at:2) = 'checkin' ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1200 |
name := words at:3. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1201 |
changeClassNames at:changeNr put:name. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1202 |
^ name |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1203 |
] |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1204 |
]. |
958
942fbe2a9806
can now extract className from a checkin-chunk
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1205 |
]. |
942fbe2a9806
can now extract className from a checkin-chunk
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1206 |
|
942fbe2a9806
can now extract className from a checkin-chunk
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1207 |
"/ fix it - otherwise, it cannot be parsed |
226 | 1208 |
(chunk endsWith:'primitiveDefinitions:') ifTrue:[ |
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1209 |
chunk := chunk , '''''' |
226 | 1210 |
]. |
1211 |
(chunk endsWith:'primitiveFunctions:') ifTrue:[ |
|
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1212 |
chunk := chunk , '''''' |
226 | 1213 |
]. |
1214 |
(chunk endsWith:'primitiveVariables:') ifTrue:[ |
|
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1215 |
chunk := chunk , '''''' |
226 | 1216 |
]. |
1217 |
||
202 | 1218 |
" |
1219 |
use parser to construct a parseTree |
|
1220 |
" |
|
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1221 |
oldDollarSetting := Parser allowDollarInIdentifier. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1222 |
[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1223 |
Parser allowDollarInIdentifier:true. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1224 |
aParseTree := Parser parseExpression:chunk. |
1625
0b907cb3f8af
also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents:
1622
diff
changeset
|
1225 |
|
0b907cb3f8af
also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents:
1622
diff
changeset
|
1226 |
aParseTree == #Error ifTrue:[ |
0b907cb3f8af
also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents:
1622
diff
changeset
|
1227 |
(chunk includesString:'comment') ifTrue:[ |
0b907cb3f8af
also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents:
1622
diff
changeset
|
1228 |
"/ could be a comment ... |
0b907cb3f8af
also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents:
1622
diff
changeset
|
1229 |
aParseTree := Parser parseExpression:chunk , ''''. |
0b907cb3f8af
also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents:
1622
diff
changeset
|
1230 |
] |
0b907cb3f8af
also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents:
1622
diff
changeset
|
1231 |
]. |
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1232 |
] valueNowOrOnUnwindDo:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1233 |
Parser allowDollarInIdentifier:oldDollarSetting |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1234 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1235 |
|
202 | 1236 |
(aParseTree isNil or:[aParseTree == #Error]) ifTrue:[ |
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1237 |
^ nil "seems strange ... (could be a comment)" |
202 | 1238 |
]. |
1239 |
aParseTree isMessage ifFalse:[ |
|
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1240 |
^ nil "very strange ... (whats that ?)" |
202 | 1241 |
]. |
1242 |
||
1243 |
" |
|
1244 |
ask parser for selector |
|
1245 |
" |
|
1246 |
sel := aParseTree selector. |
|
1247 |
recTree := aParseTree receiver. |
|
1248 |
||
1249 |
" |
|
1250 |
is it a method-change, methodRemove or comment-change ? |
|
1251 |
" |
|
1252 |
(#(#'methodsFor:' |
|
1253 |
#'privateMethodsFor:' |
|
1254 |
#'protectedMethodsFor:' |
|
1788
4f2616466d68
fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1255 |
#'ignoredMethodsFor:' |
202 | 1256 |
#'publicMethodsFor:' |
1257 |
#'removeSelector:' |
|
1258 |
#'comment:' |
|
1259 |
#'primitiveDefinitions:' |
|
1260 |
#'primitiveFunctions:' |
|
1261 |
#'primitiveVariables:' |
|
1262 |
#'renameCategory:to:' |
|
1263 |
#'instanceVariableNames:' |
|
1264 |
) includes:sel) ifTrue:[ |
|
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1265 |
" |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1266 |
yes, the className is the receiver |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1267 |
" |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1268 |
(recTree notNil and:[recTree ~~ #Error]) ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1269 |
isMeta := false. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1270 |
recTree isUnaryMessage ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1271 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1272 |
"id class methodsFor:..." |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1273 |
recTree := recTree receiver. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1274 |
isMeta := true. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1275 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1276 |
recTree isPrimary ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1277 |
name := recTree name. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1278 |
isMeta ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1279 |
name := name , ' class'. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1280 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1281 |
changeClassNames at:changeNr put:name. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1282 |
^ name |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1283 |
] |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1284 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1285 |
"more strange things" |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1286 |
^ nil |
202 | 1287 |
]. |
1288 |
||
1289 |
" |
|
1290 |
is it a change in a class-description ? |
|
1291 |
" |
|
1292 |
(('subclass:*' match:sel) |
|
1293 |
or:[('variable*subclass:*' match:sel)]) ifTrue:[ |
|
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1294 |
"/ must parse the full changes text, to get |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1295 |
"/ privacy information. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1296 |
|
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1297 |
changeStream := self streamForChange:changeNr. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1298 |
changeStream notNil ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1299 |
chunk := changeStream nextChunk. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1300 |
changeStream close. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1301 |
fullParseTree := Parser parseExpression:chunk. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1302 |
(fullParseTree isNil or:[fullParseTree == #Error]) ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1303 |
fullParseTree := nil |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1304 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1305 |
fullParseTree isMessage ifFalse:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1306 |
fullParseTree := nil |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1307 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1308 |
"/ actually, the nil case cannot happen |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1309 |
fullParseTree notNil ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1310 |
aParseTree := fullParseTree. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1311 |
sel := aParseTree selector. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1312 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1313 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1314 |
|
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1315 |
arg1Tree := aParseTree arg1. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1316 |
(arg1Tree notNil and:[arg1Tree isConstant]) ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1317 |
name := arg1Tree value asString. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1318 |
|
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1319 |
"/ is it a private-class ? |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1320 |
('*privateIn:' match:sel) ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1321 |
ownerTree := aParseTree args last. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1322 |
ownerName := ownerTree name asString. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1323 |
name := ownerName , '::' , name |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1324 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1325 |
changeClassNames at:changeNr put:name. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1326 |
^ name |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1327 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1328 |
"very strange" |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1329 |
^ nil |
202 | 1330 |
]. |
1331 |
||
1332 |
" |
|
1333 |
is it a class remove ? |
|
1334 |
" |
|
1335 |
(sel == #removeClass:) ifTrue:[ |
|
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1336 |
(recTree notNil |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1337 |
and:[recTree ~~ #Error |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1338 |
and:[recTree isPrimary |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1339 |
and:[recTree name = 'Smalltalk']]]) ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1340 |
arg1Tree := aParseTree arg1. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1341 |
(arg1Tree notNil and:[arg1Tree isPrimary]) ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1342 |
name := arg1Tree name. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1343 |
changeClassNames at:changeNr put:name. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1344 |
^ name |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1345 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1346 |
] |
202 | 1347 |
]. |
1348 |
||
1349 |
" |
|
1350 |
is it a method category change ? |
|
1351 |
" |
|
928 | 1352 |
((sel == #category:) |
1353 |
or:[sel == #privacy:]) ifTrue:[ |
|
1425
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1354 |
(recTree notNil |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1355 |
and:[recTree ~~ #Error |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1356 |
and:[recTree isMessage |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1357 |
and:[recTree selector == #compiledMethodAt:]]]) ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1358 |
isMeta := false. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1359 |
recTree := recTree receiver. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1360 |
recTree isUnaryMessage ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1361 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1362 |
"id class " |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1363 |
recTree := recTree receiver |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1364 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1365 |
recTree isPrimary ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1366 |
isMeta ifTrue:[ |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1367 |
name := name , ' class'. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1368 |
]. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1369 |
name := recTree name. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1370 |
changeClassNames at:changeNr put:name. |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1371 |
^ name |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1372 |
] |
443eb4286f66
must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents:
1378
diff
changeset
|
1373 |
] |
202 | 1374 |
]. |
1375 |
^ nil |
|
241
9366ced0db42
doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents:
226
diff
changeset
|
1376 |
|
1788
4f2616466d68
fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1377 |
"Modified: / 3.8.1998 / 19:58:17 / cg" |
241
9366ced0db42
doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents:
226
diff
changeset
|
1378 |
! |
9366ced0db42
doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents:
226
diff
changeset
|
1379 |
|
202 | 1380 |
makeChangeAPatch:changeNr |
1381 |
"append change to patchfile" |
|
1382 |
||
1383 |
self appendChange:changeNr toFile:'patches' |
|
1384 |
! |
|
1385 |
||
1386 |
makeChangePermanent:changeNr |
|
1387 |
"rewrite the source file where change changeNr lies" |
|
1388 |
||
1389 |
self notify:'this is not yet implemented' |
|
1390 |
! |
|
1391 |
||
1392 |
newLabel:how |
|
1393 |
|l| |
|
1394 |
||
1395 |
(changeFileName ~= 'changes') ifTrue:[ |
|
1470 | 1396 |
l := self class defaultLabel , ': ', changeFileName |
202 | 1397 |
] ifFalse:[ |
1470 | 1398 |
l := self class defaultLabel |
202 | 1399 |
]. |
1400 |
l := l , ' ' , how. |
|
1401 |
self label:l |
|
1402 |
||
1470 | 1403 |
"Created: / 8.9.1995 / 19:32:04 / claus" |
1404 |
"Modified: / 8.9.1995 / 19:39:29 / claus" |
|
1405 |
"Modified: / 6.2.1998 / 13:27:01 / cg" |
|
202 | 1406 |
! |
1407 |
||
255 | 1408 |
numberOfChanges |
1409 |
^ changePositions size |
|
1410 |
||
1411 |
"Created: 3.12.1995 / 18:15:39 / cg" |
|
1412 |
! |
|
1413 |
||
202 | 1414 |
queryCloseText |
1415 |
"made this a method for easy redefinition in subclasses" |
|
1416 |
||
1417 |
^ 'Quit without updating changeFile ?' |
|
1418 |
! |
|
1419 |
||
1420 |
readChangesFile |
|
1421 |
"read the changes file, create a list of header-lines (changeChunks) |
|
1422 |
and a list of chunk-positions (changePositions)" |
|
1423 |
||
1424 |
^ self readChangesFileInBackground:false |
|
1425 |
! |
|
1426 |
||
37 | 1427 |
readChangesFileInBackground:inBackground |
1428 |
"read the changes file, create a list of header-lines (changeChunks) |
|
51 | 1429 |
and a list of chunk-positions (changePositions). |
1430 |
Starting with 2.10.3, the entries are multi-col entries; |
|
1431 |
the cols are: |
|
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1432 |
1 delta (only if comparing) |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1433 |
'+' -> new method (w.r.t. current state) |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1434 |
'-' -> removed method (w.r.t. current state) |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1435 |
'?' -> class does not exist currently |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1436 |
'=' -> change is same as current methods source |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1437 |
2 class/selector |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1438 |
3 type of change |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1439 |
doit |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1440 |
method |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1441 |
category change |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1442 |
4 timestamp |
89 | 1443 |
|
1444 |
since comparing slows down startup time, it is now disabled by |
|
182
0c2f9214d531
handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
1445 |
default and can be enabled via a toggle." |
37 | 1446 |
|
829
b6b0be2e14af
changes for new return from OS>>infoOf:
Claus Gittinger <cg@exept.de>
parents:
761
diff
changeset
|
1447 |
|aStream maxLen i f| |
50 | 1448 |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1449 |
editingClassSource := false. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1450 |
|
50 | 1451 |
maxLen := 60. |
0 | 1452 |
|
133 | 1453 |
f := changeFileName asFilename. |
1454 |
aStream := f readStream. |
|
0 | 1455 |
aStream isNil ifTrue:[^ nil]. |
1456 |
||
326 | 1457 |
self newLabel:'updating ...'. |
1458 |
||
829
b6b0be2e14af
changes for new return from OS>>infoOf:
Claus Gittinger <cg@exept.de>
parents:
761
diff
changeset
|
1459 |
i := f info. |
b6b0be2e14af
changes for new return from OS>>infoOf:
Claus Gittinger <cg@exept.de>
parents:
761
diff
changeset
|
1460 |
changeFileSize := i size. |
b6b0be2e14af
changes for new return from OS>>infoOf:
Claus Gittinger <cg@exept.de>
parents:
761
diff
changeset
|
1461 |
changeFileTimestamp := i modified. |
133 | 1462 |
|
294 | 1463 |
self withReadCursorDo:[ |
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1464 |
|myProcess myPriority| |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1465 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1466 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1467 |
this is a time consuming operation (especially, if reading an |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1468 |
NFS-mounted directory; therefore lower my priority ... |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1469 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1470 |
inBackground ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1471 |
myProcess := Processor activeProcess. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1472 |
myPriority := myProcess priority. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1473 |
myProcess priority:(Processor userBackgroundPriority). |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1474 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1475 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1476 |
[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1477 |
|excla timeStampInfo| |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1478 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1479 |
changeChunks := OrderedCollection new. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1480 |
changeHeaderLines := OrderedCollection new. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1481 |
changePositions := OrderedCollection new. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1482 |
changeTimeStamps := OrderedCollection new. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1483 |
changeIsFollowupMethodChange := OrderedCollection new. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1484 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1485 |
excla := aStream class chunkSeparator. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1486 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1487 |
[aStream atEnd] whileFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1488 |
|entry changeDelta changeString changeType |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1489 |
line s l changeClass sawExcla category |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1490 |
chunkText chunkPos sel| |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1491 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1492 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1493 |
get a chunk (separated by excla) |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1494 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1495 |
aStream skipSeparators. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1496 |
chunkPos := aStream position. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1497 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1498 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1499 |
sawExcla := aStream peekFor:excla. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1500 |
chunkText := aStream nextChunk. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1501 |
chunkText notNil ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1502 |
|index headerLine cls| |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1503 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1504 |
(chunkText startsWith:'''---- timestamp ') ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1505 |
timeStampInfo := (chunkText copyFrom:16 to:(chunkText size - 6)) withoutSpaces. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1506 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1507 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1508 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1509 |
only first line is saved in changeChunks ... |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1510 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1511 |
index := chunkText indexOf:(Character cr). |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1512 |
(index ~~ 0) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1513 |
chunkText := chunkText copyTo:(index - 1). |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1514 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1515 |
"take care for comment changes - must still be a |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1516 |
valid expression for classNameOfChange: to work" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1517 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1518 |
(chunkText endsWith:'comment:''') ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1519 |
chunkText := chunkText , '...''' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1520 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1521 |
(chunkText endsWith:'primitiveDefinitions:''') ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1522 |
sel := 'primitiveDefinitions:'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1523 |
chunkText := chunkText copyWithoutLast:1 |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1524 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1525 |
(chunkText endsWith:'primitiveVariables:''') ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1526 |
sel := 'primitiveVariables:'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1527 |
chunkText := chunkText copyWithoutLast:1 |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1528 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1529 |
(chunkText endsWith:'primitiveFunctions:''') ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1530 |
sel := 'primitiveFunctions:'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1531 |
chunkText := chunkText copyWithoutLast:1 |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1532 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1533 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1534 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1535 |
changeChunks add:chunkText. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1536 |
changePositions add:chunkPos. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1537 |
changeTimeStamps add:timeStampInfo. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1538 |
changeIsFollowupMethodChange add:false. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1539 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1540 |
headerLine := nil. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1541 |
changeDelta := ' '. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1542 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1543 |
sawExcla ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1544 |
(chunkText startsWith:'''---- snap') ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1545 |
changeType := ''. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1546 |
headerLine := chunkText. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1547 |
changeString := (chunkText contractTo:maxLen). |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1548 |
timeStampInfo := nil. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1549 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1550 |
|
1714
2a06650719f1
also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1551 |
|p cls clsName| |
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1552 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1553 |
headerLine := chunkText , ' (doIt)'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1554 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1555 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1556 |
first, assume doIt - then lets have a more detailed look ... |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1557 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1558 |
((chunkText startsWith:'''---- file') |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1559 |
or:[(chunkText startsWith:'''---- check')]) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1560 |
changeType := ''. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1561 |
timeStampInfo := nil. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1562 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1563 |
changeType := '(doIt)'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1564 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1565 |
changeString := (chunkText contractTo:maxLen). |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1566 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1567 |
p := Parser parseExpression:chunkText inNameSpace:Smalltalk. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1568 |
(p notNil |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1569 |
and:[p ~~ #Error |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1570 |
and:[p isMessage]]) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1571 |
sel := p selector. |
1726 | 1572 |
] ifFalse:[ |
1573 |
sel := nil. |
|
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1574 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1575 |
(sel == #removeSelector:) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1576 |
p receiver isUnaryMessage ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1577 |
cls := p receiver receiver name. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1578 |
changeClass := (Smalltalk classNamed:cls) class. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1579 |
cls := cls , ' class'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1580 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1581 |
cls := p receiver name. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1582 |
changeClass := (Smalltalk classNamed:cls) |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1583 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1584 |
sel := (p args at:1) evaluate. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1585 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1586 |
compareChanges ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1587 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1588 |
changeDelta := '?' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1589 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1590 |
(changeClass implements:sel asSymbol) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1591 |
changeDelta := '-'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1592 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1593 |
changeDelta := '='. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1594 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1595 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1596 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1597 |
changeType := '(remove)'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1598 |
changeString := self contractClass:cls selector:sel to:maxLen. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1599 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1600 |
(p ~~ #Error |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1601 |
and:[p isMessage |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1602 |
and:[p receiver isMessage |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1603 |
and:[p receiver selector == #compiledMethodAt:]]]) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1604 |
p receiver receiver isUnaryMessage ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1605 |
cls := p receiver receiver receiver name. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1606 |
changeClass := (Smalltalk classNamed:cls) class. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1607 |
cls := cls , ' class'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1608 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1609 |
cls := p receiver receiver name. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1610 |
changeClass := (Smalltalk classNamed:cls) |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1611 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1612 |
(sel == #category:) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1613 |
sel := (p receiver args at:1) evaluate. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1614 |
changeType := '(category change)'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1615 |
changeString := self contractClass:cls selector:sel to:maxLen. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1616 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1617 |
(sel == #privacy:) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1618 |
sel := (p receiver args at:1) evaluate. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1619 |
changeType := '(privacy change)'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1620 |
changeString := self contractClass:cls selector:sel to:maxLen. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1621 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1622 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1623 |
(#(#'subclass:' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1624 |
#'variableSubclass:' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1625 |
#'variableByteSubclass:' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1626 |
#'variableWordSubclass:' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1627 |
#'variableLongSubclass:' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1628 |
#'variableFloatSubclass:' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1629 |
#'variableDoubleSubclass:' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1630 |
#'primitiveDefinitions:' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1631 |
#'primitiveFunctions:' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1632 |
#'primitiveVariables:' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1633 |
) includes:sel) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1634 |
changeType := '(class definition)'. |
1714
2a06650719f1
also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1635 |
clsName := (p args at:1) evaluate. |
2a06650719f1
also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1636 |
cls := Smalltalk at:clsName ifAbsent:nil. |
2a06650719f1
also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1637 |
cls isNil ifTrue:[ |
2a06650719f1
also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1638 |
changeDelta := '+'. |
2a06650719f1
also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
1639 |
] |
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1640 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1641 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1642 |
] ifTrue:[ "sawExcla" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1643 |
|done first p className cls text methodPos| |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1644 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1645 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1646 |
method definitions actually consist of |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1647 |
two (or more) chunks; skip next chunk(s) |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1648 |
up to an empty one. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1649 |
The system only writes one chunk, |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1650 |
and we cannot handle more in this ChangesBrowser .... |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1651 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1652 |
className := nil. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1653 |
p := Parser parseExpression:chunkText inNameSpace:Smalltalk. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1654 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1655 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1656 |
sel := p selector. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1657 |
(sel == #methodsFor:) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1658 |
p receiver isUnaryMessage ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1659 |
className := p receiver receiver name. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1660 |
changeClass := (Smalltalk classNamed:className) class. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1661 |
className := className , ' class'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1662 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1663 |
className := p receiver name. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1664 |
changeClass := Smalltalk classNamed:className |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1665 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1666 |
category := (p args at:1) evaluate. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1667 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1668 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1669 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1670 |
done := false. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1671 |
first := true. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1672 |
[done] whileFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1673 |
changeDelta := ' '. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1674 |
methodPos := aStream position. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1675 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1676 |
text := aStream nextChunk. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1677 |
text isNil ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1678 |
done := true |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1679 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1680 |
done := text isEmpty |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1681 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1682 |
done ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1683 |
first ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1684 |
changeChunks add:chunkText. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1685 |
changePositions add:methodPos. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1686 |
changeTimeStamps add:timeStampInfo. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1687 |
changeIsFollowupMethodChange add:true. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1688 |
editingClassSource := true. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1689 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1690 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1691 |
first := false. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1692 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1693 |
try to find the selector |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1694 |
" |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1695 |
sel := nil. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1696 |
className notNil ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1697 |
p := Parser |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1698 |
parseMethodSpecification:text |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1699 |
in:nil |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1700 |
ignoreErrors:true |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1701 |
ignoreWarnings:true. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1702 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1703 |
sel := p selector. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1704 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1705 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1706 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1707 |
sel isNil ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1708 |
changeString := (chunkText contractTo:maxLen). |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1709 |
changeType := '(change)'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1710 |
headerLine := chunkText , ' (change)'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1711 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1712 |
changeString := self contractClass:className selector:sel to:maxLen. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1713 |
changeType := '(method in: ''' , category , ''')'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1714 |
headerLine := className , ' ' , sel , ' ' , '(change category: ''' , category , ''')'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1715 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1716 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1717 |
compareChanges ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1718 |
changeClass isNil ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1719 |
changeClass isMeta ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1720 |
cls := changeClass soleInstance |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1721 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1722 |
cls := changeClass |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1723 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1724 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1725 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1726 |
(changeClass isNil or:[cls isLoaded not]) ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1727 |
changeDelta := '?' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1728 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1729 |
(changeClass implements:sel asSymbol) ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1730 |
changeDelta := '+'. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1731 |
] ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1732 |
|m currentText t1 t2| |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1733 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1734 |
m := changeClass compiledMethodAt:sel asSymbol. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1735 |
currentText := m source. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1736 |
currentText notNil ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1737 |
text asString = currentText asString ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1738 |
changeDelta := '=' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1739 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1740 |
t1 := currentText asCollectionOfLines collect:[:s | s withTabsExpanded]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1741 |
t2 := text asCollectionOfLines collect:[:s | s withTabsExpanded]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1742 |
t1 = t2 ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1743 |
changeDelta := '=' |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1744 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1745 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1746 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1747 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1748 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1749 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1750 |
entry := MultiColListEntry new. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1751 |
entry tabulatorSpecification:tabSpec. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1752 |
entry colAt:1 put:changeDelta. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1753 |
entry colAt:2 put:changeString. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1754 |
entry colAt:3 put:changeType. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1755 |
timeStampInfo notNil ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1756 |
entry colAt:4 put:timeStampInfo. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1757 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1758 |
changeHeaderLines add:entry |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1759 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1760 |
changeString := nil. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1761 |
headerLine := nil. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1762 |
|
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1763 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1764 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1765 |
changeString notNil ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1766 |
entry := MultiColListEntry new. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1767 |
entry tabulatorSpecification:tabSpec. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1768 |
entry colAt:1 put:changeDelta. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1769 |
entry colAt:2 put:changeString. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1770 |
entry colAt:3 put:changeType. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1771 |
timeStampInfo notNil ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1772 |
entry colAt:4 put:timeStampInfo. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1773 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1774 |
changeHeaderLines add:entry |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1775 |
] ifFalse:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1776 |
headerLine notNil ifTrue:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1777 |
changeHeaderLines add:headerLine |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1778 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1779 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1780 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1781 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1782 |
]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1783 |
changeClassNames := OrderedCollection new grow:(changeChunks size). |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1784 |
anyChanges := false |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1785 |
] valueNowOrOnUnwindDo:[ |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1786 |
aStream close. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1787 |
inBackground ifTrue:[myProcess priority:myPriority]. |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1788 |
]. |
133 | 1789 |
]. |
1790 |
||
1791 |
self checkIfFileHasChanged |
|
123 | 1792 |
|
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1793 |
"Modified: / 27.8.1995 / 23:06:55 / claus" |
1726 | 1794 |
"Modified: / 17.7.1998 / 11:10:07 / cg" |
45 | 1795 |
! |
37 | 1796 |
|
209
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1797 |
selectorOfMethodChange:changeNr |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1798 |
"return a method-changes selector, or nil if its not a methodChange" |
209
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1799 |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1800 |
|source parser sel| |
209
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1801 |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1802 |
source := self sourceOfMethodChange:changeNr. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1803 |
source isNil ifTrue:[^ nil]. |
209
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1804 |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1805 |
parser := Parser |
1378 | 1806 |
parseMethod:source |
1807 |
in:nil |
|
1808 |
ignoreErrors:true |
|
1809 |
ignoreWarnings:true. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1810 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1811 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
1378 | 1812 |
sel := parser selector. |
209
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1813 |
]. |
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1814 |
^ sel |
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1815 |
|
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1816 |
"Created: 24.11.1995 / 14:30:46 / cg" |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1817 |
"Modified: 5.9.1996 / 17:12:50 / cg" |
209
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1818 |
! |
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
1819 |
|
202 | 1820 |
setChangeList |
1821 |
"extract type-information from changes and stuff into top selection |
|
1822 |
view" |
|
51 | 1823 |
|
1648 | 1824 |
changeListView setList:changeHeaderLines expandTabs:false redraw:false. |
1649 | 1825 |
changeListView invalidate. |
1826 |
||
202 | 1827 |
"/ changeListView deselect. |
1648 | 1828 |
|
1649 | 1829 |
"Modified: / 18.5.1998 / 14:29:10 / cg" |
51 | 1830 |
! |
1831 |
||
73 | 1832 |
silentDeleteChange:changeNr |
1833 |
"delete a change do not update changeListView" |
|
57 | 1834 |
|
73 | 1835 |
anyChanges := true. |
1836 |
changeChunks removeIndex:changeNr. |
|
1837 |
changePositions removeIndex:changeNr. |
|
1838 |
changeClassNames removeIndex:changeNr. |
|
182
0c2f9214d531
handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
1839 |
changeHeaderLines removeIndex:changeNr. |
0c2f9214d531
handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
1840 |
changeTimeStamps removeIndex:changeNr |
0c2f9214d531
handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
1841 |
|
0c2f9214d531
handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
1842 |
"Modified: 18.11.1995 / 17:08:44 / cg" |
45 | 1843 |
! |
1844 |
||
202 | 1845 |
silentDeleteChangesFor:aClassName from:start to:stop |
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1846 |
"delete changes for a given class in a range. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1847 |
Return the number of deleted changes." |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1848 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1849 |
|thisClassName index numDeleted| |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1850 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1851 |
numDeleted := 0. |
202 | 1852 |
index := stop. |
1853 |
[index >= start] whileTrue:[ |
|
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1854 |
thisClassName := self classNameOfChange:index. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1855 |
thisClassName = aClassName ifTrue:[ |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1856 |
self silentDeleteChange:index. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1857 |
numDeleted := numDeleted + 1. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1858 |
]. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1859 |
index := index - 1 |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1860 |
]. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
1861 |
^ numDeleted |
51 | 1862 |
|
45 | 1863 |
! |
1864 |
||
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
1865 |
silentDeleteInternalChange:changeNr |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
1866 |
"delete a change do not update changeListView" |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
1867 |
|
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
1868 |
anyChanges := true. |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
1869 |
changeChunks removeIndex:changeNr. |
1473 | 1870 |
changePositions size >= changeNr ifTrue:[changePositions removeIndex:changeNr]. |
1871 |
changeClassNames size >= changeNr ifTrue:[changeClassNames removeIndex:changeNr]. |
|
1496
978b3c3565c9
#silentDeleteInternalChange: copy-paste error
Stefan Vogel <sv@exept.de>
parents:
1473
diff
changeset
|
1872 |
changeTimeStamps size >= changeNr ifTrue:[changeTimeStamps removeIndex:changeNr] |
1473 | 1873 |
|
1874 |
"Created: / 7.3.1997 / 16:28:32 / cg" |
|
1875 |
"Modified: / 7.2.1998 / 19:59:11 / cg" |
|
1496
978b3c3565c9
#silentDeleteInternalChange: copy-paste error
Stefan Vogel <sv@exept.de>
parents:
1473
diff
changeset
|
1876 |
"Modified: / 26.2.1998 / 18:20:48 / stefan" |
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
1877 |
! |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
1878 |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1879 |
sourceOfMethodChange:changeNr |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1880 |
"return a method-changes source code, or nil if its not a methodChange." |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1881 |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
724
diff
changeset
|
1882 |
|aStream chunk sawExcla parseTree sourceChunk| |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1883 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1884 |
aStream := self streamForChange:changeNr. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1885 |
aStream isNil ifTrue:[^ nil]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1886 |
|
1472 | 1887 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
1888 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
|
1889 |
chunk := aStream nextChunk. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1890 |
] ifTrue:[ |
1472 | 1891 |
chunk := (changeChunks at:changeNr). |
1892 |
sawExcla := true. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1893 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1894 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1895 |
sawExcla ifTrue:[ |
1472 | 1896 |
parseTree := Parser parseExpression:chunk. |
1897 |
(parseTree notNil and:[parseTree isMessage]) ifTrue:[ |
|
1788
4f2616466d68
fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1898 |
(#(#methodsFor: |
4f2616466d68
fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1899 |
#privateMethodsFor: |
4f2616466d68
fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1900 |
#publicMethodsFor: |
4f2616466d68
fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1901 |
#ignoredMethodsFor: |
4f2616466d68
fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1902 |
#protectedMethodsFor:) |
4f2616466d68
fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1903 |
includes:parseTree selector) ifTrue:[ |
1472 | 1904 |
sourceChunk := aStream nextChunk. |
1905 |
] |
|
1906 |
]. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1907 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1908 |
aStream close. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1909 |
^ sourceChunk |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1910 |
|
1472 | 1911 |
"Created: / 5.9.1996 / 17:11:32 / cg" |
1788
4f2616466d68
fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1912 |
"Modified: / 3.8.1998 / 20:00:21 / cg" |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1913 |
! |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1914 |
|
202 | 1915 |
streamForChange:changeNr |
1916 |
"answer a stream for change" |
|
1917 |
||
1918 |
|aStream| |
|
73 | 1919 |
|
202 | 1920 |
(changeNr between:1 and:changePositions size) ifFalse:[^ nil]. |
1921 |
aStream := FileStream readonlyFileNamed:changeFileName. |
|
1922 |
aStream isNil ifTrue:[^ nil]. |
|
1923 |
aStream position:(changePositions at:changeNr). |
|
1924 |
^ aStream |
|
1925 |
! |
|
1926 |
||
1927 |
unselect |
|
1928 |
"common unselect" |
|
1929 |
||
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
1930 |
changeListView setSelection:nil. |
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
1931 |
|
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
1932 |
"Modified: 25.5.1996 / 13:02:49 / cg" |
73 | 1933 |
! |
1934 |
||
1935 |
withSelectedChangeDo:aBlock |
|
1936 |
"just a helper, check for a selected change and evaluate aBlock |
|
1937 |
with busy cursor" |
|
1938 |
||
1939 |
|changeNr| |
|
1940 |
||
1941 |
changeNr := changeListView selection. |
|
1942 |
changeNr notNil ifTrue:[ |
|
1378 | 1943 |
self withExecuteCursorDo:[ |
1944 |
aBlock value:changeNr |
|
1945 |
] |
|
73 | 1946 |
] |
294 | 1947 |
|
1948 |
"Modified: 14.12.1995 / 20:58:45 / cg" |
|
73 | 1949 |
! |
1950 |
||
45 | 1951 |
writeBackChanges |
163
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1952 |
"write back the changes file. To avoid problems when the disk is full |
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1953 |
or a crash occurs while writing (well, or someone kills us), |
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1954 |
first write the stuff to a new temporary file. If this works ok, |
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1955 |
rename the old change-file to a .bak file and finally rename the |
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1956 |
tempfile back to the change-file. |
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1957 |
That way, if anything happens, either the original file is left unchanged, |
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1958 |
or we have at least a backup of the previous change file." |
45 | 1959 |
|
1316 | 1960 |
|inStream outStream tempfile stamp f| |
163
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1961 |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1962 |
editingClassSource ifTrue:[ |
1566
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1963 |
(self confirm:'You are editing a classes sourceFile (not a changeFile) !!\\Are you certain, you want to overwrite it ?' withCRs) |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1964 |
ifFalse:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1965 |
^ false |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1966 |
] |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1967 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1968 |
|
163
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1969 |
tempfile := Filename newTemporaryIn:nil. |
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1970 |
tempfile exists ifTrue:[tempfile remove]. |
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1971 |
|
3aa2b2e7db65
handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents:
133
diff
changeset
|
1972 |
outStream := tempfile writeStream. |
45 | 1973 |
outStream isNil ifTrue:[ |
1566
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1974 |
self warn:'cannot create temporary file in current directory.'. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1975 |
^ false |
45 | 1976 |
]. |
1977 |
||
1978 |
inStream := FileStream readonlyFileNamed:changeFileName. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1979 |
inStream isNil ifTrue:[^ false]. |
45 | 1980 |
|
1981 |
self withCursor:(Cursor write) do:[ |
|
1566
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1982 |
|excla sawExcla done first chunk |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1983 |
nChanges "{Class:SmallInteger}" | |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1984 |
|
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1985 |
Stream writeErrorSignal handle:[:ex | |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1986 |
self warn:('could not update the changes file.\\' , ex errorString) withCRs. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1987 |
tempfile exists ifTrue:[tempfile remove]. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1988 |
^ false |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1989 |
] do:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1990 |
|
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1991 |
excla := inStream class chunkSeparator. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1992 |
nChanges := self numberOfChanges. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1993 |
|
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1994 |
1 to:nChanges do:[:index | |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1995 |
inStream position:(changePositions at:index). |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1996 |
sawExcla := inStream peekFor:excla. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1997 |
chunk := inStream nextChunk. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1998 |
|
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
1999 |
(chunk notNil |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2000 |
and:[(chunk startsWith:'''---- snap') not]) ifTrue:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2001 |
(stamp := changeTimeStamps at:index) notNil ifTrue:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2002 |
outStream nextPutAll:'''---- timestamp ' , stamp , ' ----'''. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2003 |
outStream nextPut:excla; cr. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2004 |
]. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2005 |
]. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2006 |
|
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2007 |
sawExcla ifTrue:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2008 |
outStream nextPut:excla. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2009 |
outStream nextChunkPut:chunk. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2010 |
outStream cr; cr. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2011 |
" |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2012 |
a method-definition chunk - output followups |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2013 |
" |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2014 |
done := false. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2015 |
first := true. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2016 |
[done] whileFalse:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2017 |
chunk := inStream nextChunk. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2018 |
chunk isNil ifTrue:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2019 |
outStream cr; cr. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2020 |
done := true |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2021 |
] ifFalse:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2022 |
chunk isEmpty ifTrue:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2023 |
outStream space; nextChunkPut:chunk; cr; cr. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2024 |
done := true. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2025 |
] ifFalse:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2026 |
first ifFalse:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2027 |
outStream cr; cr. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2028 |
]. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2029 |
outStream nextChunkPut:chunk. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2030 |
]. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2031 |
]. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2032 |
first := false. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2033 |
]. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2034 |
] ifFalse:[ |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2035 |
outStream nextChunkPut:chunk. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2036 |
outStream cr |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2037 |
] |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2038 |
]. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2039 |
outStream close. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2040 |
inStream close. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2041 |
]. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2042 |
|
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2043 |
f := changeFileName asFilename. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2044 |
f renameTo:(f withSuffix:'bak'). |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2045 |
tempfile renameTo:changeFileName. |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2046 |
anyChanges := false |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
2047 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
2048 |
^ true |
182
0c2f9214d531
handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2049 |
|
1566
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2050 |
"Modified: / 2.12.1996 / 22:29:15 / stefan" |
7a4ef80fb49b
try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
2051 |
"Modified: / 21.4.1998 / 17:50:11 / cg" |
202 | 2052 |
! ! |
0 | 2053 |
|
202 | 2054 |
!ChangesBrowser methodsFor:'termination'! |
51 | 2055 |
|
1787 | 2056 |
closeRequest |
2057 |
"window manager wants us to go away" |
|
2058 |
||
2059 |
|action again| |
|
2060 |
||
2061 |
anyChanges ifTrue:[ |
|
2062 |
again := true. |
|
2063 |
[again] whileTrue:[ |
|
2064 |
action := OptionBox |
|
2065 |
request:(resources at:'changefile has not been updated from the modified changelist.\\Update before closing ?') withCRs |
|
2066 |
label:'ChangesBrowser' |
|
2067 |
form:(WarningBox iconBitmap) |
|
2068 |
buttonLabels:(resources array:#('cancel' 'don''t update' 'update')) |
|
2069 |
values:#(#abort #ignore #save) |
|
2070 |
default:#save. |
|
2071 |
||
2072 |
again := false. |
|
2073 |
action == #abort ifTrue:[^ self]. |
|
2074 |
action == #save ifTrue:[ |
|
2075 |
again := self writeBackChanges not |
|
2076 |
]. |
|
2077 |
] |
|
2078 |
]. |
|
2079 |
super closeRequest |
|
2080 |
||
2081 |
"Modified: / 31.7.1997 / 18:29:06 / cg" |
|
2082 |
"Created: / 3.8.1998 / 19:54:13 / cg" |
|
2083 |
! |
|
2084 |
||
202 | 2085 |
destroy |
2086 |
"destroy the receiver; make certain, that boxes are destroyed too" |
|
73 | 2087 |
|
202 | 2088 |
Processor removeTimedBlock:checkBlock. |
2089 |
ObjectMemory removeDependent:self. |
|
2090 |
super destroy |
|
51 | 2091 |
! |
2092 |
||
202 | 2093 |
saveAndTerminate |
2094 |
"update the changes file and quit. |
|
2095 |
Dont depend on this being sent, not all window managers |
|
2096 |
send it; instead, they simply destroy the view." |
|
28 | 2097 |
|
202 | 2098 |
anyChanges ifTrue:[ |
1787 | 2099 |
self writeBackChanges. |
0 | 2100 |
]. |
1787 | 2101 |
super saveAndTerminate |
2102 |
||
2103 |
"Modified: / 3.8.1998 / 19:54:00 / cg" |
|
0 | 2104 |
! ! |
2105 |
||
73 | 2106 |
!ChangesBrowser methodsFor:'user interaction'! |
51 | 2107 |
|
221 | 2108 |
autoUpdate:aBoolean |
2109 |
autoUpdate := aBoolean |
|
2110 |
||
2111 |
"Created: 3.12.1995 / 14:14:24 / cg" |
|
2112 |
"Modified: 3.12.1995 / 14:20:45 / cg" |
|
2113 |
! |
|
2114 |
||
0 | 2115 |
changeSelection:lineNr |
2116 |
"show a change in the codeView" |
|
2117 |
||
2118 |
|aStream sawExcla chunk| |
|
2119 |
||
2120 |
aStream := self streamForChange:lineNr. |
|
2121 |
aStream isNil ifTrue:[^ self]. |
|
2122 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
|
2123 |
chunk := aStream nextChunk. |
|
2124 |
sawExcla ifTrue:[ |
|
45 | 2125 |
chunk := aStream nextChunk |
0 | 2126 |
]. |
2127 |
aStream close. |
|
2128 |
codeView contents:chunk. |
|
13 | 2129 |
codeView acceptAction:[:theCode | self doApply "noChangesAllowed"]. |
15 | 2130 |
changeNrShown := lineNr. |
0 | 2131 |
|
51 | 2132 |
! |
2133 |
||
202 | 2134 |
doApply |
2135 |
"user wants a change to be applied" |
|
45 | 2136 |
|
202 | 2137 |
self withSelectedChangeDo:[:changeNr | |
2138 |
skipSignal := nil. |
|
2139 |
self applyChange:changeNr. |
|
2140 |
self autoSelect:(changeNr + 1) |
|
2141 |
] |
|
45 | 2142 |
! |
2143 |
||
202 | 2144 |
doApplyAll |
2145 |
"user wants all changes to be applied" |
|
37 | 2146 |
|
294 | 2147 |
self withExecuteCursorDo:[ |
1378 | 2148 |
|lastNr "{ Class: SmallInteger }" | |
2149 |
||
2150 |
self clearCodeView. |
|
2151 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
2152 |
lastNr := self numberOfChanges. |
|
2153 |
1 to:lastNr do:[:changeNr | |
|
2154 |
changeListView setSelection:changeNr. |
|
2155 |
self applyChange:changeNr |
|
2156 |
]. |
|
2157 |
self autoSelectLast |
|
202 | 2158 |
] |
294 | 2159 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2160 |
"Modified: 21.1.1997 / 22:26:30 / cg" |
37 | 2161 |
! |
2162 |
||
202 | 2163 |
doApplyClassRest |
2164 |
"user wants all changes for this class from changeNr to be applied" |
|
2165 |
||
2166 |
self withSelectedChangeDo:[:changeNr | |
|
1378 | 2167 |
|thisClassName classNameToApply lastChange |
2168 |
lastNr "{ Class: SmallInteger }" | |
|
2169 |
||
2170 |
classNameToApply := self classNameOfChange:changeNr. |
|
2171 |
classNameToApply notNil ifTrue:[ |
|
2172 |
self clearCodeView. |
|
2173 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
2174 |
||
2175 |
lastNr := self numberOfChanges. |
|
2176 |
changeNr to:lastNr do:[:changeNr | |
|
2177 |
thisClassName := self classNameOfChange:changeNr. |
|
2178 |
thisClassName = classNameToApply ifTrue:[ |
|
2179 |
changeListView setSelection:changeNr. |
|
2180 |
self applyChange:changeNr. |
|
2181 |
lastChange := changeNr |
|
2182 |
]. |
|
2183 |
]. |
|
2184 |
self autoSelect:lastChange. |
|
2185 |
] |
|
202 | 2186 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2187 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2188 |
"Modified: 21.1.1997 / 22:26:04 / cg" |
37 | 2189 |
! |
2190 |
||
202 | 2191 |
doApplyRest |
2192 |
"user wants all changes from changeNr to be applied" |
|
28 | 2193 |
|
202 | 2194 |
self withSelectedChangeDo:[:changeNr | |
1378 | 2195 |
|lastNr "{ Class: SmallInteger }" | |
2196 |
||
2197 |
self clearCodeView. |
|
2198 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
2199 |
||
2200 |
lastNr := self numberOfChanges. |
|
2201 |
changeNr to:lastNr do:[:changeNr | |
|
2202 |
changeListView setSelection:changeNr. |
|
2203 |
self applyChange:changeNr |
|
2204 |
]. |
|
2205 |
self autoSelect:self numberOfChanges. |
|
37 | 2206 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2207 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2208 |
"Modified: 21.1.1997 / 22:25:29 / cg" |
37 | 2209 |
! |
2210 |
||
45 | 2211 |
doBrowse |
2212 |
"user wants a browser on the class of a change" |
|
2213 |
||
241
9366ced0db42
doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents:
226
diff
changeset
|
2214 |
|changeNr className cls isMeta| |
45 | 2215 |
|
2216 |
changeNr := changeListView selection. |
|
2217 |
changeNr notNil ifTrue:[ |
|
1781
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2218 |
className := self fullClassNameOfChange:changeNr. |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2219 |
className notNil ifTrue:[ |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2220 |
isMeta := false. |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2221 |
(className endsWith:' class') ifTrue:[ |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2222 |
className := className copyWithoutLast:6. |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2223 |
isMeta := true. |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2224 |
]. |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2225 |
(cls := Smalltalk classNamed:className) notNil ifTrue:[ |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2226 |
isMeta ifTrue:[ |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2227 |
cls := cls class |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2228 |
]. |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2229 |
SystemBrowser |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2230 |
openInClass:cls |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2231 |
selector:(self selectorOfMethodChange:changeNr) |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2232 |
] ifFalse:[ |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2233 |
self warn:'class not found: ''' , className , ''''. |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2234 |
] |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2235 |
] ifFalse:[ |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2236 |
self warn:'could not extract classname from change'. |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2237 |
] |
37 | 2238 |
] |
209
dc43fdd0aadf
browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents:
207
diff
changeset
|
2239 |
|
1781
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2240 |
"Created: / 24.11.1995 / 23:13:24 / cg" |
f1e06a41b1ac
show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents:
1726
diff
changeset
|
2241 |
"Modified: / 31.7.1998 / 20:17:42 / cg" |
37 | 2242 |
! |
2243 |
||
73 | 2244 |
doCompare |
2245 |
"compare change with current system version |
|
2246 |
- give a note in transcript" |
|
2247 |
||
2248 |
|changeNr| |
|
2249 |
||
2250 |
changeNr := changeListView selection. |
|
2251 |
changeNr notNil ifTrue:[ |
|
1378 | 2252 |
self withExecuteCursorDo:[ |
2253 |
self compareChange:changeNr |
|
2254 |
] |
|
394 | 2255 |
]. |
2256 |
self newLabel:'' |
|
294 | 2257 |
|
394 | 2258 |
"Modified: 24.2.1996 / 19:37:19 / cg" |
73 | 2259 |
! |
2260 |
||
45 | 2261 |
doCompress |
2262 |
"compress the change-set; this replaces multiple method-changes by the last |
|
2263 |
(i.e. the most recent) change" |
|
2264 |
||
1359 | 2265 |
self compressForClass:nil |
2266 |
||
2267 |
"Modified: / 29.10.1997 / 01:03:26 / cg" |
|
2268 |
! |
|
2269 |
||
2270 |
doCompressClass |
|
2271 |
"compress changes for the selected class. |
|
2272 |
this replaces multiple method-changes by the last (i.e. the most recent) change." |
|
2273 |
||
2274 |
self withSelectedChangeDo:[:changeNr | |
|
1378 | 2275 |
| classNameToCompress | |
2276 |
||
2277 |
classNameToCompress := self classNameOfChange:changeNr. |
|
2278 |
classNameToCompress notNil ifTrue:[ |
|
2279 |
self compressForClass:classNameToCompress. |
|
2280 |
] |
|
1359 | 2281 |
] |
2282 |
||
2283 |
"Created: / 29.10.1997 / 01:05:16 / cg" |
|
2284 |
"Modified: / 29.10.1997 / 01:06:22 / cg" |
|
45 | 2285 |
! |
2286 |
||
202 | 2287 |
doDelete |
2288 |
"delete currently selected change" |
|
2289 |
||
2290 |
|changeNr| |
|
73 | 2291 |
|
202 | 2292 |
changeNr := changeListView selection. |
2293 |
changeNr notNil ifTrue:[ |
|
2294 |
self deleteChange:changeNr. |
|
2295 |
self autoSelectOrEnd:changeNr |
|
73 | 2296 |
] |
2297 |
! |
|
2298 |
||
202 | 2299 |
doDeleteClassAll |
2300 |
"delete all changes with same class as currently selected change" |
|
2301 |
||
2302 |
self withSelectedChangeDo:[:changeNr | |
|
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2303 |
|classNameToDelete numDeletedBefore| |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2304 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2305 |
classNameToDelete := self classNameOfChange:changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2306 |
classNameToDelete notNil ifTrue:[ |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2307 |
changeListView setSelection:nil. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2308 |
self silentDeleteChangesFor:classNameToDelete |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2309 |
from:changeNr |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2310 |
to:(self numberOfChanges). |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2311 |
numDeletedBefore := self |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2312 |
silentDeleteChangesFor:classNameToDelete |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2313 |
from:1 |
1431 | 2314 |
to:(changeNr-1). |
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2315 |
self setChangeList. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2316 |
self autoSelectOrEnd:(changeNr - numDeletedBefore) |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2317 |
] |
51 | 2318 |
] |
286
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2319 |
|
1431 | 2320 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
2321 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
|
286
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2322 |
! |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2323 |
|
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2324 |
doDeleteClassFromBeginning |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2325 |
"delete changes with same class as currently selected change from the beginning |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2326 |
up to the selected change. |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2327 |
Useful to get rid of obsolete changes before a fileout or checkin entry." |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2328 |
|
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2329 |
self withSelectedChangeDo:[:changeNr | |
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2330 |
|classNameToDelete prevSelection numDeleted| |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2331 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2332 |
classNameToDelete := self classNameOfChange:changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2333 |
classNameToDelete notNil ifTrue:[ |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2334 |
prevSelection := changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2335 |
changeListView setSelection:nil. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2336 |
numDeleted := self |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2337 |
silentDeleteChangesFor:classNameToDelete |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2338 |
from:1 |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2339 |
to:changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2340 |
self setChangeList. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2341 |
self autoSelectOrEnd:(changeNr + 1 - numDeleted) |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2342 |
] |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
2343 |
]. |
286
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2344 |
|
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
2345 |
"Created: 13.12.1995 / 15:41:58 / cg" |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2346 |
"Modified: 25.5.1996 / 12:26:34 / cg" |
51 | 2347 |
! |
2348 |
||
73 | 2349 |
doDeleteClassRest |
2350 |
"delete rest of changes with same class as currently selected change" |
|
2351 |
||
2352 |
self withSelectedChangeDo:[:changeNr | |
|
1648 | 2353 |
| classNameToDelete | |
2354 |
||
2355 |
classNameToDelete := self classNameOfChange:changeNr. |
|
2356 |
classNameToDelete notNil ifTrue:[ |
|
2357 |
changeListView setSelection:nil. |
|
2358 |
self silentDeleteChangesFor:classNameToDelete |
|
2359 |
from:changeNr |
|
2360 |
to:(self numberOfChanges). |
|
2361 |
self setChangeList. |
|
2362 |
self autoSelectOrEnd:changeNr |
|
2363 |
] |
|
73 | 2364 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2365 |
|
1648 | 2366 |
"Modified: / 18.5.1998 / 14:25:07 / cg" |
73 | 2367 |
! |
2368 |
||
202 | 2369 |
doDeleteRest |
2370 |
"delete all changes from current to the end" |
|
51 | 2371 |
|
202 | 2372 |
|changeNr| |
51 | 2373 |
|
202 | 2374 |
changeNr := changeListView selection. |
2375 |
changeNr notNil ifTrue:[ |
|
223
d451e2badbd1
fixed handling of primitive def/var/function changes
Claus Gittinger <cg@exept.de>
parents:
221
diff
changeset
|
2376 |
self deleteChangesFrom:changeNr to:(self numberOfChanges). |
202 | 2377 |
self clearCodeView. |
2378 |
self autoSelectOrEnd:changeNr-1 |
|
51 | 2379 |
] |
132 | 2380 |
! |
2381 |
||
2382 |
doFileoutAndDeleteClassAll |
|
2383 |
"first fileOut the selected changes class then delete all changes |
|
2384 |
for it." |
|
2385 |
||
2386 |
self withSelectedChangeDo:[:changeNr | |
|
2387 |
| className class | |
|
2388 |
||
2389 |
className := self classNameOfChange:changeNr. |
|
2390 |
className notNil ifTrue:[ |
|
2391 |
class := Smalltalk classNamed:className. |
|
2392 |
class notNil ifTrue:[ |
|
2393 |
Class fileOutErrorSignal handle:[:ex | |
|
2394 |
self warn:('fileout failed: ' , ex errorString). |
|
2395 |
] do:[ |
|
2396 |
class fileOut. |
|
2397 |
self doDeleteClassAll |
|
2398 |
]. |
|
2399 |
]. |
|
2400 |
||
2401 |
]. |
|
2402 |
] |
|
2403 |
||
2404 |
"Modified: 6.9.1995 / 17:11:16 / claus" |
|
202 | 2405 |
! |
73 | 2406 |
|
202 | 2407 |
doMakePatch |
2408 |
"user wants a change to be made a patch |
|
2409 |
- copy it over to the patches file" |
|
89 | 2410 |
|
202 | 2411 |
|changeNr| |
89 | 2412 |
|
202 | 2413 |
changeNr := changeListView selection. |
2414 |
changeNr notNil ifTrue:[ |
|
2415 |
self makeChangeAPatch:changeNr. |
|
2416 |
self autoSelect:(changeNr + 1) |
|
2417 |
] |
|
73 | 2418 |
! |
2419 |
||
202 | 2420 |
doMakePermanent |
2421 |
"user wants a change to be made permanent |
|
2422 |
- rewrite the source file where this change has to go" |
|
2423 |
||
2424 |
|yesNoBox| |
|
73 | 2425 |
|
202 | 2426 |
yesNoBox := YesNoBox new. |
2427 |
yesNoBox title:(resources at:'Warning: this operation cannot be undone'). |
|
1378 | 2428 |
yesNoBox okText:(resources at:'continue') noText:(resources at:'abort'). |
202 | 2429 |
yesNoBox okAction:[ |changeNr| |
2430 |
||
1378 | 2431 |
changeNr := changeListView selection. |
2432 |
changeNr notNil ifTrue:[ |
|
2433 |
self makeChangePermanent:changeNr. |
|
2434 |
self autoSelect:(changeNr + 1) |
|
2435 |
] |
|
2436 |
]. |
|
917 | 2437 |
yesNoBox showAtPointer. |
2438 |
yesNoBox destroy |
|
2439 |
||
2440 |
"Modified: 7.1.1997 / 23:03:33 / cg" |
|
73 | 2441 |
! |
2442 |
||
202 | 2443 |
doSave |
2444 |
"user wants a change to be appended to a file" |
|
73 | 2445 |
|
202 | 2446 |
|changeNr fileName| |
73 | 2447 |
|
202 | 2448 |
changeNr := changeListView selection. |
2449 |
changeNr notNil ifTrue:[ |
|
1473 | 2450 |
fileName := Dialog |
2451 |
requestFileName:'append change to:' |
|
2452 |
default:'' |
|
2453 |
ok:'append' |
|
2454 |
abort:'abort' |
|
2455 |
pattern:'*.chg'. |
|
2456 |
||
2457 |
fileName notNil ifTrue:[ |
|
2458 |
self withCursor:(Cursor write) do:[ |
|
2459 |
self appendChange:changeNr toFile:fileName. |
|
2460 |
]. |
|
2461 |
self autoSelect:(changeNr + 1) |
|
2462 |
]. |
|
202 | 2463 |
] |
73 | 2464 |
! |
2465 |
||
202 | 2466 |
doSaveClass |
2467 |
"user wants changes for some class from current to end to be appended to a file" |
|
89 | 2468 |
|
202 | 2469 |
self doSaveClassFrom:1 |
89 | 2470 |
! |
2471 |
||
202 | 2472 |
doSaveClassAll |
2473 |
"user wants changes for some class from current to end to be appended to a file" |
|
73 | 2474 |
|
202 | 2475 |
self doSaveClassFrom:1 |
2476 |
! |
|
2477 |
||
2478 |
doSaveClassFrom:startNr |
|
2479 |
"user wants changes from current to end to be appended to a file" |
|
2480 |
||
2481 |
|changeNr classNameToSave| |
|
73 | 2482 |
|
202 | 2483 |
changeNr := changeListView selection. |
2484 |
changeNr notNil ifTrue:[ |
|
2485 |
classNameToSave := self classNameOfChange:changeNr. |
|
2486 |
classNameToSave notNil ifTrue:[ |
|
2487 |
self saveClass:classNameToSave from:startNr |
|
2488 |
] |
|
2489 |
] |
|
2490 |
! |
|
73 | 2491 |
|
202 | 2492 |
doSaveClassRest |
2493 |
"user wants changes for some class from current to end to be appended to a file" |
|
73 | 2494 |
|
202 | 2495 |
|changeNr| |
132 | 2496 |
|
202 | 2497 |
changeNr := changeListView selection. |
2498 |
changeNr notNil ifTrue:[ |
|
2499 |
self doSaveClassFrom:changeNr |
|
2500 |
] |
|
81 | 2501 |
! |
2502 |
||
202 | 2503 |
doSaveRest |
2504 |
"user wants changes from current to end to be appended to a file" |
|
73 | 2505 |
|
202 | 2506 |
|changeNr fileName| |
51 | 2507 |
|
202 | 2508 |
changeNr := changeListView selection. |
2509 |
changeNr notNil ifTrue:[ |
|
1378 | 2510 |
fileName := Dialog |
2511 |
requestFileName:'append changes to:' |
|
2512 |
default:'' |
|
2513 |
ok:'append' |
|
2514 |
abort:'abort' |
|
2515 |
pattern:'*.chg'. |
|
2516 |
||
2517 |
fileName notNil ifTrue:[ |
|
2518 |
self withCursor:(Cursor write) do:[ |
|
2519 |
changeNr to:(self numberOfChanges) do:[:changeNr | |
|
2520 |
changeListView setSelection:changeNr. |
|
2521 |
(self appendChange:changeNr toFile:fileName) ifFalse:[ |
|
2522 |
^ self |
|
2523 |
] |
|
2524 |
] |
|
2525 |
] |
|
2526 |
]. |
|
202 | 2527 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2528 |
|
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2529 |
"Modified: 25.5.1996 / 12:26:41 / cg" |
51 | 2530 |
! |
2531 |
||
202 | 2532 |
doUpdate |
2533 |
"reread the changes-file" |
|
51 | 2534 |
|
202 | 2535 |
self readChangesFileInBackground:true. |
2536 |
realized ifTrue:[ |
|
2537 |
self setChangeList. |
|
2538 |
] |
|
2539 |
||
51 | 2540 |
! |
2541 |
||
202 | 2542 |
doWriteBack |
2543 |
"write back the list onto the changes file" |
|
51 | 2544 |
|
2545 |
anyChanges ifTrue:[ |
|
1378 | 2546 |
(self writeBackChanges) ifTrue:[ |
2547 |
realized ifTrue:[ |
|
2548 |
self readChangesFileInBackground:false. |
|
2549 |
realized ifTrue:[ |
|
2550 |
self setChangeList |
|
2551 |
] |
|
2552 |
] |
|
2553 |
] |
|
202 | 2554 |
] |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
2555 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
2556 |
"Modified: 5.9.1996 / 17:19:46 / cg" |
202 | 2557 |
! |
126 | 2558 |
|
1471 | 2559 |
doubleClickOnChange:lineNr |
2560 |
self doBrowse |
|
2561 |
||
2562 |
"Created: / 6.2.1998 / 13:08:49 / cg" |
|
2563 |
! |
|
2564 |
||
1127 | 2565 |
findClass |
2566 |
|nm current savedCursor search| |
|
2567 |
||
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2568 |
lastSearchType := #class. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2569 |
|
1127 | 2570 |
changeNrShown notNil ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2571 |
current := self classNameOfChange:changeNrShown. |
1127 | 2572 |
]. |
1275 | 2573 |
nm := Dialog |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2574 |
request:'class to search for:' |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2575 |
initialAnswer:current |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2576 |
onCancel:nil. |
1275 | 2577 |
nm isNil ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2578 |
^ self |
1275 | 2579 |
]. |
1127 | 2580 |
|
2581 |
changeNrShown isNil ifTrue:[ |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2582 |
search := 1. |
1127 | 2583 |
] ifFalse:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2584 |
search := changeNrShown + 1 |
1127 | 2585 |
]. |
2586 |
||
2587 |
self withCursor:Cursor questionMark do:[ |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2588 |
|lastNr nr thisClass | |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2589 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2590 |
lastNr := self numberOfChanges. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2591 |
nr := search. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2592 |
[nr <= lastNr] whileTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2593 |
thisClass := self classNameOfChange:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2594 |
(thisClass = nm |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2595 |
or:[nm includesMatchCharacters and:[nm match:thisClass]]) ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2596 |
changeListView setSelection:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2597 |
self changeSelection:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2598 |
^ self |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2599 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2600 |
nr := nr + 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2601 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2602 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2603 |
self beep. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2604 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2605 |
savedCursor := cursor. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2606 |
self cursor:(Cursor cross). |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2607 |
Delay waitForMilliseconds:300. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2608 |
self cursor:savedCursor |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2609 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2610 |
"Created: / 8.4.1997 / 11:00:16 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2611 |
"Modified: / 18.4.1997 / 12:47:52 / stefan" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2612 |
"Modified: / 18.6.1998 / 22:27:33 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2613 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2614 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2615 |
findNext |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2616 |
lastSearchType == #selector ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2617 |
^ self findNextForSelector |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2618 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2619 |
^ self findNextForClass |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2620 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2621 |
"Created: / 18.6.1998 / 22:15:00 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2622 |
"Modified: / 18.6.1998 / 22:15:25 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2623 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2624 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2625 |
findNextForClass |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2626 |
|savedCursor| |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2627 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2628 |
lastSearchType := #class. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2629 |
changeNrShown isNil ifTrue:[^ self]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2630 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2631 |
self withCursor:Cursor questionMark do:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2632 |
|lastNr cls nr thisClass | |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2633 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2634 |
cls := self classNameOfChange:changeNrShown. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2635 |
cls isNil ifTrue:[^ self]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2636 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2637 |
lastNr := self numberOfChanges. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2638 |
nr := changeNrShown + 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2639 |
[nr <= lastNr] whileTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2640 |
thisClass := self classNameOfChange:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2641 |
(thisClass = cls |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2642 |
or:[cls includesMatchCharacters and:[cls match:thisClass]]) ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2643 |
changeListView setSelection:nr . |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2644 |
self changeSelection:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2645 |
^ self |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2646 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2647 |
nr := nr + 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2648 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2649 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2650 |
self beep. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2651 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2652 |
savedCursor := cursor. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2653 |
self cursor:(Cursor cross). |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2654 |
Delay waitForMilliseconds:300. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2655 |
self cursor:savedCursor |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2656 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2657 |
"Created: / 21.1.1997 / 22:28:07 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2658 |
"Modified: / 18.4.1997 / 12:48:18 / stefan" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2659 |
"Modified: / 18.6.1998 / 22:29:40 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2660 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2661 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2662 |
findNextForSelector |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2663 |
|savedCursor| |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2664 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2665 |
lastSearchType := #selector. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2666 |
changeNrShown isNil ifTrue:[^ self]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2667 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2668 |
self withCursor:Cursor questionMark do:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2669 |
|lastNr sel nr thisSelector | |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2670 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2671 |
sel := self selectorOfMethodChange:changeNrShown. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2672 |
sel isNil ifTrue:[^ self]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2673 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2674 |
lastNr := self numberOfChanges. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2675 |
nr := changeNrShown + 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2676 |
[nr <= lastNr] whileTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2677 |
thisSelector := self classNameOfChange:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2678 |
(thisSelector = sel |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2679 |
or:[sel includesMatchCharacters and:[sel match:thisSelector]]) ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2680 |
changeListView setSelection:nr . |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2681 |
self changeSelection:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2682 |
^ self |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2683 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2684 |
nr := nr + 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2685 |
]. |
1127 | 2686 |
]. |
2687 |
self beep. |
|
2688 |
||
2689 |
savedCursor := cursor. |
|
2690 |
self cursor:(Cursor cross). |
|
1150
fc05bbed9e43
Use 'Delay' instead of Process waitForMilliseconds:
Stefan Vogel <sv@exept.de>
parents:
1127
diff
changeset
|
2691 |
Delay waitForMilliseconds:300. |
1127 | 2692 |
self cursor:savedCursor |
2693 |
||
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2694 |
"Modified: / 18.4.1997 / 12:48:18 / stefan" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2695 |
"Created: / 18.6.1998 / 22:17:37 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2696 |
"Modified: / 18.6.1998 / 22:29:33 / cg" |
1127 | 2697 |
! |
2698 |
||
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2699 |
findNextSnapshot |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2700 |
|savedCursor| |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2701 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2702 |
changeNrShown isNil ifTrue:[^ self]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2703 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2704 |
self withCursor:Cursor questionMark do:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2705 |
|cls nr lastNr words chunk| |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2706 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2707 |
Object userInterruptSignal handle:[:ex | |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2708 |
self beep. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2709 |
^ self |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2710 |
] do:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2711 |
lastNr := self numberOfChanges. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2712 |
nr := changeNrShown + 1. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2713 |
[nr <= lastNr] whileTrue:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2714 |
" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2715 |
get the chunk |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2716 |
" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2717 |
chunk := changeChunks at:nr. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2718 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2719 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2720 |
(chunk startsWith:'''---') ifTrue:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2721 |
words := chunk asCollectionOfWords. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2722 |
words size > 2 ifTrue:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2723 |
(words at:2) = 'snapshot' ifTrue:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2724 |
changeListView setSelection:nr . |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2725 |
self changeSelection:nr. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2726 |
^ self |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2727 |
]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2728 |
]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2729 |
]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2730 |
nr := nr + 1. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2731 |
]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2732 |
] |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2733 |
]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2734 |
self beep. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2735 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2736 |
savedCursor := cursor. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2737 |
self cursor:(Cursor cross). |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2738 |
Delay waitForMilliseconds:300. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2739 |
self cursor:savedCursor |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2740 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2741 |
"Modified: / 18.4.1997 / 12:48:41 / stefan" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2742 |
"Created: / 22.8.1998 / 15:58:49 / cg" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2743 |
"Modified: / 22.8.1998 / 15:59:38 / cg" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2744 |
! |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2745 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2746 |
findPrevious |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2747 |
lastSearchType == #selector ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2748 |
^ self findPreviousForSelector |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2749 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2750 |
^ self findPreviousForClass |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2751 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2752 |
"Created: / 18.6.1998 / 22:15:15 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2753 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2754 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2755 |
findPreviousForClass |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2756 |
|savedCursor| |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2757 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2758 |
lastSearchType := #class. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2759 |
changeNrShown isNil ifTrue:[^ self]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2760 |
|
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2761 |
self withCursor:Cursor questionMark do:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2762 |
|cls nr thisClass | |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2763 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2764 |
Object userInterruptSignal handle:[:ex | |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2765 |
self beep. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2766 |
^ self |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2767 |
] do:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2768 |
cls := self classNameOfChange:changeNrShown. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2769 |
cls isNil ifTrue:[^ self]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2770 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2771 |
nr := changeNrShown - 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2772 |
[nr >= 1] whileTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2773 |
thisClass := self classNameOfChange:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2774 |
(thisClass = cls |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2775 |
or:[cls includesMatchCharacters and:[cls match:thisClass]]) ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2776 |
changeListView setSelection:nr . |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2777 |
self changeSelection:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2778 |
^ self |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2779 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2780 |
nr := nr - 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2781 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2782 |
] |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2783 |
]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2784 |
self beep. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2785 |
|
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2786 |
savedCursor := cursor. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2787 |
self cursor:(Cursor cross). |
1150
fc05bbed9e43
Use 'Delay' instead of Process waitForMilliseconds:
Stefan Vogel <sv@exept.de>
parents:
1127
diff
changeset
|
2788 |
Delay waitForMilliseconds:300. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2789 |
self cursor:savedCursor |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2790 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2791 |
"Modified: / 18.4.1997 / 12:48:41 / stefan" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2792 |
"Modified: / 18.6.1998 / 22:29:44 / cg" |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2793 |
! |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2794 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2795 |
findPreviousForSelector |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2796 |
|savedCursor| |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2797 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2798 |
lastSearchType := #selector. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2799 |
changeNrShown isNil ifTrue:[^ self]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2800 |
|
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2801 |
self withCursor:Cursor questionMark do:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2802 |
|sel nr thisSelector | |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2803 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2804 |
Object userInterruptSignal handle:[:ex | |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2805 |
self beep. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2806 |
^ self |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2807 |
] do:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2808 |
sel := self selectorOfMethodChange:changeNrShown. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2809 |
sel isNil ifTrue:[^ self]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2810 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2811 |
nr := changeNrShown - 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2812 |
[nr >= 1] whileTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2813 |
thisSelector := self selectorOfMethodChange:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2814 |
(thisSelector = sel |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2815 |
or:[sel includesMatchCharacters and:[sel match:thisSelector]]) ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2816 |
changeListView setSelection:nr . |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2817 |
self changeSelection:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2818 |
^ self |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2819 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2820 |
nr := nr - 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2821 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2822 |
] |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2823 |
]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2824 |
self beep. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2825 |
|
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2826 |
savedCursor := cursor. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2827 |
self cursor:(Cursor cross). |
1150
fc05bbed9e43
Use 'Delay' instead of Process waitForMilliseconds:
Stefan Vogel <sv@exept.de>
parents:
1127
diff
changeset
|
2828 |
Delay waitForMilliseconds:300. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2829 |
self cursor:savedCursor |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2830 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2831 |
"Modified: / 18.4.1997 / 12:48:41 / stefan" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2832 |
"Created: / 18.6.1998 / 22:18:19 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2833 |
"Modified: / 18.6.1998 / 22:29:29 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2834 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2835 |
|
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2836 |
findPreviousSnapshot |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2837 |
|savedCursor| |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2838 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2839 |
changeNrShown isNil ifTrue:[^ self]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2840 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2841 |
self withCursor:Cursor questionMark do:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2842 |
|cls nr words chunk| |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2843 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2844 |
Object userInterruptSignal handle:[:ex | |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2845 |
self beep. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2846 |
^ self |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2847 |
] do:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2848 |
nr := changeNrShown - 1. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2849 |
[nr >= 1] whileTrue:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2850 |
" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2851 |
get the chunk |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2852 |
" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2853 |
chunk := changeChunks at:nr. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2854 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2855 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2856 |
(chunk startsWith:'''---') ifTrue:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2857 |
words := chunk asCollectionOfWords. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2858 |
words size > 2 ifTrue:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2859 |
(words at:2) = 'snapshot' ifTrue:[ |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2860 |
changeListView setSelection:nr . |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2861 |
self changeSelection:nr. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2862 |
^ self |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2863 |
]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2864 |
]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2865 |
]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2866 |
nr := nr - 1. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2867 |
]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2868 |
] |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2869 |
]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2870 |
self beep. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2871 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2872 |
savedCursor := cursor. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2873 |
self cursor:(Cursor cross). |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2874 |
Delay waitForMilliseconds:300. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2875 |
self cursor:savedCursor |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2876 |
|
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2877 |
"Modified: / 18.4.1997 / 12:48:41 / stefan" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2878 |
"Modified: / 18.6.1998 / 22:29:44 / cg" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2879 |
"Created: / 22.8.1998 / 15:57:34 / cg" |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2880 |
! |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2881 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2882 |
findSelector |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2883 |
|sel current savedCursor search| |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2884 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2885 |
lastSearchType := #selector. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2886 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2887 |
changeNrShown notNil ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2888 |
current := self selectorOfMethodChange:changeNrShown. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2889 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2890 |
sel := Dialog |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2891 |
request:'selector to search for:' |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2892 |
initialAnswer:current |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2893 |
onCancel:nil. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2894 |
sel isNil ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2895 |
^ self |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2896 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2897 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2898 |
changeNrShown isNil ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2899 |
search := 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2900 |
] ifFalse:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2901 |
search := changeNrShown + 1 |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2902 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2903 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2904 |
self withCursor:Cursor questionMark do:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2905 |
|lastNr cls nr thisSelector | |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2906 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2907 |
lastNr := self numberOfChanges. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2908 |
nr := search. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2909 |
[nr <= lastNr] whileTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2910 |
thisSelector := self selectorOfMethodChange:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2911 |
(thisSelector = sel |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2912 |
or:[sel includesMatchCharacters and:[sel match:thisSelector]]) ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2913 |
changeListView setSelection:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2914 |
self changeSelection:nr. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2915 |
^ self |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2916 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2917 |
nr := nr + 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2918 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2919 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2920 |
self beep. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2921 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2922 |
savedCursor := cursor. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2923 |
self cursor:(Cursor cross). |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2924 |
Delay waitForMilliseconds:300. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2925 |
self cursor:savedCursor |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2926 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2927 |
"Modified: / 18.4.1997 / 12:47:52 / stefan" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2928 |
"Created: / 18.6.1998 / 22:17:04 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
2929 |
"Modified: / 18.6.1998 / 22:27:44 / cg" |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2930 |
! |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
2931 |
|
202 | 2932 |
noChangesAllowed |
2933 |
"show a warning that changes cannot be changed" |
|
93 | 2934 |
|
202 | 2935 |
self warn:'changes are not allowed to be changed' |
0 | 2936 |
! |
2937 |
||
202 | 2938 |
saveClass:aClassName from:startNr |
2939 |
"user wants changes from current to end to be appended to a file" |
|
51 | 2940 |
|
202 | 2941 |
|changeNr fileName| |
51 | 2942 |
|
202 | 2943 |
changeNr := changeListView selection. |
2944 |
changeNr notNil ifTrue:[ |
|
1378 | 2945 |
fileName := Dialog |
2946 |
requestFileName:'append changes for class to:' |
|
2947 |
default:'' |
|
2948 |
ok:'append' |
|
2949 |
abort:'abort' |
|
2950 |
pattern:'*.chg'. |
|
2951 |
||
2952 |
fileName notNil ifTrue:[ |
|
2953 |
self withCursor:(Cursor write) do:[ |
|
2954 |
startNr to:(self numberOfChanges) do:[:changeNr | |
|
2955 |
|thisClassName| |
|
2956 |
||
2957 |
thisClassName := self classNameOfChange:changeNr. |
|
2958 |
thisClassName = aClassName ifTrue:[ |
|
2959 |
changeListView setSelection:changeNr. |
|
2960 |
(self appendChange:changeNr toFile:fileName) ifFalse:[ |
|
2961 |
^ self |
|
2962 |
] |
|
2963 |
] |
|
2964 |
] |
|
2965 |
] |
|
2966 |
]. |
|
202 | 2967 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2968 |
|
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2969 |
"Modified: 25.5.1996 / 12:26:44 / cg" |
202 | 2970 |
! ! |
0 | 2971 |
|
761 | 2972 |
!ChangesBrowser class methodsFor:'documentation'! |
202 | 2973 |
|
2974 |
version |
|
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
2975 |
^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.146 1998-08-24 12:35:47 cg Exp $' |
276
017219e571e4
more stuff for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
275
diff
changeset
|
2976 |
! ! |