author | Claus Gittinger <cg@exept.de> |
Tue, 16 Jan 2018 22:13:47 +0100 | |
changeset 17899 | fd1e7993ab71 |
parent 17848 | ab289c04f89c |
child 17924 | e9ec188d9e59 |
permissions | -rw-r--r-- |
17899 | 1 |
"{ Encoding: utf8 }" |
2 |
||
0 | 3 |
" |
4 | 4 |
COPYRIGHT (c) 1990 by Claus Gittinger |
6288 | 5 |
All Rights Reserved |
0 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
14 |
"{ Package: 'stx:libtool' }" |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
15 |
|
15082 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
0 | 18 |
StandardSystemView subclass:#ChangesBrowser |
16372 | 19 |
instanceVariableNames:'changesReader changeInfoList changeListView codeView diffView |
20 |
changeFileName anyChanges changeNrShown changeNrProcessed |
|
21 |
multipleApply autoCompare changeFileSize changeFileTimestamp |
|
22 |
checkBlock tabSpec autoUpdate editingClassSource lastSearchType |
|
4489 | 23 |
lastSearchString applyInOriginalNameSpace lastSaveFileName |
24 |
readOnly enforcedPackage enforcedNameSpace updateChangeSet |
|
8026
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
25 |
showingDiffs diffViewBox autoloadAsRequired |
10719 | 26 |
classesNotToBeAutoloaded encodingIfKnown |
11244 | 27 |
ignorePublicPrivateCategories changeListSelectionHolder |
17848 | 28 |
defaultApplicationForVAGEClasses infoHolder leftCodeLabelHolder |
29 |
rightCodeLabelHolder' |
|
30 |
classVariableNames:'CompressSnapshotInfo DefaultAutoCompare DefaultShowingDiffs |
|
31 |
KeepEnforcedNameSpace LastEnforcedNameSpace NoColoring |
|
32 |
ShowWarningDialogs' |
|
4489 | 33 |
poolDictionaries:'' |
34 |
category:'Interface-Browsers' |
|
0 | 35 |
! |
36 |
||
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
37 |
Object subclass:#ChangeFileReader |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
38 |
instanceVariableNames:'browser enforcedNameSpace changeFileName changeFileSize |
16372 | 39 |
changeFileTimestamp changeInfo changeChunks changeClassNames |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
40 |
changeHeaderLines changePositions changeTimeStamps |
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
41 |
changeIsFollowupMethodChange autoCompare autoloadAsRequired |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
42 |
tabSpec anyChanges inStream thisIsAClassSource chunkText |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
43 |
chunkPosition sawExcla fullChunkText noColoring timeStampInfo |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
44 |
changeString changeType changeDelta headerLine maxLen' |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
45 |
classVariableNames:'NoColoring' |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
46 |
poolDictionaries:'' |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
47 |
privateIn:ChangesBrowser |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
48 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
49 |
|
16372 | 50 |
Object subclass:#ChangeInfo |
51 |
instanceVariableNames:'position chunk className selector headerLine timestamp |
|
52 |
isFollowupChange' |
|
53 |
classVariableNames:'' |
|
54 |
poolDictionaries:'' |
|
55 |
privateIn:ChangesBrowser |
|
56 |
! |
|
57 |
||
761 | 58 |
!ChangesBrowser class methodsFor:'documentation'! |
29 | 59 |
|
60 |
copyright |
|
61 |
" |
|
62 |
COPYRIGHT (c) 1990 by Claus Gittinger |
|
6288 | 63 |
All Rights Reserved |
0 | 64 |
|
29 | 65 |
This software is furnished under a license and may be used |
66 |
only in accordance with the terms of that license and with the |
|
67 |
inclusion of the above copyright notice. This software may not |
|
68 |
be provided or otherwise made available to, or used by, any |
|
69 |
other person. No title to or ownership of the software is |
|
70 |
hereby transferred. |
|
71 |
" |
|
72 |
! |
|
73 |
||
74 |
documentation |
|
75 |
" |
|
11397 | 76 |
this implements a browser for the changes-file |
77 |
(actually, it can display any sourceFile's contents). |
|
29 | 78 |
See the extra document 'doc/misc/cbrowser.doc' for how to use this browser. |
79 |
||
80 |
written jan 90 by claus |
|
51 | 81 |
|
11397 | 82 |
This is a very old leftover class (it was one of the very first apps in ST/X |
83 |
and the Merovingian has not yet detected this one ;-) |
|
5703 | 84 |
It will be completely replaced by the ChangeSetBrowser class in the near future. |
85 |
||
86 |
||
508 | 87 |
[Class variables:] |
11397 | 88 |
CompressSnapshotInfo if true (the default), snapshot entries |
89 |
are also compressed in the compress function. |
|
90 |
Some users prefer them to be not compressed. |
|
91 |
Set it to false for this. |
|
58 | 92 |
|
51 | 93 |
Notice: |
11397 | 94 |
this needs a total rewrite, to build up a changeSet from the file |
95 |
(which did not exist when the ChangesBrowser was originally written) |
|
96 |
and manipulate that changeSet. |
|
97 |
||
98 |
This way, we get a browser for any upcoming incore changeSets for |
|
99 |
free. Also, this will put the chunk analysation code into Change and |
|
100 |
subclasses (where it belongs) and give a better encapsulation and |
|
101 |
overall structure. Do not take this as an example for good style ;-) |
|
102 |
||
103 |
The Change hierarchy is currently been completed, and the changes browser |
|
17047 | 104 |
should be adapted soon. |
508 | 105 |
|
106 |
[author:] |
|
11397 | 107 |
Claus Gittinger |
508 | 108 |
|
109 |
[start with:] |
|
11397 | 110 |
ChangesBrowser open |
1359 | 111 |
|
112 |
[see also:] |
|
11397 | 113 |
( Using the ChangesBrowser :html: tools/cbrowser/TOP.html ) |
6288 | 114 |
|
29 | 115 |
" |
116 |
! ! |
|
0 | 117 |
|
761 | 118 |
!ChangesBrowser class methodsFor:'instance creation'! |
45 | 119 |
|
8379 | 120 |
openOn:aFilename |
9525 | 121 |
"create & open a changes browser on a change file" |
5696 | 122 |
|
8379 | 123 |
|fileName browser| |
124 |
||
125 |
fileName := aFilename asFilename pathName. |
|
126 |
||
127 |
(self isXMLFile:fileName) ifTrue:[ |
|
128 |
browser := ChangeSetBrowser new |
|
5696 | 129 |
] ifFalse:[ |
8379 | 130 |
browser := self new |
131 |
]. |
|
132 |
||
133 |
browser label:(self defaultLabel , ': ', fileName). |
|
134 |
browser changeFileName:fileName. |
|
5696 | 135 |
browser open. |
136 |
^ browser |
|
9525 | 137 |
|
138 |
"Modified: / 18-07-2010 / 10:32:18 / cg" |
|
45 | 139 |
! ! |
140 |
||
761 | 141 |
!ChangesBrowser class methodsFor:'behavior'! |
0 | 142 |
|
143 |
autoSelectNext |
|
144 |
"returning true here, makes a Delete operation automatically |
|
145 |
select the next change" |
|
146 |
||
147 |
^ true |
|
148 |
! ! |
|
149 |
||
761 | 150 |
!ChangesBrowser class methodsFor:'defaults'! |
0 | 151 |
|
489 | 152 |
defaultIcon |
1153 | 153 |
"return the browsers default window icon" |
154 |
||
7631
258e8ad34edf
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7625
diff
changeset
|
155 |
<resource: #programImage> |
258e8ad34edf
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7625
diff
changeset
|
156 |
|
258e8ad34edf
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7625
diff
changeset
|
157 |
^ ToolbarIconLibrary startChangesBrowserIcon |
489 | 158 |
! |
159 |
||
73 | 160 |
defaultLabel |
5527 | 161 |
^ self classResources string:'Changes Browser' |
2417 | 162 |
! |
163 |
||
164 |
isVisualStartable |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
165 |
"return true, if this application can be started via #open. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
166 |
(to allow start of a change browser via double-click in the browser)" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
167 |
|
2417 | 168 |
^ true |
169 |
||
170 |
"Created: / 27.9.1999 / 12:28:27 / cg" |
|
28 | 171 |
! ! |
172 |
||
16022 | 173 |
!ChangesBrowser class methodsFor:'help specs'! |
3202 | 174 |
|
17899 | 175 |
helpSpec |
16022 | 176 |
<resource: #help> |
177 |
||
178 |
^ Dictionary new |
|
179 |
addPairsFrom:#( |
|
180 |
||
181 |
#applyChange |
|
182 |
'Apply (install) the selected change' |
|
183 |
||
184 |
deleteAllForClass |
|
185 |
'Delete all changes for the selected change''s class' |
|
186 |
||
187 |
deleteForClassFromBegin |
|
17597 | 188 |
'Delete this and all previous changes for the selected change''s class' |
16022 | 189 |
|
190 |
deleteForClassToEnd |
|
191 |
'Delete this and all following changes for the selected change''s class' |
|
17565 | 192 |
|
193 |
deleteClassSelectorAll |
|
194 |
'Delete all changes for the selected method' |
|
195 |
||
196 |
deleteClassSelectorOlder |
|
17597 | 197 |
'Delete this and all previous changes for the selected method' |
16022 | 198 |
) |
17565 | 199 |
|
17597 | 200 |
"Modified: / 25-07-2017 / 10:55:55 / cg" |
16022 | 201 |
! ! |
202 |
||
203 |
!ChangesBrowser class methodsFor:'menu specs'! |
|
10681 | 204 |
|
3202 | 205 |
menuSpec |
206 |
"This resource specification was automatically generated |
|
207 |
by the MenuEditor of ST/X." |
|
208 |
||
209 |
"Do not manually edit this!! If it is corrupted, |
|
210 |
the MenuEditor may not be able to read the specification." |
|
211 |
||
10719 | 212 |
|
3202 | 213 |
" |
214 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpec |
|
215 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpec)) startUp |
|
216 |
" |
|
217 |
||
218 |
<resource: #menu> |
|
219 |
||
7360 | 220 |
^ |
6216 | 221 |
#(Menu |
7096 | 222 |
( |
223 |
(MenuItem |
|
224 |
label: 'File' |
|
17093 | 225 |
submenuChannel: menuSpecFile |
7096 | 226 |
) |
227 |
(MenuItem |
|
17096 | 228 |
label: 'CHANGE' |
17093 | 229 |
submenuChannel: menuSpecChange |
7096 | 230 |
) |
231 |
(MenuItem |
|
232 |
label: 'Search' |
|
17093 | 233 |
submenuChannel: menuSpecSearch |
7096 | 234 |
) |
235 |
(MenuItem |
|
236 |
label: 'Browse' |
|
17093 | 237 |
submenuChannel: menuSpecBrowse |
7096 | 238 |
) |
239 |
(MenuItem |
|
240 |
label: 'Settings' |
|
17093 | 241 |
submenuChannel: menuSpecSettings |
7096 | 242 |
) |
243 |
(MenuItem |
|
7463
e8e74bdbfbda
support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents:
7415
diff
changeset
|
244 |
label: 'MENU_Help' |
17093 | 245 |
submenuChannel: menuSpecHelp |
246 |
) |
|
247 |
) |
|
248 |
nil |
|
249 |
nil |
|
250 |
) |
|
17096 | 251 |
|
252 |
"Modified: / 21-11-2016 / 23:46:22 / cg" |
|
17093 | 253 |
! |
254 |
||
255 |
menuSpecBrowse |
|
256 |
"This resource specification was automatically generated |
|
257 |
by the MenuEditor of ST/X." |
|
258 |
||
259 |
"Do not manually edit this!! If it is corrupted, |
|
260 |
the MenuEditor may not be able to read the specification." |
|
261 |
||
262 |
||
263 |
" |
|
264 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecBrowse |
|
265 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecBrowse)) startUp |
|
266 |
" |
|
267 |
||
268 |
<resource: #menu> |
|
269 |
||
270 |
^ |
|
271 |
#(Menu |
|
272 |
( |
|
273 |
(MenuItem |
|
274 |
enabled: hasSingleSelection |
|
275 |
label: 'Class' |
|
276 |
itemValue: doBrowse |
|
277 |
) |
|
278 |
(MenuItem |
|
279 |
label: '-' |
|
280 |
) |
|
281 |
(MenuItem |
|
282 |
label: 'Senders...' |
|
283 |
itemValue: doBrowseSenders |
|
284 |
) |
|
285 |
(MenuItem |
|
286 |
label: 'Implementors...' |
|
287 |
itemValue: doBrowseImplementors |
|
288 |
) |
|
289 |
) |
|
290 |
nil |
|
291 |
nil |
|
292 |
) |
|
293 |
! |
|
294 |
||
295 |
menuSpecChange |
|
296 |
"This resource specification was automatically generated |
|
297 |
by the MenuEditor of ST/X." |
|
298 |
||
299 |
"Do not manually edit this!! If it is corrupted, |
|
300 |
the MenuEditor may not be able to read the specification." |
|
301 |
||
302 |
||
303 |
" |
|
304 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecChange |
|
305 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecChange)) startUp |
|
306 |
" |
|
307 |
||
308 |
<resource: #menu> |
|
309 |
||
310 |
^ |
|
311 |
#(Menu |
|
312 |
( |
|
313 |
(MenuItem |
|
314 |
enabled: hasSelection |
|
315 |
label: 'Apply' |
|
316 |
itemValue: doApply |
|
317 |
) |
|
318 |
(MenuItem |
|
319 |
enabled: hasSingleSelection |
|
320 |
label: 'Apply to End' |
|
321 |
itemValue: doApplyRest |
|
322 |
) |
|
323 |
(MenuItem |
|
324 |
enabled: hasSingleSelection |
|
325 |
label: 'Apply from Begin' |
|
326 |
itemValue: doApplyFromBeginning |
|
327 |
) |
|
328 |
(MenuItem |
|
329 |
enabled: hasSingleSelection |
|
330 |
label: 'Apply for Class to End' |
|
331 |
itemValue: doApplyClassRest |
|
332 |
) |
|
333 |
(MenuItem |
|
334 |
enabled: hasSingleSelection |
|
335 |
label: 'Apply for Class from Begin' |
|
336 |
itemValue: doApplyClassFromBeginning |
|
337 |
) |
|
338 |
(MenuItem |
|
339 |
enabled: hasNoSelection |
|
340 |
label: 'Apply All' |
|
341 |
itemValue: doApplyAll |
|
342 |
) |
|
343 |
(MenuItem |
|
344 |
enabled: hasSingleSelection |
|
345 |
label: 'Apply to Conflict or End' |
|
346 |
itemValue: doApplyToConflictOrEnd |
|
347 |
) |
|
348 |
(MenuItem |
|
349 |
label: '-' |
|
350 |
) |
|
351 |
(MenuItem |
|
352 |
enabled: hasSelection |
|
353 |
label: 'Delete' |
|
354 |
itemValue: doDelete |
|
355 |
) |
|
356 |
(MenuItem |
|
357 |
enabled: hasSingleSelection |
|
358 |
label: 'Delete to End' |
|
359 |
itemValue: doDeleteRest |
|
360 |
) |
|
361 |
(MenuItem |
|
362 |
enabled: hasSingleSelection |
|
363 |
label: 'Delete from Begin' |
|
364 |
itemValue: doDeleteFromBeginning |
|
365 |
) |
|
366 |
(MenuItem |
|
367 |
enabled: hasSingleSelection |
|
368 |
label: 'Delete for Class to End' |
|
369 |
itemValue: doDeleteClassRest |
|
370 |
) |
|
371 |
(MenuItem |
|
372 |
enabled: hasSingleSelection |
|
373 |
label: 'Delete for Class from Begin' |
|
374 |
itemValue: doDeleteClassFromBeginning |
|
375 |
) |
|
376 |
(MenuItem |
|
377 |
enabled: hasSelection |
|
378 |
label: 'Delete all for Class' |
|
379 |
itemValue: doDeleteClassAll |
|
380 |
isVisible: hasNoMultiSelection |
|
381 |
) |
|
382 |
(MenuItem |
|
383 |
enabled: hasSelection |
|
384 |
label: 'Delete all for Class && its Private Classes' |
|
385 |
itemValue: doDeleteClassAndPrivateClassesAll |
|
386 |
isVisible: hasNoMultiSelection |
|
387 |
) |
|
388 |
(MenuItem |
|
389 |
enabled: hasSelection |
|
390 |
label: 'Delete all for Namespace' |
|
391 |
itemValue: doDeleteAllForNamespace |
|
392 |
) |
|
393 |
(MenuItem |
|
394 |
enabled: hasSelection |
|
395 |
label: 'Delete all for Classes' |
|
396 |
itemValue: doDeleteClassAll |
|
397 |
isVisible: hasMultiSelection |
|
398 |
) |
|
399 |
(MenuItem |
|
400 |
enabled: hasSelection |
|
401 |
label: 'Delete all for Classes && their Private Classes' |
|
402 |
itemValue: doDeleteClassAndPrivateClassesAll |
|
403 |
isVisible: hasMultiSelection |
|
404 |
) |
|
405 |
(MenuItem |
|
406 |
label: '-' |
|
407 |
) |
|
408 |
(MenuItem |
|
409 |
enabled: hasSelection |
|
410 |
label: 'Delete older Versions of Selected Method' |
|
411 |
itemValue: doDeleteClassSelectorOlder |
|
412 |
isVisible: hasNoMultiSelectionHolder |
|
413 |
) |
|
414 |
(MenuItem |
|
415 |
enabled: hasSelection |
|
416 |
label: 'Delete older Versions of all Selected Methods' |
|
417 |
itemValue: doDeleteClassSelectorOlder |
|
418 |
isVisible: hasMultiSelectionHolder |
|
419 |
) |
|
420 |
(MenuItem |
|
421 |
enabled: hasSelection |
|
422 |
label: 'Delete all Versions of Selected Method' |
|
423 |
itemValue: doDeleteClassSelectorAll |
|
424 |
isVisible: hasNoMultiSelectionHolder |
|
425 |
) |
|
426 |
(MenuItem |
|
427 |
enabled: hasSelection |
|
428 |
label: 'Delete all Versions of all Selected Methods' |
|
429 |
itemValue: doDeleteClassSelectorAll |
|
430 |
isVisible: hasMultiSelectionHolder |
|
431 |
) |
|
432 |
(MenuItem |
|
433 |
label: '-' |
|
434 |
) |
|
435 |
(MenuItem |
|
436 |
enabled: hasSingleSelection |
|
437 |
label: 'Compare with Current' |
|
438 |
itemValue: doCompare |
|
439 |
) |
|
440 |
(MenuItem |
|
17096 | 441 |
enabled: hasSingleSelection |
442 |
label: 'Copy to Clipboard' |
|
443 |
itemValue: doCopyToClipboard |
|
444 |
) |
|
445 |
(MenuItem |
|
17093 | 446 |
label: '-' |
447 |
) |
|
448 |
(MenuItem |
|
449 |
enabled: hasSelection |
|
450 |
label: 'Make Change a Patch' |
|
451 |
itemValue: doMakePatch |
|
452 |
) |
|
453 |
) |
|
454 |
nil |
|
455 |
nil |
|
456 |
) |
|
17096 | 457 |
|
458 |
"Modified: / 21-11-2016 / 23:46:42 / cg" |
|
17093 | 459 |
! |
460 |
||
461 |
menuSpecFile |
|
462 |
"This resource specification was automatically generated |
|
463 |
by the MenuEditor of ST/X." |
|
464 |
||
465 |
"Do not manually edit this!! If it is corrupted, |
|
466 |
the MenuEditor may not be able to read the specification." |
|
467 |
||
468 |
||
469 |
" |
|
470 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecFile |
|
471 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecFile)) startUp |
|
472 |
" |
|
473 |
||
474 |
<resource: #menu> |
|
475 |
||
476 |
^ |
|
477 |
#(Menu |
|
478 |
( |
|
479 |
(MenuItem |
|
480 |
label: 'Compress' |
|
481 |
itemValue: doCompress |
|
482 |
isVisible: notEditingClassSource |
|
483 |
) |
|
484 |
(MenuItem |
|
485 |
enabled: hasSingleSelection |
|
486 |
label: 'Compress for Class' |
|
487 |
itemValue: doCompressClass |
|
488 |
isVisible: notEditingClassSource |
|
489 |
) |
|
490 |
(MenuItem |
|
491 |
enabled: hasSingleSelection |
|
492 |
label: 'Compress for Class && Selector' |
|
493 |
itemValue: doCompressSelector |
|
494 |
isVisible: notEditingClassSource |
|
495 |
) |
|
496 |
(MenuItem |
|
497 |
label: 'Compare and Compress' |
|
498 |
itemValue: doCompareAndCompress |
|
499 |
isVisible: notEditingClassSource |
|
500 |
) |
|
501 |
(MenuItem |
|
502 |
label: '-' |
|
503 |
isVisible: notEditingClassSource |
|
504 |
) |
|
505 |
(MenuItem |
|
506 |
enabled: hasSingleSelection |
|
507 |
label: 'Fileout && Delete all Changes for Class' |
|
508 |
itemValue: doFileoutAndDeleteClassAll |
|
509 |
isVisible: notEditingClassSource |
|
510 |
) |
|
511 |
(MenuItem |
|
512 |
enabled: hasSelection |
|
513 |
label: 'CheckIn && Delete all Changes for Class' |
|
514 |
itemValue: doCheckinAndDeleteClassAll |
|
515 |
isVisible: notEditingClassSource |
|
516 |
) |
|
517 |
(MenuItem |
|
518 |
label: '-' |
|
519 |
isVisible: notEditingClassSource |
|
520 |
) |
|
521 |
(MenuItem |
|
522 |
enabled: hasSelection |
|
523 |
label: 'Save In...' |
|
524 |
itemValue: doSave |
|
525 |
) |
|
526 |
(MenuItem |
|
527 |
enabled: hasSingleSelection |
|
528 |
label: 'Save to End In...' |
|
529 |
itemValue: doSaveRest |
|
530 |
) |
|
531 |
(MenuItem |
|
532 |
enabled: hasSingleSelection |
|
533 |
label: 'Save for Class to End In...' |
|
534 |
itemValue: doSaveClassRest |
|
535 |
) |
|
536 |
(MenuItem |
|
537 |
enabled: hasSingleSelection |
|
538 |
label: 'Save all for Class In...' |
|
539 |
itemValue: doSaveClassAll |
|
540 |
) |
|
541 |
(MenuItem |
|
542 |
label: '-' |
|
543 |
) |
|
544 |
(MenuItem |
|
545 |
label: 'Writeback ClassFile' |
|
546 |
itemValue: doWriteBack |
|
547 |
isVisible: editingClassSource |
|
548 |
) |
|
549 |
(MenuItem |
|
550 |
label: 'Writeback ChangeFile' |
|
551 |
itemValue: doWriteBack |
|
552 |
isVisible: notEditingClassSource |
|
553 |
) |
|
554 |
(MenuItem |
|
555 |
label: '-' |
|
556 |
) |
|
557 |
(MenuItem |
|
558 |
label: 'Update' |
|
559 |
itemValue: doUpdate |
|
560 |
) |
|
561 |
(MenuItem |
|
562 |
label: '-' |
|
563 |
) |
|
564 |
(MenuItem |
|
565 |
label: 'Exit' |
|
566 |
itemValue: menuExit |
|
567 |
) |
|
568 |
) |
|
569 |
nil |
|
570 |
nil |
|
571 |
) |
|
572 |
! |
|
573 |
||
574 |
menuSpecHelp |
|
575 |
"This resource specification was automatically generated |
|
576 |
by the MenuEditor of ST/X." |
|
577 |
||
578 |
"Do not manually edit this!! If it is corrupted, |
|
579 |
the MenuEditor may not be able to read the specification." |
|
580 |
||
581 |
||
582 |
" |
|
583 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecHelp |
|
584 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecHelp)) startUp |
|
585 |
" |
|
586 |
||
587 |
<resource: #menu> |
|
588 |
||
589 |
^ |
|
590 |
#(Menu |
|
591 |
( |
|
592 |
(MenuItem |
|
593 |
label: 'ChangesBrowser Documentation' |
|
594 |
itemValue: openHTMLDocument: |
|
595 |
argument: 'tools/cbrowser/TOP.html' |
|
596 |
) |
|
597 |
(MenuItem |
|
598 |
label: '-' |
|
599 |
) |
|
600 |
(MenuItem |
|
601 |
label: 'About ChangesBrowser...' |
|
602 |
itemValue: openAboutThisApplication |
|
603 |
) |
|
604 |
) |
|
605 |
nil |
|
606 |
nil |
|
607 |
) |
|
608 |
! |
|
609 |
||
610 |
menuSpecSearch |
|
611 |
"This resource specification was automatically generated |
|
612 |
by the MenuEditor of ST/X." |
|
613 |
||
614 |
"Do not manually edit this!! If it is corrupted, |
|
615 |
the MenuEditor may not be able to read the specification." |
|
616 |
||
617 |
||
618 |
" |
|
619 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecSearch |
|
620 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecSearch)) startUp |
|
621 |
" |
|
622 |
||
623 |
<resource: #menu> |
|
624 |
||
625 |
^ |
|
626 |
#(Menu |
|
627 |
( |
|
628 |
(MenuItem |
|
629 |
label: 'Class...' |
|
630 |
itemValue: findClass |
|
631 |
) |
|
632 |
(MenuItem |
|
633 |
enabled: hasSelection |
|
634 |
label: 'First for Class' |
|
635 |
itemValue: findFirstForClass |
|
636 |
) |
|
637 |
(MenuItem |
|
638 |
enabled: hasSelection |
|
639 |
label: 'Previous for Class' |
|
640 |
itemValue: findPreviousForClass |
|
641 |
) |
|
642 |
(MenuItem |
|
643 |
enabled: hasSelection |
|
644 |
label: 'Next for Class' |
|
645 |
itemValue: findNextForClass |
|
646 |
) |
|
647 |
(MenuItem |
|
648 |
enabled: hasSelection |
|
649 |
label: 'Last for Class' |
|
650 |
itemValue: findLastForClass |
|
651 |
) |
|
652 |
(MenuItem |
|
653 |
label: '-' |
|
654 |
) |
|
655 |
(MenuItem |
|
656 |
label: 'Selector...' |
|
657 |
itemValue: findSelector |
|
658 |
) |
|
659 |
(MenuItem |
|
660 |
enabled: hasSelection |
|
661 |
label: 'Previous for Selector' |
|
662 |
itemValue: findPreviousForSelector |
|
663 |
) |
|
664 |
(MenuItem |
|
665 |
enabled: hasSelection |
|
666 |
label: 'Next for Selector' |
|
667 |
itemValue: findNextForSelector |
|
668 |
) |
|
669 |
(MenuItem |
|
670 |
label: '-' |
|
671 |
) |
|
672 |
(MenuItem |
|
673 |
label: 'String...' |
|
674 |
itemValue: findString |
|
675 |
) |
|
676 |
(MenuItem |
|
677 |
enabled: hasSelection |
|
678 |
label: 'Previous with String' |
|
679 |
itemValue: findPreviousForString |
|
680 |
) |
|
681 |
(MenuItem |
|
682 |
enabled: hasSelection |
|
683 |
label: 'Next with String' |
|
684 |
itemValue: findNextForString |
|
685 |
) |
|
686 |
(MenuItem |
|
687 |
label: '-' |
|
688 |
) |
|
689 |
(MenuItem |
|
690 |
enabled: hasSelection |
|
691 |
label: 'Previous Difference' |
|
692 |
itemValue: findPreviousDifference |
|
693 |
) |
|
694 |
(MenuItem |
|
695 |
enabled: hasSelection |
|
696 |
label: 'Next Difference' |
|
697 |
itemValue: findNextDifference |
|
698 |
) |
|
699 |
(MenuItem |
|
700 |
label: '-' |
|
701 |
) |
|
702 |
(MenuItem |
|
703 |
enabled: hasSelection |
|
704 |
label: 'Previous Snapshot' |
|
705 |
itemValue: findPreviousSnapshot |
|
706 |
) |
|
707 |
(MenuItem |
|
708 |
enabled: hasSelection |
|
709 |
label: 'Next Snapshot' |
|
710 |
itemValue: findNextSnapshot |
|
711 |
) |
|
712 |
(MenuItem |
|
713 |
label: 'Last Snapshot' |
|
714 |
itemValue: findLastSnapshot |
|
715 |
) |
|
716 |
) |
|
717 |
nil |
|
718 |
nil |
|
719 |
) |
|
720 |
! |
|
721 |
||
722 |
menuSpecSettings |
|
723 |
"This resource specification was automatically generated |
|
724 |
by the MenuEditor of ST/X." |
|
725 |
||
726 |
"Do not manually edit this!! If it is corrupted, |
|
727 |
the MenuEditor may not be able to read the specification." |
|
728 |
||
729 |
||
730 |
" |
|
731 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecSettings |
|
732 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecSettings)) startUp |
|
733 |
" |
|
734 |
||
735 |
<resource: #menu> |
|
736 |
||
737 |
^ |
|
738 |
#(Menu |
|
739 |
( |
|
740 |
(MenuItem |
|
741 |
label: 'Auto Compare' |
|
742 |
indication: autoCompare |
|
743 |
) |
|
744 |
(MenuItem |
|
745 |
label: 'Autoload As Required' |
|
746 |
indication: autoloadAsRequired |
|
747 |
) |
|
748 |
(MenuItem |
|
749 |
label: 'Show Diffs' |
|
750 |
indication: showingDiffs |
|
751 |
) |
|
752 |
(MenuItem |
|
753 |
label: 'Auto Update' |
|
754 |
indication: autoUpdate |
|
755 |
) |
|
756 |
(MenuItem |
|
757 |
label: '-' |
|
758 |
) |
|
759 |
(MenuItem |
|
760 |
label: 'Add to ChangeSet when Applying' |
|
761 |
indication: updateChangeSet |
|
762 |
) |
|
763 |
(MenuItem |
|
764 |
label: 'Ignore Public/Private in Categories (Dolphin code)' |
|
765 |
itemValue: ignorePublicPrivateCategories: |
|
766 |
isVisible: false |
|
767 |
indication: ignorePublicPrivateCategories |
|
768 |
) |
|
769 |
(MenuItem |
|
770 |
label: '-' |
|
771 |
) |
|
772 |
(MenuItem |
|
773 |
label: 'Apply into Package...' |
|
774 |
itemValue: setEnforcedPackage |
|
775 |
) |
|
776 |
(MenuItem |
|
777 |
label: 'Apply into NameSpace...' |
|
778 |
itemValue: setEnforcedNameSpace |
|
779 |
) |
|
780 |
(MenuItem |
|
781 |
label: '-' |
|
782 |
) |
|
783 |
(MenuItem |
|
784 |
label: 'Settings...' |
|
785 |
itemValue: openSettingsDialog |
|
7096 | 786 |
) |
787 |
) |
|
788 |
nil |
|
789 |
nil |
|
3202 | 790 |
) |
10681 | 791 |
! |
792 |
||
793 |
toolbarMenuSpec |
|
794 |
"This resource specification was automatically generated |
|
795 |
by the MenuEditor of ST/X." |
|
796 |
||
797 |
"Do not manually edit this!! If it is corrupted, |
|
798 |
the MenuEditor may not be able to read the specification." |
|
799 |
||
800 |
||
801 |
" |
|
802 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#toolbarMenuSpec |
|
803 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser toolbarMenuSpec)) startUp |
|
804 |
" |
|
805 |
||
806 |
<resource: #menu> |
|
807 |
||
808 |
^ |
|
809 |
#(Menu |
|
810 |
( |
|
811 |
(MenuItem |
|
812 |
activeHelpKey: applyChange |
|
813 |
enabled: hasSelectionHolder |
|
814 |
label: 'Apply' |
|
815 |
itemValue: doApply |
|
816 |
translateLabel: true |
|
817 |
isButton: true |
|
818 |
labelImage: (ResourceRetriever ToolbarIconLibrary executeMethod20x20Icon) |
|
819 |
) |
|
820 |
(MenuItem |
|
821 |
label: '-' |
|
822 |
) |
|
823 |
(MenuItem |
|
824 |
activeHelpKey: deleteAllForClass |
|
825 |
enabled: hasSelectionHolder |
|
15016 | 826 |
isVisible: canDeleteChanges |
10681 | 827 |
label: 'Delete all for Class' |
828 |
itemValue: doDeleteClassAll |
|
829 |
translateLabel: true |
|
830 |
isButton: true |
|
831 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteClass24x24Icon) |
|
832 |
) |
|
13991 | 833 |
(MenuItem |
16022 | 834 |
activeHelpKey: deleteForClassFromBegin |
835 |
enabled: hasSelectionHolder |
|
836 |
isVisible: canDeleteChanges |
|
837 |
label: 'Delete for Class from Beginning' |
|
838 |
itemValue: doDeleteClassFromBeginning |
|
839 |
translateLabel: true |
|
840 |
isButton: true |
|
841 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteClassFromStart24x24Icon) |
|
842 |
) |
|
843 |
(MenuItem |
|
13991 | 844 |
activeHelpKey: deleteForClassToEnd |
845 |
enabled: hasSelectionHolder |
|
15016 | 846 |
isVisible: canDeleteChanges |
13991 | 847 |
label: 'Delete for Class to End' |
848 |
itemValue: doDeleteClassRest |
|
849 |
translateLabel: true |
|
850 |
isButton: true |
|
851 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteClassToEnd24x24Icon) |
|
852 |
) |
|
17565 | 853 |
(MenuItem |
854 |
label: '-' |
|
855 |
) |
|
856 |
(MenuItem |
|
857 |
activeHelpKey: deleteClassSelectorAll |
|
858 |
enabled: hasSelectionHolder |
|
859 |
isVisible: canDeleteChanges |
|
860 |
label: 'Delete all Versions of this Method' |
|
861 |
itemValue: doDeleteClassSelectorAll |
|
862 |
translateLabel: true |
|
863 |
isButton: true |
|
864 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteMethod24x24Icon) |
|
865 |
) |
|
866 |
(MenuItem |
|
867 |
activeHelpKey: deleteClassSelectorOlder |
|
868 |
enabled: hasSelectionHolder |
|
869 |
isVisible: canDeleteChanges |
|
870 |
label: 'Delete older Versions of this Method' |
|
871 |
itemValue: doDeleteClassSelectorOlder |
|
872 |
translateLabel: true |
|
873 |
isButton: true |
|
874 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteMethodFromStart24x24Icon) |
|
875 |
) |
|
10681 | 876 |
) |
877 |
nil |
|
878 |
nil |
|
879 |
) |
|
17565 | 880 |
|
881 |
"Modified: / 07-07-2017 / 12:52:28 / cg" |
|
3202 | 882 |
! ! |
883 |
||
3674 | 884 |
!ChangesBrowser class methodsFor:'private-changeFile access'! |
885 |
||
886 |
readXMLChangesFrom:aStream inBackground:inBackground |
|
887 |
"read an XML source file (format as in campSmalltalk DTD)" |
|
888 |
||
889 |
|changeSet| |
|
890 |
||
891 |
(XML isNil or:[XML::SourceNodeBuilder isNil or:[XML::XMLParser isNil]]) ifTrue:[ |
|
6288 | 892 |
Smalltalk loadPackage:'stx:goodies/xml/vw'. |
893 |
(XML isNil or:[XML::SourceNodeBuilder isNil or:[XML::XMLParser isNil]]) ifTrue:[ |
|
894 |
self error:'Could not load XML package(s) from ''stx:goodies/xml/vw'''. |
|
895 |
] |
|
3674 | 896 |
]. |
897 |
||
898 |
changeSet := ChangeSet new. |
|
6288 | 899 |
XML::SourceScannerNodeBuilder new |
900 |
scanFile:aStream |
|
901 |
do:[:eachChange | |
|
902 |
changeSet addChange:eachChange. |
|
903 |
]. |
|
3674 | 904 |
^ changeSet |
905 |
||
906 |
"/ builder := XML::SourceScannerNodeBuilder new. |
|
907 |
"/ parser := XML::XMLParser on:aStream. |
|
908 |
"/ parser builder:builder. |
|
909 |
"/ parser validate:false. |
|
910 |
"/ parser scanDocument. |
|
911 |
! |
|
912 |
||
913 |
readXMLChangesFromFile:changeFileName inBackground:inBackground |
|
14011 | 914 |
|set| |
915 |
||
916 |
changeFileName asFilename readingFileDo:[:s| |
|
917 |
set := self readXMLChangesFrom:s inBackground:false. |
|
918 |
]. |
|
3674 | 919 |
^ set. |
920 |
! ! |
|
921 |
||
922 |
!ChangesBrowser class methodsFor:'utilities'! |
|
923 |
||
924 |
isXMLFile:aFilename |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
925 |
|stream first| |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
926 |
|
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
927 |
stream := aFilename asFilename readStreamOrNil. |
3674 | 928 |
stream isNil ifTrue:[^ false]. |
929 |
||
930 |
stream skipSeparators. |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
931 |
first := stream peek. |
3674 | 932 |
stream close. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
933 |
^ first == $< |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
934 |
! |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
935 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
936 |
methodDefinitionSelectors |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
937 |
^ #( |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
938 |
#'methodsFor:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
939 |
#'privateMethodsFor:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
940 |
#'publicMethodsFor:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
941 |
#'ignoredMethodsFor:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
942 |
#'protectedMethodsFor:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
943 |
#'methodsFor:stamp:' "/ Squeak support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
944 |
#'commentStamp:prior:' "/ Squeak support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
945 |
#methodsFor "/ Dolphin support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
946 |
#categoriesForClass "/ Dolphin support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
947 |
#'categoriesFor:' "/ Dolphin support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
948 |
#methods "/ STV support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
949 |
#publicMethods "/ STV / V'Age support |
6532 | 950 |
#privateMethods "/ STV / V'Age support |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
951 |
#'methodsForUndefined:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
952 |
) |
3674 | 953 |
! ! |
954 |
||
3202 | 955 |
!ChangesBrowser methodsFor:'aspects'! |
956 |
||
957 |
applyInOriginalNameSpace |
|
958 |
^ applyInOriginalNameSpace |
|
959 |
! |
|
960 |
||
3472 | 961 |
applyNotInOriginalNameSpace |
6288 | 962 |
^ BlockValue forLogicalNot:self applyInOriginalNameSpace |
3472 | 963 |
! |
964 |
||
3202 | 965 |
autoCompare |
966 |
^ autoCompare |
|
967 |
! |
|
968 |
||
969 |
autoUpdate |
|
970 |
"enabled/disable automatic update from the change-file (for monitoring)" |
|
971 |
||
972 |
^ autoUpdate |
|
973 |
||
974 |
"Created: 3.12.1995 / 14:14:24 / cg" |
|
975 |
"Modified: 3.12.1995 / 14:20:45 / cg" |
|
976 |
! |
|
977 |
||
6216 | 978 |
autoloadAsRequired |
979 |
^ autoloadAsRequired |
|
980 |
! |
|
981 |
||
15016 | 982 |
canDeleteChanges |
983 |
"makes the delete buttons in the toolbar visible" |
|
984 |
||
985 |
^ true. |
|
986 |
! |
|
987 |
||
11048 | 988 |
changeListSelectionHolder |
989 |
changeListSelectionHolder isNil ifTrue:[ |
|
990 |
changeListSelectionHolder := nil asValue. |
|
991 |
]. |
|
992 |
^ changeListSelectionHolder |
|
993 |
||
994 |
"Created: / 03-01-2012 / 15:19:25 / cg" |
|
995 |
! |
|
996 |
||
3202 | 997 |
editingClassSource |
3203 | 998 |
^ editingClassSource ? false |
3202 | 999 |
! |
1000 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1001 |
hasMultiSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1002 |
^ self hasSelection and:[self hasSingleSelection not] |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1003 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1004 |
|
11028 | 1005 |
hasMultiSelectionHolder |
1006 |
^ [ self hasMultiSelection ] |
|
1007 |
||
1008 |
"Created: / 25-12-2011 / 11:21:52 / cg" |
|
1009 |
! |
|
1010 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1011 |
hasNoMultiSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1012 |
^ self hasMultiSelection not |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1013 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1014 |
|
11028 | 1015 |
hasNoMultiSelectionHolder |
1016 |
^ [ self hasNoMultiSelection ] |
|
1017 |
||
1018 |
"Created: / 25-12-2011 / 11:21:20 / cg" |
|
1019 |
! |
|
1020 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1021 |
hasNoSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1022 |
^ self hasSelection not |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1023 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1024 |
|
3202 | 1025 |
hasSelection |
6288 | 1026 |
^ changeListView hasSelection |
3202 | 1027 |
! |
1028 |
||
11048 | 1029 |
hasSelectionHolder |
1030 |
^ BlockValue |
|
1031 |
with:[:v | v notEmptyOrNil ] |
|
1032 |
argument:(self changeListSelectionHolder) |
|
1033 |
||
1034 |
"Created: / 03-01-2012 / 15:15:47 / cg" |
|
1035 |
! |
|
1036 |
||
3211 | 1037 |
hasSingleSelection |
1038 |
changeListView multipleSelectOk ifTrue:[ |
|
6288 | 1039 |
^ changeListView selection size == 1 |
3211 | 1040 |
]. |
1041 |
^ changeListView hasSelection |
|
1042 |
! |
|
1043 |
||
10719 | 1044 |
ignorePublicPrivateCategories |
1045 |
^ ignorePublicPrivateCategories |
|
1046 |
||
1047 |
"Created: / 23-09-2011 / 19:42:46 / cg" |
|
1048 |
! |
|
1049 |
||
17848 | 1050 |
leftCodeLabelHolder |
1051 |
"holds the string shown above the left codeView (defaults to: 'Current')" |
|
1052 |
||
1053 |
^ leftCodeLabelHolder |
|
1054 |
||
1055 |
"Created: / 07-12-2017 / 12:28:31 / cg" |
|
1056 |
! |
|
1057 |
||
3202 | 1058 |
notEditingClassSource |
1059 |
^ self editingClassSource not |
|
3211 | 1060 |
! |
1061 |
||
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1062 |
notEditingClassSourceAndNotReadOnly |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1063 |
^ (self editingClassSource or:[readOnly == true]) not |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1064 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1065 |
|
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1066 |
notReadOnly |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1067 |
^ (readOnly ~~ true) |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1068 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1069 |
|
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1070 |
readOnly:aBoolean |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1071 |
readOnly := aBoolean |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1072 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1073 |
|
17848 | 1074 |
rightCodeLabelHolder |
1075 |
"holds the string shown above the right codeView (defaults to: 'Change')" |
|
1076 |
||
1077 |
^ rightCodeLabelHolder |
|
1078 |
||
1079 |
"Created: / 07-12-2017 / 12:28:37 / cg" |
|
1080 |
! |
|
1081 |
||
4487 | 1082 |
showingDiffs |
1083 |
showingDiffs isNil ifTrue:[ |
|
6288 | 1084 |
showingDiffs := self showingDiffsDefault asValue. |
1085 |
showingDiffs |
|
1086 |
onChangeEvaluate:[ |
|
1087 |
showingDiffs value ifTrue:[ |
|
1088 |
self updateDiffView. |
|
1089 |
self makeDiffViewVisible |
|
1090 |
] ifFalse:[ |
|
1091 |
self makeDiffViewInvisible |
|
1092 |
]. |
|
1093 |
DefaultShowingDiffs := showingDiffs value. |
|
1094 |
] |
|
4487 | 1095 |
]. |
1096 |
^ showingDiffs |
|
1097 |
! |
|
1098 |
||
4943 | 1099 |
showingDiffsDefault |
1100 |
^ (DefaultShowingDiffs ? true) |
|
1101 |
! |
|
1102 |
||
3211 | 1103 |
theSingleSelection |
1104 |
|sel| |
|
1105 |
||
1106 |
sel := changeListView selection. |
|
1107 |
changeListView multipleSelectOk ifTrue:[ |
|
6288 | 1108 |
sel size == 1 ifTrue:[ |
1109 |
^ sel first |
|
1110 |
]. |
|
1111 |
^ nil |
|
3211 | 1112 |
]. |
1113 |
^ sel. |
|
3319 | 1114 |
! |
1115 |
||
1116 |
updateChangeSet |
|
1117 |
^ updateChangeSet |
|
3202 | 1118 |
! ! |
1119 |
||
202 | 1120 |
!ChangesBrowser methodsFor:'compiler interface'! |
1121 |
||
1122 |
wantChangeLog |
|
1123 |
"sent by the compiler to ask if a changeLog entry should |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1124 |
be written when compiling. Return false here." |
202 | 1125 |
|
1126 |
^ false |
|
1127 |
! ! |
|
1128 |
||
4869 | 1129 |
!ChangesBrowser methodsFor:'compiler interface-error handling'! |
202 | 1130 |
|
1131 |
correctableError:aString position:relPos to:relEndPos from:aCompiler |
|
12656 | 1132 |
"compiler notifies us of an error - this should really not happen since |
202 | 1133 |
changes ought to be correct (did someone edit the changes file ??). |
1134 |
Show the bad change in the codeView and let codeView hilight the error; |
|
1135 |
no corrections allowed here therefore return false" |
|
1136 |
||
2293 | 1137 |
ShowWarningDialogs == true ifTrue:[ |
12656 | 1138 |
self error:aString position:relPos to:relEndPos from:aCompiler. |
2293 | 1139 |
] ifFalse:[ |
12656 | 1140 |
Transcript showCR:aString. |
2293 | 1141 |
]. |
202 | 1142 |
^ false |
1143 |
! |
|
1144 |
||
2555 | 1145 |
correctableSelectorWarning:aString position:relPos to:relEndPos from:aCompiler |
12656 | 1146 |
"compiler notifies us of a warning" |
2555 | 1147 |
|
1148 |
^ false |
|
1149 |
||
1150 |
"Modified: / 19.1.2000 / 16:25:31 / cg" |
|
1151 |
"Created: / 19.1.2000 / 16:27:23 / cg" |
|
1152 |
! |
|
1153 |
||
9621
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1154 |
correctableWarning:aString position:relPos to:relEndPos from:aCompiler |
12656 | 1155 |
"compiler notifies us of an error - this should really not happen since |
9621
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1156 |
changes ought to be correct (did someone edit the changes file ??). |
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1157 |
Show the bad change in the codeView and let codeView hilight the error; |
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1158 |
no corrections allowed here therefore return false" |
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1159 |
|
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1160 |
^ self correctableError:aString position:relPos to:relEndPos from:aCompiler |
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1161 |
|
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1162 |
"Created: / 02-11-2010 / 13:29:52 / cg" |
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1163 |
! |
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1164 |
|
202 | 1165 |
error:aString position:relPos to:relEndPos from:aCompiler |
12656 | 1166 |
"compiler notifies us of an error - this should really not happen since |
202 | 1167 |
changes ought to be correct (did someone edit the changes file ??). |
1168 |
Show the bad change in the codeView and let codeView hilight the error" |
|
1169 |
||
1170 |
|action| |
|
1171 |
||
1172 |
(changeNrProcessed ~~ changeNrShown) ifTrue:[ |
|
7783
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1173 |
self changeSelection:changeNrProcessed |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1174 |
]. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1175 |
|
12973 | 1176 |
"if more than a single change is applied, |
7783
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1177 |
ask the user if he wants to abort the whole sequence of operations..." |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1178 |
multipleApply == true ifTrue:[ |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1179 |
codeView highlightingErrorPosition:relPos to:relEndPos do:[ |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1180 |
|box| |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1181 |
|
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1182 |
" |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1183 |
start dialog - make certain cleanup is done |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1184 |
" |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1185 |
action := OptionBox |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1186 |
request:aString |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1187 |
label:'Error' |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1188 |
image:(WarningBox iconBitmap) |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1189 |
buttonLabels:#('Cancel All' 'Skip this Change' " 'Shut up' " 'Continue') |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1190 |
values:#(abortAll skip "shutUp" continue) |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1191 |
default:#continue |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1192 |
onCancel:#abort. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1193 |
]. |
2293 | 1194 |
|
1195 |
"/ action == #shutUp ifTrue:[ |
|
1196 |
"/ aCompiler ignoreWarnings. |
|
6288 | 1197 |
"/ ^ false |
2293 | 1198 |
"/ ]. |
1199 |
||
7783
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1200 |
action == #abortAll ifTrue:[ |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1201 |
AbortAllOperationRequest raise. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1202 |
^ false |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1203 |
]. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1204 |
action == #skip ifTrue:[ |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1205 |
AbortOperationRequest raise. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1206 |
^ false |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1207 |
]. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1208 |
^ false |
202 | 1209 |
]. |
1210 |
^ codeView error:aString position:relPos to:relEndPos from:aCompiler |
|
373 | 1211 |
|
3436
c4fe19deba58
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3406
diff
changeset
|
1212 |
"Modified: / 16.11.2001 / 17:38:10 / cg" |
202 | 1213 |
! |
1214 |
||
3064 | 1215 |
unusedVariableWarning:aString position:relPos to:relEndPos from:aCompiler |
1216 |
"compiler notifies us of a (or some) unused variables; |
|
1217 |
hilight the error (relPos to relEndPos) and show a Box asking for continue/correct/abort; |
|
1218 |
this method should return true to the compiler if user wants the error |
|
1219 |
to be corrected; false otherwise" |
|
1220 |
||
1221 |
^ false |
|
1222 |
! |
|
1223 |
||
202 | 1224 |
warning:aString position:relPos to:relEndPos from:aCompiler |
12656 | 1225 |
"compiler notifies us of a warning - ignore it" |
202 | 1226 |
|
1227 |
^ self |
|
1228 |
! ! |
|
1229 |
||
2604 | 1230 |
!ChangesBrowser methodsFor:'event handling'! |
202 | 1231 |
|
1232 |
handlesKeyPress:key inView:view |
|
1233 |
"this method is reached via delegation: are we prepared to handle |
|
1234 |
a keyPress in some other view ?" |
|
1235 |
||
1127 | 1236 |
<resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)> |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1237 |
|
202 | 1238 |
view == changeListView ifTrue:[ |
6288 | 1239 |
(key == #Delete |
1240 |
or:[key == #BackSpace |
|
1241 |
or:[key == #Accept |
|
1242 |
or:[key == #Find |
|
1243 |
or:[key == #FindPrev |
|
1244 |
or:[key == #FindNext]]]]]) ifTrue:[^ true]. |
|
202 | 1245 |
]. |
1246 |
^ false |
|
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1247 |
|
1127 | 1248 |
"Modified: 8.4.1997 / 11:01:42 / cg" |
0 | 1249 |
! |
1250 |
||
202 | 1251 |
keyPress:key x:x y:y view:view |
1252 |
"this method is reached via delegation from the changeListView" |
|
1253 |
||
1127 | 1254 |
<resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)> |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1255 |
|
3249 | 1256 |
(key == #Delete) ifTrue:[ |
13078 | 1257 |
self sensor shiftDown ifTrue:[ |
1258 |
self doDeleteAndSelectPrevious. |
|
1259 |
] ifFalse:[ |
|
1260 |
self doDelete. |
|
1261 |
]. |
|
1262 |
^ self |
|
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1263 |
]. |
3249 | 1264 |
(key == #BackSpace) ifTrue:[ |
13078 | 1265 |
self doDelete. "/ doDeleteAndSelectPrevious. |
1266 |
^ self |
|
3249 | 1267 |
]. |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1268 |
(key == #Accept) ifTrue:[ |
13078 | 1269 |
self doApply. |
1270 |
^ self |
|
202 | 1271 |
]. |
1127 | 1272 |
(key == #Find) ifTrue:[ |
13078 | 1273 |
self findClass. |
1274 |
^ self |
|
1127 | 1275 |
]. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1276 |
(key == #FindPrev) ifTrue:[ |
13078 | 1277 |
self findPrevious. |
1278 |
^ self |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1279 |
]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1280 |
(key == #FindNext) ifTrue:[ |
13078 | 1281 |
self findNext. |
1282 |
^ self |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1283 |
]. |
202 | 1284 |
changeListView keyPress:key x:x y:y |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1285 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1286 |
"Modified: / 18.6.1998 / 22:15:36 / cg" |
202 | 1287 |
! ! |
1288 |
||
3327 | 1289 |
!ChangesBrowser methodsFor:'help'! |
202 | 1290 |
|
394 | 1291 |
showActivity:someMessage |
502 | 1292 |
"some activityNotification to be forwarded to the user; |
1293 |
show it in the windows title area here." |
|
1294 |
||
11346 | 1295 |
someMessage isNil ifTrue:[ |
1296 |
self newLabel:'' |
|
11347 | 1297 |
] ifFalse:[ |
1298 |
self label:someMessage |
|
1299 |
]. |
|
394 | 1300 |
|
1301 |
"Created: 24.2.1996 / 19:35:42 / cg" |
|
502 | 1302 |
"Modified: 23.4.1996 / 21:39:36 / cg" |
202 | 1303 |
! ! |
1304 |
||
4868 | 1305 |
!ChangesBrowser methodsFor:'initialization & release'! |
202 | 1306 |
|
3202 | 1307 |
autoCompareChanged |
1308 |
"sent from the compare-toggle" |
|
1309 |
||
3534 | 1310 |
|doCompare| |
1311 |
||
13373 | 1312 |
self askIfChangesAreToBeWrittenBack. |
1313 |
||
3534 | 1314 |
doCompare := autoCompare value. |
1315 |
DefaultAutoCompare := doCompare. |
|
1316 |
self setupTabSpec. |
|
1317 |
doCompare ifTrue:[ |
|
13373 | 1318 |
self doUpdate |
3202 | 1319 |
] ifFalse:[ |
13373 | 1320 |
changeListView invalidate. "/ clear; redraw. |
3202 | 1321 |
] |
1322 |
! |
|
1323 |
||
202 | 1324 |
changeListMenu |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1325 |
"return the menu for the change (upper) list" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1326 |
|
586 | 1327 |
<resource: #keyboard ( #Accept #Delete ) > |
1359 | 1328 |
<resource: #programMenu > |
586 | 1329 |
|
3211 | 1330 |
|items m replNext replPrev sel| |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1331 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1332 |
self sensor ctrlDown ifTrue:[ |
7360 | 1333 |
"/ notice - findNext/prev shortKeys will search for the same thing again. |
1334 |
items := #( |
|
1335 |
('Search Class...' findClass #Find ) |
|
1336 |
('Previous for this Class' findPreviousForClass #FindPrevClass ) |
|
1337 |
('Next for this Class' findNextForClass #FindNextClass ) |
|
1338 |
('-' ) |
|
1339 |
('Search Selector...' findSelector ) |
|
1340 |
('Previous with this Selector' findPreviousForSelector #FindPrevSelector ) |
|
1341 |
('Next with this Selector' findNextForSelector #FindNextSelector ) |
|
1342 |
('-' ) |
|
1343 |
('Search String...' findString ) |
|
1344 |
('Previous with this String' findPreviousForString #FindPrevString ) |
|
1345 |
('Next with this String' findNextForString #FindNextString ) |
|
1346 |
('-' ) |
|
1347 |
('Previous Snapshot' findPreviousSnapshot #FindPrevSnapshot ) |
|
1348 |
('Next Snapshot' findNextSnapshot #FindNextSnapshot ) |
|
1349 |
). |
|
1350 |
||
1351 |
lastSearchType == #selector ifTrue:[ |
|
1352 |
replNext := #FindNextSelector. |
|
1353 |
replPrev := #FindPrevSelector. |
|
1354 |
] ifFalse:[ |
|
1355 |
lastSearchType == #snapshot ifTrue:[ |
|
1356 |
replNext := #FindNextSnapshot. |
|
1357 |
replPrev := #FindPrevSnapshot. |
|
1358 |
] ifFalse:[ |
|
1359 |
lastSearchType == #string ifTrue:[ |
|
1360 |
replNext := #FindNextString. |
|
1361 |
replPrev := #FindPrevString. |
|
1362 |
] ifFalse:[ |
|
1363 |
replNext := #FindNextClass. |
|
1364 |
replPrev := #FindPrevClass. |
|
1365 |
] |
|
1366 |
] |
|
1367 |
]. |
|
1368 |
items := items deepCopy. |
|
1369 |
items do:[:each | |
|
1370 |
each replaceAll:replNext with:#FindNext. |
|
1371 |
each replaceAll:replPrev with:#FindPrev. |
|
1372 |
each replaceAny:#(FindNextClass FindPrevClass |
|
1373 |
FindNextSelector FindPrevSelector |
|
1374 |
FindNextSnapshot FindPrevSnapshot |
|
1375 |
FindNextString FindPrevString) |
|
1376 |
with:nil. |
|
1377 |
]. |
|
1378 |
||
1379 |
^ PopUpMenu itemList:items resources:resources. |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1380 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1381 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1382 |
items := #( |
7360 | 1383 |
('Apply' doApply Accept) |
1384 |
('Apply to End' doApplyRest ) |
|
1385 |
('Apply from Begin' doApplyFromBeginning ) |
|
1386 |
('Apply for Class to End' doApplyClassRest ) |
|
1387 |
('Apply for Class from Begin' doApplyClassFromBeginning ) |
|
1388 |
('Apply All' doApplyAll ) |
|
1389 |
('-' ) |
|
1390 |
('Delete' doDelete Delete) |
|
1391 |
('Delete to End' doDeleteRest ) |
|
1392 |
('Delete for Class to End' doDeleteClassRest ) |
|
1393 |
('Delete for Class from Begin' doDeleteClassFromBeginning ) |
|
1394 |
). |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1395 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1396 |
(self hasSelection and:[self hasSingleSelection not]) ifTrue:[ |
7360 | 1397 |
items := items , |
1398 |
#( |
|
15187 | 1399 |
('Delete all for Classes' doDeleteClassAll ) |
1400 |
('Delete all for Classes & their Private Classes' doDeleteClassAndPrivateClassesAll ) |
|
7360 | 1401 |
). |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1402 |
] ifFalse:[ |
7360 | 1403 |
items := items , |
1404 |
#( |
|
15187 | 1405 |
('Delete all for Class' doDeleteClassAll ) |
1406 |
('Delete all for Class & its Private Classes' doDeleteClassAndPrivateClassesAll ) |
|
7360 | 1407 |
). |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1408 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1409 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1410 |
items := items , |
7360 | 1411 |
#( |
1412 |
('-' ) |
|
1413 |
('Compress' doCompress ) |
|
1414 |
('Compress for Class' doCompressClass ) |
|
1415 |
('Compare and Compress' doCompareAndCompress ) |
|
1416 |
('-' ) |
|
1417 |
('Compare with current Version' doCompare ) |
|
1418 |
('Browse Class' doBrowse ) |
|
1419 |
('-' ) |
|
1420 |
('Make Change a Patch' doMakePatch ) |
|
1421 |
). |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1422 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1423 |
editingClassSource ifFalse:[ |
7360 | 1424 |
items := items , #( |
15187 | 1425 |
('Fileout & Delete all for Class' doFileoutAndDeleteClassAll ) |
1426 |
('CheckIn & Delete all for Class' doCheckinAndDeleteClassAll ) |
|
7360 | 1427 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1428 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1429 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1430 |
items := items , #( |
7360 | 1431 |
('-' ) |
1432 |
('Save in...' doSave ) |
|
1433 |
('Save to End In...' doSaveRest ) |
|
1434 |
('Save for Class to End In...' doSaveClassRest ) |
|
1435 |
('Save all for Class In...' doSaveClassAll ) |
|
1436 |
('-' ) |
|
1437 |
). |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1438 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1439 |
editingClassSource ifTrue:[ |
7360 | 1440 |
items := items , #( |
1441 |
('Writeback ClassFile' doWriteBack ) |
|
1442 |
) |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1443 |
] ifFalse:[ |
7360 | 1444 |
items := items , #( |
1445 |
('Writeback ChangeFile' doWriteBack ) |
|
1446 |
) |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1447 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1448 |
|
1833
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
1449 |
items := items , #( |
7360 | 1450 |
('-' ) |
1451 |
('Update' doUpdate ) |
|
1452 |
). |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1453 |
|
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1454 |
m := PopUpMenu itemList:items resources:resources. |
202 | 1455 |
|
255 | 1456 |
"/ |
1457 |
"/ disable those that require a selected entry |
|
1458 |
"/ |
|
3202 | 1459 |
self hasSelection ifFalse:[ |
7360 | 1460 |
m disableAll:#(doApply doApplyClassRest doApplyRest doDelete doDeleteRest doDeleteClassRest |
1461 |
doDeleteClassFromBeginning doDeleteClassAll doDeleteClassAndPrivateClassesAll |
|
1462 |
doCompare doCompressClass doMakePatch doSaveChangeInFile doMakePermanent |
|
1463 |
doSave doSaveRest doSaveClassAll doSaveClassRest doBrowse |
|
1464 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll) |
|
1368 | 1465 |
] ifTrue:[ |
7360 | 1466 |
sel := self theSingleSelection. |
1467 |
sel isNil ifTrue:[ |
|
1468 |
"/ multiple selections |
|
1469 |
m disableAll:#(doApplyClassRest doApplyRest doDeleteClassRest doDeleteRest |
|
1470 |
doDeleteClassFromBeginning |
|
1471 |
doCompressClass doCompare |
|
1472 |
doSaveClassAll doSaveClassRest doSaveRest doBrowse |
|
1473 |
doFileoutAndDeleteClassAll) |
|
1474 |
] ifFalse:[ |
|
1475 |
(self classNameOfChange:sel) isNil ifTrue:[ |
|
1476 |
m disableAll:#(doApplyClassRest doDeleteClassRest |
|
1477 |
doDeleteClassFromBeginning doDeleteClassAll doDeleteClassAndPrivateClassesAll |
|
1478 |
doCompressClass doCompare doMakePatch |
|
1479 |
doSaveClassAll doSaveClassRest doBrowse |
|
1480 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll) |
|
1481 |
] |
|
1482 |
] |
|
255 | 1483 |
]. |
1484 |
||
1485 |
"/ |
|
1486 |
"/ disable those that do not make sense with autoUpdate |
|
1487 |
"/ ('cause this would be overwritten by next update operation) |
|
1488 |
"/ |
|
3202 | 1489 |
autoUpdate value ifTrue:[ |
7360 | 1490 |
m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll |
1491 |
doDeleteClassAndPrivateClassesAll doCompress |
|
1492 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll |
|
1493 |
doWriteBack) |
|
202 | 1494 |
]. |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1495 |
readOnly == true ifTrue:[ |
7360 | 1496 |
m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll |
1497 |
doDeleteClassAndPrivateClassesAll doCompress |
|
1498 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll |
|
1499 |
doWriteBack doSaveBack doUpdate |
|
1500 |
doApplyAll doApplyRest) |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1501 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1502 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1503 |
self hasSelection ifTrue:[ |
7360 | 1504 |
m disable:#doApplyAll |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1505 |
]. |
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1506 |
|
202 | 1507 |
^ m |
1508 |
||
7360 | 1509 |
"Modified: / 06-09-1995 / 17:14:22 / claus" |
1510 |
"Modified: / 06-10-2006 / 11:17:06 / cg" |
|
202 | 1511 |
! |
1512 |
||
2114 | 1513 |
destroy |
1514 |
"destroy the receiver; make certain, that boxes are destroyed too" |
|
1515 |
||
1516 |
Processor removeTimedBlock:checkBlock. |
|
1517 |
ObjectMemory removeDependent:self. |
|
1518 |
super destroy |
|
1519 |
! |
|
1520 |
||
202 | 1521 |
initialize |
16467 | 1522 |
|panel infoLabel v upperFrame buttonPanel menuPanel mH toolbarMenu tmH |
9168 | 1523 |
checkBox oldStyle codeViewBox lbl applyInOriginal| |
3202 | 1524 |
|
17848 | 1525 |
leftCodeLabelHolder := 'Current' asValue. |
1526 |
rightCodeLabelHolder := 'Change' asValue. |
|
1527 |
||
3211 | 1528 |
"/ oldStyle := true. |
3202 | 1529 |
oldStyle := false. |
202 | 1530 |
|
1531 |
super initialize. |
|
1532 |
||
5702 | 1533 |
changeFileName := ObjectMemory nameForChanges. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
1534 |
encodingIfKnown := nil. |
3534 | 1535 |
autoCompare := (DefaultAutoCompare ? false) asValue. |
3202 | 1536 |
autoCompare onChangeSend:#autoCompareChanged to:self. |
1537 |
autoUpdate := false asValue. |
|
6216 | 1538 |
autoloadAsRequired := false asValue. |
10719 | 1539 |
ignorePublicPrivateCategories := false asValue. |
9168 | 1540 |
|
1541 |
applyInOriginal := true. |
|
1542 |
KeepEnforcedNameSpace == true ifTrue:[ |
|
1543 |
enforcedNameSpace := LastEnforcedNameSpace. |
|
1544 |
applyInOriginal := false. |
|
1545 |
]. |
|
1546 |
||
1547 |
applyInOriginalNameSpace := applyInOriginal asValue. |
|
6288 | 1548 |
applyInOriginalNameSpace |
6357 | 1549 |
onChangeEvaluate:[ |
1550 |
autoCompare value ifTrue:[ |
|
1551 |
self doUpdate |
|
1552 |
]. |
|
1553 |
]. |
|
9168 | 1554 |
|
4897 | 1555 |
updateChangeSet := true "false" asValue. |
8026
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
1556 |
classesNotToBeAutoloaded := Set new. |
221 | 1557 |
|
1099
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1558 |
" |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1559 |
checkBlock is executed by the Processor. |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1560 |
We use #pushEvent: to perform the update |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1561 |
in our windowgroups process. |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1562 |
" |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1563 |
checkBlock := [self pushEvent:#checkIfFileHasChanged]. |
202 | 1564 |
|
3202 | 1565 |
oldStyle ifFalse:[ |
6357 | 1566 |
menuPanel := MenuPanel in:self. |
1567 |
"/ menuPanel level:1. |
|
1568 |
menuPanel verticalLayout:false. |
|
1569 |
menuPanel receiver:self. |
|
1570 |
menuPanel menu:(self pullDownMenu). |
|
1571 |
||
8164
ee17624160a6
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8102
diff
changeset
|
1572 |
mH := menuPanel preferredHeight. |
6357 | 1573 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
1574 |
mH := mH + 1. |
|
10681 | 1575 |
|
1576 |
toolbarMenu := MenuPanel in:self. |
|
1577 |
toolbarMenu verticalLayout:false. |
|
1578 |
toolbarMenu receiver:self. |
|
1579 |
toolbarMenu menu:(self toolbarMenu). |
|
17899 | 1580 |
toolbarMenu helpSpecProvider:self. "/ for helpTexts |
10681 | 1581 |
|
1582 |
tmH := toolbarMenu preferredHeight. |
|
1583 |
toolbarMenu origin:(0.0 @ mH) corner:(1.0 @ (mH+tmH)). |
|
1584 |
mH := mH + tmH + 1. |
|
3202 | 1585 |
] ifTrue:[ |
6357 | 1586 |
mH := 0.0 |
3202 | 1587 |
]. |
1588 |
||
16467 | 1589 |
panel := VariableVerticalPanel in:self. |
1590 |
"/ panel origin:(0.0 @ mH) corner:(1.0 @ 1.0) |
|
1591 |
panel layout:(LayoutFrame |
|
1592 |
leftFraction:0.0 offset:0 |
|
1593 |
rightFraction:1.0 offset:0 |
|
1594 |
topFraction:0.0 offset:mH |
|
1595 |
bottomFraction:1.0 offset:-30). |
|
1596 |
panel borderWidth:0. |
|
1597 |
||
1598 |
infoLabel := Label in:self. |
|
1599 |
infoLabel layout:(LayoutFrame |
|
1600 |
leftFraction:0.0 offset:0 |
|
1601 |
rightFraction:1.0 offset:0 |
|
1602 |
topFraction:1.0 offset:-28 |
|
1603 |
bottomFraction:1.0 offset:-2). |
|
1604 |
infoLabel borderWidth:0. |
|
1605 |
infoLabel sizeFixed:true. |
|
1606 |
infoLabel level:-1. |
|
1607 |
infoLabel adjust:#left. |
|
1608 |
infoLabel labelChannel:(infoHolder := '' asValue). |
|
1609 |
||
3202 | 1610 |
upperFrame := panel. |
1611 |
oldStyle ifTrue:[ |
|
6357 | 1612 |
upperFrame := VariableHorizontalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 0.3) in:panel. |
3202 | 1613 |
]. |
202 | 1614 |
|
1615 |
v := HVScrollableView for:SelectionInListView miniScrollerH:true in:upperFrame. |
|
3202 | 1616 |
oldStyle ifTrue:[ |
6357 | 1617 |
v origin:(0.0 @ 0.0) corner:(0.75 @ 1.0). |
3202 | 1618 |
] ifFalse:[ |
6357 | 1619 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.3). |
3202 | 1620 |
]. |
3090 | 1621 |
|
202 | 1622 |
changeListView := v scrolledView. |
1623 |
changeListView delegate:self. |
|
1624 |
changeListView menuHolder:self; menuPerformer:self; menuMessage:#changeListMenu. |
|
1471 | 1625 |
changeListView doubleClickAction:[:line | self doubleClickOnChange:line]. |
3211 | 1626 |
oldStyle ifFalse:[ |
6357 | 1627 |
changeListView multipleSelectOk:true. |
3211 | 1628 |
]. |
202 | 1629 |
|
3202 | 1630 |
oldStyle ifTrue:[ |
6357 | 1631 |
buttonPanel := VerticalPanelView in:upperFrame. |
1632 |
buttonPanel origin:(0.75 @ 0.0) corner:(1.0 @ 1.0). |
|
1633 |
buttonPanel verticalLayout:#topSpace; horizontalLayout:#leftSpace. |
|
1634 |
||
1635 |
checkBox := CheckBox new model:autoCompare. |
|
1636 |
checkBox label:(resources string:'Auto Compare'). |
|
1637 |
checkBox action:[:val | autoCompare value:val]. |
|
1638 |
buttonPanel addSubView:checkBox. |
|
1639 |
||
1640 |
checkBox := CheckBox new model:autoUpdate. |
|
1641 |
checkBox label:(resources string:'Auto Update'). |
|
1642 |
checkBox action:[:val | autoUpdate value:val]. |
|
1643 |
buttonPanel addSubView:checkBox. |
|
1644 |
||
1645 |
checkBox := CheckBox new. |
|
1646 |
checkBox label:(resources stringWithCRs:'Apply in original NameSpace'). |
|
1647 |
checkBox model:applyInOriginalNameSpace. |
|
1648 |
buttonPanel addSubView:checkBox. |
|
3202 | 1649 |
]. |
2301 | 1650 |
|
3090 | 1651 |
"/ protectExistingMethods := CheckBox new. |
1652 |
"/ protectExistingMethods label:(resources string:'Protect existing code' withCRs). |
|
1653 |
"/ protectExistingMethods model:protectExistingMethods. |
|
1654 |
"/ buttonPanel addSubView:protectExistingMethods. |
|
1655 |
||
4487 | 1656 |
codeViewBox := View in:panel. |
1657 |
codeViewBox origin:(0.0 @ 0.3) corner:(1.0 @ 1.0). |
|
1658 |
||
1659 |
v := HVScrollableView for:CodeView miniScrollerH:true miniScrollerV:false in:codeViewBox. |
|
1660 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
202 | 1661 |
codeView := v scrolledView. |
1996 | 1662 |
codeView readOnly:true. |
202 | 1663 |
|
4487 | 1664 |
diffViewBox := View in:codeViewBox. |
1665 |
diffViewBox origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
1666 |
||
17848 | 1667 |
lbl := Label label:leftCodeLabelHolder value in:diffViewBox. |
1668 |
lbl labelChannel:leftCodeLabelHolder. |
|
4487 | 1669 |
lbl layout:(LayoutFrame |
6357 | 1670 |
leftFraction:0.0 offset:0 |
1671 |
rightFraction:0.5 offset:0 |
|
1672 |
topFraction:0.0 offset:0 |
|
1673 |
bottomFraction:0.0 offset:20). |
|
17848 | 1674 |
lbl := Label label:rightCodeLabelHolder value in:diffViewBox. |
1675 |
lbl labelChannel:rightCodeLabelHolder. |
|
4487 | 1676 |
lbl layout:(LayoutFrame |
6357 | 1677 |
leftFraction:0.5 offset:0 |
1678 |
rightFraction:1.0 offset:0 |
|
1679 |
topFraction:0.0 offset:0 |
|
1680 |
bottomFraction:0.0 offset:20). |
|
4487 | 1681 |
|
1682 |
"/ diffView := DiffTextView in:diffViewBox. |
|
1683 |
"/ diffView layout:(LayoutFrame |
|
1684 |
"/ leftFraction:0.0 offset:0 |
|
1685 |
"/ rightFraction:1.0 offset:0 |
|
1686 |
"/ topFraction:0.0 offset:20 |
|
1687 |
"/ bottomFraction:1.0 offset:0). |
|
1688 |
||
8102 | 1689 |
v := HVScrollableView for:DiffCodeView miniScrollerH:true miniScrollerV:false in:diffViewBox. |
4487 | 1690 |
v layout:(LayoutFrame |
6357 | 1691 |
leftFraction:0.0 offset:0 |
1692 |
rightFraction:1.0 offset:0 |
|
1693 |
topFraction:0.0 offset:20 |
|
1694 |
bottomFraction:1.0 offset:0). |
|
4487 | 1695 |
diffView := v scrolledView. |
1696 |
||
1697 |
self showingDiffs value ifFalse:[ |
|
6357 | 1698 |
self makeDiffViewInvisible |
4487 | 1699 |
]. |
1700 |
||
202 | 1701 |
anyChanges := false. |
1702 |
ObjectMemory addDependent:self. "to get shutdown-update" |
|
1703 |
||
1704 |
tabSpec := TabulatorSpecification new. |
|
1705 |
tabSpec unit:#inch. |
|
1706 |
tabSpec positions:#(-1 0 5 8.5 ). |
|
1707 |
" +/- cls>>sel type info" |
|
1708 |
tabSpec align: #(#left #left #left #left). |
|
1709 |
||
10681 | 1710 |
"Modified: / 27-03-1997 / 11:07:07 / stefan" |
17848 | 1711 |
"Modified: / 07-12-2017 / 12:28:09 / cg" |
202 | 1712 |
! |
1713 |
||
1246
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1714 |
postRealize |
3534 | 1715 |
self setupTabSpec. |
202 | 1716 |
self readChangesFileInBackground:true. |
1717 |
self setChangeList. |
|
16467 | 1718 |
changeListView action:[:lineNrOrCollection | self changeSelection:lineNrOrCollection]. |
202 | 1719 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
1246
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1720 |
|
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1721 |
"Created: 24.7.1997 / 18:06:12 / cg" |
202 | 1722 |
! |
1723 |
||
3202 | 1724 |
pullDownMenu |
1725 |
"return the top (pullDown) menu" |
|
1726 |
||
1727 |
<resource: #programMenu> |
|
1728 |
||
3330 | 1729 |
^ self menuFromSpec:self class menuSpec. |
1730 |
||
1731 |
"/ |m| |
|
1732 |
"/ |
|
1733 |
"/ m := self class menuSpec. |
|
1734 |
"/ m := m decodeAsLiteralArray. |
|
1735 |
"/ m receiver:self. |
|
1736 |
"/ m findGuiResourcesIn:self. |
|
1737 |
"/ ^ m. |
|
3202 | 1738 |
! |
1739 |
||
3534 | 1740 |
setupTabSpec |
1741 |
autoCompare value ifTrue:[ |
|
9515 | 1742 |
tabSpec positions:#(0 0.15 7 9.5 ). |
3534 | 1743 |
] ifFalse:[ |
9515 | 1744 |
"/ |
1745 |
"/ set tabs to hide compare-column |
|
1746 |
"/ |
|
1747 |
tabSpec positions:#(-1 0 7 9.5 ). |
|
3534 | 1748 |
] |
9515 | 1749 |
|
1750 |
"Modified: / 10-07-2010 / 10:59:49 / cg" |
|
3534 | 1751 |
! |
1752 |
||
10681 | 1753 |
toolbarMenu |
1754 |
"return the top (pullDown) menu" |
|
1755 |
||
1756 |
<resource: #programMenu> |
|
1757 |
||
1758 |
^ self menuFromSpec:self class toolbarMenuSpec. |
|
1759 |
||
1760 |
"Created: / 07-09-2011 / 16:03:41 / cg" |
|
1761 |
! |
|
1762 |
||
627 | 1763 |
update:what with:aParameter from:changedObject |
202 | 1764 |
|box| |
1765 |
||
8558
a85166102cb7
Wait for #aboutToQuit change message instead of obsolete #aboutToExit
Stefan Vogel <sv@exept.de>
parents:
8515
diff
changeset
|
1766 |
(what == #aboutToQuit) ifTrue:[ |
6639 | 1767 |
" |
1768 |
smalltalk is about to shut down - |
|
1769 |
- if change list was modified, ask user and save if requested. |
|
1770 |
" |
|
1771 |
anyChanges ifTrue:[ |
|
1772 |
self raiseDeiconified. |
|
1773 |
||
1774 |
box := YesNoBox new. |
|
1775 |
box title:('The modified changelist has not been written back to the change file.\\Write change file before exiting ?') withCRs. |
|
1776 |
box okText:(resources string:'Write') noText:(resources string:'Don''t write'). |
|
1777 |
box yesAction:[self writeBackChanges] |
|
1778 |
noAction:[]. |
|
1779 |
box showAtPointer. |
|
1780 |
box destroy |
|
1781 |
]. |
|
1782 |
^ self |
|
202 | 1783 |
]. |
11048 | 1784 |
|
8558
a85166102cb7
Wait for #aboutToQuit change message instead of obsolete #aboutToExit
Stefan Vogel <sv@exept.de>
parents:
8515
diff
changeset
|
1785 |
super update:what with:aParameter from:changedObject |
627 | 1786 |
|
11048 | 1787 |
"Created: / 15-06-1996 / 15:26:30 / cg" |
1788 |
"Modified: / 24-08-1999 / 09:45:06 / stefan" |
|
1789 |
"Modified: / 03-01-2012 / 15:23:13 / cg" |
|
202 | 1790 |
! ! |
1791 |
||
3202 | 1792 |
!ChangesBrowser methodsFor:'menu actions'! |
1793 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1794 |
doApply |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1795 |
"user wants a change to be applied" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1796 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1797 |
self withSelectedChangesDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1798 |
(self applyChange:changeNr) ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1799 |
^ self "/ cancel |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1800 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1801 |
self autoSelect:(changeNr + 1) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1802 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1803 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1804 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1805 |
doApplyAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1806 |
"user wants all changes to be applied" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1807 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1808 |
self withExecuteCursorDo:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1809 |
|lastNr "{ Class: SmallInteger }" | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1810 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1811 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1812 |
lastNr := self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1813 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1814 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1815 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1816 |
multipleApply := lastNr > 1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1817 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1818 |
1 to:lastNr do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1819 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1820 |
self applyChange:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1821 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1822 |
self autoSelectLast |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1823 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1824 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1825 |
"Modified: 21.1.1997 / 22:26:30 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1826 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1827 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1828 |
doApplyClassFromBeginning |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1829 |
"user wants all changes for this class from 1 to changeNr to be applied" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1830 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1831 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1832 |
|thisClassName classNameToApply lastChange |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1833 |
lastNr "{ Class: SmallInteger }" | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1834 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1835 |
classNameToApply := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1836 |
classNameToApply notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1837 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1838 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1839 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1840 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1841 |
multipleApply := changeNr ~= 1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1842 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1843 |
1 to:changeNr do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1844 |
thisClassName := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1845 |
thisClassName = classNameToApply ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1846 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1847 |
self applyChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1848 |
lastChange := changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1849 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1850 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1851 |
self autoSelect:changeNr+1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1852 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1853 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1854 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1855 |
"Modified: 21.1.1997 / 22:26:04 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1856 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1857 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1858 |
doApplyClassRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1859 |
"user wants all changes for this class from changeNr to be applied" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1860 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1861 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1862 |
|thisClassName classNameToApply lastChange |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1863 |
lastNr "{ Class: SmallInteger }" | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1864 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1865 |
classNameToApply := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1866 |
classNameToApply notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1867 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1868 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1869 |
lastNr := self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1870 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1871 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1872 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1873 |
multipleApply := (lastNr - changeNr) > 1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1874 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1875 |
changeNr to:lastNr do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1876 |
thisClassName := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1877 |
thisClassName = classNameToApply ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1878 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1879 |
self applyChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1880 |
lastChange := changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1881 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1882 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1883 |
self autoSelect:lastChange. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1884 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1885 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1886 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1887 |
"Modified: 21.1.1997 / 22:26:04 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1888 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1889 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1890 |
doApplyFromBeginning |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1891 |
"user wants all changes from 1 to changeNr to be applied" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1892 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1893 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1894 |
|lastNr "{ Class: SmallInteger }" | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1895 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1896 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1897 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1898 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1899 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1900 |
multipleApply := changeNr ~= 1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1901 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1902 |
1 to:changeNr do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1903 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1904 |
self applyChange:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1905 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1906 |
self autoSelect:changeNr+1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1907 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1908 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1909 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1910 |
doApplyRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1911 |
"apply all changes from changeNr to the end" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1912 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1913 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1914 |
|lastNr "{ Class: SmallInteger }" | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1915 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1916 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1917 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1918 |
lastNr := self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1919 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1920 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1921 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1922 |
multipleApply := (lastNr - changeNr) > 1. |
15087 | 1923 |
AbortAllOperationRequest handle:[:ex | |
1924 |
ex return |
|
1925 |
] do:[ |
|
1926 |
changeNr to:lastNr do:[:changeNr | |
|
1927 |
changeListView setSelection:changeNr. |
|
1928 |
self applyChange:changeNr |
|
1929 |
]. |
|
1930 |
self autoSelect:self numberOfChanges. |
|
1931 |
] |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1932 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1933 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1934 |
"Modified: 21.1.1997 / 22:25:29 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1935 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1936 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1937 |
doApplyToConflictOrEnd |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1938 |
"apply all changes from changeNr to either a conflict (i.e. method exists) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1939 |
or the end." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1940 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1941 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1942 |
|lastNr "{ Class: SmallInteger }"| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1943 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1944 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1945 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1946 |
lastNr := self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1947 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1948 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1949 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1950 |
multipleApply := (lastNr - changeNr) > 1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1951 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1952 |
changeNr to:lastNr do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1953 |
| cls sel | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1954 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1955 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1956 |
((cls := self classOfChange:changeNr ifAbsent:[:className| nil]) notNil |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1957 |
and:[(sel := self selectorOfMethodChange:changeNr) notNil]) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1958 |
ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1959 |
(cls includesSelector:sel) ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1960 |
self autoSelect:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1961 |
^ self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1962 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1963 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1964 |
self applyChange:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1965 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1966 |
self autoSelect:self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1967 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1968 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1969 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1970 |
doBrowse |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1971 |
"user wants a browser on the class of a change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1972 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1973 |
self withSingleSelectedChangeDo:[:changeNr | |
17666 | 1974 |
|cls| |
1975 |
||
1976 |
cls := self classOfChange:changeNr. |
|
1977 |
cls notNil ifTrue:[ |
|
1978 |
SystemBrowser default |
|
1979 |
openInClass:cls |
|
1980 |
selector:(self selectorOfMethodChange:changeNr) |
|
1981 |
] |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1982 |
] |
17666 | 1983 |
|
1984 |
"Modified: / 01-09-2017 / 14:20:00 / cg" |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1985 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1986 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1987 |
doBrowseImplementors |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1988 |
"open an implementors-browser" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1989 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1990 |
|changeNr initial selector| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1991 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1992 |
(changeNr := self theSingleSelection) notNil ifTrue:[ |
17666 | 1993 |
initial := self selectorOfMethodChange:changeNr. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1994 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1995 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1996 |
selector := Dialog |
17666 | 1997 |
request:'Selector to browse implementors of:' |
1998 |
initialAnswer:(initial ? ''). |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1999 |
selector size ~~ 0 ifTrue:[ |
17666 | 2000 |
SystemBrowser default browseImplementorsMatching:selector. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2001 |
] |
17666 | 2002 |
|
2003 |
"Modified (format): / 01-09-2017 / 14:20:06 / cg" |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2004 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2005 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2006 |
doBrowseSenders |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2007 |
"user wants a browser on the class of a change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2008 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2009 |
|changeNr initial selector| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2010 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2011 |
(changeNr := self theSingleSelection) notNil ifTrue:[ |
17666 | 2012 |
initial := self selectorOfMethodChange:changeNr. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2013 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2014 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2015 |
selector := Dialog |
17666 | 2016 |
request:'Selector to browse senders of:' |
2017 |
initialAnswer:(initial ? ''). |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2018 |
selector size ~~ 0 ifTrue:[ |
17666 | 2019 |
SystemBrowser default browseAllCallsOn:selector asSymbol. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2020 |
] |
17666 | 2021 |
|
2022 |
"Modified: / 01-09-2017 / 14:20:13 / cg" |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2023 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2024 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2025 |
doCheckinAndDeleteClassAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2026 |
"first checkin the selected changes class then delete all changes |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2027 |
for it." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2028 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2029 |
|classes answer logTitle checkinInfo| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2030 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2031 |
"/ self theSingleSelection isNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2032 |
"/ ^ self information:'Only possible if a single change is selected.'. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2033 |
"/ ]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2034 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2035 |
self withExecuteCursorDo:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2036 |
classes := IdentitySet new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2037 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2038 |
self withSelectedChangesDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2039 |
| className class | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2040 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2041 |
className := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2042 |
className notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2043 |
class := Smalltalk classNamed:className. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2044 |
class isNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2045 |
self error:'oops - no class: ', className mayProceed:true. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2046 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2047 |
class notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2048 |
class := class theNonMetaclass. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2049 |
(classes includes:class) ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2050 |
class isPrivate ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2051 |
(classes includes:class owningClass) ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2052 |
answer := self confirmWithCancel:('This is a private class.\\CheckIn the owner ''%1'' and all of its private classes ?' |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2053 |
bindWith:class owningClass name allBold) withCRs. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2054 |
answer isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2055 |
answer ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2056 |
classes add:class owningClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2057 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2058 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2059 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2060 |
classes add:class |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2061 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2062 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2063 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2064 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2065 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2066 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2067 |
classes size == 1 ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2068 |
logTitle := classes first name. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2069 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2070 |
logTitle := '%1 classes' bindWith:classes size. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2071 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2072 |
checkinInfo := SourceCodeManagerUtilities default |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2073 |
getCheckinInfoFor:logTitle |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2074 |
initialAnswer:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2075 |
checkinInfo isNil ifTrue:[^ self ]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2076 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2077 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2078 |
classes do:[:eachClass | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2079 |
(SourceCodeManagerUtilities default checkinClass:eachClass withInfo:checkinInfo) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2080 |
ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2081 |
self silentDeleteChangesForClassAndPrivateClasses:eachClass name |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2082 |
from:1 to:(self numberOfChanges). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2083 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2084 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2085 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2086 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2087 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2088 |
"Modified: / 6.9.1995 / 17:11:16 / claus" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2089 |
"Modified: / 17.11.2001 / 14:21:13 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2090 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2091 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2092 |
doCompare |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2093 |
"compare change with current system version" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2094 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2095 |
classesNotToBeAutoloaded removeAll. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2096 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2097 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2098 |
self withExecuteCursorDo:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2099 |
self compareChange:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2100 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2101 |
self newLabel:'' |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2102 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2103 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2104 |
"Modified: 24.2.1996 / 19:37:19 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2105 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2106 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2107 |
doCompareAndCompress |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2108 |
"remove all changes, which are equivalent to the current image version" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2109 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2110 |
|toDelete| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2111 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2112 |
classesNotToBeAutoloaded removeAll. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2113 |
toDelete := OrderedCollection new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2114 |
self withExecuteCursorDo:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2115 |
1 to:self numberOfChanges do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2116 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2117 |
toDelete add:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2118 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2119 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2120 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2121 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2122 |
toDelete reverseDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2123 |
self silentDeleteChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2124 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2125 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2126 |
" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2127 |
scroll back a bit, if we are left way behind the list |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2128 |
" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2129 |
changeListView firstLineShown > self numberOfChanges ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2130 |
changeListView makeLineVisible:self numberOfChanges |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2131 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2132 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2133 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2134 |
self newLabel:''. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2135 |
classesNotToBeAutoloaded removeAll. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2136 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2137 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2138 |
doCompress |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2139 |
"compress the change-set; this replaces multiple method-changes by the last |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2140 |
(i.e. the most recent) change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2141 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2142 |
self compressForClass:nil |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2143 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2144 |
"Modified: / 29.10.1997 / 01:03:26 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2145 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2146 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2147 |
doCompressClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2148 |
"compress changes for the selected class. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2149 |
this replaces multiple method-changes by the last (i.e. the most recent) change." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2150 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2151 |
self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2152 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2153 |
self selectedClassNames do:[:classNameToCompress | |
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2154 |
self compressForClass:classNameToCompress. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2155 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2156 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2157 |
"Created: / 29.10.1997 / 01:05:16 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2158 |
"Modified: / 19.11.2001 / 21:55:17 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2159 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2160 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2161 |
doCompressSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2162 |
"compress changes for the selected class & selector. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2163 |
this replaces multiple method-changes by the last (i.e. the most recent) change." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2164 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2165 |
|classSelectorPairs| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2166 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2167 |
self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2168 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2169 |
classSelectorPairs := Set new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2170 |
self withSelectedChangesDo:[:changeNr | |
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2171 |
| classNameToCompress selector | |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2172 |
|
17600 | 2173 |
classNameToCompress := self realClassNameOfChange:changeNr. |
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2174 |
classNameToCompress notNil ifTrue:[ |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2175 |
selector := self selectorOfMethodChange:changeNr. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2176 |
selector notNil ifTrue:[ |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2177 |
classSelectorPairs add:(classNameToCompress -> selector). |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2178 |
] |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2179 |
] |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2180 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2181 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2182 |
classSelectorPairs do:[:pair | |
17600 | 2183 |
self compressForClass:(pair key) selector:(pair value). |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2184 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2185 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2186 |
"Created: / 19.11.2001 / 21:50:59 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2187 |
"Modified: / 19.11.2001 / 22:10:08 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2188 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2189 |
|
17096 | 2190 |
doCopyToClipboard |
2191 |
"user wants a change text to be copied to the clipboard" |
|
2192 |
||
2193 |
|text| |
|
2194 |
||
2195 |
self withSingleSelectedChangeDo:[:changeNr | |
|
2196 |
text := self sourceOfMethodChange:changeNr. |
|
2197 |
]. |
|
2198 |
text notEmptyOrNil ifTrue:[ |
|
2199 |
self window setClipboardText:text |
|
2200 |
] |
|
2201 |
||
2202 |
"Created: / 21-11-2016 / 23:38:11 / cg" |
|
2203 |
! |
|
2204 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2205 |
doDelete |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2206 |
"delete currently selected change(s)" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2207 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2208 |
|rangeEnd rangeStart firstDeleted| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2209 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2210 |
changeListView selection size <= 5 ifTrue:[ |
16467 | 2211 |
self withSelectedChangesReverseDo:[:changeNr | |
2212 |
self deleteChange:changeNr. |
|
2213 |
self autoSelectOrEnd:changeNr |
|
2214 |
]. |
|
2215 |
self showNumberOfChanges. |
|
2216 |
^ self |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2217 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2218 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2219 |
self withSelectedChangesReverseDo:[:changeNr | |
16467 | 2220 |
rangeEnd isNil ifTrue:[ |
2221 |
rangeEnd := rangeStart := changeNr |
|
2222 |
] ifFalse:[ |
|
2223 |
(changeNr = (rangeEnd + 1)) ifTrue:[ |
|
2224 |
rangeEnd := changeNr |
|
2225 |
] ifFalse:[ |
|
2226 |
(changeNr = (rangeStart - 1)) ifTrue:[ |
|
2227 |
rangeStart := changeNr |
|
2228 |
] ifFalse:[ |
|
2229 |
self deleteChangesFrom:rangeStart to:rangeEnd. |
|
2230 |
firstDeleted := (firstDeleted ? rangeStart) min:rangeStart. |
|
2231 |
rangeStart := rangeEnd := nil. |
|
2232 |
]. |
|
2233 |
]. |
|
2234 |
]. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2235 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2236 |
rangeStart notNil ifTrue:[ |
16467 | 2237 |
self deleteChangesFrom:rangeStart to:rangeEnd. |
2238 |
firstDeleted := (firstDeleted ? rangeStart) min:rangeStart. |
|
2239 |
]. |
|
2240 |
self autoSelectOrEnd:firstDeleted. |
|
2241 |
self showNumberOfChanges |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2242 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2243 |
|
12428 | 2244 |
doDeleteAllForNamespace |
2245 |
"delete all changes for classes with same namespace as currently selected change" |
|
2246 |
||
2247 |
|namespacesToDelete lastChangeNr overAllNumDeletedBefore| |
|
2248 |
||
2249 |
lastChangeNr := -1. |
|
2250 |
namespacesToDelete := Set new. |
|
2251 |
self withSelectedChangesDo:[:changeNr | |
|
2252 |
|namespaceToDelete| |
|
2253 |
||
2254 |
namespaceToDelete := self namespaceOfChange:changeNr. |
|
2255 |
namespaceToDelete notNil ifTrue:[ |
|
2256 |
namespacesToDelete add:namespaceToDelete |
|
2257 |
]. |
|
2258 |
lastChangeNr := lastChangeNr max:changeNr. |
|
2259 |
]. |
|
2260 |
namespacesToDelete isEmpty ifTrue:[^ self]. |
|
2261 |
||
2262 |
overAllNumDeletedBefore := 0. |
|
2263 |
changeListView setSelection:nil. |
|
2264 |
||
2265 |
self withExecuteCursorDo:[ |
|
2266 |
namespacesToDelete do:[:namespaceToDelete | |
|
2267 |
|numDeletedBefore| |
|
2268 |
||
2269 |
self |
|
2270 |
silentDeleteChangesForNamespace:namespaceToDelete |
|
2271 |
from:lastChangeNr |
|
2272 |
to:(self numberOfChanges). |
|
2273 |
numDeletedBefore := self |
|
2274 |
silentDeleteChangesForNamespace:namespaceToDelete |
|
2275 |
from:1 |
|
2276 |
to:(lastChangeNr-1). |
|
2277 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
2278 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
2279 |
]. |
|
2280 |
]. |
|
2281 |
||
2282 |
self setChangeList. |
|
16467 | 2283 |
self autoSelectOrEnd:lastChangeNr. |
12428 | 2284 |
! |
2285 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2286 |
doDeleteAndSelectPrevious |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2287 |
"delete currently selected change(s)" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2288 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2289 |
self withSelectedChangesReverseDo:[:changeNr | |
16467 | 2290 |
self deleteChange:changeNr. |
2291 |
self autoSelectOrEnd:changeNr-1 |
|
2292 |
]. |
|
2293 |
||
2294 |
"/mh - don't we need a |
|
2295 |
"/ self setChangeList |
|
2296 |
"/ here? |
|
2297 |
self showNumberOfChanges |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2298 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2299 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2300 |
doDeleteClassAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2301 |
"delete all changes with same class as currently selected change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2302 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2303 |
|classNamesToDelete lastChangeNr overAllNumDeletedBefore| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2304 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2305 |
lastChangeNr := -1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2306 |
classNamesToDelete := Set new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2307 |
self withSelectedChangesDo:[:changeNr | |
16467 | 2308 |
|classNameToDelete| |
2309 |
||
2310 |
classNameToDelete := self classNameOfChange:changeNr. |
|
2311 |
classNameToDelete notNil ifTrue:[ |
|
2312 |
classNamesToDelete add:classNameToDelete. |
|
2313 |
]. |
|
2314 |
lastChangeNr := lastChangeNr max:changeNr. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2315 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2316 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2317 |
overAllNumDeletedBefore := 0. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2318 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2319 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2320 |
self withExecuteCursorDo:[ |
16467 | 2321 |
classNamesToDelete do:[:classNameToDelete | |
2322 |
|numDeletedBefore| |
|
2323 |
||
2324 |
self silentDeleteChangesFor:classNameToDelete |
|
2325 |
from:lastChangeNr |
|
2326 |
to:(self numberOfChanges). |
|
2327 |
numDeletedBefore := self |
|
2328 |
silentDeleteChangesFor:classNameToDelete |
|
2329 |
from:1 |
|
2330 |
to:(lastChangeNr-1). |
|
2331 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
2332 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
2333 |
]. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2334 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2335 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2336 |
self setChangeList. |
16467 | 2337 |
self autoSelectOrEnd:lastChangeNr. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2338 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2339 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2340 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2341 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2342 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2343 |
doDeleteClassAndPrivateClassesAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2344 |
"delete all changes with same class and private classes |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2345 |
as currently selected change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2346 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2347 |
|lastChangeNr classNamesToDelete overAllNumDeletedBefore| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2348 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2349 |
lastChangeNr := -1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2350 |
classNamesToDelete := Set new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2351 |
self withSelectedChangesDo:[:changeNr | |
16467 | 2352 |
|classNameToDelete| |
2353 |
||
2354 |
classNameToDelete := self ownerClassNameOfChange:changeNr. |
|
2355 |
classNameToDelete notNil ifTrue:[ |
|
2356 |
classNamesToDelete add:classNameToDelete. |
|
2357 |
]. |
|
2358 |
lastChangeNr := lastChangeNr max:changeNr. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2359 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2360 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2361 |
overAllNumDeletedBefore := 0. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2362 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2363 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2364 |
self withExecuteCursorDo:[ |
16467 | 2365 |
classNamesToDelete do:[:classNameToDelete | |
2366 |
| changeNr numDeletedBefore| |
|
2367 |
||
2368 |
classNameToDelete notNil ifTrue:[ |
|
2369 |
changeListView setSelection:nil. |
|
2370 |
self silentDeleteChangesForClassAndPrivateClasses:classNameToDelete |
|
2371 |
from:lastChangeNr |
|
2372 |
to:(self numberOfChanges). |
|
2373 |
numDeletedBefore := self |
|
2374 |
silentDeleteChangesForClassAndPrivateClasses:classNameToDelete |
|
2375 |
from:1 |
|
2376 |
to:(lastChangeNr-1). |
|
2377 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
2378 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
2379 |
] |
|
2380 |
] |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2381 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2382 |
self setChangeList. |
16467 | 2383 |
self autoSelectOrEnd:lastChangeNr. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2384 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2385 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2386 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2387 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2388 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2389 |
doDeleteClassFromBeginning |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2390 |
"delete changes with same class as currently selected change from the beginning |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2391 |
up to the selected change. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2392 |
Useful to get rid of obsolete changes before a fileout or checkin entry." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2393 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2394 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2395 |
|classNameToDelete prevSelection numDeleted| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2396 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2397 |
classNameToDelete := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2398 |
classNameToDelete notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2399 |
prevSelection := changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2400 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2401 |
numDeleted := self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2402 |
silentDeleteChangesFor:classNameToDelete |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2403 |
from:1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2404 |
to:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2405 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2406 |
self autoSelectOrEnd:(changeNr + 1 - numDeleted) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2407 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2408 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2409 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2410 |
"Created: 13.12.1995 / 15:41:58 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2411 |
"Modified: 25.5.1996 / 12:26:34 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2412 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2413 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2414 |
doDeleteClassRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2415 |
"delete rest of changes with same class as currently selected change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2416 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2417 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2418 |
| classNameToDelete | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2419 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2420 |
classNameToDelete := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2421 |
classNameToDelete notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2422 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2423 |
self silentDeleteChangesFor:classNameToDelete |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2424 |
from:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2425 |
to:(self numberOfChanges). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2426 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2427 |
self autoSelectOrEnd:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2428 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2429 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2430 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2431 |
"Modified: / 18.5.1998 / 14:25:07 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2432 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2433 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2434 |
doDeleteClassSelectorAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2435 |
"delete all changes with same class and selector as currently selected change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2436 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2437 |
|classNameSelectorPairsToDelete lastChangeNr overAllNumDeletedBefore| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2438 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2439 |
lastChangeNr := -1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2440 |
classNameSelectorPairsToDelete := Set new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2441 |
self withSelectedChangesDo:[:changeNr | |
17600 | 2442 |
|className selector| |
2443 |
||
2444 |
className := self realClassNameOfChange:changeNr. |
|
2445 |
selector := self selectorOfMethodChange:changeNr. |
|
2446 |
selector notNil ifTrue:[ |
|
2447 |
(className notNil and:[selector notNil]) ifTrue:[ |
|
2448 |
classNameSelectorPairsToDelete add:(className -> selector). |
|
2449 |
] |
|
2450 |
]. |
|
2451 |
lastChangeNr := lastChangeNr max:changeNr. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2452 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2453 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2454 |
overAllNumDeletedBefore := 0. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2455 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2456 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2457 |
self withExecuteCursorDo:[ |
17600 | 2458 |
classNameSelectorPairsToDelete do:[:pair | |
2459 |
|numDeletedBefore className selector| |
|
2460 |
||
2461 |
className := pair key. |
|
2462 |
selector := pair value. |
|
2463 |
self silentDeleteChangesFor:className selector:selector |
|
2464 |
from:lastChangeNr |
|
2465 |
to:(self numberOfChanges). |
|
2466 |
numDeletedBefore := self |
|
2467 |
silentDeleteChangesFor:className selector:selector |
|
2468 |
from:1 |
|
2469 |
to:(lastChangeNr-1). |
|
2470 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
2471 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
2472 |
]. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2473 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2474 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2475 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2476 |
self autoSelectOrEnd:lastChangeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2477 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2478 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2479 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2480 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2481 |
|
16475 | 2482 |
doDeleteClassSelectorOlder |
2483 |
"delete older changes with same class and selector as currently selected change(s)" |
|
2484 |
||
2485 |
|classNameSelectorPairsToDelete upToPerClassAndSelector lastChangeNr overAllNumDeletedBefore| |
|
2486 |
||
2487 |
lastChangeNr := -1. |
|
2488 |
classNameSelectorPairsToDelete := Set new. |
|
2489 |
upToPerClassAndSelector := Dictionary new. |
|
2490 |
||
17597 | 2491 |
"/ collect info on what is to be deleted |
16475 | 2492 |
self withSelectedChangesDo:[:changeNr | |
2493 |
|className selector| |
|
2494 |
||
17600 | 2495 |
className := self realClassNameOfChange:changeNr. |
16475 | 2496 |
selector := self selectorOfMethodChange:changeNr. |
2497 |
selector notNil ifTrue:[ |
|
2498 |
(className notNil and:[selector notNil]) ifTrue:[ |
|
2499 |
classNameSelectorPairsToDelete add:(className -> selector). |
|
2500 |
upToPerClassAndSelector at:(className -> selector) put:changeNr. |
|
2501 |
] |
|
2502 |
]. |
|
2503 |
lastChangeNr := lastChangeNr max:changeNr. |
|
2504 |
]. |
|
2505 |
||
2506 |
overAllNumDeletedBefore := 0. |
|
2507 |
changeListView setSelection:nil. |
|
2508 |
||
2509 |
self withExecuteCursorDo:[ |
|
2510 |
classNameSelectorPairsToDelete do:[:pair | |
|
2511 |
|numDeletedBefore className selector lastToDelete| |
|
2512 |
||
2513 |
className := pair key. |
|
2514 |
selector := pair value. |
|
17597 | 2515 |
lastToDelete := (upToPerClassAndSelector at:pair). |
16475 | 2516 |
|
2517 |
numDeletedBefore := self |
|
2518 |
silentDeleteChangesFor:className selector:selector |
|
2519 |
from:1 |
|
2520 |
to:lastToDelete. |
|
2521 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
2522 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
2523 |
]. |
|
2524 |
]. |
|
2525 |
||
2526 |
self setChangeList. |
|
2527 |
self autoSelectOrEnd:lastChangeNr |
|
17597 | 2528 |
|
2529 |
"Modified: / 25-07-2017 / 10:57:31 / cg" |
|
16475 | 2530 |
! |
2531 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2532 |
doDeleteFromBeginning |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2533 |
"delete all changes from 1 to the current" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2534 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2535 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2536 |
self deleteChangesFrom:1 to:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2537 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2538 |
self autoSelectOrEnd:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2539 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2540 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2541 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2542 |
doDeleteRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2543 |
"delete all changes from current to the end" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2544 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2545 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2546 |
self deleteChangesFrom:changeNr to:(self numberOfChanges). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2547 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2548 |
self autoSelectOrEnd:changeNr-1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2549 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2550 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2551 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2552 |
doFileoutAndDeleteClassAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2553 |
"first fileOut the selected changes class then delete all changes |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2554 |
for it." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2555 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2556 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2557 |
| className class | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2558 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2559 |
className := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2560 |
className notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2561 |
class := Smalltalk classNamed:className. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2562 |
class notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2563 |
Class fileOutErrorSignal handle:[:ex | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2564 |
self warn:('fileout failed: ' , ex description). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2565 |
] do:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2566 |
class fileOut. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2567 |
self doDeleteClassAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2568 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2569 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2570 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2571 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2572 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2573 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2574 |
"Modified: 6.9.1995 / 17:11:16 / claus" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2575 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2576 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2577 |
doMakePatch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2578 |
"user wants a change to be made a patch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2579 |
- copy it over to the patches file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2580 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2581 |
self withSelectedChangesDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2582 |
self makeChangeAPatch:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2583 |
self autoSelect:(changeNr + 1) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2584 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2585 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2586 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2587 |
doMakePermanent |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2588 |
"user wants a change to be made permanent |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2589 |
- rewrite the source file where this change has to go" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2590 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2591 |
|yesNoBox| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2592 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2593 |
self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2594 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2595 |
yesNoBox := YesNoBox new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2596 |
yesNoBox title:(resources string:'Warning: this operation cannot be undone'). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2597 |
yesNoBox okText:(resources string:'continue') noText:(resources string:'abort'). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2598 |
yesNoBox okAction:[ |changeNr| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2599 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2600 |
changeNr := self theSingleSelection. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2601 |
changeNr notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2602 |
self makeChangePermanent:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2603 |
self autoSelect:(changeNr + 1) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2604 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2605 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2606 |
yesNoBox showAtPointer. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2607 |
yesNoBox destroy |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2608 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2609 |
"Modified: 7.1.1997 / 23:03:33 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2610 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2611 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2612 |
doSave |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2613 |
"user wants a change to be appended to a file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2614 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2615 |
|fileName| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2616 |
|
13651 | 2617 |
fileName := Dialog |
2618 |
requestFileNameForSave:(resources string:'Append change to:') |
|
2619 |
default:(lastSaveFileName ? '') |
|
2620 |
ok:(resources string:'Append') |
|
2621 |
abort:(resources string:'Abort') |
|
2622 |
pattern:'*.chg'. |
|
2623 |
fileName isEmptyOrNil ifTrue:[ |
|
2624 |
^ self |
|
2625 |
]. |
|
2626 |
lastSaveFileName := fileName. |
|
2627 |
||
2628 |
self withWriteCursorDo:[ |
|
2629 |
self withSelectedChangesDo:[:changeNr | |
|
2630 |
self appendChange:changeNr toFile:fileName. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2631 |
self autoSelect:(changeNr + 1) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2632 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2633 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2634 |
|
11685 | 2635 |
"Modified: / 27-07-2012 / 09:46:14 / cg" |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2636 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2637 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2638 |
doSaveClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2639 |
"user wants changes for some class from current to end to be appended to a file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2640 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2641 |
self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2642 |
self doSaveClassFrom:1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2643 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2644 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2645 |
doSaveClassAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2646 |
"user wants changes for some class from current to end to be appended to a file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2647 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2648 |
self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2649 |
self doSaveClassFrom:1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2650 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2651 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2652 |
doSaveClassFrom:startNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2653 |
"user wants changes from current to end to be appended to a file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2654 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2655 |
|changeNr classNameToSave| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2656 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2657 |
changeNr := self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2658 |
classNameToSave := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2659 |
classNameToSave notNil ifTrue:[ |
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2660 |
self saveClass:classNameToSave from:startNr |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2661 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2662 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2663 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2664 |
doSaveClassRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2665 |
"user wants changes for some class from current to end to be appended to a file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2666 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2667 |
|changeNr| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2668 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2669 |
changeNr := self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2670 |
self doSaveClassFrom:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2671 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2672 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2673 |
"/ self changeSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2674 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2675 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2676 |
doSaveRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2677 |
"user wants changes from current to end to be appended to a file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2678 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2679 |
|changeNr fileName| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2680 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2681 |
(changeNr := self theSingleSelection) isNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2682 |
^ self information:(resources string:'Only possible if a single change is selected.'). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2683 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2684 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2685 |
fileName := Dialog |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2686 |
requestFileNameForSave:(resources string:'Append changes to:') |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2687 |
default:(lastSaveFileName ? '') |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2688 |
ok:(resources string:'Append') |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2689 |
abort:(resources string:'Abort') |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2690 |
pattern:'*.chg'. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2691 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2692 |
fileName notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2693 |
lastSaveFileName := fileName. |
11685 | 2694 |
self withWriteCursorDo:[ |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2695 |
changeNr to:(self numberOfChanges) do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2696 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2697 |
(self appendChange:changeNr toFile:fileName) ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2698 |
^ self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2699 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2700 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2701 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2702 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2703 |
|
11685 | 2704 |
"Modified: / 27-07-2012 / 09:46:09 / cg" |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2705 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2706 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2707 |
doUpdate |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2708 |
"reread the changes-file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2709 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2710 |
self readChangesFileInBackground:true. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2711 |
self newLabel:''. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2712 |
realized ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2713 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2714 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2715 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2716 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2717 |
doWriteBack |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2718 |
"write back the list onto the changes file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2719 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2720 |
anyChanges ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2721 |
(self writeBackChanges) ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2722 |
realized ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2723 |
self readChangesFile. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2724 |
realized ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2725 |
self setChangeList |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2726 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2727 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2728 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2729 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2730 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2731 |
"Modified: 5.9.1996 / 17:19:46 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2732 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2733 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2734 |
findClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2735 |
"findClass menu action: let user enter a classes name, and select the next change for that class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2736 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2737 |
|current| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2738 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2739 |
changeNrShown notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2740 |
current := self classNameOfChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2741 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2742 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2743 |
self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2744 |
askForSearch:'Class to search for:' |
17394 | 2745 |
initialAnswer:(current ? lastSearchString) |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2746 |
thenSearchUsing:[:searchString :changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2747 |
|thisClassName| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2748 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2749 |
thisClassName := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2750 |
thisClassName notNil |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2751 |
and:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2752 |
(thisClassName sameAs: searchString) |
13440 | 2753 |
or:[searchString includesMatchCharacters and:[searchString match:thisClassName caseSensitive:false]]] |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2754 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2755 |
onCancel:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2756 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2757 |
lastSearchType := #class. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2758 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
17382 | 2759 |
|
17394 | 2760 |
"Modified: / 12-02-2017 / 11:31:47 / cg" |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2761 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2762 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2763 |
findFirstForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2764 |
"findNextForClass menu action: select the next change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2765 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2766 |
self findNextForClassStartingAt:1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2767 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2768 |
"Created: / 20-11-2006 / 16:37:56 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2769 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2770 |
|
15674 | 2771 |
findFirstForClass:className |
2772 |
"findNextForClass menu action: select the next change for the selected changes class" |
|
2773 |
||
2774 |
self findNextForClass:className startingAt:1 |
|
2775 |
! |
|
2776 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2777 |
findLastForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2778 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2779 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2780 |
self findPreviousForClassStartingAt:(self numberOfChanges) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2781 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2782 |
"Created: / 20-11-2006 / 16:39:15 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2783 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2784 |
|
15674 | 2785 |
findLastForClass:className |
2786 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
|
2787 |
||
2788 |
self findPreviousForClass:className startingAt:(self numberOfChanges) |
|
2789 |
||
2790 |
"Created: / 20-11-2006 / 16:39:15 / cg" |
|
2791 |
! |
|
2792 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2793 |
findLastSnapshot |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2794 |
"findLastSnapshot menu action: select the last change which is for a snapShot-image save action" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2795 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2796 |
"/ lastSearchType := #snapshot. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2797 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2798 |
self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2799 |
findPreviousForWhich: [:changeNr | self changeIsSnapShotInfo:changeNr ] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2800 |
startingAt:(self numberOfChanges) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2801 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2802 |
"Created: / 06-10-2006 / 11:03:39 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2803 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2804 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2805 |
findNext |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2806 |
"findNext menu action: select the next change. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2807 |
Searches for what the last search was for; i.e. either same class or same selector" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2808 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2809 |
lastSearchType == #selector ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2810 |
^ self findNextForSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2811 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2812 |
lastSearchType == #snapshot ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2813 |
^ self findNextSnapshot |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2814 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2815 |
lastSearchType == #string ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2816 |
^ self findNextForString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2817 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2818 |
lastSearchType == #difference ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2819 |
^ self findNextDifference |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2820 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2821 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2822 |
^ self findNextForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2823 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2824 |
"Created: / 18.6.1998 / 22:15:00 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2825 |
"Modified: / 18.6.1998 / 22:15:25 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2826 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2827 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2828 |
findNextDifference |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2829 |
lastSearchType := #difference. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2830 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2831 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2832 |
self findNextForWhich:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2833 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2834 |
"/ same |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2835 |
false |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2836 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2837 |
"/ different |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2838 |
true |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2839 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2840 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2841 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2842 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2843 |
findNextForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2844 |
"findNextForClass menu action: select the next change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2845 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2846 |
self findNextForClassStartingAt: changeNrShown + 1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2847 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2848 |
"Modified: / 20-11-2006 / 16:37:49 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2849 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2850 |
|
15674 | 2851 |
findNextForClass:className startingAt:startNr |
2852 |
"findNextForClass menu action: select the next change for the selected changes class" |
|
2853 |
||
2854 |
lastSearchType := #class. |
|
2855 |
||
2856 |
self |
|
2857 |
findNextForWhich:[:changeNr | |
|
2858 |
|thisClass| |
|
2859 |
||
2860 |
thisClass := self classNameOfChange:changeNr. |
|
2861 |
(thisClass = className |
|
2862 |
or:[className includesMatchCharacters |
|
2863 |
and:[className match:thisClass]])] |
|
2864 |
startingAt:startNr |
|
2865 |
! |
|
2866 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2867 |
findNextForClassStartingAt:startNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2868 |
"findNextForClass menu action: select the next change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2869 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2870 |
|cls| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2871 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2872 |
lastSearchType := #class. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2873 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2874 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2875 |
cls := self classNameOfChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2876 |
cls isNil ifTrue:[^ self]. |
15674 | 2877 |
self findNextForClass:cls startingAt:startNr. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2878 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2879 |
"Created: / 20-11-2006 / 16:37:37 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2880 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2881 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2882 |
findNextForSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2883 |
"findNextForSelector menu action: select the next change for the selected changes selector" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2884 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2885 |
|sel| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2886 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2887 |
lastSearchType := #selector. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2888 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2889 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2890 |
sel := self selectorOfMethodChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2891 |
sel isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2892 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2893 |
self findNextForWhich: [:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2894 |
|thisSelector| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2895 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2896 |
thisSelector := self selectorOfMethodChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2897 |
(thisSelector = sel or:[sel includesMatchCharacters and:[sel match:thisSelector]]) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2898 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2899 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2900 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2901 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2902 |
findNextForString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2903 |
lastSearchString isNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2904 |
^ self findString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2905 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2906 |
self findNextWithString:lastSearchString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2907 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2908 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2909 |
findNextForWhich:aBlock |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2910 |
"helper: select the next change for which aBlock evaluates to true" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2911 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2912 |
^ self findNextForWhich:aBlock startingAt:changeNrShown + 1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2913 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2914 |
"Modified: / 20-11-2006 / 16:34:23 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2915 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2916 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2917 |
findNextForWhich:aBlock startingAt:changeNrToStartSearch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2918 |
"helper: select the next change for which aBlock evaluates to true" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2919 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2920 |
^ self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2921 |
findNextOrPrevious:#next |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2922 |
forWhich:aBlock startingAt:changeNrToStartSearch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2923 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2924 |
"Created: / 20-11-2006 / 16:34:06 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2925 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2926 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2927 |
findNextOrPrevious:direction forWhich:aBlock startingAt:changeNrToStartSearch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2928 |
"helper: find and select the next or previous change for which aBlock evaluates to true" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2929 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2930 |
self withCursor:Cursor questionMark do:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2931 |
Object userInterruptSignal handle:[:ex | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2932 |
self beep. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2933 |
^ 0 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2934 |
] do:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2935 |
|increment nr lastNr| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2936 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2937 |
increment := (direction == #previous) ifTrue:[-1] ifFalse:[1]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2938 |
lastNr := self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2939 |
nr := changeNrToStartSearch. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2940 |
[ (direction == #previous and:[nr >= 1]) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2941 |
or:[ direction == #next and:[ nr <= lastNr]] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2942 |
] whileTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2943 |
(aBlock value:nr) ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2944 |
changeListView setSelection:nr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2945 |
self changeSelection:nr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2946 |
^ nr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2947 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2948 |
nr := nr + increment. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2949 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2950 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2951 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2952 |
self showNotFound. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2953 |
self windowGroup sensor flushKeyboard. "/ avoid multiple beeps, in case of type ahead |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2954 |
^ 0 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2955 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2956 |
"Created: / 08-03-2012 / 11:57:26 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2957 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2958 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2959 |
findNextSnapshot |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2960 |
"findNextSnapshot menu action: select the next change which is for a snapShot-image save action" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2961 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2962 |
lastSearchType := #snapshot. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2963 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2964 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2965 |
self findNextForWhich: [:changeNr | self changeIsSnapShotInfo:changeNr ] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2966 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2967 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2968 |
findNextWithString:searchString |
14939 | 2969 |
|includesMatchCharacters| |
2970 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2971 |
lastSearchType := #string. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2972 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2973 |
lastSearchString := searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2974 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2975 |
changeNrShown isNil ifTrue:[ |
14939 | 2976 |
changeNrShown := 0. |
2977 |
]. |
|
2978 |
||
2979 |
includesMatchCharacters := searchString includesMatchCharacters. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2980 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2981 |
self findNextForWhich: |
14939 | 2982 |
[:changeNr | |
2983 |
|s| |
|
2984 |
||
2985 |
s := self sourceOfMethodChange:changeNr. |
|
2986 |
s notNil and:[ |
|
2987 |
(includesMatchCharacters not and:[(s findString:searchString) ~~ 0]) |
|
2988 |
or:[ includesMatchCharacters and:[('*' , searchString , '*') match:s ]]] |
|
2989 |
]. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2990 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2991 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2992 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2993 |
codeView setSearchPattern:searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2994 |
codeView |
14939 | 2995 |
searchFwd:searchString |
2996 |
ignoreCase:false |
|
2997 |
startingAtLine:1 col:0 |
|
2998 |
ifAbsent:nil. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2999 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3000 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3001 |
findPrevious |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3002 |
"findPrevious menu action: select the previous change. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3003 |
Searches for what the last search was for; i.e. either same class or same selector" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3004 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3005 |
lastSearchType == #selector ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3006 |
^ self findPreviousForSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3007 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3008 |
lastSearchType == #snapshot ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3009 |
^ self findPreviousSnapshot |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3010 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3011 |
lastSearchType == #string ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3012 |
^ self findPreviousForString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3013 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3014 |
lastSearchType == #difference ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3015 |
^ self findPreviousDifference |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3016 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3017 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3018 |
^ self findPreviousForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3019 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3020 |
"Created: / 18.6.1998 / 22:15:15 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3021 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3022 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3023 |
findPreviousDifference |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3024 |
lastSearchType := #difference. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3025 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3026 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3027 |
self findPreviousForWhich:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3028 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3029 |
"/ same |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3030 |
false |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3031 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3032 |
"/ different |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3033 |
true |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3034 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3035 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3036 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3037 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3038 |
findPreviousForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3039 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3040 |
|
12738 | 3041 |
self findPreviousForClassStartingAt:((changeNrShown ? 1) - 1) |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3042 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3043 |
"Modified: / 20-11-2006 / 16:39:04 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3044 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3045 |
|
15674 | 3046 |
findPreviousForClass:className startingAt:startNr |
3047 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
|
3048 |
||
3049 |
lastSearchType := #class. |
|
3050 |
||
3051 |
self |
|
3052 |
findPreviousForWhich: |
|
3053 |
[:changeNr | |
|
3054 |
|thisClass| |
|
3055 |
||
3056 |
thisClass := self classNameOfChange:changeNr. |
|
3057 |
(thisClass = className |
|
3058 |
or:[className includesMatchCharacters |
|
3059 |
and:[className match:thisClass]])] |
|
3060 |
startingAt:startNr |
|
3061 |
! |
|
3062 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3063 |
findPreviousForClassStartingAt:startNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3064 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3065 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3066 |
|cls| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3067 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3068 |
lastSearchType := #class. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3069 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3070 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3071 |
cls := self classNameOfChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3072 |
cls isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3073 |
|
15674 | 3074 |
self findPreviousForClass:cls startingAt:startNr |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3075 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3076 |
"Created: / 20-11-2006 / 16:38:37 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3077 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3078 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3079 |
findPreviousForSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3080 |
"findPreviousForSelector menu action: select the previous change for the selected changes selector" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3081 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3082 |
|sel| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3083 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3084 |
lastSearchType := #selector. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3085 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3086 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3087 |
sel := self selectorOfMethodChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3088 |
sel isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3089 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3090 |
self findPreviousForWhich: |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3091 |
[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3092 |
|thisSelector| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3093 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3094 |
thisSelector := self selectorOfMethodChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3095 |
(thisSelector = sel |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3096 |
or:[sel includesMatchCharacters and:[sel match:thisSelector]]) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3097 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3098 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3099 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3100 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3101 |
findPreviousForString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3102 |
lastSearchString isNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3103 |
^ self findString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3104 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3105 |
self findPreviousWithString:lastSearchString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3106 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3107 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3108 |
findPreviousForWhich:aBlock |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3109 |
"helper: select the previous change for which aBlock evaluates to true" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3110 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3111 |
^ self findPreviousForWhich:aBlock startingAt:(changeNrShown - 1) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3112 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3113 |
"Modified: / 06-10-2006 / 11:01:38 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3114 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3115 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3116 |
findPreviousForWhich:aBlock startingAt:changeNrToStartSearch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3117 |
"helper: select the previous change for which aBlock evaluates to true" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3118 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3119 |
^ self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3120 |
findNextOrPrevious:#previous |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3121 |
forWhich:aBlock startingAt:changeNrToStartSearch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3122 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3123 |
"Created: / 06-10-2006 / 11:01:09 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3124 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3125 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3126 |
findPreviousSnapshot |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3127 |
"findPreviousSnapshot menu action: select the previous change which is for a snapShot-image save action" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3128 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3129 |
lastSearchType := #snapshot. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3130 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3131 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3132 |
self findPreviousForWhich: [:changeNr | self changeIsSnapShotInfo:changeNr ] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3133 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3134 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3135 |
findPreviousWithString:searchString |
14939 | 3136 |
|includesMatchCharacters| |
3137 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3138 |
lastSearchType := #string. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3139 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3140 |
lastSearchString := searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3141 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3142 |
changeNrShown isNil ifTrue:[ |
14939 | 3143 |
changeNrShown := 0. |
3144 |
]. |
|
3145 |
||
3146 |
includesMatchCharacters := searchString includesMatchCharacters. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3147 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3148 |
self findPreviousForWhich: |
14939 | 3149 |
[:changeNr | |
3150 |
|s | |
|
3151 |
||
3152 |
s := self sourceOfMethodChange:changeNr. |
|
3153 |
s notNil and:[ |
|
3154 |
(includesMatchCharacters not and:[(s findString:searchString) ~~ 0]) |
|
3155 |
or:[includesMatchCharacters and:[('*' , searchString , '*') match:s ]]] |
|
3156 |
]. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3157 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3158 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3159 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3160 |
codeView setSearchPattern:searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3161 |
codeView |
14939 | 3162 |
searchFwd:searchString |
3163 |
ignoreCase:false |
|
3164 |
startingAtLine:1 col:0 |
|
3165 |
ifAbsent:nil. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3166 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3167 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3168 |
findSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3169 |
"findSelector menu action: let user enter a selector, and select the next change for that selector" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3170 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3171 |
|current| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3172 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3173 |
changeNrShown notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3174 |
current := self selectorOfMethodChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3175 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3176 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3177 |
self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3178 |
askForSearch:'Selector to search for:' |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3179 |
initialAnswer:current |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3180 |
thenSearchUsing:[:searchString :changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3181 |
|thisSelector| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3182 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3183 |
thisSelector := self selectorOfMethodChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3184 |
(thisSelector = searchString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3185 |
or:[searchString includesMatchCharacters and:[searchString match:thisSelector]]) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3186 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3187 |
onCancel:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3188 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3189 |
lastSearchType := #selector. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3190 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3191 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3192 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3193 |
findString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3194 |
|searchString directionHolder| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3195 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3196 |
lastSearchType := #string. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3197 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3198 |
searchString := codeView selection. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3199 |
searchString size == 0 ifTrue:[searchString := lastSearchString]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3200 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3201 |
searchString := self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3202 |
askForSearchString:'String to search for:' |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3203 |
initialAnswer:(searchString ? '') |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3204 |
directionInto:(directionHolder := ValueHolder new). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3205 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3206 |
searchString size == 0 ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3207 |
^ self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3208 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3209 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3210 |
directionHolder value == #backward ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3211 |
self findPreviousWithString:searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3212 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3213 |
self findNextWithString:searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3214 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3215 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3216 |
|
10719 | 3217 |
ignorePublicPrivateCategories:aBoolean |
3218 |
UserPreferences current ignorePublicPrivateCategories:aBoolean |
|
3219 |
||
3220 |
"Created: / 23-09-2011 / 19:52:21 / cg" |
|
3221 |
! |
|
3222 |
||
3202 | 3223 |
menuExit |
3204 | 3224 |
self closeRequest |
3202 | 3225 |
! |
3226 |
||
3227 |
openAboutThisApplication |
|
3228 |
"opens an about box for this application." |
|
3229 |
||
7115 | 3230 |
Dialog aboutClass:self class. |
3231 |
||
3232 |
"Modified: / 12-09-2006 / 17:20:22 / cg" |
|
3202 | 3233 |
! |
3234 |
||
3235 |
openHTMLDocument:relativeDocPath |
|
3236 |
HTMLDocumentView openFullOnDocumentationFile:relativeDocPath |
|
3237 |
! |
|
3238 |
||
9055 | 3239 |
openSettingsDialog |
14558 | 3240 |
|settingsList| |
9055 | 3241 |
|
3242 |
settingsList := |
|
3243 |
#( |
|
3244 |
#('Editor' #'AbstractSettingsApplication::EditSettingsAppl' ) |
|
3245 |
"/ #('Syntax Color' #'AbstractSettingsApplication::SyntaxColorSettingsAppl' ) |
|
3246 |
"/ #('Code Format' #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl' ) |
|
3247 |
"/ #('System Browser' #'AbstractSettingsApplication::SystemBrowserSettingsAppl' ) |
|
3248 |
#('Compiler' #'AbstractSettingsApplication::GeneralCompilerSettingsAppl' ) |
|
3249 |
#('Compiler/ByteCode' #'AbstractSettingsApplication::ByteCodeCompilerSettingsAppl' ) |
|
3250 |
"/ #('Source Code Management' #'AbstractSettingsApplication::SourceCodeManagementSettingsAppl') |
|
3251 |
). |
|
3252 |
||
14558 | 3253 |
SettingsDialog |
3254 |
openWithList:settingsList |
|
3255 |
label:(resources string:'Change Browser Settings'). |
|
9055 | 3256 |
! |
3257 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3258 |
setEnforcedNameSpace |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3259 |
|nsName listOfKnownNameSpaces keepAsDefaultHolder| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3260 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3261 |
listOfKnownNameSpaces := Set new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3262 |
NameSpace |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3263 |
allNameSpaces |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3264 |
do:[:eachNameSpace | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3265 |
listOfKnownNameSpaces add:eachNameSpace name |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3266 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3267 |
listOfKnownNameSpaces := listOfKnownNameSpaces asOrderedCollection sort. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3268 |
|
15450 | 3269 |
Dialog modifyingBoxWith:[:box | |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3270 |
keepAsDefaultHolder := true asValue. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3271 |
box verticalPanel |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3272 |
add:((CheckBox |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3273 |
label:(resources string:'Use this as default in the future')) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3274 |
model:keepAsDefaultHolder). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3275 |
] do:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3276 |
nsName := Dialog |
15450 | 3277 |
request:(resources string:'When applying, new classes are created in nameSpace:') |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3278 |
initialAnswer:(enforcedNameSpace ? LastEnforcedNameSpace ? Class nameSpaceQuerySignal query name) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3279 |
list:listOfKnownNameSpaces. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3280 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3281 |
nsName isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3282 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3283 |
(nsName isEmpty or:[nsName = 'Smalltalk']) ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3284 |
applyInOriginalNameSpace value:true. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3285 |
LastEnforcedNameSpace := enforcedNameSpace := nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3286 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3287 |
applyInOriginalNameSpace value:false. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3288 |
LastEnforcedNameSpace := enforcedNameSpace := NameSpace name:nsName. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3289 |
autoCompare value ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3290 |
self doUpdate |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3291 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3292 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3293 |
KeepEnforcedNameSpace := keepAsDefaultHolder value. |
11680
5b1a15736f97
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11499
diff
changeset
|
3294 |
codeView nameSpaceForDoits:enforcedNameSpace. |
5b1a15736f97
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11499
diff
changeset
|
3295 |
diffView textViews do:[:each | each nameSpaceForDoits:enforcedNameSpace]. |
5b1a15736f97
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11499
diff
changeset
|
3296 |
|
5b1a15736f97
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11499
diff
changeset
|
3297 |
"Modified: / 26-07-2012 / 23:06:23 / cg" |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3298 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3299 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3300 |
setEnforcedPackage |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3301 |
|pkg listOfKnownPackages| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3302 |
|
16207 | 3303 |
listOfKnownPackages := Smalltalk allPackageIDs. |
12645 | 3304 |
"/ Smalltalk allClassesDo:[:eachClass | |
3305 |
"/ |package| |
|
3306 |
"/ |
|
3307 |
"/ package := eachClass package. |
|
3308 |
"/ package size > 0 ifTrue:[ |
|
3309 |
"/ listOfKnownPackages add:package |
|
3310 |
"/ ] |
|
3311 |
"/ ]. |
|
3312 |
listOfKnownPackages := listOfKnownPackages asNewOrderedCollection sort. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3313 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3314 |
pkg := Dialog |
12645 | 3315 |
request:'When applying, changes go into package:' |
3316 |
initialAnswer:(enforcedPackage ? Class packageQuerySignal query) |
|
3317 |
list:listOfKnownPackages. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3318 |
pkg size ~~ 0 ifTrue:[ |
12645 | 3319 |
enforcedPackage := pkg |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3320 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3321 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3322 |
|
3202 | 3323 |
showAboutSTX |
3324 |
ToolApplicationModel openAboutSTX |
|
3325 |
! ! |
|
3326 |
||
202 | 3327 |
!ChangesBrowser methodsFor:'private'! |
3328 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3329 |
autoSelect:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3330 |
"select a change" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3331 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3332 |
self class autoSelectNext ifTrue:[ |
6288 | 3333 |
(changeNr <= self numberOfChanges) ifTrue:[ |
3334 |
changeListView setSelection:changeNr. |
|
3335 |
self changeSelection:changeNr. |
|
3336 |
^ self |
|
3337 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3338 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3339 |
self clearCodeView. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3340 |
changeListView setSelection:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3341 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3342 |
"Modified: / 18.5.1998 / 14:26:43 / cg" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3343 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3344 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3345 |
autoSelectLast |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3346 |
"select the last change" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3347 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3348 |
self autoSelect:(self numberOfChanges) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3349 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3350 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3351 |
autoSelectOrEnd:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3352 |
"select the next change or the last" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3353 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3354 |
|last| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3355 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3356 |
last := self numberOfChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3357 |
changeNr < last ifTrue:[ |
6288 | 3358 |
self autoSelect:changeNr |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3359 |
] ifFalse:[ |
6288 | 3360 |
last == 0 ifTrue:[ |
3361 |
last := nil |
|
3362 |
]. |
|
3363 |
changeListView setSelection:last . |
|
3364 |
self changeSelection:last. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3365 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3366 |
|
3406
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
3367 |
"Modified: / 13.11.2001 / 13:00:45 / cg" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3368 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3369 |
|
8619 | 3370 |
beep |
15136 | 3371 |
"output an audible beep or bell on my screen device" |
3372 |
||
8619 | 3373 |
UserPreferences current beepInEditor ifTrue:[ |
3374 |
super beep |
|
3375 |
] |
|
3376 |
! |
|
3377 |
||
16372 | 3378 |
changeChunkAt:index |
3379 |
^ (changeInfoList at:index) chunk |
|
3380 |
"/ ^ changeChunks at:index |
|
3381 |
||
3382 |
"Created: / 01-05-2016 / 18:24:28 / cg" |
|
3383 |
! |
|
3384 |
||
3385 |
changeClassNameAt:index |
|
3386 |
^ (changeInfoList at:index) className |
|
3387 |
||
3388 |
"Created: / 01-05-2016 / 18:28:13 / cg" |
|
3389 |
"Modified: / 01-05-2016 / 19:32:42 / cg" |
|
3390 |
! |
|
3391 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3392 |
checkClassIsLoaded:aClass |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3393 |
"check for and warn if a class is unloaded (helper for compare-change)" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3394 |
|
6162
5ab2371c63a1
Compare and Compress: continue comparing even if the user doesn't
Stefan Vogel <sv@exept.de>
parents:
6048
diff
changeset
|
3395 |
|cls answer| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3396 |
|
3359
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
3397 |
cls := aClass theNonMetaclass. |
5825 | 3398 |
cls isLoaded ifTrue:[ |
6357 | 3399 |
^ true. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3400 |
]. |
11805 | 3401 |
(classesNotToBeAutoloaded includes:#all) ifTrue:[ |
3402 |
^ false. |
|
3403 |
]. |
|
8026
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3404 |
(classesNotToBeAutoloaded includes:cls) ifTrue:[ |
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3405 |
^ false. |
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3406 |
]. |
5825 | 3407 |
|
6216 | 3408 |
autoloadAsRequired value == true ifTrue:[ |
6357 | 3409 |
answer := true |
6216 | 3410 |
] ifFalse:[ |
11805 | 3411 |
answer := Dialog |
3412 |
confirmWithCancel:(resources |
|
17400 | 3413 |
stringWithCRs:'%1 is an autoloaded class.\I can only compare the method''s source if it''s loaded first.\\Shall the class be loaded now ?' |
11805 | 3414 |
with:cls name allBold) |
3415 |
labels:(resources array:#('Cancel' 'No for All' 'No' 'Yes')) |
|
3416 |
values:#(nil #never false true) |
|
3417 |
default:4. |
|
3418 |
answer isNil ifTrue:[ |
|
3419 |
"cancel the operation" |
|
3420 |
AbortAllOperationRequest raise. |
|
3421 |
"not reached" |
|
3422 |
]. |
|
3423 |
answer == #never ifTrue:[ |
|
3424 |
classesNotToBeAutoloaded add:#all. |
|
3425 |
^ false. |
|
3426 |
]. |
|
8026
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3427 |
]. |
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3428 |
|
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3429 |
answer ifTrue:[ |
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3430 |
Autoload autoloadFailedSignal catch:[ |
6357 | 3431 |
^ cls autoload isLoaded |
3432 |
] |
|
5825 | 3433 |
]. |
6162
5ab2371c63a1
Compare and Compress: continue comparing even if the user doesn't
Stefan Vogel <sv@exept.de>
parents:
6048
diff
changeset
|
3434 |
|
8026
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3435 |
classesNotToBeAutoloaded add:cls. |
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3436 |
|
6162
5ab2371c63a1
Compare and Compress: continue comparing even if the user doesn't
Stefan Vogel <sv@exept.de>
parents:
6048
diff
changeset
|
3437 |
^ false. |
17400 | 3438 |
|
3439 |
"Modified: / 13-02-2017 / 19:57:15 / cg" |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3440 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3441 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3442 |
checkSingleSelectedChange |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3443 |
"just a helper, check for a single selection" |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3444 |
|
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3445 |
|changeNr| |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3446 |
|
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3447 |
(changeNr := self theSingleSelection) isNil ifTrue:[ |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3448 |
self information:'Only possible if a single change is selected.'. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3449 |
AbortSignal raise. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3450 |
^ nil. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3451 |
]. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3452 |
^ changeNr |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3453 |
! |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3454 |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3455 |
classFromEvaluatingTree:aParseTree |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3456 |
|thisClass| |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3457 |
|
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3458 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3459 |
do:[ |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3460 |
thisClass := Parser undefinedVariableError handle:[:ex | ] do:[ aParseTree evaluate ]. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3461 |
]. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3462 |
^ thisClass |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3463 |
|
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3464 |
"Created: / 05-03-2012 / 14:28:01 / cg" |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3465 |
! |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3466 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3467 |
clearCodeView |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3468 |
"clear the (lower) code view." |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3469 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3470 |
self unselect "changeListView deselect". |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3471 |
codeView contents:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3472 |
changeNrShown := nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3473 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3474 |
|
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3475 |
currentSourceForParseTree:parseTree |
12845 | 3476 |
|selector thisClass method mClass thisClassSym ownerClass receiver classGlobalNode| |
4857 | 3477 |
|
6288 | 3478 |
(parseTree isNil |
3479 |
or:[parseTree == #Error |
|
4857 | 3480 |
or:[ parseTree isMessage not ]]) ifTrue:[ |
6614 | 3481 |
^ nil |
4857 | 3482 |
]. |
3483 |
||
3484 |
selector := parseTree selector. |
|
3485 |
receiver := parseTree receiver. |
|
3486 |
||
3487 |
selector == #'removeSelector:' ifTrue:[ |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3488 |
thisClass := self classFromEvaluatingTree:receiver. |
6614 | 3489 |
thisClass isBehavior ifTrue:[ |
3490 |
thisClass isLoaded ifTrue:[ |
|
3491 |
selector := (parseTree arg1 evaluate). |
|
3492 |
(thisClass includesSelector:selector) ifTrue:[ |
|
3493 |
^ (thisClass compiledMethodAt:selector) source. |
|
3494 |
] |
|
3495 |
] ifFalse:[ |
|
3496 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
3497 |
] |
|
3498 |
] ifFalse:[ |
|
3499 |
^ 'Cannot compare this change (class not present)'. |
|
3500 |
]. |
|
4857 | 3501 |
]. |
3502 |
selector == #'comment:' ifTrue:[ |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3503 |
thisClass := self classFromEvaluatingTree:receiver. |
6614 | 3504 |
thisClass isBehavior ifTrue:[ |
3505 |
thisClass isLoaded ifTrue:[ |
|
3506 |
^ thisClass name , ' comment: ' , thisClass comment storeString. |
|
3507 |
] ifFalse:[ |
|
3508 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
3509 |
] |
|
3510 |
] ifFalse:[ |
|
3511 |
^ 'Cannot compare this change (class not present)'. |
|
3512 |
]. |
|
4857 | 3513 |
]. |
3514 |
||
7953 | 3515 |
(#(#'category:' #'package:') includes:selector) ifTrue:[ |
6614 | 3516 |
receiver isMessage ifTrue:[ |
3517 |
receiver selector == #compiledMethodAt: ifTrue:[ |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3518 |
"/ thisClass := self classFromEvaluatingTree:receiver receiver. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3519 |
"/ thisClass isNil ifTrue:[ |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3520 |
"/ ^ 'Class does not exist.'. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3521 |
"/ ]. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3522 |
|
6614 | 3523 |
classGlobalNode := receiver receiver. |
3524 |
(classGlobalNode isMessage and:[classGlobalNode selector == #class]) ifTrue:[ |
|
3525 |
classGlobalNode := classGlobalNode receiver |
|
3526 |
]. |
|
3527 |
classGlobalNode isUndeclared ifTrue:[ |
|
3528 |
^ 'Class does not exist.'. |
|
3529 |
]. |
|
3530 |
Error handle:[method := nil] do:[method := receiver evaluate]. |
|
7953 | 3531 |
method isMethod ifFalse:[ |
3532 |
^ 'There is no such method'. |
|
3533 |
]. |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3534 |
mClass := method mclass. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3535 |
|
7953 | 3536 |
selector == #category: ifTrue:[ |
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3537 |
"/ method category = parseTree arg1 evaluate ifFalse:[ |
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3538 |
^ '(' , mClass name , ' compiledMethodAt: ' , method selector storeString , ') category: ' , method category storeString. |
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3539 |
"/ ]. |
6614 | 3540 |
] ifFalse:[ |
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3541 |
"/ method package = parseTree arg1 evaluate ifFalse:[ |
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3542 |
^ '(' , mClass name , ' compiledMethodAt: ' , method selector storeString , ') package: ' , method package storeString. |
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3543 |
"/ ]. |
7953 | 3544 |
]. |
3545 |
^ nil |
|
6614 | 3546 |
] |
3547 |
] |
|
4857 | 3548 |
]. |
3549 |
||
3550 |
selector == #'instanceVariableNames:' ifTrue:[ |
|
6614 | 3551 |
receiver isMessage ifTrue:[ |
3552 |
receiver selector == #class ifTrue:[ |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3553 |
thisClass := self classFromEvaluatingTree:receiver. |
6614 | 3554 |
thisClass isBehavior ifTrue:[ |
3555 |
thisClass isLoaded ifTrue:[ |
|
4857 | 3556 |
"/ varsHere := thisClass instanceVariableString asCollectionOfWords. |
3557 |
"/ varsInChange := (parseTree arguments at:1) evaluate asCollectionOfWords. |
|
6614 | 3558 |
^ thisClass definition. |
3559 |
] ifFalse:[ |
|
3560 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
3561 |
]. |
|
3562 |
] ifFalse:[ |
|
3563 |
^ 'Cannot compare this change (class not present)'. |
|
3564 |
] |
|
3565 |
]. |
|
3566 |
] |
|
4857 | 3567 |
]. |
3568 |
||
3569 |
(Class definitionSelectors includes:selector) |
|
6288 | 3570 |
"/ selector == #'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' |
4857 | 3571 |
ifTrue:[ |
6614 | 3572 |
"/ Class nameSpaceQuerySignal |
3573 |
"/ answer:(self nameSpaceForApply) |
|
3574 |
"/ do:[ |
|
3575 |
"/ superClass := receiver evaluate. |
|
3576 |
"/ ]. |
|
3577 |
"/ superClass isBehavior ifFalse:[ |
|
3578 |
"/ self nameSpaceForApply classNamed:receiver name |
|
3579 |
"/ ]. |
|
3580 |
"/ superClass isBehavior ifFalse:[ |
|
3581 |
"/ |rest matchingKeys superClassName| |
|
3582 |
"/ |
|
3583 |
"/ rest := '::' , receiver name. |
|
3584 |
"/ matchingKeys := Smalltalk keys select:[:nm | nm endsWith:rest]. |
|
3585 |
"/ superClassName := Dialog choose:'Which Class ?' fromList:matchingKeys lines:10. |
|
3586 |
"/ superClassName notEmptyOrNil ifTrue:[ |
|
3587 |
"/ superClass := Smalltalk at:superClassName asSymbol. |
|
3588 |
"/ ]. |
|
3589 |
"/ ]. |
|
3590 |
"/ superClass isBehavior ifFalse:[ |
|
3591 |
"/ ^ 'Cannot compare this change\\(no such superclass).' withCRs. |
|
3592 |
"/ ]. |
|
3593 |
"/ superClass isLoaded ifFalse:[ |
|
3594 |
"/ ^ 'Cannot compare this change\\(superclass not loaded).' withCRs. |
|
3595 |
"/ ]. |
|
3596 |
||
3597 |
thisClassSym := (parseTree arguments at:1) evaluate. |
|
3598 |
||
3599 |
(selector endsWith:':privateIn:') ifTrue:[ |
|
3600 |
ownerClass := (parseTree arguments at:5). |
|
3601 |
ownerClass isUndeclared ifFalse:[ |
|
3602 |
ownerClass := ownerClass evaluate. |
|
3603 |
] ifTrue:[ |
|
3604 |
ownerClass := nil. |
|
3605 |
]. |
|
3606 |
ownerClass isNil ifTrue:[ |
|
3607 |
^ 'Cannot compare this change\\(owning class is not loaded).' withCRs. |
|
3608 |
]. |
|
3609 |
thisClass := ownerClass privateClassesAt:thisClassSym. |
|
3610 |
] ifFalse:[ |
|
3611 |
thisClass := (self nameSpaceForApply) at:thisClassSym ifAbsent:nil. |
|
3612 |
]. |
|
3613 |
thisClass notNil ifTrue:[ |
|
3614 |
thisClass isLoaded ifFalse:[ |
|
3615 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
3616 |
] ifTrue:[ |
|
3617 |
^ thisClass definition. |
|
3618 |
] |
|
3619 |
] |
|
4857 | 3620 |
]. |
3621 |
||
3622 |
^ nil. |
|
9570
f81993219003
changed: #oldSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
9548
diff
changeset
|
3623 |
|
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3624 |
"Created: / 15-02-2012 / 15:11:15 / cg" |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3625 |
! |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3626 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3627 |
isChangeSetBrowser |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3628 |
^ false |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3629 |
! |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3630 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3631 |
makeDiffViewInvisible |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3632 |
diffViewBox lower |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3633 |
! |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3634 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3635 |
makeDiffViewVisible |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3636 |
diffViewBox raise |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3637 |
! |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3638 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3639 |
nameSpaceForApply |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3640 |
applyInOriginalNameSpace value ifFalse:[ |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3641 |
^ enforcedNameSpace ? Class nameSpaceQuerySignal query. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3642 |
]. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3643 |
^ Smalltalk. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3644 |
! |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3645 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3646 |
newLabel:how |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3647 |
|l| |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3648 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3649 |
l := self class defaultLabel. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3650 |
(changeFileName notNil and:[changeFileName ~= 'changes']) ifTrue:[ |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3651 |
l := l , ': ', changeFileName |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3652 |
]. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3653 |
l := l , ' ' , how. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3654 |
self label:l |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3655 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3656 |
"Created: / 08-09-1995 / 19:32:04 / claus" |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3657 |
"Modified: / 12-11-2006 / 16:23:53 / cg" |
4857 | 3658 |
! |
3659 |
||
8665 | 3660 |
parseExpression:chunk |
3661 |
^ self parseExpression:chunk inNameSpace:(self nameSpaceForApply). |
|
3662 |
! |
|
3663 |
||
3664 |
parseExpression:text inNameSpace:nameSpace |
|
3665 |
|parser p| |
|
3666 |
||
3667 |
"/ old: |
|
3668 |
"/ does not care for VW qualified names |
|
3669 |
"/ ^ Parser parseExpression:text inNameSpace:nameSpace. |
|
3670 |
||
17899 | 3671 |
(text includesString:'§') ifTrue:[self halt]. |
17094 | 3672 |
|
8665 | 3673 |
"/ new: |
3674 |
parser := Parser for:(ReadStream on:text). |
|
3675 |
parser parserFlags allowQualifiedNames:true. |
|
17094 | 3676 |
parser parserFlags allowDollarInIdentifier:true. |
3677 |
parser parserFlags allowParagraphInIdentifier:true. |
|
9228
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3678 |
Error handle:[:ex | |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3679 |
^ nil |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3680 |
] do:[ |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3681 |
p := parser |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3682 |
parseExpressionWithSelf:nil |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3683 |
notifying:nil |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3684 |
ignoreErrors:true |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3685 |
ignoreWarnings:true |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3686 |
inNameSpace:nameSpace. |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3687 |
]. |
8665 | 3688 |
^ p |
17094 | 3689 |
|
3690 |
"Modified: / 21-11-2016 / 23:25:48 / cg" |
|
8665 | 3691 |
! |
3692 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3693 |
queryCloseText |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3694 |
"made this a method for easy redefinition in subclasses" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3695 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3696 |
^ 'Quit without updating changeFile ?' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3697 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3698 |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3699 |
selectedClassNames |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3700 |
|classes| |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3701 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3702 |
classes := Set new. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3703 |
self withSelectedChangesDo:[:changeNr | |
6288 | 3704 |
| classNameToCompress | |
3705 |
||
3706 |
classNameToCompress := self classNameOfChange:changeNr. |
|
3707 |
classNameToCompress notNil ifTrue:[ |
|
3708 |
classes add:classNameToCompress. |
|
3709 |
] |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3710 |
]. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3711 |
^ classes |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3712 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3713 |
"Created: / 19.11.2001 / 21:54:59 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3714 |
! |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3715 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3716 |
setChangeList |
16467 | 3717 |
"update the selection-list; |
3718 |
called after the changeList has been modified" |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3719 |
|
16372 | 3720 |
|headerList| |
3721 |
||
3722 |
headerList := changeInfoList collect:[:info | info headerLine]. |
|
3723 |
changeListView setList:headerList expandTabs:false redraw:false. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3724 |
changeListView invalidate. |
16467 | 3725 |
self showNumberOfChanges. |
3726 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3727 |
"/ changeListView deselect. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3728 |
|
16372 | 3729 |
"Modified: / 01-05-2016 / 19:27:35 / cg" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3730 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3731 |
|
3211 | 3732 |
setSingleSelection:changeNr |
3733 |
changeListView multipleSelectOk ifFalse:[ |
|
6288 | 3734 |
changeListView setSelection:changeNr. |
3211 | 3735 |
] ifTrue:[ |
6288 | 3736 |
changeListView setSelection:(Array with:changeNr). |
3211 | 3737 |
]. |
3738 |
! |
|
3739 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3740 |
showNotFound |
14483 | 3741 |
self withCursor:(Cursor cross) do:[ |
3742 |
self beep. |
|
3743 |
Delay waitForMilliseconds:300. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3744 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3745 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3746 |
"Modified: / 29.4.1999 / 22:36:54 / cg" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3747 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3748 |
|
16467 | 3749 |
showNumberOfChanges |
3750 |
infoHolder value:(resources string:'%1 changes.' with:changeInfoList size). |
|
3751 |
! |
|
3752 |
||
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3753 |
sourceOfChange:changeNr |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3754 |
|aStream sawExcla chunk| |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3755 |
|
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3756 |
aStream := self streamForChange:changeNr. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3757 |
aStream isNil ifTrue:[ |
6288 | 3758 |
^ nil |
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3759 |
]. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3760 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3761 |
chunk := aStream nextChunk. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3762 |
sawExcla ifTrue:[ |
6288 | 3763 |
chunk := aStream nextChunk |
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3764 |
]. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3765 |
aStream close. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3766 |
^ chunk |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3767 |
! |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3768 |
|
12599
827681c8f7d4
timestamp printing extracted
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3769 |
timeStampPrintStringOf:ts |
827681c8f7d4
timestamp printing extracted
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3770 |
^ ts printString |
17838 | 3771 |
|
3772 |
" |
|
3773 |
self basicNew timeStampPrintStringOf:(Timestamp now) |
|
3774 |
" |
|
3775 |
||
3776 |
"Modified (format): / 05-12-2017 / 15:08:48 / cg" |
|
12599
827681c8f7d4
timestamp printing extracted
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3777 |
! |
827681c8f7d4
timestamp printing extracted
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3778 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3779 |
unselect |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3780 |
"common unselect" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3781 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3782 |
changeListView setSelection:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3783 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3784 |
"Modified: 25.5.1996 / 13:02:49 / cg" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3785 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3786 |
|
3211 | 3787 |
withSelectedChangesDo:aBlock |
3788 |
"just a helper, check for a selected change and evaluate aBlock |
|
3789 |
with busy cursor" |
|
3790 |
||
3791 |
self withSelectedChangesInOrder:nil do:aBlock |
|
3792 |
! |
|
3793 |
||
3794 |
withSelectedChangesInOrder:order do:aBlock |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3795 |
"just a helper, check for a selected change and evaluate aBlock |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3796 |
with busy cursor" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3797 |
|
3211 | 3798 |
|changeNrSelection| |
3799 |
||
3800 |
changeNrSelection := changeListView selection. |
|
7783
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3801 |
|
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3802 |
"if we apply multiple changes, and an error occurs, |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3803 |
ask the user if all operations should be aborted..." |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3804 |
multipleApply := changeNrSelection size > 1. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3805 |
|
3211 | 3806 |
changeListView multipleSelectOk ifFalse:[ |
7783
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3807 |
changeNrSelection notNil ifTrue:[ |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3808 |
self withExecuteCursorDo:[ |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3809 |
aBlock value:changeNrSelection |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3810 |
] |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3811 |
] |
3211 | 3812 |
] ifTrue:[ |
7783
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3813 |
changeNrSelection size > 0 ifTrue:[ |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3814 |
self withExecuteCursorDo:[ |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3815 |
|changeNumbers| |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3816 |
|
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3817 |
changeNumbers := changeNrSelection copy sort. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3818 |
order == #reverse ifTrue:[ |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3819 |
changeNumbers reverse |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3820 |
]. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3821 |
changeNumbers do:aBlock |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3822 |
] |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3823 |
] |
3211 | 3824 |
]. |
3825 |
! |
|
3826 |
||
3827 |
withSelectedChangesReverseDo:aBlock |
|
3828 |
"just a helper, check for a selected change and evaluate aBlock |
|
3829 |
with busy cursor" |
|
3830 |
||
3831 |
self withSelectedChangesInOrder:#reverse do:aBlock |
|
3668 | 3832 |
! |
3833 |
||
3834 |
withSingleSelectedChangeDo:aBlock |
|
3835 |
"just a helper, check for a single selection, and evaluate aBlock |
|
3836 |
with busy cursor" |
|
3837 |
||
3838 |
self theSingleSelection isNil ifTrue:[ |
|
6288 | 3839 |
^ self information:'Only possible if a single change is selected.'. |
3668 | 3840 |
]. |
3841 |
||
3842 |
self withSelectedChangesInOrder:nil do:aBlock |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3843 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3844 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3845 |
!ChangesBrowser methodsFor:'private-change access'! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3846 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3847 |
changeIsFollowupMethodChange:changeNr |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3848 |
"return true, if a change is a followup change (i.e. a followup change |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3849 |
in a bunch of methodsFor-changes)" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3850 |
|
16372 | 3851 |
^ (changeInfoList at:changeNr) isFollowupChange |
3852 |
||
3853 |
"Created: / 06-02-1998 / 13:03:39 / cg" |
|
3854 |
"Modified: / 01-05-2016 / 19:32:06 / cg" |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3855 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3856 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3857 |
changeIsSnapShotInfo:changeNr |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3858 |
"return true, if a change is a snapShot info chunk" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3859 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3860 |
|words chunk| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3861 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3862 |
(self classNameOfChange:changeNr) isNil ifTrue:[ |
16372 | 3863 |
" |
3864 |
get the chunk |
|
3865 |
" |
|
3866 |
chunk := self changeChunkAt:changeNr. |
|
3867 |
"mhmh - empty ??" |
|
3868 |
chunk notNil ifTrue:[ |
|
3869 |
(chunk startsWith:'''---') ifTrue:[ |
|
3870 |
words := chunk asCollectionOfWords. |
|
3871 |
words size > 2 ifTrue:[ |
|
3872 |
(words at:2) = 'snapshot' ifTrue:[ |
|
3873 |
^ true |
|
3874 |
]. |
|
3875 |
]. |
|
3876 |
]. |
|
3877 |
]. |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3878 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3879 |
^ false |
16372 | 3880 |
|
3881 |
"Modified: / 01-05-2016 / 18:25:25 / cg" |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3882 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3883 |
|
11396 | 3884 |
classNameFromAttributeChangeParseTree:aParseTree |
3885 |
"mhmh - seems to always return the name of the nonMeta class - is this OK?" |
|
3886 |
||
11397 | 3887 |
|recTree isMeta name| |
11396 | 3888 |
|
3889 |
recTree := aParseTree receiver. |
|
3890 |
||
3891 |
(recTree notNil |
|
3892 |
and:[recTree ~~ #Error |
|
3893 |
and:[recTree isMessage |
|
3894 |
and:[recTree selector == #compiledMethodAt:]]]) ifTrue:[ |
|
3895 |
isMeta := false. |
|
3896 |
recTree := recTree receiver. |
|
3897 |
recTree isUnaryMessage ifTrue:[ |
|
3898 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
|
3899 |
"id class " |
|
3900 |
recTree := recTree receiver |
|
3901 |
]. |
|
3902 |
recTree isPrimary ifTrue:[ |
|
3903 |
name := recTree name. |
|
3904 |
isMeta ifTrue:[ |
|
3905 |
^ name , ' class'. |
|
3906 |
]. |
|
3907 |
^ name |
|
3908 |
] |
|
3909 |
]. |
|
3910 |
"very strange" |
|
3911 |
^ nil |
|
3912 |
||
3913 |
"Created: / 08-03-2012 / 09:42:36 / cg" |
|
3914 |
! |
|
3915 |
||
3916 |
classNameFromClassDefinitionChange:changeNr |
|
11397 | 3917 |
|changeStream chunk fullParseTree sel arg1Tree ownerTree ownerName name| |
11396 | 3918 |
|
3919 |
"/ must parse the full changes text, to get privacy information. |
|
3920 |
||
3921 |
changeStream := self streamForChange:changeNr. |
|
3922 |
changeStream isNil ifTrue:[ ^ nil]. |
|
3923 |
||
3924 |
chunk := changeStream nextChunk. |
|
3925 |
changeStream close. |
|
3926 |
fullParseTree := self parseExpression:chunk. |
|
3927 |
(fullParseTree isNil or:[fullParseTree == #Error]) ifTrue:[ |
|
3928 |
^ nil |
|
3929 |
]. |
|
3930 |
fullParseTree isMessage ifFalse:[ |
|
3931 |
^ nil |
|
3932 |
]. |
|
3933 |
||
3934 |
sel := fullParseTree selector. |
|
3935 |
arg1Tree := fullParseTree arg1. |
|
16390 | 3936 |
(arg1Tree notNil and:[arg1Tree isLiteral]) ifTrue:[ |
11396 | 3937 |
name := arg1Tree value asString. |
3938 |
||
3939 |
"/ is it a private-class ? |
|
3940 |
('*privateIn:' match:sel) ifTrue:[ |
|
3941 |
ownerTree := fullParseTree args last. |
|
3942 |
ownerName := ownerTree name asString. |
|
3943 |
^ ownerName , '::' , name |
|
3944 |
]. |
|
3945 |
^ name |
|
3946 |
]. |
|
3947 |
"very strange" |
|
3948 |
^ nil |
|
3949 |
||
3950 |
"Created: / 08-03-2012 / 09:34:04 / cg" |
|
3951 |
! |
|
3952 |
||
3953 |
classNameFromReceiverInParseTree:aParseTree |
|
3954 |
"extrat the class name from a method-change, methodRemove or comment-change's |
|
3955 |
parse tree" |
|
3956 |
||
3957 |
|recTree isMeta cls name| |
|
3958 |
||
3959 |
recTree := aParseTree receiver. |
|
3960 |
(recTree isNil or:[recTree == #Error]) ifTrue:[ |
|
3961 |
"more strange things" |
|
3962 |
^ nil |
|
3963 |
]. |
|
3964 |
||
3965 |
isMeta := false. |
|
3966 |
recTree isUnaryMessage ifTrue:[ |
|
3967 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
|
3968 |
"id class methodsFor:..." |
|
3969 |
recTree := recTree receiver. |
|
3970 |
isMeta := true. |
|
3971 |
]. |
|
3972 |
recTree isPrimary ifTrue:[ |
|
3973 |
cls := self classFromEvaluatingTree:recTree. |
|
3974 |
cls notNil ifTrue:[^ cls name]. |
|
3975 |
||
3976 |
name := recTree name. |
|
3977 |
isMeta ifTrue:[ |
|
3978 |
^ name , ' class'. |
|
3979 |
]. |
|
3980 |
^ name |
|
3981 |
]. |
|
3982 |
||
3983 |
"more strange things" |
|
3984 |
^ nil |
|
3985 |
||
3986 |
"Created: / 08-03-2012 / 09:26:57 / cg" |
|
3987 |
! |
|
3988 |
||
3989 |
classNameFromRemoveClassParseTree:aParseTree |
|
11397 | 3990 |
"tree is: Smalltalk removeClass: class" |
3991 |
||
11396 | 3992 |
|recTree arg1Tree| |
3993 |
||
3994 |
recTree := aParseTree receiver. |
|
3995 |
||
3996 |
(recTree notNil |
|
3997 |
and:[recTree ~~ #Error |
|
3998 |
and:[recTree isPrimary |
|
3999 |
and:[recTree name = 'Smalltalk']]]) ifTrue:[ |
|
4000 |
arg1Tree := aParseTree arg1. |
|
13663 | 4001 |
(arg1Tree notNil and:[arg1Tree isVariable]) ifTrue:[ |
11397 | 4002 |
^ arg1Tree name. |
11396 | 4003 |
]. |
4004 |
]. |
|
4005 |
"very strange" |
|
4006 |
^ nil |
|
4007 |
||
4008 |
"Created: / 08-03-2012 / 09:36:59 / cg" |
|
4009 |
! |
|
4010 |
||
11397 | 4011 |
classNameFromRenameClassParseTree:aParseTree |
4012 |
"tree is: Smalltalk renameClass: oldClass to: 'newName'" |
|
4013 |
||
4014 |
|recTree arg1Tree arg2Tree oldName newName| |
|
4015 |
||
4016 |
recTree := aParseTree receiver. |
|
4017 |
||
4018 |
(recTree notNil |
|
4019 |
and:[recTree ~~ #Error |
|
4020 |
and:[recTree isPrimary |
|
4021 |
and:[recTree name = 'Smalltalk']]]) ifTrue:[ |
|
4022 |
arg1Tree := aParseTree arg1. |
|
4023 |
(arg1Tree notNil and:[arg1Tree isPrimary]) ifTrue:[ |
|
4024 |
oldName := arg1Tree name. |
|
4025 |
arg2Tree := aParseTree arg2. |
|
16390 | 4026 |
(arg2Tree notNil and:[arg2Tree isLiteral]) ifTrue:[ |
11397 | 4027 |
newName := arg2Tree evaluate. |
4028 |
(Smalltalk classNamed:oldName) notNil ifTrue:[^ oldName ]. |
|
4029 |
(Smalltalk classNamed:newName) notNil ifTrue:[^ newName ]. |
|
4030 |
]. |
|
4031 |
]. |
|
4032 |
]. |
|
4033 |
"very strange" |
|
4034 |
^ nil |
|
4035 |
||
4036 |
"Created: / 08-03-2012 / 11:42:25 / cg" |
|
4037 |
! |
|
4038 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4039 |
classNameOfChange:changeNr |
6288 | 4040 |
"return the classname of a change |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4041 |
(for classChanges (i.e. xxx class), the non-metaClassName (i.e. xxx) is returned)" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4042 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4043 |
|name| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4044 |
|
3364 | 4045 |
name := self realClassNameOfChange:changeNr. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4046 |
name isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4047 |
(name endsWith:' class') ifTrue:[ |
12704
6f20f7d39e75
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12656
diff
changeset
|
4048 |
name := name copyButLast:6 |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4049 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4050 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4051 |
|
3364 | 4052 |
"Modified: / 5.11.2001 / 18:10:25 / cg" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4053 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4054 |
|
3202 | 4055 |
extractSelectorOfMethodChange:changeNr |
17400 | 4056 |
"return a method-changes selector, or nil if it's not a methodChange" |
3202 | 4057 |
|
4058 |
|source parser sel chunk aParseTree | |
|
4059 |
||
4060 |
source := self sourceOfMethodChange:changeNr. |
|
4061 |
source isNil ifTrue:[ |
|
8665 | 4062 |
(self classNameOfChange:changeNr) notNil ifTrue:[ |
16372 | 4063 |
chunk := self changeChunkAt:changeNr. |
8665 | 4064 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
4065 |
||
4066 |
aParseTree := self parseExpression:chunk. |
|
4067 |
(aParseTree isNil |
|
4068 |
or:[aParseTree == #Error |
|
4069 |
or:[aParseTree isMessage not]]) ifTrue:[ |
|
4070 |
^ nil "seems strange ... (could be a comment)" |
|
4071 |
]. |
|
4072 |
sel := aParseTree selector. |
|
4073 |
(#( |
|
4074 |
#'removeSelector:' |
|
4075 |
) includes:sel) ifTrue:[ |
|
4076 |
sel := aParseTree arguments at:1. |
|
16390 | 4077 |
sel isLiteral ifTrue:[ |
8665 | 4078 |
sel := sel evaluate. |
4079 |
sel isSymbol ifTrue:[ |
|
4080 |
^ sel |
|
4081 |
] |
|
4082 |
] |
|
4083 |
] |
|
4084 |
]. |
|
4085 |
^ nil |
|
3202 | 4086 |
]. |
4087 |
||
4088 |
||
6288 | 4089 |
parser := Parser |
8665 | 4090 |
parseMethodArgAndVarSpecification:source |
4091 |
in:nil |
|
4092 |
ignoreErrors:true |
|
4093 |
ignoreWarnings:true |
|
4094 |
parseBody:false. |
|
3202 | 4095 |
|
4096 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
8665 | 4097 |
sel := parser selector. |
3202 | 4098 |
]. |
4099 |
^ sel |
|
4100 |
||
16372 | 4101 |
"Created: / 24-11-1995 / 14:30:46 / cg" |
4102 |
"Modified: / 01-05-2016 / 18:25:39 / cg" |
|
17400 | 4103 |
"Modified (comment): / 13-02-2017 / 19:57:20 / cg" |
3202 | 4104 |
! |
4105 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4106 |
fullClassNameOfChange:changeNr |
6288 | 4107 |
"return the full classname of a change |
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4108 |
(for classChanges (i.e. xxx class), a string ending in ' class' is returned." |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4109 |
|
11396 | 4110 |
|chunk aParseTree sel name prevMethodDefNr words oldDollarSetting| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4111 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4112 |
changeNr isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4113 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4114 |
first look, if not already known |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4115 |
" |
16372 | 4116 |
name := self changeClassNameAt:changeNr. |
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4117 |
name notNil ifTrue:[ |
7953 | 4118 |
name == #nil ifTrue:[^ nil]. |
4119 |
^ name |
|
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4120 |
]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4121 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4122 |
prevMethodDefNr := changeNr. |
16372 | 4123 |
[ (changeInfoList at:prevMethodDefNr) isFollowupChange ] whileTrue:[ |
7953 | 4124 |
prevMethodDefNr := prevMethodDefNr - 1. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4125 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4126 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4127 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4128 |
get the chunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4129 |
" |
16372 | 4130 |
chunk := self changeChunkAt:prevMethodDefNr. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4131 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4132 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4133 |
(chunk startsWith:'''---') ifTrue:[ |
7953 | 4134 |
words := chunk asCollectionOfWords. |
4135 |
words size > 2 ifTrue:[ |
|
4136 |
(words at:2) = 'checkin' ifTrue:[ |
|
4137 |
name := words at:3. |
|
4138 |
^ name |
|
4139 |
] |
|
4140 |
]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4141 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4142 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4143 |
"/ fix it - otherwise, it cannot be parsed |
11396 | 4144 |
((chunk endsWith:'primitiveDefinitions:') |
4145 |
or:[(chunk endsWith:'primitiveFunctions:') |
|
4146 |
or:[(chunk endsWith:'primitiveVariables:')]]) ifTrue:[ |
|
7953 | 4147 |
chunk := chunk , '''''' |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4148 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4149 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4150 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4151 |
use parser to construct a parseTree |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4152 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4153 |
oldDollarSetting := Parser allowDollarInIdentifier. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4154 |
[ |
7953 | 4155 |
Parser allowDollarInIdentifier:true. |
5014 | 4156 |
"/ Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
4157 |
"/ do:[ |
|
8665 | 4158 |
aParseTree := self parseExpression:chunk. |
5014 | 4159 |
"/ ]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4160 |
|
7953 | 4161 |
aParseTree == #Error ifTrue:[ |
4162 |
(chunk includesString:'comment') ifTrue:[ |
|
4163 |
"/ could be a comment ... |
|
8665 | 4164 |
aParseTree := self parseExpression:chunk , ''''. |
7953 | 4165 |
] |
4166 |
]. |
|
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3586
diff
changeset
|
4167 |
] ensure:[ |
7953 | 4168 |
Parser allowDollarInIdentifier:oldDollarSetting |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4169 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4170 |
(aParseTree isNil or:[aParseTree == #Error]) ifTrue:[ |
7953 | 4171 |
^ nil "seems strange ... (could be a comment)" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4172 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4173 |
aParseTree isMessage ifFalse:[ |
7953 | 4174 |
^ nil "very strange ... (whats that ?)" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4175 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4176 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4177 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4178 |
ask parser for selector |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4179 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4180 |
sel := aParseTree selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4181 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4182 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4183 |
is it a method-change, methodRemove or comment-change ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4184 |
" |
6288 | 4185 |
(#(#'methodsFor:' |
4186 |
#'privateMethodsFor:' |
|
4187 |
#'protectedMethodsFor:' |
|
4188 |
#'ignoredMethodsFor:' |
|
4189 |
#'publicMethodsFor:' |
|
4190 |
#'removeSelector:' |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4191 |
#'comment:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4192 |
#'primitiveDefinitions:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4193 |
#'primitiveFunctions:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4194 |
#'primitiveVariables:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4195 |
#'renameCategory:to:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4196 |
#'instanceVariableNames:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4197 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4198 |
#'methodsFor:stamp:' "/ Squeak support |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4199 |
#'commentStamp:prior:' "/ Squeak support |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4200 |
#'addClassVarName:' "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
4201 |
#methodsFor "/ Dolphin support |
3472 | 4202 |
#categoriesForClass "/ Dolphin support |
4203 |
#categoriesFor: "/ Dolphin support |
|
2606 | 4204 |
#methods "/ STV support |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4205 |
) includes:sel) ifTrue:[ |
7953 | 4206 |
" |
4207 |
yes, the className is the receiver |
|
4208 |
" |
|
11396 | 4209 |
^ self classNameFromReceiverInParseTree:aParseTree |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4210 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4211 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4212 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4213 |
is it a change in a class-description ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4214 |
" |
6288 | 4215 |
(('subclass:*' match:sel) |
2322 | 4216 |
or:[('variable*ubclass:*' match:sel)]) ifTrue:[ |
7953 | 4217 |
"/ must parse the full changes text, to get |
4218 |
"/ privacy information. |
|
11396 | 4219 |
^ self classNameFromClassDefinitionChange:changeNr |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4220 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4221 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4222 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4223 |
is it a class remove ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4224 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4225 |
(sel == #removeClass:) ifTrue:[ |
11396 | 4226 |
^ self classNameFromRemoveClassParseTree:aParseTree |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4227 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4228 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4229 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4230 |
is it a method category change ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4231 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4232 |
((sel == #category:) |
7953 | 4233 |
or:[sel == #package: |
4234 |
or:[sel == #privacy:]]) ifTrue:[ |
|
11396 | 4235 |
^ self classNameFromAttributeChangeParseTree:aParseTree |
4236 |
]. |
|
4237 |
||
4238 |
sel == #renameClass:to: ifTrue:[ |
|
11397 | 4239 |
^ self classNameFromRenameClassParseTree:aParseTree |
11396 | 4240 |
]. |
4241 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4242 |
^ nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4243 |
|
16372 | 4244 |
"Modified: / 01-05-2016 / 19:29:14 / cg" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4245 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4246 |
|
12428 | 4247 |
namespaceOfChange:changeNr |
4248 |
"return the namespace of a change or nil" |
|
4249 |
||
15116 | 4250 |
|className namespace idx| |
12428 | 4251 |
|
4252 |
className := self classNameOfChange:changeNr. |
|
4253 |
className isNil ifTrue:[ ^ nil ]. |
|
4254 |
||
15116 | 4255 |
idx := className indexOfSubCollection:'::'. |
4256 |
idx == 0 ifTrue:[ ^ nil ]. |
|
4257 |
namespace := className copyTo:idx-1. |
|
12428 | 4258 |
^ namespace |
4259 |
! |
|
4260 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4261 |
numberOfChanges |
16372 | 4262 |
^ changeInfoList size |
4263 |
||
4264 |
"Created: / 03-12-1995 / 18:15:39 / cg" |
|
4265 |
"Modified: / 01-05-2016 / 19:24:05 / cg" |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4266 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4267 |
|
2511 | 4268 |
ownerClassNameOfChange:changeNr |
6288 | 4269 |
"return the owner classname of a change |
2511 | 4270 |
For a normal class, this is the className; |
4271 |
for a private class, this is the name of the owning class" |
|
4272 |
||
4706 | 4273 |
|name "ns idx" cls| |
2511 | 4274 |
|
4275 |
name := self classNameOfChange:changeNr. |
|
4276 |
name isNil ifTrue:[^ nil]. |
|
4277 |
cls := Smalltalk at:name asSymbol. |
|
4278 |
(cls notNil and:[cls isBehavior]) ifTrue:[ |
|
6288 | 4279 |
cls owningClass notNil ifTrue:[ |
4280 |
^ cls owningClass name |
|
4281 |
]. |
|
4282 |
^ cls name |
|
2511 | 4283 |
]. |
4284 |
||
4285 |
"/ (name includes:$:) ifTrue:[ |
|
4286 |
"/ idx := name indexOf:$:. |
|
4287 |
"/ ns := name copyTo:idx-1. |
|
4288 |
"/ ns := Smalltalk at:ns asSymbol. |
|
4289 |
"/ ns notNil ifTrue:[ |
|
6288 | 4290 |
"/ |
2511 | 4291 |
"/ ]. |
4292 |
"/ |
|
4293 |
"/ name := name copyFrom:idx+2. |
|
4294 |
"/ (Smalltalk at:ns asSymbol) notNil ifTrue:[ |
|
4295 |
"/ cls |
|
4296 |
"/ ]. |
|
13851 | 4297 |
"/ ^ name copyButLast:6 |
2511 | 4298 |
"/ ]. |
4299 |
^ name |
|
4300 |
||
4301 |
"Modified: 6.12.1995 / 17:06:31 / cg" |
|
4302 |
! |
|
4303 |
||
3364 | 4304 |
realClassNameOfChange:changeNr |
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4305 |
"return the classname of a change. |
6288 | 4306 |
- since parsing ascii methods is slow, keep result cached in |
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4307 |
changeClassNames for the next query" |
3364 | 4308 |
|
4309 |
|name| |
|
4310 |
||
16372 | 4311 |
name := self changeClassNameAt:changeNr. |
3364 | 4312 |
name isNil ifTrue:[ |
16372 | 4313 |
name := self fullClassNameOfChange:changeNr. |
4314 |
name isNil ifTrue:[ |
|
4315 |
(changeInfoList at:changeNr) className:#nil. |
|
4316 |
]. |
|
3364 | 4317 |
]. |
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4318 |
name == #nil ifTrue:[^ nil]. |
3364 | 4319 |
^ name |
4320 |
||
16372 | 4321 |
"Created: / 05-11-2001 / 18:09:46 / cg" |
4322 |
"Modified: / 01-05-2016 / 19:24:53 / cg" |
|
3364 | 4323 |
! |
4324 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4325 |
selectorOfMethodChange:changeNr |
16467 | 4326 |
"return a method-changes selector, |
4327 |
or nil if it's not a methodChange" |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4328 |
|
3202 | 4329 |
|sel | |
4330 |
||
16372 | 4331 |
changeInfoList size >= changeNr ifTrue:[ |
4332 |
sel := (changeInfoList at:changeNr) selector. |
|
15652 | 4333 |
sel notNil ifTrue:[ ^ sel ]. |
3202 | 4334 |
]. |
4335 |
||
4336 |
sel := self extractSelectorOfMethodChange:changeNr. |
|
4337 |
sel notNil ifTrue:[ |
|
16372 | 4338 |
(changeInfoList at:changeNr) selector:sel. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4339 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4340 |
^ sel |
16372 | 4341 |
|
4342 |
"Modified: / 01-05-2016 / 19:26:21 / cg" |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4343 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4344 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4345 |
sourceOfMethodChange:changeNr |
17400 | 4346 |
"return a method-changes source code, or nil if it's not a methodChange." |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4347 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4348 |
|aStream chunk sawExcla parseTree sourceChunk sel| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4349 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4350 |
aStream := self streamForChange:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4351 |
aStream isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4352 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4353 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
8665 | 4354 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
4355 |
chunk := aStream nextChunk. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4356 |
] ifTrue:[ |
16372 | 4357 |
chunk := self changeChunkAt:changeNr. |
8665 | 4358 |
sawExcla := true. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4359 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4360 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4361 |
sawExcla ifTrue:[ |
8665 | 4362 |
parseTree := self parseExpression:chunk. |
4363 |
(parseTree notNil |
|
4364 |
and:[parseTree ~~ #Error |
|
4365 |
and:[parseTree isMessage]]) ifTrue:[ |
|
4366 |
sel := parseTree selector. |
|
4367 |
(#( |
|
4368 |
#methodsFor: |
|
4369 |
#privateMethodsFor: |
|
4370 |
#publicMethodsFor: |
|
4371 |
#ignoredMethodsFor: |
|
4372 |
#protectedMethodsFor: |
|
4373 |
||
4374 |
#methodsFor:stamp: "/ Squeak support |
|
4375 |
#commentStamp:prior: "/ Squeak support |
|
4376 |
#methodsFor "/ Dolphin support |
|
4377 |
#methods "/ STV support |
|
4378 |
) |
|
4379 |
includes:sel) ifTrue:[ |
|
4380 |
sourceChunk := aStream nextChunk. |
|
4381 |
] |
|
4382 |
]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4383 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4384 |
aStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4385 |
^ sourceChunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4386 |
|
16372 | 4387 |
"Created: / 05-09-1996 / 17:11:32 / cg" |
4388 |
"Modified: / 01-05-2016 / 18:25:53 / cg" |
|
17400 | 4389 |
"Modified (comment): / 13-02-2017 / 19:57:25 / cg" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4390 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4391 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4392 |
streamForChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4393 |
"answer a stream for change" |
6288 | 4394 |
|
15858 | 4395 |
|aStream encoding| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4396 |
|
16372 | 4397 |
(changeNr between:1 and:changeInfoList size) ifFalse:[^ nil]. |
5702 | 4398 |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
4399 |
aStream := changeFileName asFilename readStreamOrNil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4400 |
aStream isNil ifTrue:[^ nil]. |
5702 | 4401 |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4402 |
encodingIfKnown isNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4403 |
encoding := CharacterEncoder guessEncodingOfStream:aStream. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4404 |
encodingIfKnown := encoding ? #none |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4405 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4406 |
(encodingIfKnown notNil and:[encodingIfKnown ~~ #none]) ifTrue:[ |
15858 | 4407 |
aStream := EncodedStream stream:aStream encoding:encodingIfKnown. |
5702 | 4408 |
]. |
4409 |
||
16372 | 4410 |
aStream position:((changeInfoList at:changeNr) position)-1. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4411 |
^ aStream |
16372 | 4412 |
|
4413 |
"Modified: / 01-05-2016 / 19:24:17 / cg" |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4414 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4415 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4416 |
!ChangesBrowser methodsFor:'private-changeFile access'! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4417 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4418 |
changeFileName:aFileName |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4419 |
"set the name of the changeFile" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4420 |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4421 |
changeFileName := aFileName. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4422 |
encodingIfKnown := nil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4423 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4424 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4425 |
checkIfFileHasChanged |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4426 |
"check if the changeFile has been modified since the last check; |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4427 |
install a timeout for rechecking after some time." |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4428 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4429 |
|f info | |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4430 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4431 |
Processor removeTimedBlock:checkBlock. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4432 |
f := changeFileName asFilename. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4433 |
(info := f info) isNil ifTrue:[ |
16092 | 4434 |
self newLabel:'(unaccessible)' |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4435 |
] ifFalse:[ |
16092 | 4436 |
(info modificationTime) > changeFileTimestamp ifTrue:[ |
4437 |
self newLabel:'(outdated)'. |
|
4438 |
autoUpdate value ifTrue:[ |
|
4439 |
self doUpdate |
|
4440 |
] |
|
4441 |
] ifFalse:[ |
|
4442 |
self newLabel:'' |
|
4443 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4444 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4445 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4446 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4447 |
"Created: 8.9.1995 / 19:30:19 / claus" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4448 |
"Modified: 8.9.1995 / 19:38:18 / claus" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4449 |
"Modified: 1.11.1996 / 20:22:56 / cg" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4450 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4451 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4452 |
readChangesFile |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4453 |
"read the changes file, create a list of header-lines (changeChunks) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4454 |
and a list of chunk-positions (changePositions)" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4455 |
|
5178 | 4456 |
self readChangesFileInBackground:false. |
4457 |
self newLabel:''. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4458 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4459 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4460 |
readChangesFileInBackground:inBackground |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4461 |
"read the changes file, create a list of header-lines (changeChunks) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4462 |
and a list of chunk-positions (changePositions). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4463 |
Starting with 2.10.3, the entries are multi-col entries; |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4464 |
the cols are: |
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4465 |
1 delta (only if comparing) |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4466 |
'+' -> new method (w.r.t. current state) |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4467 |
'-' -> removed method (w.r.t. current state) |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4468 |
'?' -> class does not exist currently |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4469 |
'=' -> change is the same as current methods source |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4470 |
'~' -> change is almost the same as current methods source |
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4471 |
2 class/selector |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4472 |
3 type of change |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4473 |
doit |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4474 |
method |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4475 |
category change |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4476 |
4 timestamp |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4477 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4478 |
since comparing slows down startup time, it is now disabled by |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4479 |
default and can be enabled via a toggle." |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4480 |
|
12635 | 4481 |
|inStream i f askedForEditingClassSource myProcess myPriority myPrioRange| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4482 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4483 |
editingClassSource := false. |
2641 | 4484 |
askedForEditingClassSource := false. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4485 |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4486 |
"/ maxLen := 60. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4487 |
|
3674 | 4488 |
self newLabel:'updating ...'. |
4489 |
||
4490 |
(self class isXMLFile:changeFileName) ifTrue:[ |
|
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4491 |
^ self class readXMLChangesFromFile:changeFileName inBackground:inBackground |
3674 | 4492 |
]. |
4493 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4494 |
f := changeFileName asFilename. |
7346 | 4495 |
f exists ifFalse:[^ self]. |
12635 | 4496 |
inStream := EncodedStream decodedStreamFor:(f readStream). |
5696 | 4497 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4498 |
i := f info. |
3965
e499c0dae8fc
use #fileSize instead of #size
Claus Gittinger <cg@exept.de>
parents:
3962
diff
changeset
|
4499 |
changeFileSize := i fileSize. |
3962
3906b10c42fd
modified -> modificationTime
Claus Gittinger <cg@exept.de>
parents:
3930
diff
changeset
|
4500 |
changeFileTimestamp := i modificationTime. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4501 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4502 |
self withReadCursorDo:[ |
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4503 |
" |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4504 |
this is a time consuming operation (especially, if reading an |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4505 |
NFS-mounted directory; therefore lower my priority ... |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4506 |
" |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4507 |
inBackground ifTrue:[ |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4508 |
myProcess := Processor activeProcess. |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4509 |
myPriority := myProcess priority. |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4510 |
myPrioRange := myProcess priorityRange. |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4511 |
myProcess priorityRange:(Processor userBackgroundPriority to:Processor activePriority). |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4512 |
]. |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4513 |
|
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4514 |
[ |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4515 |
|reader| |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4516 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4517 |
reader := ChangeFileReader new. |
6516
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
4518 |
reader changeFileName:changeFileName. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4519 |
reader browser:self. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4520 |
reader enforcedNameSpace:enforcedNameSpace. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4521 |
reader autoCompare:autoCompare. |
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
4522 |
reader autoloadAsRequired:autoloadAsRequired. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4523 |
reader tabSpec:tabSpec. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4524 |
reader inStream:inStream. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4525 |
reader noColoring:(NoColoring == true). |
16467 | 4526 |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4527 |
reader readChangesFile. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4528 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4529 |
editingClassSource := reader thisIsAClassSource. |
16372 | 4530 |
changeInfoList := reader changeInfo. |
16467 | 4531 |
|
4532 |
self showNumberOfChanges. |
|
7360 | 4533 |
anyChanges := false. |
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4534 |
] ensure:[ |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4535 |
inStream close. |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4536 |
inBackground ifTrue:[ |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4537 |
myProcess priority:myPriority. |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4538 |
myProcess priorityRange:myPrioRange. |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4539 |
]. |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4540 |
]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4541 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4542 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4543 |
self checkIfFileHasChanged |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4544 |
|
7360 | 4545 |
"Modified: / 27-08-1995 / 23:06:55 / claus" |
16372 | 4546 |
"Modified: / 01-05-2016 / 19:13:09 / cg" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4547 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4548 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4549 |
writeBackChanges |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4550 |
"write back the changes file. To avoid problems when the disk is full |
6288 | 4551 |
or a crash occurs while writing (well, or someone kills us), |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4552 |
first write the stuff to a new temporary file. If this works ok, |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4553 |
rename the old change-file to a .bak file and finally rename the |
6288 | 4554 |
tempfile back to the change-file. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4555 |
That way, if anything happens, either the original file is left unchanged, |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4556 |
or we have at least a backup of the previous change file." |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4557 |
|
15858 | 4558 |
|inFilename inStream outStream stamp encoding tempFilename| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4559 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4560 |
editingClassSource ifTrue:[ |
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4561 |
(self confirm:'You are editing a classes sourceFile (not a changeFile) !!\\Are you certain, you want to overwrite it ?' withCRs) |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4562 |
ifFalse:[ |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4563 |
^ false |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4564 |
] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4565 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4566 |
|
13123 | 4567 |
inFilename := changeFileName asFilename. |
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4568 |
[ |
13123 | 4569 |
inStream := inFilename readStream. |
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4570 |
] on:FileStream openErrorSignal do:[:ex| |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4571 |
self warn:'Cannot open old changesFile.'. |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4572 |
^ false |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4573 |
]. |
9020 | 4574 |
[ |
4575 |
[ |
|
13123 | 4576 |
outStream := FileStream newTemporaryIn:inFilename directory. |
4577 |
tempFilename := outStream fileName. |
|
9020 | 4578 |
] on:FileStream openErrorSignal do:[:ex| |
4579 |
self warn:'Cannot create temp file in current directory.'. |
|
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4580 |
^ false |
9020 | 4581 |
]. |
4582 |
||
11234 | 4583 |
outStream nextPutLine:'''---- encoding: utf8 ----''!!'. |
9020 | 4584 |
outStream := EncodedStream stream:outStream encoder:(CharacterEncoder encoderForUTF8). |
4585 |
||
4586 |
encoding := CharacterEncoder guessEncodingOfStream:inStream. |
|
4587 |
encoding notNil ifTrue:[ |
|
15858 | 4588 |
inStream := EncodedStream stream:inStream encoding:encoding. |
9020 | 4589 |
]. |
4590 |
||
11685 | 4591 |
self withWriteCursorDo:[ |
9020 | 4592 |
|excla sawExcla done first chunk |
4593 |
nChanges "{Class:SmallInteger}" | |
|
4594 |
||
4595 |
Stream writeErrorSignal handle:[:ex | |
|
4596 |
self warn:('Could not update the changes file.\\' , ex description) withCRs. |
|
13123 | 4597 |
outStream close. |
4598 |
tempFilename remove. |
|
9020 | 4599 |
^ false |
4600 |
] do:[ |
|
4601 |
excla := inStream class chunkSeparator. |
|
4602 |
nChanges := self numberOfChanges. |
|
4603 |
||
4604 |
1 to:nChanges do:[:index | |
|
16372 | 4605 |
inStream position:((changeInfoList at:index) position)-1. |
9020 | 4606 |
sawExcla := inStream peekFor:excla. |
4607 |
chunk := inStream nextChunk. |
|
4608 |
||
4609 |
(chunk notNil |
|
4610 |
and:[(chunk startsWith:'''---- snap') not]) ifTrue:[ |
|
16372 | 4611 |
(stamp := (changeInfoList at:index) timestamp) notNil ifTrue:[ |
9020 | 4612 |
outStream nextPutAll:'''---- timestamp ' , stamp , ' ----'''. |
4613 |
outStream nextPut:excla; cr. |
|
4614 |
]. |
|
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4615 |
]. |
9020 | 4616 |
|
4617 |
sawExcla ifTrue:[ |
|
4618 |
outStream nextPut:excla. |
|
4619 |
outStream nextChunkPut:chunk. |
|
4620 |
outStream cr; cr. |
|
4621 |
" |
|
4622 |
a method-definition chunk - output followups |
|
4623 |
" |
|
4624 |
done := false. |
|
4625 |
first := true. |
|
4626 |
[done] whileFalse:[ |
|
4627 |
chunk := inStream nextChunk. |
|
4628 |
chunk isNil ifTrue:[ |
|
4629 |
outStream cr; cr. |
|
4630 |
done := true |
|
4631 |
] ifFalse:[ |
|
4632 |
chunk isEmpty ifTrue:[ |
|
4633 |
outStream space; nextChunkPut:chunk; cr; cr. |
|
4634 |
done := true. |
|
4635 |
] ifFalse:[ |
|
4636 |
first ifFalse:[ |
|
4637 |
outStream cr; cr. |
|
4638 |
]. |
|
4639 |
outStream nextChunkPut:chunk. |
|
4640 |
]. |
|
4641 |
]. |
|
4642 |
first := false. |
|
4643 |
]. |
|
4644 |
] ifFalse:[ |
|
4645 |
outStream nextChunkPut:chunk. |
|
4646 |
outStream cr |
|
4647 |
] |
|
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4648 |
]. |
9020 | 4649 |
outStream syncData; close. |
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4650 |
]. |
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4651 |
inStream close. |
9020 | 4652 |
|
17376 | 4653 |
inFilename renameTo:inFilename asBackupFilename. |
13123 | 4654 |
tempFilename renameTo:changeFileName. |
9020 | 4655 |
anyChanges := false |
6415
3b2616b53ab3
utf-8 characters have been destroyed if changes were written back to the change file
Stefan Vogel <sv@exept.de>
parents:
6386
diff
changeset
|
4656 |
]. |
9020 | 4657 |
] ensure:[ |
4658 |
inStream close. |
|
4659 |
]. |
|
4660 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4661 |
^ true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4662 |
|
16372 | 4663 |
"Modified: / 01-05-2016 / 19:30:34 / cg" |
17376 | 4664 |
"Modified: / 09-02-2017 / 13:30:57 / stefan" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4665 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4666 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4667 |
!ChangesBrowser methodsFor:'private-user interaction ops'! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4668 |
|
5735 | 4669 |
appendChange:changeNr toFile:aFileNameOrFileNameString |
202 | 4670 |
"append change to a file. return true if ok." |
4671 |
||
5735 | 4672 |
|fileName changeInStream outStream chunk chunk2 sawExcla separator encoding| |
4673 |
||
4674 |
changeInStream := self streamForChange:changeNr. |
|
4675 |
changeInStream isNil ifTrue:[ |
|
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4676 |
self warn:'Cannot read change'. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4677 |
^ false |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4678 |
]. |
5735 | 4679 |
changeInStream skipSeparators. |
4680 |
||
4681 |
separator := changeInStream class chunkSeparator. |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4682 |
|
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4683 |
(self changeIsFollowupMethodChange:changeNr) ifTrue:[ |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4684 |
sawExcla := true. |
16372 | 4685 |
chunk := self changeChunkAt:changeNr. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4686 |
] ifFalse:[ |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4687 |
sawExcla := changeInStream peekFor:separator. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4688 |
chunk := changeInStream nextChunk. |
3991 | 4689 |
]. |
4690 |
chunk withoutSeparators isEmpty ifTrue:[ |
|
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4691 |
self error:'Empty chunk - should not happen' mayProceed:true. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4692 |
^ false. |
5735 | 4693 |
]. |
4694 |
||
4695 |
fileName := aFileNameOrFileNameString asFilename. |
|
202 | 4696 |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
4697 |
[ |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4698 |
outStream := fileName readWriteStream. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
4699 |
] on:FileStream openErrorSignal do:[:ex| |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4700 |
self warn:'Cannot update file: ''%1''' with:fileName. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4701 |
^ false |
73 | 4702 |
]. |
202 | 4703 |
|
11476
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4704 |
outStream fileSize = 0 ifTrue:[ |
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4705 |
encoding := #utf8. |
15090 | 4706 |
outStream nextPutLine:'"{ Encoding: utf8 }" !!'. |
11476
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4707 |
] ifFalse:[ |
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4708 |
encoding := CharacterEncoder guessEncodingOfStream:outStream. |
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4709 |
]. |
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4710 |
|
5735 | 4711 |
encoding notNil ifTrue:[ |
15858 | 4712 |
outStream := EncodedStream stream:outStream encoding:encoding. |
11476
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4713 |
]. |
202 | 4714 |
outStream setToEnd. |
4715 |
||
4716 |
sawExcla ifTrue:[ |
|
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4717 |
outStream nextPut:separator |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4718 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4719 |
outStream nextChunkPut:chunk; cr. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4720 |
sawExcla ifTrue:[ |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4721 |
chunk2 := changeInStream nextChunk. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4722 |
chunk2 withoutSeparators isEmpty ifTrue:[ |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4723 |
self error:'Empty chunk - should not happen'. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4724 |
]. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4725 |
outStream nextChunkPut:chunk2; space |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4726 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4727 |
sawExcla ifTrue:[ |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4728 |
outStream nextPut:separator |
202 | 4729 |
]. |
4730 |
outStream cr. |
|
5735 | 4731 |
|
4732 |
changeInStream close. |
|
202 | 4733 |
outStream close. |
4734 |
^ true |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4735 |
|
16372 | 4736 |
"Modified: / 01-05-2016 / 18:25:00 / cg" |
73 | 4737 |
! |
4738 |
||
51 | 4739 |
applyChange:changeNr |
7783
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
4740 |
"fileIn a change. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
4741 |
Answer true, if everything went ok." |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
4742 |
|
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
4743 |
|aStream applyAction nameSpace className changeClass ownerName ownerClass reader doItChunk methodsForChunk pkg |
4877 | 4744 |
alternativeClass shortName orgClassName nsClass aborted| |
45 | 4745 |
|
51 | 4746 |
aStream := self streamForChange:changeNr. |
12973 | 4747 |
aStream isNil ifTrue:[^ false]. |
51 | 4748 |
|
2965 | 4749 |
className := self classNameOfChange:changeNr. |
4750 |
className notNil ifTrue:[ |
|
6378 | 4751 |
className := className asSymbol. |
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
4752 |
enforcedNameSpace notNil ifTrue:[ |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
4753 |
changeClass := enforcedNameSpace at:className ifAbsent:nil. |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
4754 |
] ifFalse:[ |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
4755 |
changeClass := Smalltalk at:className ifAbsent:nil. |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
4756 |
]. |
6378 | 4757 |
changeClass isNil ifTrue:[ |
4758 |
changeClass := self classOfChange:changeNr. |
|
4759 |
]. |
|
8351
e99a28a6288b
changed #applyChange: load class before applying a change
Stefan Vogel <sv@exept.de>
parents:
8320
diff
changeset
|
4760 |
changeClass notNil ifTrue:[ |
e99a28a6288b
changed #applyChange: load class before applying a change
Stefan Vogel <sv@exept.de>
parents:
8320
diff
changeset
|
4761 |
"load unloaded class. Otherwise a class definition change |
e99a28a6288b
changed #applyChange: load class before applying a change
Stefan Vogel <sv@exept.de>
parents:
8320
diff
changeset
|
4762 |
will create a class without methods" |
e99a28a6288b
changed #applyChange: load class before applying a change
Stefan Vogel <sv@exept.de>
parents:
8320
diff
changeset
|
4763 |
changeClass autoload. |
e99a28a6288b
changed #applyChange: load class before applying a change
Stefan Vogel <sv@exept.de>
parents:
8320
diff
changeset
|
4764 |
]. |
51 | 4765 |
]. |
45 | 4766 |
|
51 | 4767 |
changeNrProcessed := changeNr. |
4877 | 4768 |
aborted := false. |
45 | 4769 |
|
6288 | 4770 |
applyAction := |
6378 | 4771 |
[ |
7783
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
4772 |
AbortOperationRequest handle:[:ex | |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
4773 |
"catch the abort of a single apply here. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
4774 |
Send AbortAllOperationRequest to abort multiple operations" |
6378 | 4775 |
aborted := true. |
4776 |
ex return. |
|
4777 |
] do:[ |
|
4778 |
nameSpace := self nameSpaceForApply. |
|
4779 |
||
4780 |
pkg := enforcedPackage ? Class packageQuerySignal query. |
|
4781 |
Class packageQuerySignal answer:pkg |
|
4782 |
do:[ |
|
4783 |
Class nameSpaceQuerySignal answer:nameSpace |
|
4784 |
do:[ |
|
11244 | 4785 |
Class defaultApplicationQuerySignal handle:[:ex | |
4786 |
ex proceedWith:defaultApplicationForVAGEClasses |
|
4787 |
] do:[ |
|
4788 |
Class changeDefaultApplicationNotificationSignal handle:[:ex | |
|
4789 |
defaultApplicationForVAGEClasses := ex parameter. |
|
4790 |
] do:[ |
|
17899 | 4791 |
|skip| |
4792 |
||
4793 |
skip := false. |
|
11244 | 4794 |
|
4795 |
"/ a followup methodsFor: chunk ... |
|
4796 |
(self changeIsFollowupMethodChange:changeNr) ifTrue:[ |
|
16372 | 4797 |
methodsForChunk := self changeChunkAt:changeNr. |
11244 | 4798 |
] ifFalse:[ |
4799 |
doItChunk := aStream nextChunk. "/ an empty chunk sometimes ... |
|
4800 |
doItChunk notEmpty ifTrue:[ |
|
4801 |
doItChunk first = (Character value:16rFEFF) ifTrue:[ |
|
4802 |
doItChunk := doItChunk copyFrom:2. |
|
4803 |
]. |
|
4804 |
Compiler evaluate:doItChunk notifying:self. |
|
6378 | 4805 |
] ifFalse:[ |
11244 | 4806 |
methodsForChunk := aStream nextChunk. "/ the real one |
6378 | 4807 |
] |
4808 |
]. |
|
11244 | 4809 |
methodsForChunk notNil ifTrue:[ |
4810 |
changeClass isNil ifTrue:[ |
|
4811 |
orgClassName := className. |
|
4812 |
||
4813 |
(className includes:$:) ifTrue:[ |
|
4814 |
ownerName := className copyTo:(className lastIndexOf:$:) - 1. |
|
4815 |
(ownerName endsWith:$:) ifTrue:[ |
|
12704
6f20f7d39e75
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12656
diff
changeset
|
4816 |
ownerName := ownerName copyButLast:1. |
11244 | 4817 |
]. |
4818 |
||
4819 |
ownerClass := Smalltalk at:(ownerName asSymbol) ifAbsent:[]. |
|
4820 |
ownerClass notNil ifTrue:[ |
|
4821 |
ownerClass autoload |
|
4822 |
]. |
|
4823 |
]. |
|
4824 |
(nameSpace notNil and:[nameSpace ~~ Smalltalk]) ifTrue:[ |
|
4825 |
changeClass := nameSpace at:className ifAbsent:[]. |
|
4826 |
]. |
|
4827 |
changeClass isNil ifTrue:[ |
|
4828 |
changeClass := Smalltalk at:className ifAbsent:[]. |
|
4829 |
]. |
|
4830 |
[changeClass isNil] whileTrue:[ |
|
4831 |
(NameSpace allNameSpaces |
|
15683 | 4832 |
contains:[:ns | (nsClass := (ns at:className asSymbol)) notNil]) |
11244 | 4833 |
ifTrue:[ |
4834 |
shortName := nsClass name. |
|
4835 |
] ifFalse:[ |
|
4836 |
shortName := className copyFrom:(className lastIndexOf:$:) + 1. |
|
4837 |
shortName = className ifTrue:[ |
|
4838 |
shortName := '' |
|
4839 |
]. |
|
4840 |
]. |
|
17899 | 4841 |
|
4842 |
skip := false. |
|
4843 |
||
4844 |
Dialog modifyingBoxWith:[:box | |
|
4845 |
self halt. |
|
4846 |
box |
|
4847 |
addButton:(Button label:'Skip' action:[skip := true. box hide]) |
|
4848 |
after:box noButton |
|
4849 |
] do:[ |
|
4850 |
className := Dialog |
|
12973 | 4851 |
request:'No class ''' , className , ''' for change. Add to which class? (enter empty string to skip this change)' |
11244 | 4852 |
initialAnswer:shortName. |
4853 |
]. |
|
17899 | 4854 |
skip ifFalse:[ |
4855 |
className isNil ifTrue:[ |
|
4856 |
AbortAllOperationRequest raise. |
|
4857 |
]. |
|
4858 |
className isEmpty ifTrue:[ |
|
4859 |
^ false |
|
4860 |
]. |
|
4861 |
alternativeClass := Smalltalk classNamed:className. |
|
4862 |
alternativeClass notNil ifTrue:[ |
|
4863 |
changeClass := alternativeClass |
|
4864 |
] |
|
4865 |
]. |
|
11244 | 4866 |
]. |
17899 | 4867 |
skip ifFalse:[ |
4868 |
methodsForChunk := methodsForChunk copyFrom:(methodsForChunk indexOfSeparator). |
|
4869 |
methodsForChunk := changeClass name , methodsForChunk. |
|
4870 |
]. |
|
11244 | 4871 |
]. |
17899 | 4872 |
skip ifFalse:[ |
4873 |
reader := Compiler evaluate:methodsForChunk notifying:self. |
|
4874 |
reader fileInFrom:aStream notifying:self passChunk:false single:true. |
|
4875 |
] |
|
11244 | 4876 |
] |
4877 |
] |
|
6378 | 4878 |
] |
4879 |
] |
|
4880 |
] |
|
4881 |
]. |
|
4882 |
changeNrProcessed := nil. |
|
4883 |
]. |
|
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4884 |
|
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4885 |
"/ |
17026 | 4886 |
"/ if I am showing the changes file, don't update it |
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4887 |
"/ |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4888 |
changeFileName = ObjectMemory nameForChanges ifTrue:[ |
6378 | 4889 |
Class withoutUpdatingChangesDo:[ |
4890 |
Class updateChangeListQuerySignal answer:updateChangeSet value do:applyAction |
|
4891 |
] |
|
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4892 |
] ifFalse:[ |
6378 | 4893 |
applyAction value |
45 | 4894 |
]. |
4877 | 4895 |
aStream close. |
4896 |
||
4897 |
^ aborted not |
|
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4898 |
|
16372 | 4899 |
"Modified: / 01-05-2016 / 18:25:18 / cg" |
45 | 4900 |
! |
4901 |
||
7953 | 4902 |
compareCategoryChange:parseTree |
9888 | 4903 |
|receiverExpression method thisClass| |
7953 | 4904 |
|
4905 |
receiverExpression := parseTree receiver. |
|
4906 |
receiverExpression isMessage ifTrue:[ |
|
4907 |
receiverExpression selector == #compiledMethodAt: ifTrue:[ |
|
9888 | 4908 |
[ |
4909 |
thisClass := receiverExpression receiver evaluate. |
|
4910 |
] on:Parser undefinedVariableError do:[:ex| ]. |
|
4911 |
||
4912 |
(thisClass isBehavior |
|
7953 | 4913 |
and:[(method := receiverExpression evaluate) isMethod]) ifTrue:[ |
4914 |
method category = parseTree arg1 evaluate ifTrue:[ |
|
4915 |
^ true -> 'Change has no effect\\(same category)'. |
|
4916 |
] ifFalse:[ |
|
8173 | 4917 |
^ false -> ('Category is different (''' , method category , ''' vs. ''' , parseTree arg1 evaluate , ''')'). |
7953 | 4918 |
] |
4919 |
] ifFalse:[ |
|
4920 |
^ nil -> 'There is no such method'. |
|
4921 |
] |
|
4922 |
] |
|
4923 |
]. |
|
4924 |
^ nil -> 'Unhandled receiver' |
|
4925 |
! |
|
4926 |
||
255 | 4927 |
compareChange:changeNr |
2835 | 4928 |
"compare a change with the current (in-image) version; show the result of the compare (as dialog)" |
4929 |
||
4930 |
^ self compareChange:changeNr showResult:true |
|
4931 |
! |
|
4932 |
||
4933 |
compareChange:changeNr showResult:doShowResult |
|
4934 |
"compare a change with current version. |
|
4935 |
Return the result of the compare (same -> true, different -> false, uncomparable -> nil). |
|
4936 |
If doShowResult is true, the outcome is shown in a dialog/diffViewer." |
|
255 | 4937 |
|
15016 | 4938 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource outcome showDiff d selector isLoaded beep superClass thisClassSym varsHere varsInChange addedVars removedVars |
9888 | 4939 |
isSame ownerClass superClassHere superClassInChange sameAndOutcome| |
255 | 4940 |
|
4941 |
aStream := self streamForChange:changeNr. |
|
2835 | 4942 |
aStream isNil ifTrue:[^ nil]. |
255 | 4943 |
|
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
4944 |
showDiff := false. |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
4945 |
|
1472 | 4946 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
6357 | 4947 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
4948 |
chunk := aStream nextChunk. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4949 |
] ifTrue:[ |
16372 | 4950 |
chunk := self changeChunkAt:changeNr. |
6357 | 4951 |
sawExcla := true. |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4952 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4953 |
|
2835 | 4954 |
isSame := nil. |
4955 |
||
761 | 4956 |
beep := false. |
255 | 4957 |
sawExcla ifFalse:[ |
6357 | 4958 |
outcome := 'cannot compare this change\\(i.e. this is not a method change).'. |
4959 |
||
4960 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
|
4961 |
do:[ |
|
8665 | 4962 |
parseTree := self parseExpression:chunk. |
6357 | 4963 |
]. |
4964 |
(parseTree notNil and:[parseTree ~~ #Error and:[ parseTree isMessage ]]) ifTrue:[ |
|
4965 |
selector := parseTree selector. |
|
4966 |
||
4967 |
selector == #'removeSelector:' ifTrue:[ |
|
7953 | 4968 |
sameAndOutcome := self compareRemoveSelectorChange:parseTree. |
4969 |
isSame := sameAndOutcome key. |
|
4970 |
outcome := sameAndOutcome value. |
|
4971 |
]. |
|
4972 |
selector == #'package:' ifTrue:[ |
|
4973 |
sameAndOutcome := self comparePackageChange:parseTree. |
|
4974 |
isSame := sameAndOutcome key. |
|
4975 |
outcome := sameAndOutcome value. |
|
6357 | 4976 |
]. |
4977 |
selector == #'category:' ifTrue:[ |
|
7953 | 4978 |
sameAndOutcome := self compareCategoryChange:parseTree. |
4979 |
isSame := sameAndOutcome key. |
|
4980 |
outcome := sameAndOutcome value. |
|
6357 | 4981 |
]. |
4982 |
selector == #'comment:' ifTrue:[ |
|
7953 | 4983 |
sameAndOutcome := self compareCommentChange:parseTree. |
4984 |
isSame := sameAndOutcome key. |
|
4985 |
outcome := sameAndOutcome value. |
|
6357 | 4986 |
]. |
4987 |
||
4988 |
selector == #'instanceVariableNames:' ifTrue:[ |
|
7953 | 4989 |
sameAndOutcome := self compareInstanceVariableNamesChange:parseTree. |
4990 |
isSame := sameAndOutcome key. |
|
4991 |
outcome := sameAndOutcome value. |
|
6357 | 4992 |
]. |
4993 |
||
4994 |
(Class definitionSelectors includes:selector) |
|
4995 |
"/ selector == #'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' |
|
4996 |
ifTrue:[ |
|
9888 | 4997 |
[ |
4998 |
superClass := parseTree receiver evaluate. |
|
4999 |
] on:Parser undefinedVariableError do:[:ex| ]. |
|
6357 | 5000 |
superClass isBehavior ifFalse:[ |
5001 |
outcome := 'Cannot compare this change\\(superclass not loaded).'. |
|
5002 |
isSame := nil. |
|
5003 |
] ifTrue:[ |
|
5004 |
(self checkClassIsLoaded:superClass) ifTrue:[ |
|
5005 |
thisClassSym := (parseTree arguments at:1) evaluate. |
|
5006 |
||
5007 |
(selector endsWith:':privateIn:') ifTrue:[ |
|
11475
b6fdfe902263
changed: #compareChange:showResult:
Stefan Vogel <sv@exept.de>
parents:
11397
diff
changeset
|
5008 |
Parser undefinedVariableError catch:[ |
b6fdfe902263
changed: #compareChange:showResult:
Stefan Vogel <sv@exept.de>
parents:
11397
diff
changeset
|
5009 |
ownerClass := (parseTree arguments at:5) evaluate. |
b6fdfe902263
changed: #compareChange:showResult:
Stefan Vogel <sv@exept.de>
parents:
11397
diff
changeset
|
5010 |
ownerClass isBehavior ifTrue:[ |
b6fdfe902263
changed: #compareChange:showResult:
Stefan Vogel <sv@exept.de>
parents:
11397
diff
changeset
|
5011 |
thisClass := ownerClass privateClassesAt:thisClassSym. |
b6fdfe902263
changed: #compareChange:showResult:
Stefan Vogel <sv@exept.de>
parents:
11397
diff
changeset
|
5012 |
]. |
6357 | 5013 |
]. |
5014 |
] ifFalse:[ |
|
5015 |
thisClass := (self nameSpaceForApply) at:thisClassSym ifAbsent:nil. |
|
5016 |
]. |
|
5017 |
thisClass isNil ifTrue:[ |
|
5018 |
outcome := 'Change defines the class: ' , thisClassSym allBold. |
|
5019 |
isSame := false. |
|
5020 |
] ifFalse:[ |
|
5021 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
|
5022 |
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'. |
|
5023 |
isSame := nil. |
|
5024 |
] ifTrue:[ |
|
5025 |
superClassHere := thisClass superclass name. |
|
5026 |
superClassInChange := parseTree receiver name. |
|
5027 |
superClassHere ~~ superClassInChange ifTrue:[ |
|
5028 |
outcome := 'Superclass is different.'. |
|
5029 |
isSame := false. |
|
5030 |
] ifFalse:[ |
|
5031 |
varsHere := thisClass instanceVariableString asCollectionOfWords. |
|
5032 |
varsInChange := (parseTree arguments at:2) evaluate asCollectionOfWords. |
|
5033 |
varsHere = varsInChange ifTrue:[ |
|
5034 |
thisClass classVariableString asCollectionOfWords = (parseTree arguments at:3) evaluate asCollectionOfWords ifTrue:[ |
|
9689
72819fbf329a
changed: #compareChange:showResult:
Claus Gittinger <cg@exept.de>
parents:
9621
diff
changeset
|
5035 |
((thisClass sharedPoolNames size == 0) and:[(parseTree arguments at:4) evaluate = '']) ifTrue:[ |
6357 | 5036 |
((selector endsWith:':category:') |
5037 |
and:[thisClass category ~= (parseTree arguments at:5) evaluate]) ifTrue:[ |
|
5038 |
outcome := 'Category is different'. |
|
5039 |
isSame := false. |
|
5040 |
] ifFalse:[ |
|
5041 |
outcome := 'Change has no effect\\(same definition)'. |
|
5042 |
isSame := true. |
|
5043 |
] |
|
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
5044 |
"/ thisClass category = (parseTree arguments at:5) evaluate ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
5045 |
"/ outcome := 'Change has no effect\\(same definition)'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
5046 |
"/ isSame := true. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
5047 |
"/ ] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
5048 |
"/ outcome := 'Category is different'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
5049 |
"/ isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
5050 |
"/ ] |
6357 | 5051 |
] ifFalse:[ |
5052 |
outcome := 'SharedPool definition is different'. |
|
5053 |
isSame := false. |
|
5054 |
]. |
|
5055 |
] ifFalse:[ |
|
5056 |
outcome := 'ClassVariable definition is different'. |
|
5057 |
isSame := false. |
|
5058 |
] |
|
5059 |
] ifFalse:[ |
|
5060 |
outcome := 'InstanceVariable definition is different'. |
|
5061 |
isSame := false. |
|
12825 | 5062 |
addedVars := varsInChange reject:[:eachVar | (varsHere includes:eachVar)]. |
5063 |
removedVars := varsHere reject:[:eachVar | (varsInChange includes:eachVar)]. |
|
6357 | 5064 |
addedVars isEmpty ifTrue:[ |
5065 |
removedVars isEmpty ifTrue:[ |
|
5066 |
outcome := 'Change reorders instanceVariable(s)'. |
|
5067 |
] ifFalse:[ |
|
5068 |
removedVars := removedVars collect:[:eachVar | '''' , eachVar , '''']. |
|
5069 |
outcome := 'Change removes instanceVariable(s): ' , (removedVars asStringWith:Character space) allBold. |
|
5070 |
] |
|
5071 |
] ifFalse:[ |
|
5072 |
removedVars isEmpty ifTrue:[ |
|
5073 |
addedVars := addedVars collect:[:eachVar | '''' , eachVar , '''']. |
|
5074 |
outcome := 'Change adds instanceVariable(s): ' , (addedVars asStringWith:Character space) allBold. |
|
5075 |
]. |
|
5076 |
]. |
|
5077 |
] |
|
5078 |
] |
|
5079 |
] |
|
5080 |
] |
|
5081 |
] |
|
5082 |
] |
|
5083 |
] |
|
5084 |
] |
|
255 | 5085 |
] ifTrue:[ |
15016 | 5086 |
Class nameSpaceQuerySignal |
5087 |
answer:(self nameSpaceForApply) |
|
5088 |
do:[ |
|
5089 |
parseTree := self parseExpression:chunk. |
|
5090 |
]. |
|
5091 |
||
6357 | 5092 |
(parseTree notNil |
5093 |
and:[parseTree ~~ #Error |
|
5094 |
and:[parseTree isMessage]]) ifTrue:[ |
|
5095 |
"/ Squeak support (#methodsFor:***) |
|
5096 |
(#( |
|
5097 |
#methodsFor: |
|
5098 |
#privateMethodsFor: |
|
5099 |
#publicMethodsFor: |
|
5100 |
#ignoredMethodsFor: |
|
5101 |
#protectedMethodsFor: |
|
5102 |
||
5103 |
#methodsFor:stamp: "/ Squeak support |
|
5104 |
#methodsFor "/ Dolphin support |
|
5105 |
#methods "/ STV support |
|
5106 |
) |
|
5107 |
includes:parseTree selector) ifTrue:[ |
|
9888 | 5108 |
[ |
5109 |
thisClass := parseTree receiver evaluate. |
|
5110 |
] on:Parser undefinedVariableError do:[:ex| |
|
5111 |
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'. |
|
5112 |
isSame := nil. |
|
5113 |
]. |
|
5114 |
thisClass notNil ifTrue:[ |
|
5115 |
(thisClass isKindOf:UndefinedVariable) ifTrue:[ |
|
6357 | 5116 |
|thisName path| |
5117 |
||
5118 |
thisName := thisClass name. |
|
5119 |
path := thisName asCollectionOfSubstringsSeparatedByAll:'::'. |
|
5120 |
1 to:path size do:[:length | |
|
5121 |
|ownerName owner| |
|
5122 |
||
5123 |
ownerName := (path copyTo:length) asStringCollection asStringWith:'::'. |
|
6820
4e8815b9e661
Do not autoload class when comparing changes.
Stefan Vogel <sv@exept.de>
parents:
6682
diff
changeset
|
5124 |
owner := Smalltalk loadedClassNamed:ownerName. |
6357 | 5125 |
(owner notNil and:[owner isBehavior and:[owner isLoaded not]]) ifTrue:[ |
5126 |
self checkClassIsLoaded:owner. |
|
5127 |
]. |
|
5128 |
]. |
|
9888 | 5129 |
thisClass := parseTree receiver evaluate. |
6357 | 5130 |
]. |
5131 |
||
5132 |
thisClass isBehavior ifTrue:[ |
|
5133 |
parseTree selector == #methodsFor ifTrue:[ |
|
5134 |
cat := 'Dolphin methods'. |
|
5135 |
] ifFalse:[ |
|
5136 |
parseTree selector == #methods ifTrue:[ |
|
5137 |
cat := 'STV methods'. |
|
5138 |
] ifFalse:[ |
|
5139 |
cat := parseTree arg1 evaluate. |
|
5140 |
]. |
|
5141 |
]. |
|
5142 |
newSource := aStream nextChunk. |
|
5143 |
||
15016 | 5144 |
isSame := self |
5145 |
compareMethodSource:newSource |
|
5146 |
withVersionInClass:thisClass |
|
5147 |
into:[:outcomeResult :beepResult :oldSourceResult| |
|
5148 |
outcome := outcomeResult. |
|
5149 |
beep := beepResult. |
|
5150 |
oldSource := oldSourceResult. |
|
5151 |
]. |
|
5152 |
||
5153 |
isSame isNil ifTrue:[ |
|
5154 |
showDiff := false. |
|
5155 |
] ifFalse:[ |
|
5156 |
showDiff := isSame not. |
|
6357 | 5157 |
]. |
15016 | 5158 |
|
6357 | 5159 |
doShowResult ifTrue:[ |
5160 |
(showDiff and:[oldSource notNil and:[newSource notNil]]) ifTrue:[ |
|
8102 | 5161 |
d := DiffCodeView |
6639 | 5162 |
openOn:oldSource label:(resources string:'Current version (in image)') |
5163 |
and:newSource label:(resources string:'Change version'). |
|
6357 | 5164 |
d label:'method differences'. |
5165 |
] |
|
5166 |
] |
|
5167 |
] ifFalse:[ |
|
5168 |
beep := true. |
|
5169 |
outcome := 'Class does not exist.'. |
|
5170 |
isSame := nil. |
|
5171 |
] |
|
9888 | 5172 |
]] ifFalse:[ |
6357 | 5173 |
beep := true. |
5174 |
outcome := 'Not comparable.'. |
|
5175 |
isSame := nil. |
|
5176 |
] |
|
5177 |
] ifFalse:[ |
|
5178 |
beep := true. |
|
5179 |
outcome := 'Not comparable.'. |
|
5180 |
isSame := nil. |
|
5181 |
] |
|
255 | 5182 |
]. |
5183 |
aStream close. |
|
2835 | 5184 |
|
5185 |
doShowResult ifTrue:[ |
|
6357 | 5186 |
showDiff ifFalse:[ |
5187 |
outcome := (resources stringWithCRs:outcome). |
|
5188 |
beep ifTrue:[ |
|
5189 |
self warn:outcome. |
|
5190 |
] ifFalse:[ |
|
5191 |
self information:outcome. |
|
5192 |
] |
|
5193 |
]. |
|
255 | 5194 |
]. |
2835 | 5195 |
^ isSame. |
255 | 5196 |
|
9689
72819fbf329a
changed: #compareChange:showResult:
Claus Gittinger <cg@exept.de>
parents:
9621
diff
changeset
|
5197 |
"Created: / 24-11-1995 / 14:30:46 / cg" |
16372 | 5198 |
"Modified: / 01-05-2016 / 18:25:32 / cg" |
255 | 5199 |
! |
5200 |
||
7953 | 5201 |
compareCommentChange:parseTree |
5202 |
|thisClass| |
|
5203 |
||
9888 | 5204 |
[ |
5205 |
thisClass := parseTree receiver evaluate. |
|
5206 |
] on:Parser undefinedVariableError do:[:ex| ]. |
|
5207 |
||
7953 | 5208 |
thisClass isBehavior ifTrue:[ |
5209 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
5210 |
(thisClass comment = parseTree arg1 evaluate) ifTrue:[ |
|
5211 |
^ true -> 'Change has no effect\\(same comment)'. |
|
5212 |
] ifFalse:[ |
|
5213 |
^ false -> 'Comment is different'. |
|
5214 |
] |
|
5215 |
] ifFalse:[ |
|
5216 |
^ nil -> 'Cannot compare this change (compare requires class to be loaded).'. |
|
5217 |
] |
|
5218 |
]. |
|
5219 |
^ nil -> 'Cannot compare this change (class not present)'. |
|
5220 |
! |
|
5221 |
||
5222 |
compareInstanceVariableNamesChange:parseTree |
|
5223 |
|receiverExpression thisClass varsHere varsInChange | |
|
5224 |
||
5225 |
receiverExpression := parseTree receiver. |
|
5226 |
receiverExpression isMessage ifTrue:[ |
|
5227 |
receiverExpression selector == #class ifTrue:[ |
|
9888 | 5228 |
[ |
5229 |
thisClass := receiverExpression evaluate. |
|
5230 |
] on:Parser undefinedVariableError do:[:ex| |
|
5231 |
^ nil -> 'Class is not loaded'. |
|
5232 |
]. |
|
5233 |
||
7953 | 5234 |
varsHere := thisClass instanceVariableString asCollectionOfWords. |
5235 |
varsInChange := (parseTree arguments at:1) evaluate asCollectionOfWords. |
|
5236 |
varsHere = varsInChange ifTrue:[ |
|
5237 |
^ true -> 'Change has no effect\\(same definition)'. |
|
5238 |
] ifFalse:[ |
|
5239 |
^ false -> 'Class-instanceVariable definition is different'. |
|
5240 |
]. |
|
5241 |
]. |
|
5242 |
]. |
|
5243 |
^ nil -> 'Unhandled receiver' |
|
5244 |
! |
|
5245 |
||
15016 | 5246 |
compareMethodSource:newSource withVersionInClass:thisClass into:aThreeArgBlock |
5247 |
"returns true/false/nil if same,different,undecided; |
|
5248 |
also provides a message and a beep-boolean via the passed in block" |
|
5249 |
||
17579 | 5250 |
<ignore: RBReturnsBooleanAndOtherRule rationale: 'done by purpose' author: 'cg'> |
5251 |
||
15016 | 5252 |
|parser sel oldMethod oldSource outcome t1 t2 isLoaded| |
5253 |
||
5254 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
|
5255 |
do:[ |
|
5256 |
parser := Parser parseMethod:newSource in:thisClass. |
|
5257 |
]. |
|
5258 |
(parser isNil or:[parser == #Error]) ifTrue:[ |
|
5259 |
outcome := 'Change is unparsable (parse error).'. |
|
5260 |
aThreeArgBlock value:outcome value:true "beep" value:nil. |
|
5261 |
^ nil. |
|
5262 |
]. |
|
5263 |
||
5264 |
sel := parser selector. |
|
5265 |
oldMethod := thisClass compiledMethodAt:sel. |
|
5266 |
oldMethod isNil ifTrue:[ |
|
5267 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
|
5268 |
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'. |
|
5269 |
] ifTrue:[ |
|
5270 |
outcome := 'Method does not exist.'. |
|
5271 |
]. |
|
5272 |
aThreeArgBlock value:outcome value:true "beep" value:nil. |
|
5273 |
^ nil. |
|
5274 |
]. |
|
5275 |
||
5276 |
oldSource := oldMethod source. |
|
5277 |
oldSource isNil ifTrue:[ |
|
5278 |
outcome := 'No source for compare.'. |
|
5279 |
aThreeArgBlock value:outcome value:true "beep" value:nil. |
|
5280 |
^ nil. |
|
5281 |
]. |
|
5282 |
(oldSource = newSource) ifTrue:[ |
|
5283 |
outcome := 'Same source'. |
|
5284 |
aThreeArgBlock value:outcome value:false "beep" value:oldSource. |
|
5285 |
^ true. |
|
5286 |
]. |
|
5287 |
||
5288 |
"/ |
|
5289 |
"/ compare for tabulator <-> space changes |
|
5290 |
"/ before showing diff ... |
|
5291 |
"/ |
|
5292 |
t1 := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
5293 |
t2 := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
5294 |
t1 = t2 ifTrue:[ |
|
5295 |
outcome := 'Same source'. |
|
5296 |
aThreeArgBlock value:outcome value:false "beep" value:oldSource. |
|
5297 |
^ true. |
|
5298 |
]. |
|
5299 |
||
5300 |
"/ |
|
5301 |
"/ check if only historyLine diffs |
|
5302 |
"/ |
|
5303 |
(HistoryManager notNil |
|
5304 |
and:[HistoryManager isActive]) ifTrue:[ |
|
5305 |
(HistoryManager withoutHistoryLines:newSource) |
|
5306 |
= |
|
5307 |
(HistoryManager withoutHistoryLines:oldSource) |
|
5308 |
ifTrue:[ |
|
5309 |
outcome := 'Same source (history only)'. |
|
5310 |
aThreeArgBlock value:outcome value:false "beep" value:oldSource. |
|
5311 |
^ true. |
|
5312 |
] |
|
5313 |
]. |
|
5314 |
||
5315 |
outcome := 'Source changed.'. |
|
5316 |
aThreeArgBlock value:outcome value:false "beep" value:oldSource. |
|
5317 |
^ false. |
|
17579 | 5318 |
|
5319 |
"Modified: / 16-07-2017 / 13:32:05 / cg" |
|
15016 | 5320 |
! |
5321 |
||
7953 | 5322 |
comparePackageChange:parseTree |
9888 | 5323 |
|receiverExpression method thisClass| |
7953 | 5324 |
|
5325 |
receiverExpression := parseTree receiver. |
|
5326 |
receiverExpression isMessage ifTrue:[ |
|
5327 |
receiverExpression selector == #compiledMethodAt: ifTrue:[ |
|
9888 | 5328 |
[ |
5329 |
thisClass := receiverExpression receiver evaluate. |
|
5330 |
] on:Parser undefinedVariableError do:[:ex| ]. |
|
5331 |
(thisClass isBehavior |
|
7953 | 5332 |
and:[(method := receiverExpression evaluate) isMethod]) ifTrue:[ |
5333 |
method package = parseTree arg1 evaluate ifTrue:[ |
|
5334 |
^ true -> 'Change has no effect\\(same package)'. |
|
5335 |
] ifFalse:[ |
|
8000 | 5336 |
^ false -> ('Package is different (''<1p>'' vs. ''<2p>'')' expandMacrosWith:method package with:parseTree arg1 evaluate). |
7953 | 5337 |
] |
5338 |
] ifFalse:[ |
|
5339 |
^ nil -> 'There is no such method'. |
|
5340 |
] |
|
5341 |
] |
|
5342 |
]. |
|
5343 |
^ nil -> 'Unhandled receiver' |
|
5344 |
! |
|
5345 |
||
5346 |
compareRemoveSelectorChange:parseTree |
|
5347 |
|thisClass selector| |
|
5348 |
||
9888 | 5349 |
[ |
5350 |
thisClass := parseTree receiver evaluate. |
|
5351 |
] on:Parser undefinedVariableError do:[:ex| ]. |
|
5352 |
||
7953 | 5353 |
thisClass isBehavior ifTrue:[ |
5354 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
5355 |
selector := (parseTree arg1 evaluate). |
|
5356 |
(thisClass includesSelector:selector) ifTrue:[ |
|
8000 | 5357 |
^ false -> ('Change removes the #' , selector , ' method from ' , thisClass name). |
7953 | 5358 |
] ifFalse:[ |
8000 | 5359 |
^ true -> ('Change has no effect\\(there is no method for #' , selector , ' in ' , thisClass name , ')'). |
7953 | 5360 |
] |
5361 |
] ifFalse:[ |
|
5362 |
^ nil -> 'Cannot compare this change (compare requires class to be loaded).'. |
|
5363 |
] |
|
5364 |
]. |
|
5365 |
^ nil -> 'Cannot compare this change (class not present)'. |
|
5366 |
! |
|
5367 |
||
1359 | 5368 |
compressForClass:aClassNameOrNil |
6288 | 5369 |
"compress the change-set; |
1359 | 5370 |
this replaces multiple method-changes by the last (i.e. the most recent) change. |
5371 |
If the class argument is nil, compress for all classes. |
|
5372 |
otherwise, only changes for that class are compressed." |
|
5373 |
||
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5374 |
self |
6288 | 5375 |
compressForClass:aClassNameOrNil selector:nil |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5376 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5377 |
"Modified: / 19.11.2001 / 22:04:12 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5378 |
! |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5379 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5380 |
compressForClass:aClassNameOrNil selector:selectorToCompressOrNil |
6288 | 5381 |
"compress the change-set; |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5382 |
this replaces multiple method-changes by the last (i.e. the most recent) change. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5383 |
If the class argument is nil, compress for all classes. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5384 |
otherwise, only changes for that class are compressed." |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5385 |
|
6288 | 5386 |
|lbl aStream searchIndex anyMore deleteSet index |
7507 | 5387 |
str snapshotProto snapshotPrefix snapshotNameIndex| |
5388 |
||
5389 |
changeFileName notNil ifTrue:[ |
|
5390 |
aStream := changeFileName asFilename readStreamOrNil. |
|
5391 |
aStream isNil ifTrue:[^ self]. |
|
5392 |
]. |
|
1359 | 5393 |
|
4762 | 5394 |
lbl := 'compressing'. |
1359 | 5395 |
aClassNameOrNil isNil ifTrue:[ |
7507 | 5396 |
selectorToCompressOrNil notNil ifTrue:[ |
5397 |
lbl := lbl , ' for ' , selectorToCompressOrNil. |
|
5398 |
] |
|
1359 | 5399 |
] ifFalse:[ |
7507 | 5400 |
selectorToCompressOrNil isNil ifTrue:[ |
5401 |
lbl := lbl , ' for ' , aClassNameOrNil. |
|
5402 |
] ifFalse:[ |
|
5403 |
lbl := lbl , ' for ' , aClassNameOrNil , '>>' , selectorToCompressOrNil. |
|
5404 |
] |
|
1359 | 5405 |
]. |
6288 | 5406 |
lbl := lbl , '...'. |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5407 |
self newLabel:lbl. |
1359 | 5408 |
|
5409 |
CompressSnapshotInfo == true ifTrue:[ |
|
7507 | 5410 |
" |
5411 |
get a prototype snapshot record (to be independent of |
|
5412 |
the actual format .. |
|
5413 |
" |
|
16877 | 5414 |
str := WriteStream on:''. |
7507 | 5415 |
Class addChangeRecordForSnapshot:'foo' to:str. |
5416 |
snapshotProto := str contents. |
|
5417 |
snapshotPrefix := snapshotProto copyTo:10. |
|
5418 |
snapshotNameIndex := snapshotProto findString:'foo'. |
|
1359 | 5419 |
]. |
5420 |
||
5421 |
self withExecuteCursorDo:[ |
|
7507 | 5422 |
|numChanges classes selectors types excla sawExcla |
5423 |
chunk aParseTree parseTreeChunk |
|
5424 |
thisClass thisSelector codeChunk codeParser |
|
5425 |
compressThis fileName| |
|
5426 |
||
5427 |
numChanges := self numberOfChanges. |
|
5428 |
classes := Array new:numChanges. |
|
5429 |
selectors := Array new:numChanges. |
|
5430 |
types := Array new:numChanges. |
|
5431 |
||
5432 |
"starting at the end, get the change class and change selector; |
|
5433 |
collect all in classes / selectors" |
|
5434 |
||
5435 |
aStream notNil ifTrue:[ |
|
5436 |
excla := aStream class chunkSeparator. |
|
5437 |
numChanges to:1 by:-1 do:[:changeNr | |
|
16372 | 5438 |
aStream position:((changeInfoList at:changeNr) position)-1. |
7507 | 5439 |
sawExcla := aStream peekFor:excla. |
5440 |
chunk := aStream nextChunk. |
|
5441 |
sawExcla ifTrue:[ |
|
5442 |
"optimize a bit if multiple methods for same category arrive" |
|
5443 |
(chunk = parseTreeChunk) ifFalse:[ |
|
8665 | 5444 |
aParseTree := self parseExpression:chunk. |
7507 | 5445 |
parseTreeChunk := chunk |
5446 |
]. |
|
5447 |
(aParseTree notNil |
|
5448 |
and:[(aParseTree ~~ #Error) |
|
5449 |
and:[aParseTree isMessage]]) ifTrue:[ |
|
5450 |
(#( |
|
5451 |
#methodsFor: |
|
5452 |
#privateMethodsFor: |
|
5453 |
#publicMethodsFor: |
|
5454 |
#ignoredMethodsFor: |
|
5455 |
#protectedMethodsFor: |
|
5456 |
#methodsFor:stamp: "/ Squeak support |
|
5457 |
#methodsFor "/ Dolphin support |
|
5458 |
#methods "/ STV support |
|
5459 |
) |
|
5460 |
includes:aParseTree selector) ifTrue:[ |
|
5461 |
codeChunk := aStream nextChunk. |
|
9543
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5462 |
[ |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5463 |
thisClass := aParseTree receiver evaluate. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5464 |
codeParser := Parser |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5465 |
parseMethodSpecification:codeChunk |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5466 |
in:thisClass |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5467 |
ignoreErrors:true |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5468 |
ignoreWarnings:true. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5469 |
(codeParser notNil and:[codeParser ~~ #Error]) ifTrue:[ |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5470 |
selectors at:changeNr put:(codeParser selector). |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5471 |
classes at:changeNr put:thisClass. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5472 |
types at:changeNr put:#methodsFor |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5473 |
] |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5474 |
] on:Parser parseErrorSignal do:[:ex| |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5475 |
"ignore chunk" |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5476 |
ex return. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5477 |
]. |
7507 | 5478 |
] |
5479 |
] |
|
5480 |
] ifFalse:[ |
|
8665 | 5481 |
aParseTree := self parseExpression:chunk. |
7507 | 5482 |
parseTreeChunk := chunk. |
5483 |
(aParseTree notNil |
|
5484 |
and:[(aParseTree ~~ #Error) |
|
5485 |
and:[aParseTree isMessage]]) ifTrue:[ |
|
5486 |
(aParseTree selector == #removeSelector:) ifTrue:[ |
|
9543
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5487 |
[ |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5488 |
thisClass := aParseTree receiver evaluate. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5489 |
selectors at:changeNr put:(aParseTree arg1 value). |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5490 |
classes at:changeNr put:thisClass. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5491 |
types at:changeNr put:#removeSelector |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5492 |
] on:Parser parseErrorSignal do:[:ex| |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5493 |
"ignore chunk" |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5494 |
ex return. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5495 |
]. |
7507 | 5496 |
] |
5497 |
] ifFalse:[ |
|
5498 |
CompressSnapshotInfo == true ifTrue:[ |
|
5499 |
(chunk startsWith:snapshotPrefix) ifTrue:[ |
|
13314 | 5500 |
str := chunk readStream position:snapshotNameIndex-1. |
7507 | 5501 |
fileName := str upTo:(Character space). |
5502 |
" |
|
5503 |
kludge to allow use of match-check below |
|
5504 |
" |
|
5505 |
selectors at:changeNr put:snapshotPrefix. |
|
5506 |
classes at:changeNr put:fileName. |
|
5507 |
] |
|
5508 |
] |
|
5509 |
] |
|
5510 |
]. |
|
5511 |
]. |
|
5512 |
aStream close. |
|
5513 |
] ifFalse:[ |
|
5514 |
numChanges to:1 by:-1 do:[:changeNr | |
|
5515 |
|change| |
|
5516 |
||
5517 |
classes at:changeNr put:(self classOfChange:changeNr ifAbsent:[:className| nil]). |
|
5518 |
selectors at:changeNr put:(self selectorOfMethodChange:changeNr). |
|
5519 |
]. |
|
5520 |
]. |
|
5521 |
||
5522 |
"for all changes, look for another class/selector occurrence later |
|
5523 |
in the list and, if there is one, add change number to the delete set" |
|
5524 |
||
5525 |
deleteSet := OrderedCollection new. |
|
5526 |
1 to:self numberOfChanges-1 do:[:changeNr | |
|
5527 |
thisClass := classes at:changeNr. |
|
5528 |
||
5529 |
compressThis := false. |
|
5530 |
aClassNameOrNil isNil ifTrue:[ |
|
5531 |
compressThis := true |
|
5532 |
] ifFalse:[ |
|
5533 |
"/ skipping unloaded/unknown classes |
|
5534 |
thisClass isBehavior ifTrue:[ |
|
5535 |
compressThis := aClassNameOrNil = thisClass theNonMetaclass name. |
|
5536 |
] |
|
5537 |
]. |
|
5538 |
compressThis ifTrue:[ |
|
5539 |
thisSelector := selectors at:changeNr. |
|
5540 |
compressThis := (selectorToCompressOrNil isNil or:[thisSelector == selectorToCompressOrNil]). |
|
5541 |
compressThis ifTrue:[ |
|
5542 |
searchIndex := changeNr. |
|
5543 |
anyMore := true. |
|
5544 |
[anyMore] whileTrue:[ |
|
5545 |
searchIndex := classes indexOf:thisClass startingAt:(searchIndex + 1). |
|
5546 |
(searchIndex ~~ 0) ifTrue:[ |
|
5547 |
((selectors at:searchIndex) == thisSelector) ifTrue:[ |
|
5548 |
thisClass notNil ifTrue:[ |
|
5549 |
deleteSet add:changeNr. |
|
5550 |
anyMore := false |
|
5551 |
] |
|
5552 |
] |
|
5553 |
] ifFalse:[ |
|
5554 |
anyMore := false |
|
5555 |
] |
|
5556 |
]. |
|
5557 |
]. |
|
5558 |
]. |
|
5559 |
]. |
|
5560 |
||
5561 |
"finally delete what has been found" |
|
5562 |
||
5563 |
(deleteSet size > 0) ifTrue:[ |
|
5564 |
changeListView setSelection:nil. |
|
5565 |
index := deleteSet size. |
|
5566 |
[index > 0] whileTrue:[ |
|
5567 |
self silentDeleteChange:(deleteSet at:index). |
|
5568 |
index := index - 1 |
|
5569 |
]. |
|
5570 |
self setChangeList. |
|
5571 |
" |
|
5572 |
scroll back a bit, if we are left way behind the list |
|
5573 |
" |
|
5574 |
changeListView firstLineShown > self numberOfChanges ifTrue:[ |
|
5575 |
changeListView makeLineVisible:self numberOfChanges |
|
5576 |
]. |
|
5577 |
self clearCodeView |
|
5578 |
] |
|
1359 | 5579 |
]. |
5580 |
self newLabel:''. |
|
5581 |
||
7507 | 5582 |
"Created: / 19-11-2001 / 22:03:42 / cg" |
16372 | 5583 |
"Modified: / 01-05-2016 / 19:23:54 / cg" |
1359 | 5584 |
! |
5585 |
||
255 | 5586 |
deleteChange:changeNr |
5587 |
"delete a change" |
|
5588 |
||
5589 |
self deleteChangesFrom:changeNr to:changeNr |
|
5590 |
! |
|
5591 |
||
5592 |
deleteChangesFrom:start to:stop |
|
5593 |
"delete a range of changes" |
|
5594 |
||
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
5595 |
changeListView setSelection:nil. |
255 | 5596 |
stop to:start by:-1 do:[:changeNr | |
6288 | 5597 |
self silentDeleteInternalChange:changeNr. |
255 | 5598 |
]. |
6255 | 5599 |
changeListView removeFromIndex:start toIndex:stop. |
744
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
5600 |
|
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5601 |
"/ changeListView contentsChanged. |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5602 |
"/ changeListView redrawFromLine:start. |
255 | 5603 |
|
744
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
5604 |
"/ self setChangeList |
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
5605 |
|
1648 | 5606 |
"Modified: / 18.5.1998 / 14:22:27 / cg" |
255 | 5607 |
! |
5608 |
||
202 | 5609 |
makeChangeAPatch:changeNr |
5610 |
"append change to patchfile" |
|
5611 |
||
5612 |
self appendChange:changeNr toFile:'patches' |
|
5613 |
! |
|
5614 |
||
5615 |
makeChangePermanent:changeNr |
|
5616 |
"rewrite the source file where change changeNr lies" |
|
5617 |
||
5618 |
self notify:'this is not yet implemented' |
|
5619 |
! |
|
5620 |
||
73 | 5621 |
silentDeleteChange:changeNr |
5622 |
"delete a change do not update changeListView" |
|
57 | 5623 |
|
73 | 5624 |
anyChanges := true. |
16372 | 5625 |
changeInfoList removeIndex:changeNr. |
5626 |
"/ changeChunks removeIndex:changeNr. |
|
5627 |
"/ changePositions size >= changeNr ifTrue:[ changePositions removeIndex:changeNr ]. |
|
5628 |
"/ changeClassNames size >= changeNr ifTrue:[ changeClassNames removeIndex:changeNr ]. |
|
5629 |
"/ changeSelectors size >= changeNr ifTrue:[ changeSelectors removeIndex:changeNr ]. |
|
5630 |
"/ changeHeaderLines size >= changeNr ifTrue:[ changeHeaderLines removeIndex:changeNr ]. |
|
5631 |
"/ changeTimeStamps size >= changeNr ifTrue:[ changeTimeStamps removeIndex:changeNr ]. |
|
5632 |
"/ changeIsFollowupMethodChange size >= changeNr ifTrue:[ changeIsFollowupMethodChange removeIndex:changeNr ]. |
|
5633 |
||
5634 |
"Modified: / 01-05-2016 / 19:20:40 / cg" |
|
45 | 5635 |
! |
5636 |
||
202 | 5637 |
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
|
5638 |
"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
|
5639 |
Return the number of deleted changes." |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5640 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5641 |
|thisClassName index numDeleted| |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5642 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5643 |
numDeleted := 0. |
202 | 5644 |
index := stop. |
5645 |
[index >= start] whileTrue:[ |
|
6288 | 5646 |
thisClassName := self classNameOfChange:index. |
5647 |
thisClassName = aClassName ifTrue:[ |
|
5648 |
self silentDeleteChange:index. |
|
5649 |
numDeleted := numDeleted + 1. |
|
5650 |
]. |
|
5651 |
index := index - 1 |
|
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5652 |
]. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5653 |
^ numDeleted |
51 | 5654 |
|
45 | 5655 |
! |
5656 |
||
3607 | 5657 |
silentDeleteChangesFor:aClassName selector:selector from:start to:stop |
5658 |
"delete changes for given class/selector in a range. |
|
5659 |
Return the number of deleted changes." |
|
5660 |
||
5661 |
|thisClassName index numDeleted| |
|
5662 |
||
5663 |
numDeleted := 0. |
|
5664 |
index := stop. |
|
5665 |
[index >= start] whileTrue:[ |
|
17600 | 5666 |
thisClassName := self realClassNameOfChange:index. |
5667 |
thisClassName = aClassName ifTrue:[ |
|
5668 |
(self selectorOfMethodChange:index) == selector ifTrue:[ |
|
5669 |
self silentDeleteChange:index. |
|
5670 |
numDeleted := numDeleted + 1. |
|
5671 |
] |
|
5672 |
]. |
|
5673 |
index := index - 1 |
|
3607 | 5674 |
]. |
5675 |
^ numDeleted |
|
5676 |
! |
|
5677 |
||
2511 | 5678 |
silentDeleteChangesForClassAndPrivateClasses:aClassName from:start to:stop |
5679 |
"delete changes for a given class and its private classes in a range. |
|
5680 |
Return the number of deleted changes." |
|
5681 |
||
5682 |
|thisClassName index numDeleted| |
|
5683 |
||
5684 |
numDeleted := 0. |
|
5685 |
index := stop. |
|
5686 |
[index >= start] whileTrue:[ |
|
6288 | 5687 |
thisClassName := self ownerClassNameOfChange:index. |
5688 |
thisClassName = aClassName ifTrue:[ |
|
5689 |
self silentDeleteChange:index. |
|
5690 |
numDeleted := numDeleted + 1. |
|
5691 |
]. |
|
5692 |
index := index - 1 |
|
2511 | 5693 |
]. |
5694 |
^ numDeleted |
|
5695 |
||
5696 |
! |
|
5697 |
||
12428 | 5698 |
silentDeleteChangesForNamespace:aNamespace from:start to:stop |
5699 |
"delete changes for a given namespace in a range. |
|
5700 |
Return the number of deleted changes." |
|
5701 |
||
5702 |
|thisNamespace index numDeleted| |
|
5703 |
||
5704 |
numDeleted := 0. |
|
5705 |
index := stop. |
|
5706 |
[index >= start] whileTrue:[ |
|
5707 |
thisNamespace := self namespaceOfChange:index. |
|
5708 |
thisNamespace = aNamespace ifTrue:[ |
|
5709 |
self silentDeleteChange:index. |
|
5710 |
numDeleted := numDeleted + 1. |
|
5711 |
]. |
|
5712 |
index := index - 1 |
|
5713 |
]. |
|
5714 |
^ numDeleted |
|
5715 |
! |
|
5716 |
||
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5717 |
silentDeleteInternalChange:changeNr |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5718 |
"delete a change do not update changeListView" |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5719 |
|
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5720 |
anyChanges := true. |
16372 | 5721 |
changeInfoList removeIndex:changeNr. |
5722 |
"/ changeChunks removeIndex:changeNr. |
|
5723 |
"/ changePositions size >= changeNr ifTrue:[changePositions removeIndex:changeNr]. |
|
5724 |
"/ changeClassNames size >= changeNr ifTrue:[changeClassNames removeIndex:changeNr]. |
|
5725 |
"/ changeSelectors size >= changeNr ifTrue:[ changeSelectors removeIndex:changeNr ]. |
|
5726 |
"/ changeTimeStamps size >= changeNr ifTrue:[changeTimeStamps removeIndex:changeNr]. |
|
5727 |
"/ changeIsFollowupMethodChange size >= changeNr ifTrue:[changeIsFollowupMethodChange removeIndex:changeNr]. |
|
5728 |
||
5729 |
"Created: / 07-03-1997 / 16:28:32 / cg" |
|
5730 |
"Modified: / 26-02-1998 / 18:20:48 / stefan" |
|
5731 |
"Modified: / 01-05-2016 / 19:20:59 / cg" |
|
4487 | 5732 |
! |
5733 |
||
5734 |
updateDiffView |
|
5735 |
self withSelectedChangesDo:[:changeNr | |
|
6288 | 5736 |
self updateDiffViewFor:changeNr. |
5737 |
^ self. |
|
4487 | 5738 |
]. |
5739 |
||
5740 |
diffView text1:'' text2:'' |
|
5741 |
! |
|
5742 |
||
5743 |
updateDiffViewFor:changeNr |
|
5744 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource |
|
8675
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5745 |
parser sel showDiff selector oldMethod i| |
4487 | 5746 |
|
5747 |
aStream := self streamForChange:changeNr. |
|
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5748 |
aStream isNil ifTrue:[ |
6317 | 5749 |
^ self |
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5750 |
]. |
4487 | 5751 |
|
5752 |
showDiff := false. |
|
5753 |
||
5754 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
|
6317 | 5755 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
5756 |
chunk := aStream nextChunk. |
|
4487 | 5757 |
] ifTrue:[ |
16372 | 5758 |
chunk := self changeChunkAt:changeNr. |
6317 | 5759 |
sawExcla := true. |
4487 | 5760 |
]. |
5761 |
||
4857 | 5762 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
5763 |
do:[ |
|
8665 | 5764 |
parseTree := self parseExpression:chunk. |
6317 | 5765 |
(parseTree notNil and:[parseTree ~~ #Error and:[ parseTree isMessage ]]) ifTrue:[ |
5766 |
selector := parseTree selector. |
|
5767 |
] |
|
4857 | 5768 |
]. |
5769 |
||
5770 |
selector isNil ifTrue:[ |
|
6317 | 5771 |
newSource := chunk. |
5772 |
oldSource := 'Not comparable.'. |
|
4857 | 5773 |
] ifFalse:[ |
6317 | 5774 |
sawExcla ifFalse:[ |
5775 |
"/ not a method-change |
|
5776 |
newSource := chunk. |
|
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
5777 |
oldSource := self currentSourceForParseTree:parseTree. |
6317 | 5778 |
] ifTrue:[ |
5779 |
"/ a method-change |
|
5780 |
||
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5781 |
(self class methodDefinitionSelectors includes:selector) ifTrue:[ |
6317 | 5782 |
newSource := aStream nextChunk. |
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5783 |
thisClass := self classFromEvaluatingTree:parseTree receiver. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5784 |
"/ Error |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5785 |
"/ handle:[ ] |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5786 |
"/ do:[ |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5787 |
"/ thisClass := parseTree receiver evaluate. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5788 |
"/ ]. |
6378 | 5789 |
thisClass isBehavior ifFalse:[ |
5790 |
thisClass := self classOfChange:changeNr. |
|
5791 |
]. |
|
6317 | 5792 |
thisClass isBehavior ifTrue:[ |
5793 |
(thisClass isLoaded |
|
5794 |
or:[ autoloadAsRequired value |
|
5795 |
and:[self checkClassIsLoaded:thisClass]]) ifFalse:[ |
|
5796 |
oldSource := 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
5797 |
] ifTrue:[ |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5798 |
selector numArgs == 0 ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5799 |
cat := '* as yet uncategorized *'. |
6532 | 5800 |
cat := selector. |
6317 | 5801 |
] ifFalse:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5802 |
cat := parseTree arg1 evaluate. |
6317 | 5803 |
]. |
5804 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
|
5805 |
do:[ |
|
7709 | 5806 |
parser := Parser new. |
6639 | 5807 |
Error catch:[ |
7709 | 5808 |
parser |
5809 |
parseMethod:newSource in:thisClass |
|
5810 |
ignoreErrors:true ignoreWarnings:true. |
|
6317 | 5811 |
] |
5812 |
]. |
|
7709 | 5813 |
sel := parser selector. |
5814 |
(sel notNil) ifTrue:[ |
|
6317 | 5815 |
oldMethod := thisClass compiledMethodAt:sel. |
5816 |
oldMethod notNil ifTrue:[ |
|
5817 |
(oldMethod category = cat) ifFalse:[ |
|
6447 | 5818 |
"/ Transcript showCR:'category changed.'. |
6317 | 5819 |
]. |
5820 |
oldSource := oldMethod source. |
|
5821 |
(oldSource = newSource) ifFalse:[ |
|
5822 |
oldSource isNil ifTrue:[ |
|
5823 |
oldSource := 'No source for compare.'. |
|
5824 |
] ifFalse:[ |
|
5825 |
"/ |
|
5826 |
"/ compare for tabulator <-> space changes |
|
5827 |
"/ before showing diff ... |
|
5828 |
"/ |
|
5829 |
oldSource := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
5830 |
newSource := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
5831 |
oldSource = newSource ifFalse:[ |
|
5832 |
"/ |
|
5833 |
"/ check if only historyLine diffs |
|
5834 |
"/ |
|
5835 |
(HistoryManager notNil |
|
5836 |
and:[HistoryManager isActive]) ifTrue:[ |
|
5837 |
oldSource := oldSource asStringCollection asString. |
|
5838 |
newSource := newSource asStringCollection asString. |
|
5839 |
(HistoryManager withoutHistoryLines:oldSource) |
|
5840 |
= |
|
5841 |
(HistoryManager withoutHistoryLines:newSource) |
|
5842 |
ifTrue:[ |
|
5843 |
oldSource := (HistoryManager withoutHistoryLines:oldSource). |
|
5844 |
newSource := (HistoryManager withoutHistoryLines:newSource). |
|
5845 |
] |
|
5846 |
]. |
|
5847 |
] |
|
5848 |
] |
|
5849 |
] |
|
5850 |
] ifFalse:[ |
|
5851 |
oldSource := 'Method does not exist.'. |
|
5852 |
] |
|
5853 |
] ifFalse:[ |
|
5854 |
oldSource := 'Change is unparsable (parse error).'. |
|
5855 |
]. |
|
5856 |
]. |
|
5857 |
] ifFalse:[ |
|
5858 |
oldSource := 'Class does not exist.'. |
|
5859 |
] |
|
5860 |
] ifFalse:[ |
|
5861 |
newSource := chunk. "/ aStream contents. |
|
5862 |
oldSource := 'Not comparable.'. |
|
5863 |
] |
|
5864 |
] |
|
4487 | 5865 |
]. |
5866 |
aStream close. |
|
5867 |
||
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5868 |
oldSource := oldSource ? ''. |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5869 |
newSource := newSource ? ''. |
8675
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5870 |
|
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5871 |
oldSource := oldSource asStringCollection asString. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5872 |
newSource := newSource asStringCollection asString. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5873 |
|
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5874 |
"/ unify cr, crlf and lf into lf |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5875 |
(oldSource includes:Character return) ifTrue: [ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5876 |
i := oldSource indexOf:Character return. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5877 |
(oldSource at:i+1) == Character nl ifTrue:[ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5878 |
"/ crnl endings |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5879 |
oldSource := oldSource copyReplaceString:(String crlf) withString:(String lf). |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5880 |
] ifFalse:[ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5881 |
"/ cr endings |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5882 |
oldSource := oldSource copyReplaceAll:Character return with:Character nl. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5883 |
]. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5884 |
]. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5885 |
|
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5886 |
"/ unify cr, crlf and lf into lf |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5887 |
(newSource includes:Character return) ifTrue: [ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5888 |
i := newSource indexOf:Character return. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5889 |
(newSource at:i+1) == Character nl ifTrue:[ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5890 |
"/ crnl endings |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5891 |
newSource := newSource copyReplaceString:(String crlf) withString:(String lf). |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5892 |
] ifFalse:[ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5893 |
"/ cr endings |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5894 |
newSource := newSource copyReplaceAll:Character return with:Character nl. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5895 |
]. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5896 |
]. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5897 |
|
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5898 |
(oldSource = newSource |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5899 |
or:[ oldSource asStringCollection withTabsExpanded = newSource asStringCollection withTabsExpanded]) ifTrue:[ |
6317 | 5900 |
self makeDiffViewInvisible |
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5901 |
] ifFalse:[ |
6317 | 5902 |
self makeDiffViewVisible. |
5903 |
diffView text1:oldSource text2:newSource. |
|
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5904 |
]. |
4487 | 5905 |
|
7709 | 5906 |
"Created: / 24-11-1995 / 14:30:46 / cg" |
16372 | 5907 |
"Modified: / 01-05-2016 / 18:26:01 / cg" |
202 | 5908 |
! ! |
0 | 5909 |
|
202 | 5910 |
!ChangesBrowser methodsFor:'termination'! |
51 | 5911 |
|
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5912 |
askIfChangesAreToBeWrittenBack |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5913 |
|action again| |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5914 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5915 |
anyChanges ifFalse:[^ self]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5916 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5917 |
again := true. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5918 |
[again] whileTrue:[ |
6357 | 5919 |
action := OptionBox |
5920 |
request:(resources stringWithCRs:'The modified changelist has not been written back to the change file.\\Write change file before closing ?') |
|
5921 |
label:'ChangesBrowser' |
|
5922 |
image:(WarningBox iconBitmap) |
|
5923 |
buttonLabels:(resources array:#('Cancel' 'Don''t Write' 'Write')) |
|
5924 |
values:#(#abort #ignore #save) |
|
5925 |
default:#save |
|
5926 |
onCancel:#abort. |
|
5927 |
||
5928 |
again := false. |
|
5929 |
action == #abort ifTrue:[AbortSignal raise. ^ self]. |
|
5930 |
action == #save ifTrue:[ |
|
5931 |
again := self writeBackChanges not |
|
5932 |
]. |
|
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5933 |
]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5934 |
! |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5935 |
|
1787 | 5936 |
closeRequest |
5937 |
"window manager wants us to go away" |
|
5938 |
||
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5939 |
self askIfChangesAreToBeWrittenBack. |
1787 | 5940 |
super closeRequest |
5941 |
! |
|
5942 |
||
202 | 5943 |
saveAndTerminate |
5944 |
"update the changes file and quit. |
|
17026 | 5945 |
Don't depend on this being sent, not all window managers |
202 | 5946 |
send it; instead, they simply destroy the view." |
28 | 5947 |
|
202 | 5948 |
anyChanges ifTrue:[ |
17026 | 5949 |
self writeBackChanges. |
0 | 5950 |
]. |
1787 | 5951 |
super saveAndTerminate |
5952 |
||
5953 |
"Modified: / 3.8.1998 / 19:54:00 / cg" |
|
0 | 5954 |
! ! |
5955 |
||
73 | 5956 |
!ChangesBrowser methodsFor:'user interaction'! |
51 | 5957 |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5958 |
askForSearch:msg initialAnswer:initial thenSearchUsing:searchBlock2 onCancel:cancelBlock |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5959 |
|searchString directionHolder searchBlock| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5960 |
|
6288 | 5961 |
searchString := self |
15674 | 5962 |
askForSearchString:msg |
5963 |
initialAnswer:initial |
|
5964 |
directionInto:(directionHolder := ValueHolder new). |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5965 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5966 |
searchString isNil ifTrue:[ |
15674 | 5967 |
^ cancelBlock value |
5968 |
]. |
|
17382 | 5969 |
lastSearchString := searchString. |
5970 |
||
15674 | 5971 |
directionHolder value == #first ifTrue:[ |
5972 |
self findFirstForClass:searchString. |
|
5973 |
^ self. |
|
5974 |
]. |
|
5975 |
directionHolder value == #last ifTrue:[ |
|
5976 |
self findLastForClass:searchString. |
|
5977 |
^ self. |
|
5978 |
]. |
|
5979 |
||
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5980 |
searchBlock := [:changeNr | searchBlock2 value:searchString value:changeNr]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5981 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5982 |
directionHolder value == #backward ifTrue:[ |
15674 | 5983 |
changeNrShown isNil ifTrue:[ |
5984 |
changeNrShown := self numberOfChanges. |
|
5985 |
]. |
|
5986 |
self findPreviousForWhich:searchBlock |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5987 |
] ifFalse:[ |
15674 | 5988 |
changeNrShown isNil ifTrue:[ |
5989 |
changeNrShown := 0. |
|
5990 |
]. |
|
5991 |
self findNextForWhich:searchBlock |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5992 |
]. |
17382 | 5993 |
|
5994 |
"Modified: / 10-02-2017 / 20:40:59 / cg" |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5995 |
! |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5996 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5997 |
askForSearchString:msg initialAnswer:initial directionInto:aValueHolder |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5998 |
"common code to open a search box" |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5999 |
|
17394 | 6000 |
|searchString direction choices current| |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
6001 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
6002 |
direction := #forward. |
17394 | 6003 |
choices := OrderedCollection new. |
6004 |
||
6005 |
changeNrShown notNil ifTrue:[ |
|
6006 |
current := self classNameOfChange:changeNrShown. |
|
6007 |
initial ~= current ifTrue:[ |
|
6008 |
(choices includes:current) ifFalse:[ |
|
6009 |
choices addFirst:current |
|
6010 |
]. |
|
6011 |
]. |
|
6012 |
]. |
|
6013 |
lastSearchString notNil ifTrue:[ |
|
6014 |
initial ~= lastSearchString ifTrue:[ |
|
6015 |
(choices includes:lastSearchString) ifFalse:[ |
|
6016 |
choices addFirst:lastSearchString |
|
6017 |
]. |
|
6018 |
]. |
|
6019 |
]. |
|
6020 |
||
15449 | 6021 |
"/ take a normal request box, but add an additional 'previous' button |
6022 |
Dialog modifyingBoxWith:[:box | |
|
15674 | 6023 |
|nextButton prevButton firstButton lastButton| |
15449 | 6024 |
|
13343 | 6025 |
nextButton := box okButton. |
15674 | 6026 |
|
6027 |
firstButton := Button label:(resources string:'First'). |
|
6028 |
firstButton action:[direction := #first. box okPressed.]. |
|
6029 |
box addButton:firstButton after:nextButton. |
|
6030 |
||
6031 |
lastButton := Button label:(resources string:'Last'). |
|
6032 |
lastButton action:[direction := #last. box okPressed.]. |
|
6033 |
box addButton:lastButton after:nextButton. |
|
6034 |
||
13343 | 6035 |
prevButton := Button label:(resources string:'Previous'). |
6036 |
prevButton action:[direction := #backward. box okPressed.]. |
|
6037 |
box addButton:prevButton after:nextButton. |
|
15674 | 6038 |
|
13343 | 6039 |
nextButton label:(resources string:'Next'). |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
6040 |
] do:[ |
13343 | 6041 |
searchString := Dialog |
6042 |
request:msg |
|
17394 | 6043 |
list:choices |
13343 | 6044 |
initialAnswer:initial |
17394 | 6045 |
]. |
6046 |
||
6047 |
searchString isEmptyOrNil ifTrue:[ |
|
13343 | 6048 |
^ nil |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
6049 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
6050 |
aValueHolder value:direction. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
6051 |
^ searchString |
15449 | 6052 |
|
6053 |
" |
|
6054 |
self new askForSearchString:'foo' initialAnswer:'bla' directionInto:(false asValue) |
|
6055 |
" |
|
17394 | 6056 |
|
6057 |
"Modified: / 12-02-2017 / 11:18:11 / cg" |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
6058 |
! |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
6059 |
|
221 | 6060 |
autoUpdate:aBoolean |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
6061 |
"enabled/disable automatic update from the change-file (for monitoring)" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
6062 |
|
6216 | 6063 |
autoUpdate value:aBoolean |
221 | 6064 |
|
6065 |
"Created: 3.12.1995 / 14:14:24 / cg" |
|
6066 |
"Modified: 3.12.1995 / 14:20:45 / cg" |
|
6067 |
! |
|
6068 |
||
6216 | 6069 |
autoloadAsRequired:aBoolean |
6070 |
"enabled/disable automatic load of unloaded classes" |
|
6071 |
||
6072 |
autoloadAsRequired value:aBoolean |
|
6073 |
! |
|
6074 |
||
3211 | 6075 |
changeSelection:lineNrCollection |
0 | 6076 |
"show a change in the codeView" |
6077 |
||
11048 | 6078 |
|chunk lineNr lineNumbers| |
3211 | 6079 |
|
6080 |
lineNrCollection isInteger ifTrue:[ |
|
11048 | 6081 |
lineNr := lineNrCollection. |
6082 |
lineNumbers := Array with:lineNr. |
|
3211 | 6083 |
] ifFalse:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6084 |
changeListView multipleSelectOk ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6085 |
lineNrCollection size == 1 ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6086 |
lineNr := lineNrCollection first. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6087 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6088 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6089 |
lineNr := lineNrCollection |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6090 |
]. |
11048 | 6091 |
lineNumbers := lineNrCollection. |
6092 |
]. |
|
6093 |
||
6094 |
self changeListSelectionHolder value:lineNumbers. |
|
16467 | 6095 |
|
2293 | 6096 |
lineNr isNil ifTrue:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6097 |
codeView contents:nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6098 |
codeView initializeDoITAction. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6099 |
changeNrShown := nil. |
16467 | 6100 |
infoHolder value:nil. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6101 |
^ self |
2293 | 6102 |
]. |
6103 |
||
16467 | 6104 |
changeNrShown := lineNr. |
6105 |
self sensor |
|
6106 |
enqueueMessage:#updateSourceCodeAfterChangedSelection for:self arguments:nil; |
|
6107 |
enqueueMessage:#updateInfoAfterChangedSelection for:self arguments:nil. |
|
6108 |
^ self. |
|
6109 |
||
3211 | 6110 |
"/ display the changes code |
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
6111 |
chunk := self sourceOfChange:lineNr. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
6112 |
chunk isNil ifTrue:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6113 |
codeView initializeDoITAction. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6114 |
^ self |
2044 | 6115 |
]. |
8391 | 6116 |
|
0 | 6117 |
codeView contents:chunk. |
13 | 6118 |
codeView acceptAction:[:theCode | self doApply "noChangesAllowed"]. |
2043
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
6119 |
codeView doItAction:[:theCode | |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6120 |
|clsName cls| |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6121 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6122 |
clsName := self classNameOfChange:lineNr. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6123 |
clsName notNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6124 |
clsName := clsName asSymbolIfInterned. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6125 |
clsName notNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6126 |
cls := Smalltalk at:clsName ifAbsent:nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6127 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6128 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6129 |
Compiler |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6130 |
evaluate:theCode |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6131 |
in:nil |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6132 |
receiver:cls |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6133 |
notifying:self |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6134 |
logged:true |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6135 |
ifFail:nil |
2043
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
6136 |
]. |
15 | 6137 |
changeNrShown := lineNr. |
0 | 6138 |
|
4487 | 6139 |
self showingDiffs value ifTrue:[ |
8391 | 6140 |
self withWaitCursorDo:[ |
6141 |
AbortOperationRequest catch:[ |
|
6142 |
self updateDiffViewFor:changeNrShown. |
|
6143 |
] |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6144 |
] |
4487 | 6145 |
]. |
6146 |
||
11048 | 6147 |
"Modified: / 03-01-2012 / 15:30:23 / cg" |
51 | 6148 |
! |
6149 |
||
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6150 |
classOfChange:changeNr |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
6151 |
^ self |
6386 | 6152 |
classOfChange:changeNr |
6153 |
ifAbsent:[:className | |
|
6154 |
|msg| |
|
6155 |
||
6156 |
className isNil ifTrue:[ |
|
6157 |
msg := 'Could not extract classname from change'. |
|
6158 |
] ifFalse:[ |
|
6159 |
msg := 'Class not found: ''' , className , ''''. |
|
6160 |
]. |
|
8320
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6161 |
Transcript showCR:msg. |
6386 | 6162 |
"/ self warn:msg. |
6163 |
nil |
|
6164 |
] |
|
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
6165 |
! |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
6166 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
6167 |
classOfChange:changeNr ifAbsent:exceptionBlock |
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6168 |
"answer the class that is subject to the chamge at changeNr. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6169 |
The classes owning class may be autoloaded, if autoloadAsRequired is true." |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6170 |
|
8272
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6171 |
|className cls isMeta nameSpaceForApply path ownerName owner| |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6172 |
|
5014 | 6173 |
className := self realClassNameOfChange:changeNr. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6174 |
className isNil ifTrue:[ |
6378 | 6175 |
^ exceptionBlock value:nil |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6176 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6177 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6178 |
isMeta := false. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6179 |
(className endsWith:' class') ifTrue:[ |
12704
6f20f7d39e75
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12656
diff
changeset
|
6180 |
className := className copyButLast:6. |
6378 | 6181 |
isMeta := true. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6182 |
]. |
3472 | 6183 |
|
8272
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6184 |
autoloadAsRequired value ifTrue:[ |
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6185 |
path := className asCollectionOfSubstringsSeparatedByAll:'::'. |
8320
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6186 |
path size >= 2 ifTrue:[ |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6187 |
1 to:path size-1 do:[:l | |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6188 |
"/ ensure that the owningClass is loaded - this will load the private classes as well |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6189 |
"/ Transcript showCR:'loading owner'. |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6190 |
ownerName := (path copyTo:l) asStringCollection asStringWith:'::'. |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6191 |
owner := Smalltalk classNamed:ownerName. |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6192 |
owner notNil ifTrue:[ |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6193 |
owner autoload. |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6194 |
]. |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6195 |
]. |
8272
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6196 |
]. |
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6197 |
]. |
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6198 |
|
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6199 |
nameSpaceForApply := self nameSpaceForApply. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6200 |
autoloadAsRequired value ifTrue:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6201 |
cls := nameSpaceForApply classNamed:className. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6202 |
] ifFalse:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6203 |
cls := nameSpaceForApply loadedClassNamed:className |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6204 |
]. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6205 |
(cls isNil and:[nameSpaceForApply ~~ Smalltalk]) ifTrue:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6206 |
"if not found in special name space, fall back to the Smalltalk name space" |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6207 |
autoloadAsRequired value ifTrue:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6208 |
cls := Smalltalk classNamed:className. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6209 |
] ifFalse:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6210 |
cls := Smalltalk loadedClassNamed:className |
6378 | 6211 |
]. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6212 |
]. |
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6213 |
|
6378 | 6214 |
cls isNil ifTrue:[ |
6215 |
^ exceptionBlock value:className |
|
6216 |
]. |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6217 |
isMeta ifTrue:[ |
6378 | 6218 |
cls := cls class |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6219 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6220 |
^ cls |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6221 |
! |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6222 |
|
1471 | 6223 |
doubleClickOnChange:lineNr |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
6224 |
"action performed when a change-list entry is doubleClicked" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
6225 |
|
1471 | 6226 |
self doBrowse |
6227 |
||
6228 |
"Created: / 6.2.1998 / 13:08:49 / cg" |
|
6229 |
! |
|
6230 |
||
202 | 6231 |
noChangesAllowed |
6232 |
"show a warning that changes cannot be changed" |
|
93 | 6233 |
|
3211 | 6234 |
self warn:'Changes are not allowed to be changed.' |
0 | 6235 |
! |
6236 |
||
202 | 6237 |
saveClass:aClassName from:startNr |
6238 |
"user wants changes from current to end to be appended to a file" |
|
51 | 6239 |
|
202 | 6240 |
|changeNr fileName| |
51 | 6241 |
|
202 | 6242 |
changeNr := changeListView selection. |
6243 |
changeNr notNil ifTrue:[ |
|
9604 | 6244 |
fileName := Dialog |
6245 |
requestFileNameForSave:(resources string:'Append changes for class to:') |
|
6246 |
default:(lastSaveFileName ? '') |
|
6247 |
ok:(resources string:'Append') |
|
6248 |
abort:(resources string:'Abort') |
|
6249 |
pattern:'*.chg'. |
|
6250 |
||
6251 |
fileName notNil ifTrue:[ |
|
6252 |
lastSaveFileName := fileName. |
|
11685 | 6253 |
self withWriteCursorDo:[ |
9604 | 6254 |
startNr to:(self numberOfChanges) do:[:changeNr | |
6255 |
|thisClassName| |
|
6256 |
||
6257 |
thisClassName := self classNameOfChange:changeNr. |
|
6258 |
thisClassName = aClassName ifTrue:[ |
|
6259 |
self setSingleSelection:changeNr. |
|
6260 |
(self appendChange:changeNr toFile:fileName) ifFalse:[ |
|
6261 |
^ self |
|
6262 |
] |
|
6263 |
] |
|
6264 |
] |
|
6265 |
] |
|
6266 |
]. |
|
202 | 6267 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
6268 |
|
11685 | 6269 |
"Modified: / 27-07-2012 / 09:46:04 / cg" |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
6270 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
6271 |
|
11477 | 6272 |
selectionChanged |
12946 | 6273 |
self halt:'should not be here' |
11048 | 6274 |
|
6275 |
"Created: / 03-01-2012 / 15:26:36 / cg" |
|
16467 | 6276 |
! |
6277 |
||
6278 |
updateInfoAfterChangedSelection |
|
6279 |
"update the info label" |
|
6280 |
||
17172 | 6281 |
|selection lineNr selectorOrNil className nonMetaClassName metaClassName |
16476 | 6282 |
nClassChanges nMethodChanges uniqueSelectors |
17172 | 6283 |
lastLineNr firstLineNr |
6284 |
countForClassBeforeCurrent countForClassAfterLast countForClassAndSelectorAfterLast |
|
17381 | 6285 |
moreInfo msg| |
16467 | 6286 |
|
6287 |
selection := lineNr := changeListView selection. |
|
6288 |
selection isNumber ifFalse:[ |
|
6289 |
lineNr := nil. |
|
6290 |
selection notEmptyOrNil ifTrue:[ |
|
6291 |
lineNr := selection first |
|
6292 |
]. |
|
6293 |
]. |
|
6294 |
||
6295 |
lineNr isNil ifTrue:[ |
|
6296 |
infoHolder value:nil. |
|
6297 |
^ self |
|
6298 |
]. |
|
6299 |
||
6300 |
"/ |
|
6301 |
"/ now, this info is computed so fast, |
|
6302 |
"/ we can do it each time the selection changes |
|
6303 |
"/ (can we?) |
|
6304 |
className := self realClassNameOfChange:lineNr. |
|
16478 | 6305 |
className isNil ifTrue:[ |
6306 |
infoHolder value:nil. |
|
6307 |
^ self |
|
6308 |
]. |
|
17172 | 6309 |
selectorOrNil := self selectorOfMethodChange:lineNr. |
16478 | 6310 |
|
16476 | 6311 |
nonMetaClassName := (className endsWith:' class') |
6312 |
ifTrue:[ className copyButLast:' class' size ] |
|
6313 |
ifFalse:[ className ]. |
|
6314 |
metaClassName := nonMetaClassName,' class'. |
|
6315 |
||
16467 | 6316 |
nClassChanges := nMethodChanges := 0. |
6317 |
uniqueSelectors := Set new. |
|
16476 | 6318 |
lastLineNr := firstLineNr := nil. |
17172 | 6319 |
countForClassAfterLast := 0. |
6320 |
countForClassBeforeCurrent := 0. |
|
6321 |
countForClassAndSelectorAfterLast := 0. |
|
16467 | 6322 |
|
6323 |
"/ count them all |
|
6324 |
1 to:changeInfoList size do:[:i | |
|
16476 | 6325 |
|sel nameOfChange| |
17420 | 6326 |
|
6327 |
changeInfoList at:i. |
|
16476 | 6328 |
nameOfChange := self realClassNameOfChange:i. |
6329 |
((nameOfChange = nonMetaClassName) or:[nameOfChange = metaClassName]) ifTrue:[ |
|
17172 | 6330 |
sel := self selectorOfMethodChange:i. |
6331 |
||
16467 | 6332 |
lastLineNr := i. |
16476 | 6333 |
firstLineNr := firstLineNr ? i. |
17172 | 6334 |
i > lineNr ifTrue:[ |
6335 |
countForClassAfterLast := countForClassAfterLast + 1. |
|
6336 |
(nameOfChange = className |
|
6337 |
and:[ selectorOrNil notNil |
|
6338 |
and:[sel == selectorOrNil]]) ifTrue:[ |
|
6339 |
countForClassAndSelectorAfterLast := countForClassAndSelectorAfterLast + 1. |
|
16476 | 6340 |
]. |
17172 | 6341 |
] ifFalse:[ |
6342 |
i < lineNr ifTrue:[ |
|
6343 |
countForClassBeforeCurrent := countForClassBeforeCurrent + 1 |
|
6344 |
] |
|
6345 |
]. |
|
16467 | 6346 |
nClassChanges := nClassChanges + 1. |
17172 | 6347 |
sel notNil ifTrue:[ |
16467 | 6348 |
uniqueSelectors add:sel. |
6349 |
nMethodChanges := nMethodChanges + 1. |
|
6350 |
]. |
|
6351 |
]. |
|
6352 |
]. |
|
6353 |
lastLineNr == lineNr ifTrue:[ |
|
16476 | 6354 |
firstLineNr == lineNr ifTrue:[ |
6355 |
moreInfo := resources string:'. This is the only one for this class '. |
|
6356 |
] ifFalse:[ |
|
6357 |
moreInfo := resources string:'. This is the last for this class '. |
|
6358 |
] |
|
16467 | 6359 |
] ifFalse:[ |
16476 | 6360 |
firstLineNr == lineNr ifTrue:[ |
6361 |
moreInfo := resources string:'. This is the first for this class'. |
|
6362 |
]. |
|
17172 | 6363 |
countForClassAfterLast > 0 ifTrue:[ |
6364 |
moreInfo := (moreInfo ? ''),(resources string:'. %1 more for this class' with:countForClassAfterLast). |
|
6365 |
countForClassAndSelectorAfterLast > 0 ifTrue:[ |
|
17419 | 6366 |
moreInfo := moreInfo,(resources string:', %1 for selector' with:countForClassAndSelectorAfterLast). |
17172 | 6367 |
]. |
16467 | 6368 |
]. |
6369 |
]. |
|
17381 | 6370 |
uniqueSelectors size == 1 ifTrue:[ |
6371 |
nMethodChanges == 1 ifTrue:[ |
|
6372 |
msg := '%1 changes. %2 for %3 (1 for #''%5'')%6' |
|
6373 |
] ifFalse:[ |
|
6374 |
msg := '%1 changes. %2 for %3 (%4 methods / for #''%5'')%6' |
|
6375 |
]. |
|
6376 |
infoHolder value:(resources |
|
6377 |
string:msg |
|
6378 |
with:(changeInfoList size) |
|
6379 |
with:nClassChanges |
|
6380 |
with:className |
|
6381 |
with:nMethodChanges |
|
6382 |
with:uniqueSelectors first |
|
6383 |
with:moreInfo). |
|
6384 |
] ifFalse:[ |
|
6385 |
infoHolder value:(resources |
|
6386 |
string:'%1 changes. %2 for %3 (%4 methods / %5 selectors)%6' |
|
6387 |
with:(changeInfoList size) |
|
6388 |
with:nClassChanges |
|
6389 |
with:className |
|
6390 |
with:nMethodChanges |
|
6391 |
with:uniqueSelectors size |
|
6392 |
with:moreInfo). |
|
6393 |
]. |
|
6394 |
||
17420 | 6395 |
"Modified: / 19-02-2017 / 13:37:19 / cg" |
16467 | 6396 |
! |
6397 |
||
6398 |
updateSourceCodeAfterChangedSelection |
|
6399 |
"show a change in the codeView" |
|
6400 |
||
6401 |
|selection lineNr chunk| |
|
6402 |
||
6403 |
selection := lineNr := changeListView selection. |
|
6404 |
selection isNumber ifFalse:[ |
|
6405 |
lineNr := nil. |
|
6406 |
selection notEmptyOrNil ifTrue:[ |
|
6407 |
lineNr := selection first |
|
6408 |
]. |
|
6409 |
]. |
|
6410 |
||
6411 |
lineNr isNil ifTrue:[ |
|
6412 |
^ self |
|
6413 |
]. |
|
6414 |
||
6415 |
"/ display the changes code |
|
6416 |
chunk := self sourceOfChange:lineNr. |
|
6417 |
chunk isNil ifTrue:[ |
|
6418 |
codeView initializeDoITAction. |
|
6419 |
^ self |
|
6420 |
]. |
|
6421 |
||
6422 |
codeView contents:chunk. |
|
6423 |
codeView acceptAction:[:theCode | self doApply "noChangesAllowed"]. |
|
6424 |
codeView doItAction:[:theCode | |
|
6425 |
|clsName cls| |
|
6426 |
||
6427 |
clsName := self classNameOfChange:lineNr. |
|
6428 |
clsName notNil ifTrue:[ |
|
6429 |
clsName := clsName asSymbolIfInterned. |
|
6430 |
clsName notNil ifTrue:[ |
|
6431 |
cls := Smalltalk at:clsName ifAbsent:nil. |
|
6432 |
] |
|
6433 |
]. |
|
6434 |
Compiler |
|
6435 |
evaluate:theCode |
|
6436 |
in:nil |
|
6437 |
receiver:cls |
|
6438 |
notifying:self |
|
6439 |
logged:true |
|
6440 |
ifFail:nil |
|
6441 |
]. |
|
6442 |
||
6443 |
||
6444 |
changeNrShown := lineNr. |
|
6445 |
||
6446 |
self showingDiffs value ifTrue:[ |
|
6447 |
self withWaitCursorDo:[ |
|
6448 |
AbortOperationRequest catch:[ |
|
6449 |
self updateDiffViewFor:changeNrShown. |
|
6450 |
] |
|
6451 |
] |
|
6452 |
]. |
|
202 | 6453 |
! ! |
0 | 6454 |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6455 |
!ChangesBrowser::ChangeFileReader methodsFor:'accessing'! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6456 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6457 |
autoCompare:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6458 |
autoCompare := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6459 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6460 |
|
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6461 |
autoloadAsRequired |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6462 |
^ autoloadAsRequired |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6463 |
! |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6464 |
|
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6465 |
autoloadAsRequired:something |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6466 |
autoloadAsRequired := something. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6467 |
! |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6468 |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6469 |
browser:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6470 |
browser := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6471 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6472 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6473 |
changeChunks |
16372 | 6474 |
self halt. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6475 |
^ changeChunks |
16372 | 6476 |
|
6477 |
"Modified: / 01-05-2016 / 19:10:52 / cg" |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6478 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6479 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6480 |
changeClassNames |
16372 | 6481 |
self halt. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6482 |
^ changeClassNames |
16372 | 6483 |
|
6484 |
"Modified: / 01-05-2016 / 19:10:47 / cg" |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6485 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6486 |
|
6516
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6487 |
changeFileName |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6488 |
^ changeFileName |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6489 |
! |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6490 |
|
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6491 |
changeFileName:something |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6492 |
changeFileName := something. |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6493 |
! |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6494 |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6495 |
changeHeaderLines |
16372 | 6496 |
self halt. |
6497 |
^ changeHeaderLines |
|
6498 |
||
6499 |
"Modified: / 01-05-2016 / 19:10:41 / cg" |
|
6500 |
! |
|
6501 |
||
6502 |
changeInfo |
|
6503 |
^ changeInfo |
|
6504 |
||
6505 |
"Created: / 01-05-2016 / 19:10:05 / cg" |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6506 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6507 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6508 |
changeIsFollowupMethodChange |
16372 | 6509 |
self halt. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6510 |
^ changeIsFollowupMethodChange |
16372 | 6511 |
|
6512 |
"Modified: / 01-05-2016 / 19:10:24 / cg" |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6513 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6514 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6515 |
changePositions |
16372 | 6516 |
self halt. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6517 |
^ changePositions |
16372 | 6518 |
|
6519 |
"Modified: / 01-05-2016 / 19:10:29 / cg" |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6520 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6521 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6522 |
changeTimeStamps |
16372 | 6523 |
self halt. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6524 |
^ changeTimeStamps |
16372 | 6525 |
|
6526 |
"Modified: / 01-05-2016 / 19:10:34 / cg" |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6527 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6528 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6529 |
enforcedNameSpace:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6530 |
enforcedNameSpace := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6531 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6532 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6533 |
inStream:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6534 |
inStream := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6535 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6536 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6537 |
noColoring:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6538 |
noColoring := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6539 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6540 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6541 |
tabSpec:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6542 |
tabSpec := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6543 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6544 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6545 |
thisIsAClassSource |
7360 | 6546 |
^ thisIsAClassSource ? false |
6547 |
||
6548 |
"Modified: / 06-10-2006 / 11:18:49 / cg" |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6549 |
! ! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6550 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6551 |
!ChangesBrowser::ChangeFileReader methodsFor:'private'! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6552 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6553 |
contractClass:className selector:selector to:maxLen |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6554 |
"contract a class>>selector string (for display in the changeList)." |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6555 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6556 |
|s l| |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6557 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6558 |
s := className , ' ', selector. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6559 |
s size > maxLen ifTrue:[ |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6560 |
l := maxLen - 1 - selector size max:20. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6561 |
s := (className contractTo:l) , ' ' , selector. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6562 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6563 |
s size > maxLen ifTrue:[ |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6564 |
l := maxLen - 1 - className size max:20. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6565 |
s := className , ' ', (selector contractTo:l). |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6566 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6567 |
s size > maxLen ifTrue:[ |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6568 |
s := (className contractTo:(maxLen // 2 - 1)) , ' ' , (selector contractTo:maxLen // 2) |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6569 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6570 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6571 |
]. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6572 |
^ s |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6573 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6574 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6575 |
extractClassAndClassNameFromParseTree:rec |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6576 |
|isUnaryMessage className changeClass| |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6577 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6578 |
isUnaryMessage := rec isUnaryMessage. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6579 |
|
9019 | 6580 |
Error |
6581 |
handle:[:ex | ^ '?' -> nil] |
|
6843 | 6582 |
do:[ |
9019 | 6583 |
isUnaryMessage ifTrue:[ |
6584 |
className := rec receiver name. |
|
6585 |
] ifFalse:[ |
|
6586 |
className := rec name. |
|
6587 |
]. |
|
6843 | 6588 |
]. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6589 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6590 |
enforcedNameSpace notNil ifTrue:[ |
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6591 |
autoloadAsRequired value ifTrue:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6592 |
changeClass := enforcedNameSpace classNamed:className. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6593 |
] ifFalse:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6594 |
changeClass := enforcedNameSpace loadedClassNamed:className. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6595 |
]. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6596 |
]. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6597 |
changeClass isNil ifTrue:[ |
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6598 |
autoloadAsRequired value ifTrue:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6599 |
changeClass := Smalltalk classNamed:className. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6600 |
] ifFalse:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6601 |
changeClass := Smalltalk loadedClassNamed:className. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6602 |
]. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6603 |
]. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6604 |
isUnaryMessage ifTrue:[ |
6843 | 6605 |
changeClass notNil ifTrue:[ |
6606 |
changeClass := changeClass class. |
|
6607 |
]. |
|
6608 |
className := className , ' class'. |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6609 |
]. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6610 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6611 |
^ className -> changeClass |
6843 | 6612 |
|
6613 |
"Modified: / 03-08-2006 / 14:02:31 / cg" |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6614 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6615 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6616 |
nameSpaceForApply |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6617 |
^ browser nameSpaceForApply |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6618 |
! ! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6619 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6620 |
!ChangesBrowser::ChangeFileReader methodsFor:'reading'! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6621 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6622 |
addHeaderLineForChangeType:changeType changeString:changeString changeDelta:changeDelta timeStampInfo:timeStampInfo |
16372 | 6623 |
changeHeaderLines add:(self headerLineForChangeType:changeType changeString:changeString changeDelta:changeDelta timeStampInfo:timeStampInfo) |
6624 |
||
6625 |
"Modified: / 01-05-2016 / 19:07:49 / cg" |
|
6626 |
! |
|
6627 |
||
6628 |
headerLineForChangeType:changeType changeString:changeString changeDelta:changeDelta timeStampInfo:timeStampInfo |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6629 |
|entry| |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6630 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6631 |
entry := MultiColListEntry new. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6632 |
entry tabulatorSpecification:tabSpec. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6633 |
entry colAt:1 put:changeDelta. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6634 |
entry colAt:2 put:changeString. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6635 |
entry colAt:3 put:changeType. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6636 |
timeStampInfo notNil ifTrue:[ |
12599
827681c8f7d4
timestamp printing extracted
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
6637 |
entry colAt:4 put:(browser timeStampPrintStringOf:timeStampInfo). |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6638 |
]. |
16372 | 6639 |
^ entry |
6640 |
||
6641 |
"Created: / 01-05-2016 / 19:07:20 / cg" |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6642 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6643 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6644 |
processChunk |
16372 | 6645 |
|info| |
6646 |
||
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6647 |
(chunkText startsWith:'''---- timestamp ') ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6648 |
timeStampInfo := (chunkText copyFrom:16 to:(chunkText size - 6)) withoutSpaces. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6649 |
^ self. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6650 |
]. |
11234 | 6651 |
(chunkText asLowercase startsWith:'''---- encoding: ') ifTrue:[ |
6652 |
^ self. |
|
6653 |
]. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6654 |
|
16372 | 6655 |
changeInfo add:(info := |
6656 |
ChangesBrowser::ChangeInfo new |
|
6657 |
position:chunkPosition chunk:chunkText className:nil selector:nil headerLine:nil |
|
6658 |
timestamp:timeStampInfo isFollowupChange:false). |
|
6659 |
"/ changeChunks add:chunkText. |
|
6660 |
"/ changeClassNames add:nil. |
|
6661 |
"/ changePositions add:chunkPosition. |
|
6662 |
"/ changeTimeStamps add:timeStampInfo. |
|
6663 |
"/ changeIsFollowupMethodChange add:false. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6664 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6665 |
headerLine := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6666 |
changeDelta := ' '. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6667 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6668 |
sawExcla ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6669 |
self processNonMethodChunk |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6670 |
] ifTrue:[ |
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6671 |
self processMethodChunkIfNone: |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6672 |
[ |
16372 | 6673 |
changeInfo removeLast. |
6674 |
"/ changeChunks removeLast. |
|
6675 |
"/ changeClassNames removeLast. |
|
6676 |
"/ changePositions removeLast. |
|
6677 |
"/ changeTimeStamps removeLast. |
|
6678 |
"/ changeIsFollowupMethodChange removeLast. |
|
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6679 |
] |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6680 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6681 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6682 |
changeString notNil ifTrue:[ |
16372 | 6683 |
"/ self addHeaderLineForChangeType:changeType changeString:changeString changeDelta:changeDelta timeStampInfo:timeStampInfo. |
6684 |
info headerLine:(self headerLineForChangeType:changeType changeString:changeString changeDelta:changeDelta timeStampInfo:timeStampInfo) |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6685 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6686 |
headerLine notNil ifTrue:[ |
17723 | 6687 |
changeHeaderLines add:headerLine. |
16372 | 6688 |
info headerLine:headerLine. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6689 |
] |
16372 | 6690 |
]. |
6691 |
||
6692 |
"Modified: / 01-05-2016 / 19:13:59 / cg" |
|
17723 | 6693 |
"Modified: / 27-10-2017 / 14:34:51 / stefan" |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6694 |
! |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6695 |
|
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6696 |
processMethodChunkIfNone:emptyBlock |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6697 |
"sawExcla" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6698 |
|
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6699 |
|askedForEditingClassSource changeClass category anyMethod |
15012 | 6700 |
sel p rec clsName done first text methodPos |
16372 | 6701 |
singleJunkOnly methodChunks classCategoryChunks methodCategoryChunks singleInfo methodSelector nameAndClass |
6702 |
info| |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6703 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6704 |
singleJunkOnly := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6705 |
methodChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6706 |
classCategoryChunks := methodCategoryChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6707 |
singleInfo := false. |
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6708 |
anyMethod := false. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6709 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6710 |
" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6711 |
method definitions actually consist of |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6712 |
two (or more) chunks; skip next chunk(s) |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6713 |
up to an empty one. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6714 |
The system only writes one chunk, |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6715 |
and we cannot handle more in this ChangesBrowser .... |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6716 |
" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6717 |
clsName := nil. |
8665 | 6718 |
|
17899 | 6719 |
(chunkText includesString:'§') ifTrue:[self halt]. |
17094 | 6720 |
|
8665 | 6721 |
p := browser parseExpression:chunkText inNameSpace:(self nameSpaceForApply). |
6835
87e0844b7e12
Avoid debugger on timestamp information whenn doing autocompare
Stefan Vogel <sv@exept.de>
parents:
6820
diff
changeset
|
6722 |
(p notNil and:[p ~~ #Error and:[p isMessage]]) ifTrue:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6723 |
rec := p receiver. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6724 |
sel := p selector. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6725 |
(ChangesBrowser methodDefinitionSelectors includes:sel) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6726 |
methodChunks := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6727 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6728 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6729 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6730 |
sel == #categoriesForClass ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6731 |
methodChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6732 |
classCategoryChunks := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6733 |
changeType := '(class category change)'. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6734 |
] ifFalse:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6735 |
sel == #categoriesFor: ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6736 |
methodChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6737 |
methodCategoryChunks := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6738 |
changeType := '(category change)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6739 |
methodSelector := (p args at:1) evaluate. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6740 |
] ifFalse:[ |
6532 | 6741 |
(sel numArgs == 0) ifTrue:[ |
6742 |
category := '* As yet uncategorized *'. |
|
6743 |
category := sel. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6744 |
] ifFalse:[ |
6532 | 6745 |
category := (p args at:1) evaluate. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6746 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6747 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6748 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6749 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6750 |
sel == #'methodsFor:stamp:' ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6751 |
"/ Squeak timeStamp |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6752 |
timeStampInfo := (p args at:2) evaluate. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6753 |
singleInfo := true |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6754 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6755 |
sel == #'commentStamp:prior:' ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6756 |
singleJunkOnly := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6757 |
methodChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6758 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6759 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6760 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6761 |
sel == #reorganize ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6762 |
singleJunkOnly := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6763 |
methodChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6764 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6765 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6766 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6767 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6768 |
done := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6769 |
first := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6770 |
[done] whileFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6771 |
changeDelta := ' '. |
13314 | 6772 |
methodPos := inStream position + 1. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6773 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6774 |
text := inStream nextChunk. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6775 |
done := text isEmptyOrNil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6776 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6777 |
done ifFalse:[ |
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6778 |
anyMethod := true. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6779 |
first ifFalse:[ |
16372 | 6780 |
info := ChangesBrowser::ChangeInfo new |
6781 |
position:methodPos chunk:chunkText className:clsName |
|
6782 |
selector:nil headerLine:nil timestamp:timeStampInfo isFollowupChange:true. |
|
6783 |
changeInfo add:info. |
|
6784 |
||
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6785 |
askedForEditingClassSource ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6786 |
thisIsAClassSource := (changeFileName asFilename hasSuffix:'st'). |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6787 |
askedForEditingClassSource := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6788 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6789 |
] ifTrue:[ |
16372 | 6790 |
changeInfo last className:clsName |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6791 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6792 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6793 |
first := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6794 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6795 |
(classCategoryChunks or:[methodCategoryChunks]) ifTrue:[ |
6639 | 6796 |
text := text firstLine. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6797 |
classCategoryChunks ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6798 |
changeClass isNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6799 |
changeDelta := '?'. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6800 |
] ifFalse:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6801 |
changeClass category = text ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6802 |
changeDelta := '='. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6803 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6804 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6805 |
changeString := clsName , ' category: ' , text storeString. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6806 |
]ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6807 |
changeString := '(' , clsName , ' compiledMethodAt:' , methodSelector storeString , ') category: ' , text storeString. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6808 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6809 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6810 |
" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6811 |
try to find the selector |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6812 |
" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6813 |
methodSelector := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6814 |
clsName notNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6815 |
methodChunks ifTrue:[ |
17094 | 6816 |
p := Parser for:(ReadStream on:text) in:nil. |
6817 |
p ignoreErrors:true. |
|
6818 |
p ignoreWarnings:true. |
|
6819 |
p parserFlags allowDollarInIdentifier:true. |
|
6820 |
p parserFlags allowParagraphInIdentifier:true. |
|
6821 |
p parseMethodSpec. |
|
6822 |
methodSelector := p selector. |
|
6823 |
"/ p := Parser |
|
6824 |
"/ parseMethodSpecification:text |
|
6825 |
"/ in:nil |
|
6826 |
"/ ignoreErrors:true |
|
6827 |
"/ ignoreWarnings:true. |
|
6828 |
"/ (p notNil and:[p ~~ #Error]) ifTrue:[ |
|
6829 |
"/ methodSelector := p selector. |
|
6830 |
"/ ] |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6831 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6832 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6833 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6834 |
methodSelector isNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6835 |
changeString := (chunkText contractTo:maxLen). |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6836 |
changeType := '(change)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6837 |
headerLine := chunkText , ' (change)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6838 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6839 |
changeString := self contractClass:clsName selector:methodSelector to:maxLen. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6840 |
changeType := '{ ' , category , ' }'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6841 |
headerLine := clsName , ' ' , methodSelector , ' ' , '(change category: ''' , category , ''')'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6842 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6843 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6844 |
autoCompare value ifTrue:[ |
17047 | 6845 |
changeDelta := ChangeDeltaInformation |
6846 |
changeDeltaFor:text changeClass:changeClass selector:methodSelector. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6847 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6848 |
]. |
17047 | 6849 |
changeInfo last |
6850 |
headerLine:(self headerLineForChangeType:changeType |
|
6851 |
changeString:changeString |
|
6852 |
changeDelta:changeDelta |
|
6853 |
timeStampInfo:timeStampInfo). |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6854 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6855 |
changeString := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6856 |
headerLine := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6857 |
singleJunkOnly ifTrue:[done := true] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6858 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6859 |
singleInfo ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6860 |
timeStampInfo := nil |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6861 |
]. |
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6862 |
anyMethod ifFalse:[ |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6863 |
emptyBlock value |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6864 |
]. |
16372 | 6865 |
|
17094 | 6866 |
"Modified: / 21-11-2016 / 23:32:29 / cg" |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6867 |
! |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6868 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6869 |
processNonMethodChunk |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6870 |
|s changeClass sel cls p rec clsName ownerTree ownerName |
15087 | 6871 |
m nameAndClass args instVarsArg classVarsArg categoryArg| |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6872 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6873 |
(chunkText startsWith:'''---- snap') ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6874 |
self processSnapshotChunk. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6875 |
^ self |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6876 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6877 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6878 |
headerLine := chunkText , ' (doIt)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6879 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6880 |
" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6881 |
first, assume doIt - then lets have a more detailed look ... |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6882 |
" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6883 |
((chunkText startsWith:'''---- file') |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6884 |
or:[(chunkText startsWith:'''---- check')]) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6885 |
changeType := ''. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6886 |
timeStampInfo := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6887 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6888 |
changeType := '(doIt)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6889 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6890 |
changeString := (chunkText contractTo:maxLen) withoutSeparators. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6891 |
|
8665 | 6892 |
p := browser parseExpression:fullChunkText inNameSpace:Smalltalk. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6893 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6894 |
p isMessage ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6895 |
sel := p selector. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6896 |
rec := p receiver. |
15087 | 6897 |
args := p args. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6898 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6899 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6900 |
sel := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6901 |
(Scanner new scanTokens:fullChunkText) size == 0 ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6902 |
"/ a comment only |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6903 |
changeType := '(comment)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6904 |
NoColoring ~~ true ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6905 |
changeType := changeType allItalic. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6906 |
"/ changeString := changeString allItalic. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6907 |
changeType emphasisAllAdd:(#color -> UserPreferences current commentColor). |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6908 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6909 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6910 |
changeType := '(???)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6911 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6912 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6913 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6914 |
(sel == #comment:) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6915 |
changeType := '(comment)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6916 |
clsName := rec name. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6917 |
changeClass := (self nameSpaceForApply) classNamed:clsName. |
16372 | 6918 |
(changeInfo last) className:clsName. |
6919 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6920 |
NoColoring ~~ true ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6921 |
changeType := changeType allItalic. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6922 |
changeType emphasisAllAdd:(#color -> UserPreferences current commentColor). |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6923 |
"/ changeString := clsName allItalic. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6924 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6925 |
autoCompare value ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6926 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6927 |
changeDelta := '?' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6928 |
] ifFalse:[ |
15087 | 6929 |
(changeClass comment = (args at:1) evaluate) ifTrue:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6930 |
changeDelta := '='. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6931 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6932 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6933 |
]. |
15087 | 6934 |
"/ sel := nil. |
6935 |
^ self. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6936 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6937 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6938 |
(sel == #removeSelector:) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6939 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6940 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6941 |
|
15087 | 6942 |
sel := (args at:1) evaluate. |
16372 | 6943 |
(changeInfo last) className:clsName. |
6944 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6945 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6946 |
autoCompare value ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6947 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6948 |
changeDelta := '?' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6949 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6950 |
(changeClass includesSelector:sel asSymbol) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6951 |
changeDelta := '-'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6952 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6953 |
changeDelta := '='. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6954 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6955 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6956 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6957 |
changeType := '(remove)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6958 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
15087 | 6959 |
"/ sel := nil. |
6960 |
^ self. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6961 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6962 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6963 |
(p notNil |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6964 |
and:[p ~~ #Error |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6965 |
and:[p isMessage |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6966 |
and:[rec isMessage |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6967 |
and:[rec selector == #compiledMethodAt:]]]]) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6968 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec receiver. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6969 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6970 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6971 |
(sel == #category:) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6972 |
sel := (rec args at:1) evaluate. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6973 |
changeType := '(category change)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6974 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
16372 | 6975 |
(changeInfo last) className:clsName. |
6976 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
15012 | 6977 |
autoCompare value ifTrue:[ |
6978 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
|
6979 |
changeDelta := '?' |
|
6980 |
] ifFalse:[ |
|
6981 |
m := changeClass compiledMethodAt:sel asSymbol. |
|
6982 |
m notNil ifTrue:[ |
|
6983 |
m category = (p args at:1) evaluate ifTrue:[ |
|
6984 |
changeDelta := '='. |
|
6985 |
] |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6986 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6987 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6988 |
]. |
15087 | 6989 |
^ self. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6990 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6991 |
(sel == #privacy:) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6992 |
sel := (rec args at:1) evaluate. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6993 |
changeType := '(privacy change)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6994 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
16372 | 6995 |
(changeInfo last) className:clsName. |
6996 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
15012 | 6997 |
autoCompare value ifTrue:[ |
6998 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
|
6999 |
changeDelta := '?' |
|
7000 |
] ifFalse:[ |
|
7001 |
changeDelta := ' ' |
|
7002 |
] |
|
7003 |
]. |
|
15087 | 7004 |
^ self. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7005 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7006 |
sel := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7007 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7008 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7009 |
(Class definitionSelectors includes:sel) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7010 |
changeType := '(class definition)'. |
15087 | 7011 |
clsName := (args at:1) evaluate. |
16372 | 7012 |
(changeInfo last) className:clsName. |
7013 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7014 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7015 |
"/ is it a private-class ? |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7016 |
('*privateIn:' match:sel) ifTrue:[ |
15087 | 7017 |
ownerTree := args last. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7018 |
ownerName := ownerTree name asString. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7019 |
clsName := ownerName , '::' , clsName |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7020 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7021 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7022 |
changeString := clsName. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7023 |
NoColoring ~~ true ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7024 |
changeType := changeType allBold. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7025 |
changeString := changeString allBold. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7026 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7027 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7028 |
autoCompare value ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7029 |
cls := (self nameSpaceForApply) at:clsName asSymbol ifAbsent:nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7030 |
cls isNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7031 |
changeDelta := '+'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7032 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7033 |
(cls definitionSelector = sel |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7034 |
or:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7035 |
"/ could be an ST/V, VAge or Dolphin definition |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7036 |
cls definitionSelector = (sel , 'category:') |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7037 |
]) |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7038 |
ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7039 |
((cls superclass isNil |
16390 | 7040 |
and:[p receiver isLiteral |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7041 |
and:[p receiver evaluate isNil]]) |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7042 |
or:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7043 |
cls superclass notNil |
16390 | 7044 |
and:[p receiver isLiteral not |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7045 |
and:[cls superclass name = p receiver name]] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7046 |
]) ifTrue:[ |
15087 | 7047 |
(sel == #'variableByteSubclass:classVariableNames:poolDictionaries:category:') |
7048 |
ifTrue:[ |
|
7049 |
"/ VSE definition message |
|
7050 |
instVarsArg := ''. |
|
7051 |
classVarsArg := (args at:2) evaluate. |
|
7052 |
categoryArg := (args at:4) evaluate. |
|
7053 |
] ifFalse:[ |
|
7054 |
instVarsArg := (args at:2) evaluate. |
|
7055 |
classVarsArg := (args at:3) evaluate. |
|
7056 |
categoryArg := (args at:5) evaluate. |
|
7057 |
]. |
|
7058 |
cls instanceVariableString asCollectionOfWords = instVarsArg asCollectionOfWords ifTrue:[ |
|
7059 |
cls classVariableString asCollectionOfWords = classVarsArg asCollectionOfWords ifTrue:[ |
|
7060 |
cls definitionSelector = (sel , 'category:') |
|
7061 |
ifTrue:[ |
|
7062 |
"/ ST/V, VAge or Dolphin definition |
|
7063 |
changeDelta := '='. |
|
7064 |
] ifFalse:[ |
|
7065 |
cls category = categoryArg ifTrue:[ |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7066 |
changeDelta := '='. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7067 |
] ifFalse:[ |
15087 | 7068 |
changeType := '(class category change)'. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7069 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7070 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7071 |
] |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7072 |
] |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7073 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7074 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7075 |
] |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7076 |
]. |
15087 | 7077 |
"/ sel := nil. |
7078 |
^ self. |
|
7079 |
]. |
|
7080 |
||
7081 |
(#( |
|
7082 |
#'primitiveDefinitions:' |
|
7083 |
#'primitiveFunctions:' |
|
7084 |
#'primitiveVariables:' |
|
7085 |
) includes:sel) ifTrue:[ |
|
7086 |
changeType := '(class definition)'. |
|
7087 |
clsName := rec name. |
|
7088 |
^ self. |
|
7089 |
]. |
|
7090 |
||
7091 |
((sel == #instanceVariableNames:) |
|
7092 |
and:[rec isMessage |
|
7093 |
and:[rec selector == #class]]) ifTrue:[ |
|
7094 |
clsName := rec receiver name. |
|
7095 |
changeClass := (self nameSpaceForApply) classNamed:clsName. |
|
7096 |
changeType := '(class definition)'. |
|
16372 | 7097 |
(changeInfo last) className:clsName. |
7098 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
15087 | 7099 |
|
7100 |
autoCompare value ifTrue:[ |
|
7101 |
changeClass isNil ifTrue:[ |
|
7102 |
changeDelta := '?'. |
|
7103 |
] ifFalse:[ |
|
7104 |
s := (p args at:1) evaluate. |
|
7105 |
s = changeClass class instanceVariableString ifTrue:[ |
|
7106 |
changeDelta := '='. |
|
7107 |
] |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7108 |
] |
15087 | 7109 |
]. |
7110 |
^ self. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7111 |
]. |
9548 | 7112 |
|
16372 | 7113 |
"Modified: / 01-05-2016 / 19:19:54 / cg" |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7114 |
! |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7115 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7116 |
processSnapshotChunk |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7117 |
changeType := ''. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7118 |
headerLine := chunkText. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7119 |
changeString := (chunkText contractTo:maxLen) withoutSeparators. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7120 |
timeStampInfo := nil. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7121 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7122 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7123 |
readChangesFile |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7124 |
"read the changes file, create a list of header-lines (changeChunks) |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7125 |
and a list of chunk-positions (changePositions). |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7126 |
Starting with 2.10.3, the entries are multi-col entries; |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7127 |
the cols are: |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7128 |
1 delta (only if comparing) |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7129 |
'+' -> new method (w.r.t. current state) |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7130 |
'-' -> removed method (w.r.t. current state) |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7131 |
'?' -> class does not exist currently |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7132 |
'=' -> change is the same as current methods source |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7133 |
'~' -> change is almost the same as current methods source |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7134 |
2 class/selector |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7135 |
3 type of change |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7136 |
doit |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7137 |
method |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7138 |
category change |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7139 |
4 timestamp |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7140 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7141 |
since comparing slows down startup time, it is now disabled by |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7142 |
default and can be enabled via a toggle." |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7143 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7144 |
|excla| |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7145 |
|
16372 | 7146 |
changeInfo := OrderedCollection new. |
7147 |
||
7148 |
"/ changeChunks := OrderedCollection new. |
|
7149 |
"/ changeClassNames := OrderedCollection new. |
|
7150 |
"/ changeHeaderLines := OrderedCollection new. |
|
7151 |
"/ changePositions := OrderedCollection new. |
|
7152 |
"/ changeTimeStamps := OrderedCollection new. |
|
7153 |
"/ changeIsFollowupMethodChange := OrderedCollection new. |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7154 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7155 |
excla := inStream class chunkSeparator. |
9515 | 7156 |
maxLen := 100. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7157 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7158 |
[inStream atEnd] whileFalse:[ |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7159 |
" |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7160 |
get a chunk (separated by excla) |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7161 |
" |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7162 |
inStream skipSeparators. |
13314 | 7163 |
chunkPosition := inStream position + 1. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7164 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7165 |
sawExcla := inStream peekFor:excla. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7166 |
chunkText := fullChunkText := inStream nextChunk. |
7619
95943c1bc289
Ignore empty chunks when reading from changes file
Stefan Vogel <sv@exept.de>
parents:
7618
diff
changeset
|
7167 |
chunkText notEmptyOrNil ifTrue:[ |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7168 |
self processChunk. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7169 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7170 |
]. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7171 |
|
9515 | 7172 |
"Modified: / 27-08-1995 / 23:06:55 / claus" |
16372 | 7173 |
"Modified: / 01-05-2016 / 18:33:36 / cg" |
7174 |
! ! |
|
7175 |
||
7176 |
!ChangesBrowser::ChangeInfo methodsFor:'accessing'! |
|
7177 |
||
7178 |
chunk |
|
7179 |
^ chunk |
|
7180 |
! |
|
7181 |
||
7182 |
className |
|
7183 |
^ className |
|
7184 |
! |
|
7185 |
||
7186 |
className:something |
|
7187 |
className := something. |
|
7188 |
! |
|
7189 |
||
7190 |
headerLine |
|
7191 |
^ headerLine |
|
7192 |
! |
|
7193 |
||
7194 |
headerLine:something |
|
7195 |
headerLine := something. |
|
7196 |
! |
|
7197 |
||
7198 |
isFollowupChange |
|
7199 |
^ isFollowupChange |
|
7200 |
! |
|
7201 |
||
7202 |
position |
|
7203 |
^ position |
|
7204 |
! |
|
7205 |
||
7206 |
position:positionArg chunk:chunkArg className:classNameArg selector:selectorArg headerLine:headerLineArg |
|
7207 |
timestamp:timestampArg isFollowupChange:isFollowupChangeArg |
|
7208 |
||
7209 |
position := positionArg. |
|
7210 |
chunk := chunkArg. |
|
7211 |
className := classNameArg. |
|
7212 |
selector := selectorArg. |
|
7213 |
headerLine := headerLineArg. |
|
7214 |
timestamp := timestampArg. |
|
7215 |
isFollowupChange := isFollowupChangeArg. |
|
7216 |
||
7217 |
"Created: / 01-05-2016 / 19:01:03 / cg" |
|
7218 |
! |
|
7219 |
||
7220 |
selector |
|
7221 |
^ selector |
|
7222 |
! |
|
7223 |
||
7224 |
selector:something |
|
7225 |
selector := something. |
|
7226 |
! |
|
7227 |
||
7228 |
timestamp |
|
7229 |
^ timestamp |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7230 |
! ! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7231 |
|
761 | 7232 |
!ChangesBrowser class methodsFor:'documentation'! |
202 | 7233 |
|
7234 |
version |
|
15683 | 7235 |
^ '$Header$' |
8978 | 7236 |
! |
7237 |
||
7238 |
version_CVS |
|
15683 | 7239 |
^ '$Header$' |
276
017219e571e4
more stuff for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
275
diff
changeset
|
7240 |
! ! |
12428 | 7241 |