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 |
|
51
|
13 |
'From Smalltalk/X, Version:2.10.4 on 6-nov-1994 at 21:36:13'!
|
45
|
14 |
|
0
|
15 |
StandardSystemView subclass:#ChangesBrowser
|
45
|
16 |
instanceVariableNames:'changeListView codeView changeFileName changeChunks
|
|
17 |
changePositions changeClassNames changeHeaderLines anyChanges
|
51
|
18 |
changeNrShown changeNrProcessed skipSignal'
|
58
|
19 |
classVariableNames:'CompressSnapshotInfo'
|
45
|
20 |
poolDictionaries:''
|
|
21 |
category:'Interface-Browsers'
|
0
|
22 |
!
|
|
23 |
|
|
24 |
ChangesBrowser comment:'
|
4
|
25 |
COPYRIGHT (c) 1990 by Claus Gittinger
|
45
|
26 |
All Rights Reserved
|
0
|
27 |
|
61
|
28 |
$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.23 1995-02-15 10:39:41 claus Exp $
|
29
|
29 |
'!
|
|
30 |
|
|
31 |
!ChangesBrowser class methodsFor:'documentation'!
|
|
32 |
|
|
33 |
copyright
|
|
34 |
"
|
|
35 |
COPYRIGHT (c) 1990 by Claus Gittinger
|
45
|
36 |
All Rights Reserved
|
0
|
37 |
|
29
|
38 |
This software is furnished under a license and may be used
|
|
39 |
only in accordance with the terms of that license and with the
|
|
40 |
inclusion of the above copyright notice. This software may not
|
|
41 |
be provided or otherwise made available to, or used by, any
|
|
42 |
other person. No title to or ownership of the software is
|
|
43 |
hereby transferred.
|
|
44 |
"
|
|
45 |
!
|
|
46 |
|
|
47 |
version
|
|
48 |
"
|
61
|
49 |
$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.23 1995-02-15 10:39:41 claus Exp $
|
31
|
50 |
"
|
29
|
51 |
!
|
|
52 |
|
|
53 |
documentation
|
|
54 |
"
|
|
55 |
this implements a browser for the changes-file.
|
|
56 |
See the extra document 'doc/misc/cbrowser.doc' for how to use this browser.
|
|
57 |
|
|
58 |
written jan 90 by claus
|
51
|
59 |
|
58
|
60 |
Class variables:
|
|
61 |
CompressSnapshotInfo if true (the default), snapshot entries
|
|
62 |
are also compressed in the compress function.
|
|
63 |
Some users prefer them to be not compressed.
|
|
64 |
Set it to false for this.
|
|
65 |
|
51
|
66 |
Notice:
|
|
67 |
this needs a total rewrite, to build up a changeSet from the file
|
|
68 |
(which did not exist when the ChangesBrowser was written) and
|
|
69 |
manipulate that changeSet.
|
58
|
70 |
This way, we get a browser for any upcoming incore changeSets for
|
|
71 |
free. Also, this will put the chunk analyzation code into Change and
|
|
72 |
subclasses (where it belongs) and give a better encapsulation and
|
|
73 |
overall structure. Do not take this as an example for good style ;-)
|
29
|
74 |
"
|
|
75 |
! !
|
0
|
76 |
|
51
|
77 |
!ChangesBrowser class methodsFor:'defaults'!
|
|
78 |
|
|
79 |
defaultLabel
|
|
80 |
^ 'Changes Browser'
|
|
81 |
! !
|
|
82 |
|
45
|
83 |
!ChangesBrowser class methodsFor:'instance creation'!
|
|
84 |
|
|
85 |
new
|
|
86 |
"create a new changes browser"
|
|
87 |
|
|
88 |
^ super label:'Changes Browser'
|
|
89 |
icon:(Form fromFile:'CBrowser.xbm' resolution:100)
|
|
90 |
!
|
|
91 |
|
|
92 |
openOn:aFileName
|
|
93 |
"create c changes browser on a change file"
|
|
94 |
|
49
|
95 |
^ ((self new label:'Changes Browser: ', aFileName) changeFileName:aFileName) open
|
45
|
96 |
! !
|
|
97 |
|
0
|
98 |
!ChangesBrowser class methodsFor:'behavior'!
|
|
99 |
|
|
100 |
autoSelectNext
|
|
101 |
"returning true here, makes a Delete operation automatically
|
|
102 |
select the next change"
|
|
103 |
|
|
104 |
^ true
|
|
105 |
! !
|
|
106 |
|
51
|
107 |
!ChangesBrowser methodsFor:'menu stuff'!
|
45
|
108 |
|
51
|
109 |
disableMenuEntries
|
|
110 |
"enable all entries refering to a selected change"
|
0
|
111 |
|
51
|
112 |
#(doApply doApplyClassRest doApplyRest doDelete doDeleteRest doDeleteClassRest
|
|
113 |
doDeleteClassAll doCompare doMakePatch doSaveChangeInFile doMakePermanent
|
|
114 |
doSave doSaveRest doSaveClassAll doSaveClassRest doBrowse)
|
|
115 |
do:[:sel |
|
|
116 |
changeListView middleButtonMenu disable:sel
|
|
117 |
].
|
0
|
118 |
!
|
|
119 |
|
51
|
120 |
enableMenuEntries
|
|
121 |
"enable all entries refering to a selected change"
|
28
|
122 |
|
51
|
123 |
#(doApply doApplyClassRest doApplyRest
|
|
124 |
doDelete doDeleteRest doDeleteClassRest
|
|
125 |
doDeleteClassAll
|
|
126 |
doCompare doMakePatch doSaveChangeInFile doMakePermanent
|
|
127 |
doSave doSaveRest doSaveClassAll doSaveClassRest doBrowse)
|
|
128 |
do:[:sel |
|
|
129 |
changeListView middleButtonMenu enable:sel
|
27
|
130 |
].
|
28
|
131 |
! !
|
|
132 |
|
0
|
133 |
!ChangesBrowser methodsFor:'private'!
|
|
134 |
|
51
|
135 |
clearCodeView
|
|
136 |
self unselect "changeListView deselect".
|
|
137 |
codeView contents:nil.
|
|
138 |
changeNrShown := nil
|
|
139 |
!
|
|
140 |
|
|
141 |
unselect
|
|
142 |
"common unselect"
|
|
143 |
|
|
144 |
changeListView deselect.
|
|
145 |
self disableMenuEntries
|
|
146 |
!
|
|
147 |
|
0
|
148 |
streamForChange:changeNr
|
|
149 |
"answer a stream for change"
|
|
150 |
|
|
151 |
|aStream|
|
|
152 |
|
56
|
153 |
(changeNr between:1 and:changePositions size) ifFalse:[^ nil].
|
0
|
154 |
aStream := FileStream readonlyFileNamed:changeFileName.
|
|
155 |
aStream isNil ifTrue:[^ nil].
|
|
156 |
aStream position:(changePositions at:changeNr).
|
|
157 |
^ aStream
|
|
158 |
!
|
|
159 |
|
51
|
160 |
applyChange:changeNr
|
|
161 |
"fileIn a change"
|
|
162 |
|
|
163 |
|aStream upd nm|
|
45
|
164 |
|
51
|
165 |
aStream := self streamForChange:changeNr.
|
|
166 |
aStream isNil ifTrue:[^ self].
|
|
167 |
|
|
168 |
nm := self classNameOfChange:changeNr.
|
|
169 |
nm notNil ifTrue:[
|
|
170 |
|cls|
|
45
|
171 |
|
51
|
172 |
cls := Smalltalk at:(nm asSymbol) ifAbsent:[].
|
|
173 |
cls notNil ifTrue:[
|
|
174 |
cls isLoaded ifFalse:[
|
|
175 |
cls autoload
|
|
176 |
]
|
|
177 |
]
|
|
178 |
].
|
45
|
179 |
|
51
|
180 |
changeNrProcessed := changeNr.
|
45
|
181 |
|
51
|
182 |
upd := Class updateChanges:false.
|
|
183 |
[
|
|
184 |
|sig|
|
45
|
185 |
|
51
|
186 |
(skipSignal notNil) ifTrue:[
|
|
187 |
sig := skipSignal
|
|
188 |
] ifFalse:[
|
|
189 |
sig := Object abortSignal
|
|
190 |
].
|
|
191 |
sig catch:[
|
|
192 |
aStream fileInNextChunkNotifying:self
|
|
193 |
].
|
|
194 |
changeNrProcessed := nil.
|
|
195 |
] valueNowOrOnUnwindDo:[
|
|
196 |
Class updateChanges:upd.
|
|
197 |
aStream close
|
45
|
198 |
].
|
|
199 |
!
|
|
200 |
|
51
|
201 |
setChangeList
|
|
202 |
"extract type-information from changes and stuff into top selection
|
|
203 |
view"
|
0
|
204 |
|
51
|
205 |
changeListView setList:changeHeaderLines expandTabs:false.
|
|
206 |
"/ changeListView deselect.
|
|
207 |
self disableMenuEntries
|
0
|
208 |
!
|
|
209 |
|
51
|
210 |
silentDeleteChange:changeNr
|
|
211 |
"delete a change do not update changeListView"
|
50
|
212 |
|
51
|
213 |
anyChanges := true.
|
|
214 |
changeChunks removeIndex:changeNr.
|
|
215 |
changePositions removeIndex:changeNr.
|
|
216 |
changeClassNames removeIndex:changeNr.
|
|
217 |
changeHeaderLines removeIndex:changeNr
|
50
|
218 |
!
|
|
219 |
|
37
|
220 |
readChangesFileInBackground:inBackground
|
|
221 |
"read the changes file, create a list of header-lines (changeChunks)
|
51
|
222 |
and a list of chunk-positions (changePositions).
|
|
223 |
Starting with 2.10.3, the entries are multi-col entries;
|
|
224 |
the cols are:
|
|
225 |
1 class/selector
|
|
226 |
2 delta
|
|
227 |
'+' -> new method (w.r.t. current state)
|
|
228 |
'-' -> removed method (w.r.t. current state)
|
|
229 |
'?' -> class does not exist currently
|
|
230 |
3 type of change
|
|
231 |
doit
|
|
232 |
method
|
|
233 |
category change
|
|
234 |
"
|
37
|
235 |
|
51
|
236 |
|aStream maxLen|
|
50
|
237 |
|
|
238 |
maxLen := 60.
|
0
|
239 |
|
|
240 |
aStream := FileStream readonlyFileNamed:changeFileName.
|
|
241 |
aStream isNil ifTrue:[^ nil].
|
|
242 |
|
|
243 |
self withCursor:(Cursor read) do:[
|
51
|
244 |
|tabSpec myProcess myPriority|
|
|
245 |
|
49
|
246 |
tabSpec := TabulatorSpecification new.
|
|
247 |
tabSpec unit:#inch.
|
51
|
248 |
tabSpec positions:#(0 4.5 4.65 5.5 ).
|
|
249 |
" cls>>sel +/- type info"
|
|
250 |
tabSpec align: #(#left #left #left #left).
|
49
|
251 |
|
45
|
252 |
"
|
|
253 |
this is a time consuming operation (especially, if reading an
|
|
254 |
NFS-mounted directory; therefore lower my priority ...
|
|
255 |
"
|
|
256 |
inBackground ifTrue:[
|
|
257 |
myProcess := Processor activeProcess.
|
|
258 |
myPriority := myProcess priority.
|
|
259 |
myProcess priority:(Processor userBackgroundPriority).
|
|
260 |
].
|
51
|
261 |
|
45
|
262 |
[
|
51
|
263 |
|excla|
|
50
|
264 |
|
45
|
265 |
changeChunks := OrderedCollection new.
|
|
266 |
changeHeaderLines := OrderedCollection new.
|
|
267 |
changePositions := OrderedCollection new.
|
|
268 |
excla := aStream class chunkSeparator.
|
0
|
269 |
|
45
|
270 |
[aStream atEnd] whileFalse:[
|
51
|
271 |
|entry changeDelta changeString changeType
|
|
272 |
line s l changeClass sawExcla category
|
|
273 |
chunkText chunkPos|
|
|
274 |
|
45
|
275 |
"
|
|
276 |
get a chunk (separated by excla)
|
|
277 |
"
|
|
278 |
aStream skipSeparators.
|
|
279 |
chunkPos := aStream position.
|
|
280 |
sawExcla := aStream peekFor:excla.
|
|
281 |
chunkText := aStream nextChunk.
|
|
282 |
chunkText notNil ifTrue:[
|
51
|
283 |
|index headerLine|
|
|
284 |
|
45
|
285 |
"
|
|
286 |
only first line is saved in changeChunks ...
|
|
287 |
"
|
|
288 |
index := chunkText indexOf:(Character cr).
|
|
289 |
(index ~~ 0) ifTrue:[
|
|
290 |
chunkText := chunkText copyTo:(index - 1).
|
|
291 |
|
|
292 |
"take care for comment changes - must still be a
|
|
293 |
valid expression for classNameOfChange: to work"
|
|
294 |
|
|
295 |
(chunkText endsWith:'comment:''') ifTrue:[
|
|
296 |
chunkText := chunkText , '...'''
|
|
297 |
]
|
29
|
298 |
|
45
|
299 |
].
|
|
300 |
|
|
301 |
changeChunks add:chunkText.
|
|
302 |
changePositions add:chunkPos.
|
50
|
303 |
headerLine := nil.
|
51
|
304 |
changeDelta := ' '.
|
29
|
305 |
|
45
|
306 |
sawExcla ifFalse:[
|
51
|
307 |
(chunkText startsWith:'''---- snap') ifTrue:[
|
|
308 |
changeType := ''.
|
|
309 |
headerLine := chunkText.
|
|
310 |
changeString := (chunkText contractTo:maxLen).
|
|
311 |
] ifFalse:[
|
|
312 |
|p sel cls|
|
|
313 |
|
49
|
314 |
headerLine := chunkText , ' (doIt)'.
|
50
|
315 |
|
51
|
316 |
"
|
|
317 |
first, assume doIt - then lets have a more detailed look ...
|
|
318 |
"
|
50
|
319 |
changeType := '(doIt)'.
|
|
320 |
changeString := (chunkText contractTo:maxLen).
|
51
|
321 |
|
50
|
322 |
p := Parser parseExpression:chunkText.
|
51
|
323 |
(p notNil
|
|
324 |
and:[p ~~ #Error
|
|
325 |
and:[p isMessage]]) ifTrue:[
|
50
|
326 |
sel := p selector.
|
51
|
327 |
].
|
|
328 |
(sel == #removeSelector:) ifTrue:[
|
|
329 |
p receiver isUnaryMessage ifTrue:[
|
|
330 |
cls := p receiver receiver name.
|
|
331 |
changeClass := (Smalltalk classNamed:cls) class.
|
|
332 |
cls := cls , ' class'.
|
|
333 |
] ifFalse:[
|
|
334 |
cls := p receiver name.
|
|
335 |
changeClass := (Smalltalk classNamed:cls)
|
|
336 |
].
|
|
337 |
sel := (p args at:1) evaluate.
|
|
338 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[
|
|
339 |
changeDelta := '?'
|
|
340 |
] ifFalse:[
|
|
341 |
(changeClass implements:sel asSymbol) ifTrue:[
|
|
342 |
changeDelta := '-'.
|
|
343 |
]
|
|
344 |
].
|
|
345 |
changeType := '(remove)'.
|
|
346 |
changeString := self contractClass:cls selector:sel to:maxLen.
|
|
347 |
].
|
|
348 |
(sel == #category:) ifTrue:[
|
|
349 |
(p receiver isMessage
|
|
350 |
and:[p receiver selector == #compiledMethodAt:]) ifTrue:[
|
|
351 |
p receiver receiver isUnaryMessage ifTrue:[
|
|
352 |
cls := p receiver receiver receiver name.
|
|
353 |
changeClass := (Smalltalk classNamed:cls) class.
|
|
354 |
cls := cls , ' class'.
|
|
355 |
] ifFalse:[
|
50
|
356 |
cls := p receiver receiver name.
|
51
|
357 |
changeClass := (Smalltalk classNamed:cls)
|
50
|
358 |
].
|
51
|
359 |
sel := (p receiver args at:1) evaluate.
|
|
360 |
changeType := '(category change)'.
|
50
|
361 |
changeString := self contractClass:cls selector:sel to:maxLen.
|
|
362 |
]
|
51
|
363 |
]
|
45
|
364 |
].
|
|
365 |
] ifTrue:[
|
51
|
366 |
|done first p sel cls text|
|
|
367 |
|
45
|
368 |
"
|
|
369 |
method definitions actually consist of
|
|
370 |
two (or more) chunks; skip next chunk(s)
|
|
371 |
up to an empty one.
|
|
372 |
The system only writes one chunk,
|
|
373 |
and we cannot handle more in this ChangesBrowser ....
|
|
374 |
"
|
|
375 |
cls := nil.
|
|
376 |
p := Parser parseExpression:chunkText.
|
37
|
377 |
|
45
|
378 |
(p notNil and:[p ~~ #Error]) ifTrue:[
|
|
379 |
sel := p selector.
|
|
380 |
(sel == #methodsFor:) ifTrue:[
|
|
381 |
p receiver isUnaryMessage ifTrue:[
|
|
382 |
cls := p receiver receiver name.
|
51
|
383 |
changeClass := (Smalltalk classNamed:cls) class.
|
|
384 |
cls := cls , ' class'.
|
45
|
385 |
] ifFalse:[
|
51
|
386 |
cls := p receiver name.
|
|
387 |
changeClass := Smalltalk classNamed:cls
|
45
|
388 |
].
|
50
|
389 |
category := (p args at:1) evaluate.
|
|
390 |
].
|
45
|
391 |
].
|
|
392 |
done := false.
|
|
393 |
first := true.
|
|
394 |
[done] whileFalse:[
|
|
395 |
text := aStream nextChunk.
|
|
396 |
text isNil ifTrue:[
|
|
397 |
done := true
|
|
398 |
] ifFalse:[
|
|
399 |
done := text isEmpty
|
|
400 |
].
|
|
401 |
done ifFalse:[
|
|
402 |
first ifFalse:[
|
|
403 |
Transcript showCr:'only one method per ''methodsFor:'' handled'.
|
|
404 |
] ifTrue:[
|
|
405 |
first := false.
|
|
406 |
"
|
|
407 |
try to find the selector
|
|
408 |
"
|
|
409 |
sel := nil.
|
|
410 |
cls notNil ifTrue:[
|
|
411 |
p := Parser
|
|
412 |
parseMethodSpecification:text
|
|
413 |
in:nil
|
|
414 |
ignoreErrors:true
|
|
415 |
ignoreWarnings:true.
|
|
416 |
(p notNil and:[p ~~ #Error]) ifTrue:[
|
|
417 |
sel := p selector.
|
|
418 |
]
|
|
419 |
].
|
50
|
420 |
|
|
421 |
sel isNil ifTrue:[
|
|
422 |
changeString := (chunkText contractTo:maxLen).
|
|
423 |
changeType := '(change)'.
|
|
424 |
] ifFalse:[
|
|
425 |
changeString := self contractClass:cls selector:sel to:maxLen.
|
|
426 |
changeType := '(method in: ''' , category , ''')'.
|
|
427 |
].
|
45
|
428 |
sel isNil ifTrue:[
|
49
|
429 |
headerLine := chunkText , ' (change)'.
|
45
|
430 |
] ifFalse:[
|
49
|
431 |
headerLine := cls , ' ' , sel , ' ' , '(change category: ''' , category , ''')'.
|
51
|
432 |
].
|
|
433 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[
|
|
434 |
changeDelta := '?'
|
|
435 |
] ifFalse:[
|
|
436 |
(changeClass implements:sel asSymbol) ifFalse:[
|
|
437 |
changeDelta := '+'.
|
|
438 |
]
|
45
|
439 |
]
|
|
440 |
]
|
|
441 |
]
|
|
442 |
]
|
49
|
443 |
].
|
51
|
444 |
changeString notNil ifTrue:[
|
|
445 |
entry := MultiColListEntry new.
|
50
|
446 |
entry tabulatorSpecification:tabSpec.
|
|
447 |
entry colAt:1 put:changeString.
|
51
|
448 |
entry colAt:2 put:changeDelta.
|
|
449 |
entry colAt:3 put:changeType.
|
49
|
450 |
changeHeaderLines add:entry
|
|
451 |
] ifFalse:[
|
|
452 |
headerLine notNil ifTrue:[
|
|
453 |
changeHeaderLines add:headerLine
|
|
454 |
]
|
45
|
455 |
]
|
|
456 |
]
|
|
457 |
].
|
|
458 |
changeClassNames := OrderedCollection new grow:(changeChunks size).
|
|
459 |
aStream close.
|
|
460 |
anyChanges := false
|
|
461 |
] valueNowOrOnUnwindDo:[
|
|
462 |
inBackground ifTrue:[myProcess priority:myPriority].
|
|
463 |
].
|
|
464 |
]
|
|
465 |
!
|
37
|
466 |
|
51
|
467 |
contractClass:className selector:selector to:maxLen
|
|
468 |
|s l|
|
|
469 |
|
|
470 |
s := className , ' ', selector.
|
|
471 |
s size > maxLen ifTrue:[
|
|
472 |
l := maxLen - 1 - selector size max:20.
|
|
473 |
s := (className contractTo:l) , ' ' , selector.
|
|
474 |
|
|
475 |
s size > maxLen ifTrue:[
|
|
476 |
l := maxLen - 1 - className size max:20.
|
|
477 |
s := className , ' ', (selector contractTo:l).
|
45
|
478 |
|
51
|
479 |
s size > maxLen ifTrue:[
|
|
480 |
s := (className contractTo:(maxLen // 2 - 1)) , ' ' , (selector contractTo:maxLen // 2)
|
|
481 |
]
|
|
482 |
]
|
|
483 |
].
|
|
484 |
^ s
|
|
485 |
!
|
|
486 |
|
|
487 |
autoSelect:changeNr
|
57
|
488 |
"select a change"
|
|
489 |
|
51
|
490 |
self class autoSelectNext ifTrue:[
|
|
491 |
(changeNr <= changePositions size) ifTrue:[
|
|
492 |
changeListView selection:changeNr.
|
|
493 |
self changeSelection:changeNr.
|
|
494 |
^ self
|
|
495 |
]
|
|
496 |
].
|
57
|
497 |
self clearCodeView.
|
|
498 |
changeListView selection:nil.
|
|
499 |
self disableMenuEntries
|
|
500 |
!
|
|
501 |
|
|
502 |
autoSelectOrEnd:changeNr
|
|
503 |
"select the next change or the last"
|
|
504 |
|
|
505 |
|last|
|
|
506 |
|
|
507 |
last := changePositions size.
|
|
508 |
changeNr < last ifTrue:[
|
|
509 |
self autoSelect:changeNr
|
|
510 |
] ifFalse:[
|
|
511 |
changeListView selection:last .
|
|
512 |
self changeSelection:last.
|
|
513 |
]
|
|
514 |
!
|
|
515 |
|
|
516 |
autoSelectLast
|
|
517 |
"select the last change"
|
|
518 |
|
|
519 |
self autoSelect:(changePositions size)
|
45
|
520 |
!
|
|
521 |
|
51
|
522 |
classNameOfChange:changeNr
|
|
523 |
"return the classname of a change (for xxx class - changes xxx is returned)
|
|
524 |
- since parsing ascii methods is slow, keep result cached in
|
|
525 |
changeClassNames for the next query"
|
|
526 |
|
|
527 |
|chunk aParseTree recTree sel name arg1Tree|
|
|
528 |
|
|
529 |
changeNr isNil ifTrue:[^ nil].
|
|
530 |
|
|
531 |
"
|
|
532 |
first look, if not already known
|
|
533 |
"
|
|
534 |
name := changeClassNames at:changeNr.
|
|
535 |
name notNil ifTrue:[^ name].
|
45
|
536 |
|
51
|
537 |
"
|
|
538 |
get the chunk
|
|
539 |
"
|
|
540 |
chunk := changeChunks at:changeNr.
|
|
541 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty"
|
45
|
542 |
|
51
|
543 |
"
|
|
544 |
use parser to construct a parseTree
|
|
545 |
"
|
|
546 |
aParseTree := Parser parseExpression:chunk.
|
|
547 |
(aParseTree isNil or:[aParseTree == #Error]) ifTrue:[
|
|
548 |
^ nil "seems strange ... (could be a comment)"
|
|
549 |
].
|
|
550 |
aParseTree isMessage ifFalse:[
|
|
551 |
^ nil "very strange ... (whats that ?)"
|
|
552 |
].
|
|
553 |
|
|
554 |
"
|
|
555 |
ask parser for selector
|
|
556 |
"
|
|
557 |
sel := aParseTree selector.
|
|
558 |
recTree := aParseTree receiver.
|
45
|
559 |
|
51
|
560 |
"
|
|
561 |
is it a method-change, methodRemove or comment-change ?
|
|
562 |
"
|
|
563 |
(#(#'methodsFor:'
|
|
564 |
#'privateMethodsFor:'
|
|
565 |
#'protectedMethodsFor:'
|
|
566 |
#'publicMethodsFor:'
|
|
567 |
#'removeSelector:'
|
|
568 |
#'comment:'
|
|
569 |
#'renameCategory:to:'
|
61
|
570 |
#'instanceVariableNames:'
|
51
|
571 |
) includes:sel) ifTrue:[
|
|
572 |
"
|
|
573 |
yes, the className is the receiver
|
|
574 |
"
|
|
575 |
(recTree notNil and:[recTree ~~ #Error]) ifTrue:[
|
|
576 |
recTree isUnaryMessage ifTrue:[
|
|
577 |
(recTree selector ~~ #class) ifTrue:[^ nil].
|
|
578 |
"id class methodsFor:..."
|
|
579 |
recTree := recTree receiver
|
|
580 |
].
|
|
581 |
recTree isPrimary ifTrue:[
|
|
582 |
name := recTree name.
|
|
583 |
changeClassNames at:changeNr put:name.
|
|
584 |
^ name
|
45
|
585 |
]
|
51
|
586 |
].
|
|
587 |
"more strange things"
|
|
588 |
^ nil
|
|
589 |
].
|
|
590 |
|
|
591 |
"
|
|
592 |
is it a change in a class-description ?
|
|
593 |
"
|
|
594 |
('subclass:*' match:sel) ifTrue:[
|
|
595 |
arg1Tree := aParseTree arg1.
|
|
596 |
(arg1Tree notNil and:[arg1Tree isConstant]) ifTrue:[
|
|
597 |
name := arg1Tree value asString.
|
|
598 |
changeClassNames at:changeNr put:name.
|
|
599 |
^ name
|
|
600 |
].
|
|
601 |
"very strange"
|
|
602 |
^ nil
|
|
603 |
].
|
|
604 |
|
|
605 |
"
|
|
606 |
is it a class remove ?
|
|
607 |
"
|
|
608 |
(sel == #removeClass:) ifTrue:[
|
|
609 |
(recTree notNil
|
|
610 |
and:[recTree ~~ #Error
|
|
611 |
and:[recTree isPrimary
|
|
612 |
and:[recTree name = 'Smalltalk']]]) ifTrue:[
|
|
613 |
arg1Tree := aParseTree arg1.
|
|
614 |
(arg1Tree notNil and:[arg1Tree isPrimary]) ifTrue:[
|
|
615 |
name := arg1Tree name.
|
|
616 |
changeClassNames at:changeNr put:name.
|
|
617 |
^ name
|
|
618 |
].
|
45
|
619 |
]
|
|
620 |
].
|
|
621 |
|
51
|
622 |
"
|
|
623 |
is it a method category change ?
|
|
624 |
"
|
|
625 |
(sel == #category:) ifTrue:[
|
|
626 |
(recTree notNil
|
|
627 |
and:[recTree ~~ #Error
|
|
628 |
and:[recTree isMessage
|
|
629 |
and:[recTree selector == #compiledMethodAt:]]]) ifTrue:[
|
|
630 |
recTree := recTree receiver.
|
|
631 |
recTree isUnaryMessage ifTrue:[
|
|
632 |
(recTree selector ~~ #class) ifTrue:[^ nil].
|
|
633 |
"id class "
|
|
634 |
recTree := recTree receiver
|
|
635 |
].
|
|
636 |
recTree isPrimary ifTrue:[
|
|
637 |
name := recTree name.
|
|
638 |
changeClassNames at:changeNr put:name.
|
|
639 |
^ name
|
|
640 |
]
|
|
641 |
]
|
45
|
642 |
].
|
51
|
643 |
^ nil
|
45
|
644 |
!
|
|
645 |
|
|
646 |
writeBackChanges
|
|
647 |
"write back the changes file"
|
|
648 |
|
51
|
649 |
|inStream outStream|
|
45
|
650 |
|
|
651 |
outStream := FileStream newFileNamed:'n_changes'.
|
|
652 |
outStream isNil ifTrue:[
|
|
653 |
self warn:'cannot create temporary file'.
|
|
654 |
^ self
|
|
655 |
].
|
|
656 |
|
|
657 |
inStream := FileStream readonlyFileNamed:changeFileName.
|
|
658 |
inStream isNil ifTrue:[^ nil].
|
|
659 |
|
|
660 |
self withCursor:(Cursor write) do:[
|
51
|
661 |
|excla sawExcla done dir chunk
|
|
662 |
nChanges "{Class:SmallInteger}" |
|
|
663 |
|
45
|
664 |
excla := inStream class chunkSeparator.
|
51
|
665 |
nChanges := changePositions size.
|
|
666 |
|
|
667 |
1 to:nChanges do:[:index |
|
45
|
668 |
inStream position:(changePositions at:index).
|
|
669 |
sawExcla := inStream peekFor:excla.
|
|
670 |
chunk := inStream nextChunk.
|
|
671 |
|
|
672 |
sawExcla ifTrue:[
|
|
673 |
outStream nextPut:excla.
|
|
674 |
outStream nextChunkPut:chunk.
|
|
675 |
outStream cr.
|
51
|
676 |
"
|
|
677 |
a method-definition chunk - skip followups
|
|
678 |
"
|
45
|
679 |
done := false.
|
|
680 |
[done] whileFalse:[
|
|
681 |
chunk := inStream nextChunk.
|
|
682 |
chunk isNil ifTrue:[
|
|
683 |
done := true
|
|
684 |
] ifFalse:[
|
|
685 |
outStream nextChunkPut:chunk.
|
|
686 |
outStream cr.
|
|
687 |
done := chunk isEmpty
|
|
688 |
]
|
|
689 |
].
|
|
690 |
] ifFalse:[
|
|
691 |
outStream nextChunkPut:chunk.
|
|
692 |
outStream cr
|
|
693 |
]
|
|
694 |
].
|
|
695 |
outStream close.
|
|
696 |
inStream close.
|
|
697 |
dir := FileDirectory currentDirectory.
|
51
|
698 |
dir renameFile:changeFileName newName:'changes.bak'.
|
45
|
699 |
dir renameFile:'n_changes' newName:changeFileName.
|
|
700 |
anyChanges := false
|
|
701 |
]
|
|
702 |
!
|
0
|
703 |
|
|
704 |
deleteChange:changeNr
|
|
705 |
"delete a change"
|
|
706 |
|
|
707 |
changeListView deselect.
|
|
708 |
self silentDeleteChange:changeNr.
|
51
|
709 |
self setChangeList
|
45
|
710 |
|
|
711 |
!
|
|
712 |
|
51
|
713 |
queryCloseText
|
|
714 |
"made this a method for easy redefinition in subclasses"
|
45
|
715 |
|
51
|
716 |
^ 'Quit without updating changeFile ?'
|
0
|
717 |
!
|
|
718 |
|
|
719 |
compareChange:changeNr
|
|
720 |
"compare a change with current version"
|
|
721 |
|
|
722 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource
|
29
|
723 |
parser sel oldMethod outcome showDiff d|
|
0
|
724 |
|
|
725 |
aStream := self streamForChange:changeNr.
|
|
726 |
aStream isNil ifTrue:[^ self].
|
28
|
727 |
|
0
|
728 |
sawExcla := aStream peekFor:(aStream class chunkSeparator).
|
|
729 |
chunk := aStream nextChunk.
|
|
730 |
sawExcla ifFalse:[
|
45
|
731 |
outcome := 'not comparable ...'
|
0
|
732 |
] ifTrue:[
|
45
|
733 |
parseTree := Parser parseExpression:chunk.
|
|
734 |
(parseTree notNil and:[parseTree isMessage]) ifTrue:[
|
|
735 |
(parseTree selector == #methodsFor:) ifTrue:[
|
|
736 |
thisClass := (parseTree receiver evaluate).
|
|
737 |
thisClass isBehavior ifTrue:[
|
|
738 |
showDiff := false.
|
|
739 |
cat := parseTree arg1 evaluate.
|
|
740 |
newSource := aStream nextChunk.
|
|
741 |
parser := Parser parseMethod:newSource in:thisClass.
|
|
742 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[
|
|
743 |
sel := parser selector.
|
|
744 |
oldMethod := thisClass compiledMethodAt:sel.
|
|
745 |
oldMethod notNil ifTrue:[
|
|
746 |
(oldMethod category = cat) ifFalse:[
|
|
747 |
Transcript showCr:'category changed.'.
|
|
748 |
].
|
|
749 |
oldSource := oldMethod source.
|
|
750 |
(oldSource = newSource) ifTrue:[
|
|
751 |
outcome := 'same source'
|
|
752 |
] ifFalse:[
|
|
753 |
outcome := 'source changed.'.
|
|
754 |
showDiff := true
|
|
755 |
]
|
|
756 |
] ifFalse:[
|
|
757 |
outcome := 'method does not exist.'
|
|
758 |
]
|
|
759 |
] ifFalse:[
|
|
760 |
outcome := 'change unparsable.'
|
|
761 |
].
|
|
762 |
(showDiff and:[oldSource notNil and:[newSource notNil]]) ifTrue:[
|
|
763 |
d := DiffTextView openOn:oldSource and:newSource.
|
|
764 |
d label:'differences (current left; change right)'.
|
|
765 |
]
|
|
766 |
] ifFalse:[
|
|
767 |
outcome := 'class does not exist.'
|
|
768 |
]
|
|
769 |
] ifFalse:[
|
|
770 |
outcome := 'not comparable.'
|
|
771 |
]
|
|
772 |
] ifFalse:[
|
|
773 |
outcome := 'not comparable.'
|
|
774 |
]
|
0
|
775 |
].
|
28
|
776 |
Transcript showCr:outcome.
|
|
777 |
aStream close.
|
0
|
778 |
!
|
|
779 |
|
51
|
780 |
deleteChangesFrom:start to:stop
|
|
781 |
"delete a range of changes"
|
|
782 |
|
|
783 |
changeListView deselect.
|
|
784 |
stop to:start by:-1 do:[:changeNr |
|
|
785 |
self silentDeleteChange:changeNr
|
|
786 |
].
|
|
787 |
self setChangeList
|
|
788 |
|
|
789 |
!
|
|
790 |
|
|
791 |
changeFileName:aFileName
|
|
792 |
changeFileName := aFileName
|
|
793 |
!
|
|
794 |
|
|
795 |
readChangesFile
|
|
796 |
"read the changes file, create a list of header-lines (changeChunks)
|
|
797 |
and a list of chunk-positions (changePositions)"
|
|
798 |
|
|
799 |
^ self readChangesFileInBackground:false
|
|
800 |
!
|
|
801 |
|
28
|
802 |
appendChange:changeNr toFile:fileName
|
37
|
803 |
"append change to a file. return true if ok."
|
0
|
804 |
|
37
|
805 |
|aStream outStream chunk sawExcla separator|
|
0
|
806 |
|
28
|
807 |
outStream := FileStream oldFileNamed:fileName.
|
0
|
808 |
outStream isNil ifTrue:[
|
45
|
809 |
outStream isNil ifTrue:[
|
|
810 |
outStream := FileStream newFileNamed:fileName.
|
|
811 |
outStream isNil ifTrue:[
|
|
812 |
self warn:'cannot update file ''%1''' with:fileName.
|
|
813 |
^ false
|
|
814 |
]
|
|
815 |
]
|
0
|
816 |
].
|
37
|
817 |
|
0
|
818 |
outStream setToEnd.
|
28
|
819 |
|
0
|
820 |
aStream := self streamForChange:changeNr.
|
37
|
821 |
aStream isNil ifTrue:[
|
45
|
822 |
self warn:'oops cannot read change'.
|
|
823 |
^ false
|
37
|
824 |
].
|
|
825 |
|
|
826 |
separator := aStream class chunkSeparator.
|
|
827 |
sawExcla := aStream peekFor:separator.
|
0
|
828 |
sawExcla ifTrue:[
|
45
|
829 |
outStream nextPut:separator
|
0
|
830 |
].
|
|
831 |
chunk := aStream nextChunk.
|
|
832 |
outStream nextChunkPut:chunk.
|
|
833 |
outStream cr.
|
|
834 |
sawExcla ifTrue:[
|
45
|
835 |
chunk := aStream nextChunk.
|
|
836 |
outStream nextChunkPut:chunk.
|
|
837 |
outStream space
|
0
|
838 |
].
|
|
839 |
sawExcla ifTrue:[
|
45
|
840 |
outStream nextPut:separator
|
0
|
841 |
].
|
|
842 |
outStream cr.
|
|
843 |
aStream close.
|
37
|
844 |
outStream close.
|
|
845 |
^ true
|
0
|
846 |
!
|
|
847 |
|
28
|
848 |
makeChangeAPatch:changeNr
|
|
849 |
"append change to patchfile"
|
|
850 |
|
|
851 |
self appendChange:changeNr toFile:'patches'
|
|
852 |
!
|
|
853 |
|
0
|
854 |
makeChangePermanent:changeNr
|
28
|
855 |
"rewrite the source file where change changeNr lies"
|
0
|
856 |
|
|
857 |
self notify:'this is not yet implemented'
|
|
858 |
!
|
|
859 |
|
45
|
860 |
silentDeleteChangesFor:aClassName from:start to:stop
|
|
861 |
"delete changes for a given class in a range"
|
|
862 |
|
|
863 |
|thisClassName index|
|
0
|
864 |
|
45
|
865 |
index := stop.
|
|
866 |
[index >= start] whileTrue:[
|
|
867 |
thisClassName := self classNameOfChange:index.
|
|
868 |
thisClassName = aClassName ifTrue:[
|
|
869 |
self silentDeleteChange:index
|
|
870 |
].
|
|
871 |
index := index - 1
|
|
872 |
]
|
0
|
873 |
|
|
874 |
! !
|
|
875 |
|
51
|
876 |
!ChangesBrowser methodsFor:'initialize / release'!
|
|
877 |
|
|
878 |
initialize
|
|
879 |
|frame v|
|
|
880 |
|
|
881 |
super initialize.
|
|
882 |
|
|
883 |
changeFileName := 'changes'.
|
|
884 |
|
|
885 |
frame := VariableVerticalPanel origin:(0.0 @ 0.0)
|
|
886 |
corner:(1.0 @ 1.0)
|
|
887 |
borderWidth:0
|
|
888 |
in:self.
|
|
889 |
|
|
890 |
v := ScrollableView for:SelectionInListView in:frame.
|
|
891 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.3).
|
|
892 |
changeListView := v scrolledView.
|
|
893 |
|
|
894 |
v := HVScrollableView for:CodeView miniScrollerH:true miniScrollerV:false in:frame.
|
|
895 |
v origin:(0.0 @ 0.3) corner:(1.0 @ 1.0).
|
|
896 |
codeView := v scrolledView.
|
|
897 |
codeView readOnly.
|
|
898 |
|
|
899 |
anyChanges := false.
|
|
900 |
ObjectMemory addDependent:self. "to get shutdown-update"
|
|
901 |
!
|
|
902 |
|
|
903 |
initializeMiddleButtonMenu
|
|
904 |
|labels|
|
|
905 |
|
|
906 |
labels := resources array:#(
|
|
907 |
'apply change'
|
|
908 |
'apply changes to end'
|
|
909 |
'apply changes for this class to end'
|
|
910 |
'apply all changes'
|
|
911 |
'-'
|
|
912 |
'delete'
|
|
913 |
'delete to end'
|
|
914 |
'delete changes for this class to end'
|
|
915 |
'delete all changes for this class'
|
|
916 |
'-'
|
|
917 |
'update'
|
|
918 |
'compress'
|
|
919 |
'compare with current version'
|
|
920 |
'browse class'
|
|
921 |
'-'
|
|
922 |
'make change a patch'
|
|
923 |
"/ 'update sourcefile from change'
|
|
924 |
"/ '-'
|
|
925 |
'save change in file ...'
|
|
926 |
'save changes to end in file ...'
|
|
927 |
'save changes for this class to end in file ...'
|
|
928 |
'save all changes for this class in file ...'
|
|
929 |
'-'
|
|
930 |
'writeback changeFile').
|
|
931 |
|
|
932 |
changeListView
|
|
933 |
middleButtonMenu:(PopUpMenu
|
|
934 |
labels:labels
|
|
935 |
selectors:#(
|
|
936 |
doApply
|
|
937 |
doApplyRest
|
|
938 |
doApplyClassRest
|
|
939 |
doApplyAll
|
|
940 |
nil
|
|
941 |
doDelete
|
|
942 |
doDeleteRest
|
|
943 |
doDeleteClassRest
|
|
944 |
doDeleteClassAll
|
|
945 |
nil
|
|
946 |
doUpdate
|
|
947 |
doCompress
|
|
948 |
doCompare
|
|
949 |
doBrowse
|
|
950 |
nil
|
|
951 |
doMakePatch
|
|
952 |
"/ doMakePermanent
|
|
953 |
"/ nil
|
|
954 |
doSave
|
|
955 |
doSaveRest
|
|
956 |
doSaveClassRest
|
|
957 |
doSaveClassAll
|
|
958 |
nil
|
|
959 |
doWriteBack)
|
|
960 |
receiver:self
|
|
961 |
for:changeListView)
|
|
962 |
!
|
|
963 |
|
|
964 |
realize
|
|
965 |
super realize.
|
|
966 |
self readChangesFileInBackground:true.
|
|
967 |
self setChangeList.
|
|
968 |
changeListView action:[:lineNr | self changeSelection:lineNr].
|
|
969 |
self disableMenuEntries.
|
|
970 |
!
|
|
971 |
|
57
|
972 |
focusSequence
|
|
973 |
^ Array with:changeListView with:codeView
|
|
974 |
!
|
|
975 |
|
51
|
976 |
update:what
|
|
977 |
|box|
|
|
978 |
|
|
979 |
(what == #aboutToExit) ifTrue:[
|
|
980 |
"
|
|
981 |
smalltalk is about to shut down -
|
|
982 |
- if change list was modified, ask user and save if requested.
|
|
983 |
"
|
|
984 |
anyChanges ifTrue:[
|
|
985 |
shown ifFalse:[
|
|
986 |
self unrealize.
|
|
987 |
self realize
|
|
988 |
].
|
|
989 |
self raise.
|
|
990 |
|
|
991 |
box := YesNoBox new.
|
|
992 |
box title:(resources at:'ChangesBrowser:\changefile has not been updated from the modified changelist.\\Update before exiting ?') withCRs.
|
|
993 |
box noText:(resources at:'don''t update').
|
|
994 |
box okText:(resources at:'update').
|
|
995 |
box yesAction:[self writeBackChanges]
|
|
996 |
noAction:[].
|
|
997 |
box showAtPointer
|
|
998 |
].
|
|
999 |
^ self
|
|
1000 |
].
|
|
1001 |
super update:what
|
|
1002 |
! !
|
|
1003 |
|
0
|
1004 |
!ChangesBrowser methodsFor:'user interaction'!
|
|
1005 |
|
|
1006 |
changeSelection:lineNr
|
|
1007 |
"show a change in the codeView"
|
|
1008 |
|
|
1009 |
|aStream sawExcla chunk|
|
|
1010 |
|
|
1011 |
aStream := self streamForChange:lineNr.
|
|
1012 |
aStream isNil ifTrue:[^ self].
|
|
1013 |
sawExcla := aStream peekFor:(aStream class chunkSeparator).
|
|
1014 |
chunk := aStream nextChunk.
|
|
1015 |
sawExcla ifTrue:[
|
45
|
1016 |
chunk := aStream nextChunk
|
0
|
1017 |
].
|
|
1018 |
aStream close.
|
|
1019 |
codeView contents:chunk.
|
13
|
1020 |
codeView acceptAction:[:theCode | self doApply "noChangesAllowed"].
|
15
|
1021 |
changeNrShown := lineNr.
|
|
1022 |
self enableMenuEntries
|
0
|
1023 |
!
|
|
1024 |
|
51
|
1025 |
doApply
|
|
1026 |
"user wants a change to be applied"
|
|
1027 |
|
|
1028 |
|changeNr|
|
|
1029 |
|
|
1030 |
changeNr := changeListView selection.
|
|
1031 |
changeNr notNil ifTrue:[
|
|
1032 |
self withCursor:(Cursor execute) do:[
|
|
1033 |
skipSignal := nil.
|
|
1034 |
self applyChange:changeNr.
|
|
1035 |
self autoSelect:(changeNr + 1)
|
|
1036 |
]
|
|
1037 |
]
|
|
1038 |
!
|
|
1039 |
|
45
|
1040 |
noChangesAllowed
|
|
1041 |
"show a warning that changes cannot be changed"
|
|
1042 |
|
|
1043 |
self warn:'changes are not allowed to be changed'
|
|
1044 |
!
|
|
1045 |
|
37
|
1046 |
doSaveClass
|
|
1047 |
"user wants changes for some class from current to end to be appended to a file"
|
|
1048 |
|
|
1049 |
self doSaveClassFrom:1
|
|
1050 |
!
|
|
1051 |
|
|
1052 |
doSaveClassAll
|
|
1053 |
"user wants changes for some class from current to end to be appended to a file"
|
|
1054 |
|
|
1055 |
self doSaveClassFrom:1
|
|
1056 |
!
|
|
1057 |
|
|
1058 |
doSaveClassRest
|
|
1059 |
"user wants changes for some class from current to end to be appended to a file"
|
28
|
1060 |
|
|
1061 |
|changeNr|
|
|
1062 |
|
|
1063 |
changeNr := changeListView selection.
|
|
1064 |
changeNr notNil ifTrue:[
|
45
|
1065 |
self doSaveClassFrom:changeNr
|
37
|
1066 |
]
|
|
1067 |
!
|
|
1068 |
|
45
|
1069 |
doBrowse
|
|
1070 |
"user wants a browser on the class of a change"
|
|
1071 |
|
|
1072 |
|changeNr className cls|
|
|
1073 |
|
|
1074 |
changeNr := changeListView selection.
|
|
1075 |
changeNr notNil ifTrue:[
|
|
1076 |
className := self classNameOfChange:changeNr.
|
|
1077 |
className notNil ifTrue:[
|
|
1078 |
(cls := Smalltalk classNamed:className) notNil ifTrue:[
|
|
1079 |
SystemBrowser browseClass:cls
|
|
1080 |
]
|
|
1081 |
]
|
37
|
1082 |
]
|
|
1083 |
!
|
|
1084 |
|
51
|
1085 |
saveClass:aClassName from:startNr
|
|
1086 |
"user wants changes from current to end to be appended to a file"
|
|
1087 |
|
|
1088 |
|changeNr fileBox|
|
|
1089 |
|
|
1090 |
changeNr := changeListView selection.
|
|
1091 |
changeNr notNil ifTrue:[
|
|
1092 |
fileBox := FileSelectionBox new.
|
|
1093 |
fileBox title:'append change to:'.
|
|
1094 |
fileBox okText:'append'.
|
|
1095 |
fileBox abortText:'cancel'.
|
|
1096 |
fileBox action:[:fileName |
|
|
1097 |
|thisClassName|
|
|
1098 |
|
|
1099 |
self withCursor:(Cursor write) do:[
|
|
1100 |
startNr to:(changePositions size) do:[:changeNr |
|
|
1101 |
thisClassName := self classNameOfChange:changeNr.
|
|
1102 |
thisClassName = aClassName ifTrue:[
|
|
1103 |
changeListView selection:changeNr.
|
|
1104 |
(self appendChange:changeNr toFile:fileName) ifFalse:[
|
|
1105 |
^ self
|
|
1106 |
]
|
|
1107 |
]
|
|
1108 |
]
|
|
1109 |
]
|
|
1110 |
].
|
|
1111 |
|
|
1112 |
fileBox pattern:'*.chg'.
|
|
1113 |
fileBox showAtPointer
|
|
1114 |
]
|
|
1115 |
!
|
|
1116 |
|
37
|
1117 |
doSaveClassFrom:startNr
|
|
1118 |
"user wants changes from current to end to be appended to a file"
|
|
1119 |
|
|
1120 |
|changeNr classNameToSave|
|
|
1121 |
|
|
1122 |
changeNr := changeListView selection.
|
|
1123 |
changeNr notNil ifTrue:[
|
45
|
1124 |
classNameToSave := self classNameOfChange:changeNr.
|
|
1125 |
classNameToSave notNil ifTrue:[
|
|
1126 |
self saveClass:classNameToSave from:startNr
|
|
1127 |
]
|
37
|
1128 |
]
|
|
1129 |
!
|
|
1130 |
|
|
1131 |
doSaveRest
|
|
1132 |
"user wants changes from current to end to be appended to a file"
|
|
1133 |
|
|
1134 |
|changeNr fileBox|
|
|
1135 |
|
|
1136 |
changeNr := changeListView selection.
|
|
1137 |
changeNr notNil ifTrue:[
|
45
|
1138 |
fileBox := FileSelectionBox new.
|
|
1139 |
fileBox title:'append change to:'.
|
|
1140 |
fileBox okText:'append'.
|
|
1141 |
fileBox abortText:'cancel'.
|
|
1142 |
fileBox action:[:fileName |
|
|
1143 |
self withCursor:(Cursor write) do:[
|
49
|
1144 |
changeNr to:(changePositions size) do:[:changeNr |
|
45
|
1145 |
changeListView selection:changeNr.
|
|
1146 |
(self appendChange:changeNr toFile:fileName) ifFalse:[
|
|
1147 |
^ self
|
|
1148 |
]
|
|
1149 |
]
|
|
1150 |
]
|
|
1151 |
].
|
37
|
1152 |
|
45
|
1153 |
fileBox pattern:'*.chg'.
|
|
1154 |
fileBox showAtPointer
|
37
|
1155 |
]
|
|
1156 |
!
|
|
1157 |
|
51
|
1158 |
doDelete
|
|
1159 |
"delete currently selected change"
|
|
1160 |
|
|
1161 |
|changeNr|
|
|
1162 |
|
|
1163 |
changeNr := changeListView selection.
|
|
1164 |
changeNr notNil ifTrue:[
|
|
1165 |
self deleteChange:changeNr.
|
|
1166 |
self autoSelectOrEnd:changeNr
|
|
1167 |
]
|
|
1168 |
!
|
|
1169 |
|
37
|
1170 |
doSave
|
|
1171 |
"user wants a change to be appended to a file"
|
|
1172 |
|
|
1173 |
|changeNr fileBox|
|
|
1174 |
|
|
1175 |
changeNr := changeListView selection.
|
|
1176 |
changeNr notNil ifTrue:[
|
45
|
1177 |
fileBox := FileSelectionBox new.
|
|
1178 |
fileBox title:'append change to:'.
|
|
1179 |
fileBox okText:'append'.
|
|
1180 |
fileBox abortText:'cancel'.
|
|
1181 |
fileBox action:[:fileName |
|
|
1182 |
self withCursor:(Cursor write) do:[
|
|
1183 |
self appendChange:changeNr toFile:fileName.
|
|
1184 |
].
|
|
1185 |
self autoSelect:(changeNr + 1)
|
|
1186 |
].
|
28
|
1187 |
|
45
|
1188 |
fileBox pattern:'*.chg'.
|
|
1189 |
fileBox showAtPointer
|
28
|
1190 |
]
|
|
1191 |
!
|
|
1192 |
|
51
|
1193 |
doUpdate
|
|
1194 |
"reread the changes-file"
|
|
1195 |
|
|
1196 |
self readChangesFileInBackground:true.
|
|
1197 |
realized ifTrue:[
|
|
1198 |
self setChangeList.
|
|
1199 |
changeListView hasSelection ifTrue:[self enableMenuEntries]
|
|
1200 |
]
|
|
1201 |
!
|
|
1202 |
|
0
|
1203 |
doMakePermanent
|
|
1204 |
"user wants a change to be made permanent
|
|
1205 |
- rewrite the source file where this change has to go"
|
|
1206 |
|
51
|
1207 |
|yesNoBox|
|
0
|
1208 |
|
28
|
1209 |
yesNoBox := YesNoBox new.
|
1
|
1210 |
yesNoBox title:(resources at:'Warning: this operation cannot be undone').
|
28
|
1211 |
yesNoBox okText:(resources at:'continue').
|
1
|
1212 |
yesNoBox noText:(resources at:'abort').
|
51
|
1213 |
yesNoBox okAction:[ |changeNr|
|
|
1214 |
|
45
|
1215 |
changeNr := changeListView selection.
|
|
1216 |
changeNr notNil ifTrue:[
|
|
1217 |
self makeChangePermanent:changeNr.
|
|
1218 |
self autoSelect:(changeNr + 1)
|
|
1219 |
]
|
|
1220 |
].
|
0
|
1221 |
yesNoBox showAtPointer
|
|
1222 |
!
|
|
1223 |
|
|
1224 |
doMakePatch
|
|
1225 |
"user wants a change to be made a patch
|
|
1226 |
- copy it over to the patches file"
|
|
1227 |
|
|
1228 |
|changeNr|
|
|
1229 |
|
|
1230 |
changeNr := changeListView selection.
|
|
1231 |
changeNr notNil ifTrue:[
|
45
|
1232 |
self makeChangeAPatch:changeNr.
|
|
1233 |
self autoSelect:(changeNr + 1)
|
0
|
1234 |
]
|
|
1235 |
!
|
|
1236 |
|
45
|
1237 |
doApplyRest
|
|
1238 |
"user wants all changes from changeNr to be applied"
|
|
1239 |
|
|
1240 |
|changeNr|
|
|
1241 |
|
|
1242 |
changeNr := changeListView selection.
|
|
1243 |
changeNr notNil ifTrue:[
|
|
1244 |
self withCursor:(Cursor execute) do:[
|
|
1245 |
self clearCodeView.
|
|
1246 |
skipSignal isNil ifTrue:[skipSignal := Signal new].
|
51
|
1247 |
changeNr to:(changePositions size) do:[:changeNr |
|
45
|
1248 |
changeListView selection:changeNr.
|
|
1249 |
self applyChange:changeNr
|
51
|
1250 |
].
|
57
|
1251 |
self autoSelect:changePositions size.
|
49
|
1252 |
]
|
|
1253 |
]
|
|
1254 |
!
|
|
1255 |
|
|
1256 |
doDeleteRest
|
|
1257 |
"delete all changes from current to the end"
|
|
1258 |
|
|
1259 |
|changeNr|
|
|
1260 |
|
|
1261 |
changeNr := changeListView selection.
|
|
1262 |
changeNr notNil ifTrue:[
|
|
1263 |
self deleteChangesFrom:changeNr to:(changePositions size).
|
|
1264 |
self clearCodeView.
|
|
1265 |
self autoSelectOrEnd:changeNr-1
|
|
1266 |
]
|
|
1267 |
!
|
|
1268 |
|
45
|
1269 |
doCompress
|
|
1270 |
"compress the change-set; this replaces multiple method-changes by the last
|
|
1271 |
(i.e. the most recent) change"
|
|
1272 |
|
51
|
1273 |
|aStream searchIndex anyMore deleteSet index
|
|
1274 |
str snapshotProto snapshotPrefix snapshotNameIndex fileName|
|
45
|
1275 |
|
|
1276 |
aStream := FileStream readonlyFileNamed:changeFileName.
|
|
1277 |
aStream isNil ifTrue:[^ self].
|
|
1278 |
|
58
|
1279 |
CompressSnapshotInfo == true ifTrue:[
|
|
1280 |
"
|
|
1281 |
get a prototype snapshot record (to be independent of
|
|
1282 |
the actual format ..
|
|
1283 |
"
|
|
1284 |
str := WriteStream on:String new.
|
|
1285 |
Class addChangeRecordForSnapshot:'foo' to:str.
|
|
1286 |
snapshotProto := str contents.
|
|
1287 |
snapshotPrefix := snapshotProto copyTo:10.
|
|
1288 |
snapshotNameIndex := snapshotProto findString:'foo'.
|
|
1289 |
].
|
45
|
1290 |
|
|
1291 |
self withCursor:(Cursor execute) do:[
|
51
|
1292 |
|numChanges classes selectors types excla sawExcla
|
|
1293 |
changeNr chunk aParseTree parseTreeChunk
|
|
1294 |
thisClass thisSelector codeChunk codeParser|
|
|
1295 |
|
45
|
1296 |
numChanges := changePositions size.
|
|
1297 |
classes := Array new:numChanges.
|
|
1298 |
selectors := Array new:numChanges.
|
|
1299 |
types := Array new:numChanges.
|
|
1300 |
|
|
1301 |
"starting at the end, get the change class and change selector;
|
|
1302 |
collect all in classes / selectors"
|
|
1303 |
|
|
1304 |
changeNr := numChanges.
|
|
1305 |
excla := aStream class chunkSeparator.
|
|
1306 |
|
|
1307 |
[changeNr >= 1] whileTrue:[
|
|
1308 |
aStream position:(changePositions at:changeNr).
|
|
1309 |
sawExcla := aStream peekFor:excla.
|
|
1310 |
chunk := aStream nextChunk.
|
|
1311 |
sawExcla ifTrue:[
|
|
1312 |
"optimize a bit if multiple methods for same category arrive"
|
|
1313 |
(chunk = parseTreeChunk) ifFalse:[
|
|
1314 |
aParseTree := Parser parseExpression:chunk.
|
|
1315 |
parseTreeChunk := chunk
|
|
1316 |
].
|
|
1317 |
(aParseTree notNil
|
|
1318 |
and:[(aParseTree ~~ #Error)
|
|
1319 |
and:[aParseTree isMessage]]) ifTrue:[
|
|
1320 |
(aParseTree selector == #methodsFor:) ifTrue:[
|
|
1321 |
thisClass := (aParseTree receiver evaluate).
|
|
1322 |
codeChunk := aStream nextChunk.
|
|
1323 |
codeParser := Parser
|
|
1324 |
parseMethodSpecification:codeChunk
|
|
1325 |
in:thisClass
|
|
1326 |
ignoreErrors:true
|
|
1327 |
ignoreWarnings:true.
|
|
1328 |
codeParser notNil ifTrue:[
|
|
1329 |
selectors at:changeNr put:(codeParser selector).
|
|
1330 |
classes at:changeNr put:thisClass.
|
|
1331 |
types at:changeNr put:#methodsFor
|
|
1332 |
]
|
|
1333 |
]
|
|
1334 |
]
|
|
1335 |
] ifFalse:[
|
|
1336 |
aParseTree := Parser parseExpression:chunk.
|
|
1337 |
parseTreeChunk := chunk.
|
|
1338 |
(aParseTree notNil
|
|
1339 |
and:[(aParseTree ~~ #Error)
|
|
1340 |
and:[aParseTree isMessage]]) ifTrue:[
|
|
1341 |
(aParseTree selector == #removeSelector:) ifTrue:[
|
|
1342 |
selectors at:changeNr put:(aParseTree arg1 value ).
|
|
1343 |
classes at:changeNr put:(aParseTree receiver evaluate).
|
|
1344 |
types at:changeNr put:#removeSelector
|
|
1345 |
]
|
|
1346 |
] ifFalse:[
|
58
|
1347 |
CompressSnapshotInfo == true ifTrue:[
|
|
1348 |
(chunk startsWith:snapshotPrefix) ifTrue:[
|
|
1349 |
str := chunk readStream position:snapshotNameIndex.
|
|
1350 |
fileName := str upTo:(Character space).
|
|
1351 |
"
|
|
1352 |
kludge to allow use of match-check below
|
|
1353 |
"
|
|
1354 |
selectors at:changeNr put:snapshotPrefix.
|
|
1355 |
classes at:changeNr put:fileName.
|
|
1356 |
]
|
45
|
1357 |
]
|
|
1358 |
]
|
|
1359 |
].
|
|
1360 |
changeNr := changeNr - 1
|
|
1361 |
].
|
|
1362 |
aStream close.
|
|
1363 |
|
|
1364 |
"for all changes, look for another class/selector occurence later
|
|
1365 |
in the list and, if there is one, add change number to the delete set"
|
|
1366 |
|
|
1367 |
deleteSet := OrderedCollection new.
|
|
1368 |
changeNr := 1.
|
|
1369 |
[changeNr < changePositions size] whileTrue:[
|
|
1370 |
thisClass := classes at:changeNr.
|
|
1371 |
thisSelector := selectors at:changeNr.
|
|
1372 |
searchIndex := changeNr.
|
|
1373 |
anyMore := true.
|
|
1374 |
[anyMore] whileTrue:[
|
|
1375 |
searchIndex := classes indexOf:thisClass
|
|
1376 |
startingAt:(searchIndex + 1).
|
|
1377 |
(searchIndex ~~ 0) ifTrue:[
|
|
1378 |
((selectors at:searchIndex) == thisSelector) ifTrue:[
|
|
1379 |
thisClass notNil ifTrue:[
|
|
1380 |
deleteSet add:changeNr.
|
|
1381 |
anyMore := false
|
|
1382 |
]
|
|
1383 |
]
|
|
1384 |
] ifFalse:[
|
|
1385 |
anyMore := false
|
|
1386 |
]
|
|
1387 |
].
|
|
1388 |
changeNr := changeNr + 1
|
|
1389 |
].
|
|
1390 |
|
|
1391 |
"finally delete what has been found"
|
|
1392 |
|
|
1393 |
(deleteSet size > 0) ifTrue:[
|
51
|
1394 |
changeListView deselect.
|
45
|
1395 |
index := deleteSet size.
|
|
1396 |
[index > 0] whileTrue:[
|
|
1397 |
self silentDeleteChange:(deleteSet at:index).
|
|
1398 |
index := index - 1
|
|
1399 |
].
|
|
1400 |
self setChangeList.
|
51
|
1401 |
"
|
|
1402 |
scroll back a bit, if we are left way behind the list
|
|
1403 |
"
|
49
|
1404 |
changeListView firstLineShown > changePositions size ifTrue:[
|
|
1405 |
changeListView makeLineVisible:changePositions size
|
45
|
1406 |
].
|
|
1407 |
self clearCodeView
|
|
1408 |
]
|
|
1409 |
]
|
|
1410 |
!
|
|
1411 |
|
51
|
1412 |
doApplyAll
|
|
1413 |
"user wants all changes to be applied"
|
45
|
1414 |
|
51
|
1415 |
self withCursor:(Cursor execute) do:[
|
|
1416 |
self clearCodeView.
|
|
1417 |
skipSignal isNil ifTrue:[skipSignal := Signal new].
|
|
1418 |
1 to:(changePositions size) do:[:changeNr |
|
|
1419 |
changeListView selection:changeNr.
|
|
1420 |
self applyChange:changeNr
|
|
1421 |
].
|
57
|
1422 |
self autoSelectLast
|
0
|
1423 |
]
|
|
1424 |
!
|
|
1425 |
|
|
1426 |
doCompare
|
|
1427 |
"compare change with current system version
|
|
1428 |
- give a note in transcript"
|
|
1429 |
|
|
1430 |
|changeNr|
|
|
1431 |
|
|
1432 |
changeNr := changeListView selection.
|
|
1433 |
changeNr notNil ifTrue:[
|
45
|
1434 |
self withCursor:(Cursor execute) do:[
|
|
1435 |
self compareChange:changeNr
|
|
1436 |
]
|
0
|
1437 |
]
|
51
|
1438 |
!
|
|
1439 |
|
|
1440 |
doDeleteClassRest
|
|
1441 |
"delete rest of changes with same class as currently selected change"
|
|
1442 |
|
|
1443 |
|changeNr|
|
|
1444 |
|
|
1445 |
changeNr := changeListView selection.
|
|
1446 |
changeNr notNil ifTrue:[
|
|
1447 |
self withCursor:(Cursor execute) do:[
|
|
1448 |
| classNameToDelete |
|
|
1449 |
|
|
1450 |
classNameToDelete := self classNameOfChange:changeNr.
|
|
1451 |
classNameToDelete notNil ifTrue:[
|
|
1452 |
changeListView selection:nil.
|
|
1453 |
self silentDeleteChangesFor:classNameToDelete
|
|
1454 |
from:changeNr
|
|
1455 |
to:(changePositions size).
|
|
1456 |
self setChangeList.
|
|
1457 |
self autoSelectOrEnd:changeNr
|
|
1458 |
]
|
|
1459 |
]
|
|
1460 |
]
|
|
1461 |
!
|
|
1462 |
|
|
1463 |
doWriteBack
|
|
1464 |
"write back the list onto the changes file"
|
|
1465 |
|
|
1466 |
anyChanges ifTrue:[
|
|
1467 |
self writeBackChanges.
|
|
1468 |
realized ifTrue:[
|
|
1469 |
self readChangesFileInBackground:false.
|
|
1470 |
realized ifTrue:[
|
|
1471 |
self setChangeList
|
|
1472 |
]
|
|
1473 |
]
|
|
1474 |
]
|
|
1475 |
!
|
|
1476 |
|
|
1477 |
doDeleteClassAll
|
|
1478 |
"delete all changes with same class as currently selected change"
|
|
1479 |
|
|
1480 |
|changeNr|
|
|
1481 |
|
|
1482 |
changeNr := changeListView selection.
|
|
1483 |
changeNr notNil ifTrue:[
|
|
1484 |
self withCursor:(Cursor execute) do:[
|
|
1485 |
| classNameToDelete |
|
|
1486 |
|
|
1487 |
classNameToDelete := self classNameOfChange:changeNr.
|
|
1488 |
classNameToDelete notNil ifTrue:[
|
|
1489 |
changeListView selection:nil.
|
|
1490 |
self silentDeleteChangesFor:classNameToDelete
|
|
1491 |
from:1
|
|
1492 |
to:(changePositions size).
|
|
1493 |
self setChangeList.
|
|
1494 |
self autoSelectOrEnd:changeNr
|
|
1495 |
]
|
|
1496 |
]
|
|
1497 |
]
|
|
1498 |
!
|
|
1499 |
|
|
1500 |
doApplyClassRest
|
|
1501 |
"user wants all changes for this class from changeNr to be applied"
|
|
1502 |
|
57
|
1503 |
|changeNr|
|
51
|
1504 |
|
|
1505 |
changeNr := changeListView selection.
|
|
1506 |
changeNr notNil ifTrue:[
|
|
1507 |
self withCursor:(Cursor execute) do:[
|
57
|
1508 |
|thisClassName classNameToApply lastChange|
|
51
|
1509 |
|
|
1510 |
classNameToApply := self classNameOfChange:changeNr.
|
|
1511 |
classNameToApply notNil ifTrue:[
|
|
1512 |
self clearCodeView.
|
|
1513 |
skipSignal isNil ifTrue:[skipSignal := Signal new].
|
|
1514 |
changeNr to:(changePositions size) do:[:changeNr |
|
|
1515 |
thisClassName := self classNameOfChange:changeNr.
|
|
1516 |
thisClassName = classNameToApply ifTrue:[
|
|
1517 |
changeListView selection:changeNr.
|
57
|
1518 |
self applyChange:changeNr.
|
|
1519 |
lastChange := changeNr
|
51
|
1520 |
].
|
|
1521 |
].
|
57
|
1522 |
self autoSelect:lastChange.
|
51
|
1523 |
]
|
|
1524 |
]
|
|
1525 |
]
|
|
1526 |
! !
|
|
1527 |
|
|
1528 |
!ChangesBrowser methodsFor:'termination'!
|
|
1529 |
|
|
1530 |
terminate
|
|
1531 |
"window manager wants us to go away"
|
|
1532 |
|
|
1533 |
|box|
|
|
1534 |
|
|
1535 |
anyChanges ifTrue:[
|
|
1536 |
box := OptionBox title:'' numberOfOptions:3.
|
|
1537 |
box title:(resources at:'close ChangesBrowser.\\changefile has not been updated from the modified changelist.\\Update before closing ?') withCRs.
|
|
1538 |
box buttonTitles:(resources array:#('abort' 'don''t update' 'update')).
|
|
1539 |
box actions:(Array with:[^ self]
|
|
1540 |
with:[self destroy]
|
|
1541 |
with:[self writeBackChanges. self destroy]
|
|
1542 |
).
|
|
1543 |
box showAtPointer.
|
|
1544 |
] ifFalse:[
|
|
1545 |
self destroy
|
|
1546 |
]
|
|
1547 |
!
|
|
1548 |
|
|
1549 |
destroy
|
|
1550 |
"destroy the receiver; make certain, that boxes are destroyed too"
|
|
1551 |
|
|
1552 |
ObjectMemory removeDependent:self.
|
|
1553 |
super destroy
|
|
1554 |
!
|
|
1555 |
|
|
1556 |
saveAndTerminate
|
|
1557 |
"update the changes file and quit.
|
|
1558 |
Dont depend on this being sent, not all window managers
|
|
1559 |
send it; instead, they simply destroy the view."
|
|
1560 |
|
|
1561 |
anyChanges ifTrue:[
|
|
1562 |
self writeBackChanges.
|
|
1563 |
].
|
|
1564 |
self destroy
|
45
|
1565 |
! !
|
|
1566 |
|
|
1567 |
!ChangesBrowser methodsFor:'error handling'!
|
|
1568 |
|
|
1569 |
correctableError:aString position:relPos to:relEndPos
|
|
1570 |
"compiler notifys us of an error - this should really not happen since
|
|
1571 |
changes ought to be correct (did someone edit the changes file ??).
|
|
1572 |
Show the bad change in the codeView and let codeView hilight the error;
|
|
1573 |
no corrections allowed here therefore return false"
|
|
1574 |
|
|
1575 |
|action|
|
|
1576 |
|
|
1577 |
(changeNrProcessed ~~ changeNrShown) ifTrue:[
|
|
1578 |
self changeSelection:changeNrProcessed
|
|
1579 |
].
|
|
1580 |
(skipSignal notNil) ifTrue:[
|
|
1581 |
|
|
1582 |
codeView highlightingErrorPosition:relPos to:relEndPos do:[
|
|
1583 |
|box|
|
|
1584 |
|
|
1585 |
"
|
|
1586 |
start dialog - make certain cleanup is done
|
|
1587 |
"
|
|
1588 |
box := OptionBox title:aString numberOfOptions:3.
|
|
1589 |
box buttonTitles:#('abort' 'skip' 'continue').
|
|
1590 |
box actions:(Array with:[action := #abort]
|
|
1591 |
with:[action := #skip]
|
|
1592 |
with:[action := #continue]).
|
|
1593 |
box showAtPointer
|
|
1594 |
].
|
|
1595 |
|
|
1596 |
action == #abort ifTrue:[
|
|
1597 |
Object abortSignal raise.
|
|
1598 |
^ false
|
|
1599 |
].
|
|
1600 |
action == #skip ifTrue:[
|
|
1601 |
skipSignal raise.
|
|
1602 |
^ false
|
|
1603 |
].
|
|
1604 |
^ false
|
|
1605 |
].
|
|
1606 |
codeView error:aString position:relPos to:relEndPos.
|
|
1607 |
^ false
|
0
|
1608 |
!
|
|
1609 |
|
51
|
1610 |
warning:aString position:relPos to:relEndPos
|
|
1611 |
"compiler notifys us of a warning - ignore it"
|
|
1612 |
|
|
1613 |
^ self
|
|
1614 |
!
|
|
1615 |
|
45
|
1616 |
error:aString position:relPos to:relEndPos
|
|
1617 |
"compiler notifys us of an error - this should really not happen since
|
|
1618 |
changes ought to be correct (did someone edit the changes file ??).
|
|
1619 |
Show the bad change in the codeView and let codeView hilight the error"
|
0
|
1620 |
|
45
|
1621 |
|action|
|
0
|
1622 |
|
45
|
1623 |
(changeNrProcessed ~~ changeNrShown) ifTrue:[
|
|
1624 |
self changeSelection:changeNrProcessed
|
|
1625 |
].
|
|
1626 |
(skipSignal notNil) ifTrue:[
|
0
|
1627 |
|
45
|
1628 |
codeView highlightingErrorPosition:relPos to:relEndPos do:[
|
|
1629 |
|box|
|
0
|
1630 |
|
45
|
1631 |
"
|
|
1632 |
start dialog - make certain cleanup is done
|
|
1633 |
"
|
|
1634 |
box := OptionBox title:aString numberOfOptions:3.
|
|
1635 |
box buttonTitles:#('abort' 'skip' 'continue').
|
|
1636 |
box actions:(Array with:[action := #abort]
|
|
1637 |
with:[action := #skip]
|
|
1638 |
with:[action := #continue]).
|
|
1639 |
box showAtPointer
|
|
1640 |
].
|
0
|
1641 |
|
45
|
1642 |
action == #abort ifTrue:[
|
|
1643 |
Object abortSignal raise.
|
|
1644 |
^ false
|
|
1645 |
].
|
|
1646 |
action == #skip ifTrue:[
|
|
1647 |
skipSignal raise.
|
|
1648 |
^ false
|
|
1649 |
].
|
|
1650 |
^ false
|
|
1651 |
].
|
|
1652 |
^ codeView error:aString position:relPos to:relEndPos
|
|
1653 |
! !
|
0
|
1654 |
|