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