author | Claus Gittinger <cg@exept.de> |
Fri, 24 Feb 2017 16:54:59 +0100 | |
changeset 17444 | 4506360ae3c8 |
parent 17420 | 161d2c46c854 |
child 17565 | fd43100ecd96 |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1990 by Claus Gittinger |
6288 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
12 |
"{ Package: 'stx:libtool' }" |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
13 |
|
15082 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
0 | 16 |
StandardSystemView subclass:#ChangesBrowser |
16372 | 17 |
instanceVariableNames:'changesReader changeInfoList changeListView codeView diffView |
18 |
changeFileName anyChanges changeNrShown changeNrProcessed |
|
19 |
multipleApply autoCompare changeFileSize changeFileTimestamp |
|
20 |
checkBlock tabSpec autoUpdate editingClassSource lastSearchType |
|
4489 | 21 |
lastSearchString applyInOriginalNameSpace lastSaveFileName |
22 |
readOnly enforcedPackage enforcedNameSpace updateChangeSet |
|
8026
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
23 |
showingDiffs diffViewBox autoloadAsRequired |
10719 | 24 |
classesNotToBeAutoloaded encodingIfKnown |
11244 | 25 |
ignorePublicPrivateCategories changeListSelectionHolder |
16467 | 26 |
defaultApplicationForVAGEClasses infoHolder' |
7631
258e8ad34edf
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7625
diff
changeset
|
27 |
classVariableNames:'CompressSnapshotInfo NoColoring ShowWarningDialogs |
9168 | 28 |
DefaultAutoCompare DefaultShowingDiffs LastEnforcedNameSpace |
29 |
KeepEnforcedNameSpace' |
|
4489 | 30 |
poolDictionaries:'' |
31 |
category:'Interface-Browsers' |
|
0 | 32 |
! |
33 |
||
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
34 |
Object subclass:#ChangeFileReader |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
35 |
instanceVariableNames:'browser enforcedNameSpace changeFileName changeFileSize |
16372 | 36 |
changeFileTimestamp changeInfo changeChunks changeClassNames |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
37 |
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
|
38 |
changeIsFollowupMethodChange autoCompare autoloadAsRequired |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
39 |
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
|
40 |
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
|
41 |
changeString changeType changeDelta headerLine maxLen' |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
42 |
classVariableNames:'NoColoring' |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
43 |
poolDictionaries:'' |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
44 |
privateIn:ChangesBrowser |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
45 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
46 |
|
16372 | 47 |
Object subclass:#ChangeInfo |
48 |
instanceVariableNames:'position chunk className selector headerLine timestamp |
|
49 |
isFollowupChange' |
|
50 |
classVariableNames:'' |
|
51 |
poolDictionaries:'' |
|
52 |
privateIn:ChangesBrowser |
|
53 |
! |
|
54 |
||
761 | 55 |
!ChangesBrowser class methodsFor:'documentation'! |
29 | 56 |
|
57 |
copyright |
|
58 |
" |
|
59 |
COPYRIGHT (c) 1990 by Claus Gittinger |
|
6288 | 60 |
All Rights Reserved |
0 | 61 |
|
29 | 62 |
This software is furnished under a license and may be used |
63 |
only in accordance with the terms of that license and with the |
|
64 |
inclusion of the above copyright notice. This software may not |
|
65 |
be provided or otherwise made available to, or used by, any |
|
66 |
other person. No title to or ownership of the software is |
|
67 |
hereby transferred. |
|
68 |
" |
|
69 |
! |
|
70 |
||
71 |
documentation |
|
72 |
" |
|
11397 | 73 |
this implements a browser for the changes-file |
74 |
(actually, it can display any sourceFile's contents). |
|
29 | 75 |
See the extra document 'doc/misc/cbrowser.doc' for how to use this browser. |
76 |
||
77 |
written jan 90 by claus |
|
51 | 78 |
|
11397 | 79 |
This is a very old leftover class (it was one of the very first apps in ST/X |
80 |
and the Merovingian has not yet detected this one ;-) |
|
5703 | 81 |
It will be completely replaced by the ChangeSetBrowser class in the near future. |
82 |
||
83 |
||
508 | 84 |
[Class variables:] |
11397 | 85 |
CompressSnapshotInfo if true (the default), snapshot entries |
86 |
are also compressed in the compress function. |
|
87 |
Some users prefer them to be not compressed. |
|
88 |
Set it to false for this. |
|
58 | 89 |
|
51 | 90 |
Notice: |
11397 | 91 |
this needs a total rewrite, to build up a changeSet from the file |
92 |
(which did not exist when the ChangesBrowser was originally written) |
|
93 |
and manipulate that changeSet. |
|
94 |
||
95 |
This way, we get a browser for any upcoming incore changeSets for |
|
96 |
free. Also, this will put the chunk analysation code into Change and |
|
97 |
subclasses (where it belongs) and give a better encapsulation and |
|
98 |
overall structure. Do not take this as an example for good style ;-) |
|
99 |
||
100 |
The Change hierarchy is currently been completed, and the changes browser |
|
17047 | 101 |
should be adapted soon. |
508 | 102 |
|
103 |
[author:] |
|
11397 | 104 |
Claus Gittinger |
508 | 105 |
|
106 |
[start with:] |
|
11397 | 107 |
ChangesBrowser open |
1359 | 108 |
|
109 |
[see also:] |
|
11397 | 110 |
( Using the ChangesBrowser :html: tools/cbrowser/TOP.html ) |
6288 | 111 |
|
29 | 112 |
" |
113 |
! ! |
|
0 | 114 |
|
761 | 115 |
!ChangesBrowser class methodsFor:'instance creation'! |
45 | 116 |
|
8379 | 117 |
openOn:aFilename |
9525 | 118 |
"create & open a changes browser on a change file" |
5696 | 119 |
|
8379 | 120 |
|fileName browser| |
121 |
||
122 |
fileName := aFilename asFilename pathName. |
|
123 |
||
124 |
(self isXMLFile:fileName) ifTrue:[ |
|
125 |
browser := ChangeSetBrowser new |
|
5696 | 126 |
] ifFalse:[ |
8379 | 127 |
browser := self new |
128 |
]. |
|
129 |
||
130 |
browser label:(self defaultLabel , ': ', fileName). |
|
131 |
browser changeFileName:fileName. |
|
5696 | 132 |
browser open. |
133 |
^ browser |
|
9525 | 134 |
|
135 |
"Modified: / 18-07-2010 / 10:32:18 / cg" |
|
45 | 136 |
! ! |
137 |
||
761 | 138 |
!ChangesBrowser class methodsFor:'behavior'! |
0 | 139 |
|
140 |
autoSelectNext |
|
141 |
"returning true here, makes a Delete operation automatically |
|
142 |
select the next change" |
|
143 |
||
144 |
^ true |
|
145 |
! ! |
|
146 |
||
761 | 147 |
!ChangesBrowser class methodsFor:'defaults'! |
0 | 148 |
|
489 | 149 |
defaultIcon |
1153 | 150 |
"return the browsers default window icon" |
151 |
||
7631
258e8ad34edf
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7625
diff
changeset
|
152 |
<resource: #programImage> |
258e8ad34edf
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7625
diff
changeset
|
153 |
|
258e8ad34edf
defaultIcon no longer uses a class variable
Stefan Vogel <sv@exept.de>
parents:
7625
diff
changeset
|
154 |
^ ToolbarIconLibrary startChangesBrowserIcon |
489 | 155 |
! |
156 |
||
73 | 157 |
defaultLabel |
5527 | 158 |
^ self classResources string:'Changes Browser' |
2417 | 159 |
! |
160 |
||
161 |
isVisualStartable |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
162 |
"return true, if this application can be started via #open. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
163 |
(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
|
164 |
|
2417 | 165 |
^ true |
166 |
||
167 |
"Created: / 27.9.1999 / 12:28:27 / cg" |
|
28 | 168 |
! ! |
169 |
||
16022 | 170 |
!ChangesBrowser class methodsFor:'help specs'! |
3202 | 171 |
|
10681 | 172 |
flyByHelpSpec |
16022 | 173 |
<resource: #help> |
174 |
||
175 |
^ Dictionary new |
|
176 |
addPairsFrom:#( |
|
177 |
||
178 |
#applyChange |
|
179 |
'Apply (install) the selected change' |
|
180 |
||
181 |
deleteAllForClass |
|
182 |
'Delete all changes for the selected change''s class' |
|
183 |
||
184 |
deleteForClassFromBegin |
|
185 |
'Delete all previous changes for the selected change''s class' |
|
186 |
||
187 |
deleteForClassToEnd |
|
188 |
'Delete this and all following changes for the selected change''s class' |
|
189 |
) |
|
190 |
! ! |
|
191 |
||
192 |
!ChangesBrowser class methodsFor:'menu specs'! |
|
10681 | 193 |
|
3202 | 194 |
menuSpec |
195 |
"This resource specification was automatically generated |
|
196 |
by the MenuEditor of ST/X." |
|
197 |
||
198 |
"Do not manually edit this!! If it is corrupted, |
|
199 |
the MenuEditor may not be able to read the specification." |
|
200 |
||
10719 | 201 |
|
3202 | 202 |
" |
203 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpec |
|
204 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpec)) startUp |
|
205 |
" |
|
206 |
||
207 |
<resource: #menu> |
|
208 |
||
7360 | 209 |
^ |
6216 | 210 |
#(Menu |
7096 | 211 |
( |
212 |
(MenuItem |
|
213 |
label: 'File' |
|
17093 | 214 |
submenuChannel: menuSpecFile |
7096 | 215 |
) |
216 |
(MenuItem |
|
17096 | 217 |
label: 'CHANGE' |
17093 | 218 |
submenuChannel: menuSpecChange |
7096 | 219 |
) |
220 |
(MenuItem |
|
221 |
label: 'Search' |
|
17093 | 222 |
submenuChannel: menuSpecSearch |
7096 | 223 |
) |
224 |
(MenuItem |
|
225 |
label: 'Browse' |
|
17093 | 226 |
submenuChannel: menuSpecBrowse |
7096 | 227 |
) |
228 |
(MenuItem |
|
229 |
label: 'Settings' |
|
17093 | 230 |
submenuChannel: menuSpecSettings |
7096 | 231 |
) |
232 |
(MenuItem |
|
7463
e8e74bdbfbda
support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents:
7415
diff
changeset
|
233 |
label: 'MENU_Help' |
17093 | 234 |
submenuChannel: menuSpecHelp |
235 |
) |
|
236 |
) |
|
237 |
nil |
|
238 |
nil |
|
239 |
) |
|
17096 | 240 |
|
241 |
"Modified: / 21-11-2016 / 23:46:22 / cg" |
|
17093 | 242 |
! |
243 |
||
244 |
menuSpecBrowse |
|
245 |
"This resource specification was automatically generated |
|
246 |
by the MenuEditor of ST/X." |
|
247 |
||
248 |
"Do not manually edit this!! If it is corrupted, |
|
249 |
the MenuEditor may not be able to read the specification." |
|
250 |
||
251 |
||
252 |
" |
|
253 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecBrowse |
|
254 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecBrowse)) startUp |
|
255 |
" |
|
256 |
||
257 |
<resource: #menu> |
|
258 |
||
259 |
^ |
|
260 |
#(Menu |
|
261 |
( |
|
262 |
(MenuItem |
|
263 |
enabled: hasSingleSelection |
|
264 |
label: 'Class' |
|
265 |
itemValue: doBrowse |
|
266 |
) |
|
267 |
(MenuItem |
|
268 |
label: '-' |
|
269 |
) |
|
270 |
(MenuItem |
|
271 |
label: 'Senders...' |
|
272 |
itemValue: doBrowseSenders |
|
273 |
) |
|
274 |
(MenuItem |
|
275 |
label: 'Implementors...' |
|
276 |
itemValue: doBrowseImplementors |
|
277 |
) |
|
278 |
) |
|
279 |
nil |
|
280 |
nil |
|
281 |
) |
|
282 |
! |
|
283 |
||
284 |
menuSpecChange |
|
285 |
"This resource specification was automatically generated |
|
286 |
by the MenuEditor of ST/X." |
|
287 |
||
288 |
"Do not manually edit this!! If it is corrupted, |
|
289 |
the MenuEditor may not be able to read the specification." |
|
290 |
||
291 |
||
292 |
" |
|
293 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecChange |
|
294 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecChange)) startUp |
|
295 |
" |
|
296 |
||
297 |
<resource: #menu> |
|
298 |
||
299 |
^ |
|
300 |
#(Menu |
|
301 |
( |
|
302 |
(MenuItem |
|
303 |
enabled: hasSelection |
|
304 |
label: 'Apply' |
|
305 |
itemValue: doApply |
|
306 |
) |
|
307 |
(MenuItem |
|
308 |
enabled: hasSingleSelection |
|
309 |
label: 'Apply to End' |
|
310 |
itemValue: doApplyRest |
|
311 |
) |
|
312 |
(MenuItem |
|
313 |
enabled: hasSingleSelection |
|
314 |
label: 'Apply from Begin' |
|
315 |
itemValue: doApplyFromBeginning |
|
316 |
) |
|
317 |
(MenuItem |
|
318 |
enabled: hasSingleSelection |
|
319 |
label: 'Apply for Class to End' |
|
320 |
itemValue: doApplyClassRest |
|
321 |
) |
|
322 |
(MenuItem |
|
323 |
enabled: hasSingleSelection |
|
324 |
label: 'Apply for Class from Begin' |
|
325 |
itemValue: doApplyClassFromBeginning |
|
326 |
) |
|
327 |
(MenuItem |
|
328 |
enabled: hasNoSelection |
|
329 |
label: 'Apply All' |
|
330 |
itemValue: doApplyAll |
|
331 |
) |
|
332 |
(MenuItem |
|
333 |
enabled: hasSingleSelection |
|
334 |
label: 'Apply to Conflict or End' |
|
335 |
itemValue: doApplyToConflictOrEnd |
|
336 |
) |
|
337 |
(MenuItem |
|
338 |
label: '-' |
|
339 |
) |
|
340 |
(MenuItem |
|
341 |
enabled: hasSelection |
|
342 |
label: 'Delete' |
|
343 |
itemValue: doDelete |
|
344 |
) |
|
345 |
(MenuItem |
|
346 |
enabled: hasSingleSelection |
|
347 |
label: 'Delete to End' |
|
348 |
itemValue: doDeleteRest |
|
349 |
) |
|
350 |
(MenuItem |
|
351 |
enabled: hasSingleSelection |
|
352 |
label: 'Delete from Begin' |
|
353 |
itemValue: doDeleteFromBeginning |
|
354 |
) |
|
355 |
(MenuItem |
|
356 |
enabled: hasSingleSelection |
|
357 |
label: 'Delete for Class to End' |
|
358 |
itemValue: doDeleteClassRest |
|
359 |
) |
|
360 |
(MenuItem |
|
361 |
enabled: hasSingleSelection |
|
362 |
label: 'Delete for Class from Begin' |
|
363 |
itemValue: doDeleteClassFromBeginning |
|
364 |
) |
|
365 |
(MenuItem |
|
366 |
enabled: hasSelection |
|
367 |
label: 'Delete all for Class' |
|
368 |
itemValue: doDeleteClassAll |
|
369 |
isVisible: hasNoMultiSelection |
|
370 |
) |
|
371 |
(MenuItem |
|
372 |
enabled: hasSelection |
|
373 |
label: 'Delete all for Class && its Private Classes' |
|
374 |
itemValue: doDeleteClassAndPrivateClassesAll |
|
375 |
isVisible: hasNoMultiSelection |
|
376 |
) |
|
377 |
(MenuItem |
|
378 |
enabled: hasSelection |
|
379 |
label: 'Delete all for Namespace' |
|
380 |
itemValue: doDeleteAllForNamespace |
|
381 |
) |
|
382 |
(MenuItem |
|
383 |
enabled: hasSelection |
|
384 |
label: 'Delete all for Classes' |
|
385 |
itemValue: doDeleteClassAll |
|
386 |
isVisible: hasMultiSelection |
|
387 |
) |
|
388 |
(MenuItem |
|
389 |
enabled: hasSelection |
|
390 |
label: 'Delete all for Classes && their Private Classes' |
|
391 |
itemValue: doDeleteClassAndPrivateClassesAll |
|
392 |
isVisible: hasMultiSelection |
|
393 |
) |
|
394 |
(MenuItem |
|
395 |
label: '-' |
|
396 |
) |
|
397 |
(MenuItem |
|
398 |
enabled: hasSelection |
|
399 |
label: 'Delete older Versions of Selected Method' |
|
400 |
itemValue: doDeleteClassSelectorOlder |
|
401 |
isVisible: hasNoMultiSelectionHolder |
|
402 |
) |
|
403 |
(MenuItem |
|
404 |
enabled: hasSelection |
|
405 |
label: 'Delete older Versions of all Selected Methods' |
|
406 |
itemValue: doDeleteClassSelectorOlder |
|
407 |
isVisible: hasMultiSelectionHolder |
|
408 |
) |
|
409 |
(MenuItem |
|
410 |
enabled: hasSelection |
|
411 |
label: 'Delete all Versions of Selected Method' |
|
412 |
itemValue: doDeleteClassSelectorAll |
|
413 |
isVisible: hasNoMultiSelectionHolder |
|
414 |
) |
|
415 |
(MenuItem |
|
416 |
enabled: hasSelection |
|
417 |
label: 'Delete all Versions of all Selected Methods' |
|
418 |
itemValue: doDeleteClassSelectorAll |
|
419 |
isVisible: hasMultiSelectionHolder |
|
420 |
) |
|
421 |
(MenuItem |
|
422 |
label: '-' |
|
423 |
) |
|
424 |
(MenuItem |
|
425 |
enabled: hasSingleSelection |
|
426 |
label: 'Compare with Current' |
|
427 |
itemValue: doCompare |
|
428 |
) |
|
429 |
(MenuItem |
|
17096 | 430 |
enabled: hasSingleSelection |
431 |
label: 'Copy to Clipboard' |
|
432 |
itemValue: doCopyToClipboard |
|
433 |
) |
|
434 |
(MenuItem |
|
17093 | 435 |
label: '-' |
436 |
) |
|
437 |
(MenuItem |
|
438 |
enabled: hasSelection |
|
439 |
label: 'Make Change a Patch' |
|
440 |
itemValue: doMakePatch |
|
441 |
) |
|
442 |
) |
|
443 |
nil |
|
444 |
nil |
|
445 |
) |
|
17096 | 446 |
|
447 |
"Modified: / 21-11-2016 / 23:46:42 / cg" |
|
17093 | 448 |
! |
449 |
||
450 |
menuSpecFile |
|
451 |
"This resource specification was automatically generated |
|
452 |
by the MenuEditor of ST/X." |
|
453 |
||
454 |
"Do not manually edit this!! If it is corrupted, |
|
455 |
the MenuEditor may not be able to read the specification." |
|
456 |
||
457 |
||
458 |
" |
|
459 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecFile |
|
460 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecFile)) startUp |
|
461 |
" |
|
462 |
||
463 |
<resource: #menu> |
|
464 |
||
465 |
^ |
|
466 |
#(Menu |
|
467 |
( |
|
468 |
(MenuItem |
|
469 |
label: 'Compress' |
|
470 |
itemValue: doCompress |
|
471 |
isVisible: notEditingClassSource |
|
472 |
) |
|
473 |
(MenuItem |
|
474 |
enabled: hasSingleSelection |
|
475 |
label: 'Compress for Class' |
|
476 |
itemValue: doCompressClass |
|
477 |
isVisible: notEditingClassSource |
|
478 |
) |
|
479 |
(MenuItem |
|
480 |
enabled: hasSingleSelection |
|
481 |
label: 'Compress for Class && Selector' |
|
482 |
itemValue: doCompressSelector |
|
483 |
isVisible: notEditingClassSource |
|
484 |
) |
|
485 |
(MenuItem |
|
486 |
label: 'Compare and Compress' |
|
487 |
itemValue: doCompareAndCompress |
|
488 |
isVisible: notEditingClassSource |
|
489 |
) |
|
490 |
(MenuItem |
|
491 |
label: '-' |
|
492 |
isVisible: notEditingClassSource |
|
493 |
) |
|
494 |
(MenuItem |
|
495 |
enabled: hasSingleSelection |
|
496 |
label: 'Fileout && Delete all Changes for Class' |
|
497 |
itemValue: doFileoutAndDeleteClassAll |
|
498 |
isVisible: notEditingClassSource |
|
499 |
) |
|
500 |
(MenuItem |
|
501 |
enabled: hasSelection |
|
502 |
label: 'CheckIn && Delete all Changes for Class' |
|
503 |
itemValue: doCheckinAndDeleteClassAll |
|
504 |
isVisible: notEditingClassSource |
|
505 |
) |
|
506 |
(MenuItem |
|
507 |
label: '-' |
|
508 |
isVisible: notEditingClassSource |
|
509 |
) |
|
510 |
(MenuItem |
|
511 |
enabled: hasSelection |
|
512 |
label: 'Save In...' |
|
513 |
itemValue: doSave |
|
514 |
) |
|
515 |
(MenuItem |
|
516 |
enabled: hasSingleSelection |
|
517 |
label: 'Save to End In...' |
|
518 |
itemValue: doSaveRest |
|
519 |
) |
|
520 |
(MenuItem |
|
521 |
enabled: hasSingleSelection |
|
522 |
label: 'Save for Class to End In...' |
|
523 |
itemValue: doSaveClassRest |
|
524 |
) |
|
525 |
(MenuItem |
|
526 |
enabled: hasSingleSelection |
|
527 |
label: 'Save all for Class In...' |
|
528 |
itemValue: doSaveClassAll |
|
529 |
) |
|
530 |
(MenuItem |
|
531 |
label: '-' |
|
532 |
) |
|
533 |
(MenuItem |
|
534 |
label: 'Writeback ClassFile' |
|
535 |
itemValue: doWriteBack |
|
536 |
isVisible: editingClassSource |
|
537 |
) |
|
538 |
(MenuItem |
|
539 |
label: 'Writeback ChangeFile' |
|
540 |
itemValue: doWriteBack |
|
541 |
isVisible: notEditingClassSource |
|
542 |
) |
|
543 |
(MenuItem |
|
544 |
label: '-' |
|
545 |
) |
|
546 |
(MenuItem |
|
547 |
label: 'Update' |
|
548 |
itemValue: doUpdate |
|
549 |
) |
|
550 |
(MenuItem |
|
551 |
label: '-' |
|
552 |
) |
|
553 |
(MenuItem |
|
554 |
label: 'Exit' |
|
555 |
itemValue: menuExit |
|
556 |
) |
|
557 |
) |
|
558 |
nil |
|
559 |
nil |
|
560 |
) |
|
561 |
! |
|
562 |
||
563 |
menuSpecHelp |
|
564 |
"This resource specification was automatically generated |
|
565 |
by the MenuEditor of ST/X." |
|
566 |
||
567 |
"Do not manually edit this!! If it is corrupted, |
|
568 |
the MenuEditor may not be able to read the specification." |
|
569 |
||
570 |
||
571 |
" |
|
572 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecHelp |
|
573 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecHelp)) startUp |
|
574 |
" |
|
575 |
||
576 |
<resource: #menu> |
|
577 |
||
578 |
^ |
|
579 |
#(Menu |
|
580 |
( |
|
581 |
(MenuItem |
|
582 |
label: 'ChangesBrowser Documentation' |
|
583 |
itemValue: openHTMLDocument: |
|
584 |
argument: 'tools/cbrowser/TOP.html' |
|
585 |
) |
|
586 |
(MenuItem |
|
587 |
label: '-' |
|
588 |
) |
|
589 |
(MenuItem |
|
590 |
label: 'About ChangesBrowser...' |
|
591 |
itemValue: openAboutThisApplication |
|
592 |
) |
|
593 |
) |
|
594 |
nil |
|
595 |
nil |
|
596 |
) |
|
597 |
! |
|
598 |
||
599 |
menuSpecSearch |
|
600 |
"This resource specification was automatically generated |
|
601 |
by the MenuEditor of ST/X." |
|
602 |
||
603 |
"Do not manually edit this!! If it is corrupted, |
|
604 |
the MenuEditor may not be able to read the specification." |
|
605 |
||
606 |
||
607 |
" |
|
608 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecSearch |
|
609 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecSearch)) startUp |
|
610 |
" |
|
611 |
||
612 |
<resource: #menu> |
|
613 |
||
614 |
^ |
|
615 |
#(Menu |
|
616 |
( |
|
617 |
(MenuItem |
|
618 |
label: 'Class...' |
|
619 |
itemValue: findClass |
|
620 |
) |
|
621 |
(MenuItem |
|
622 |
enabled: hasSelection |
|
623 |
label: 'First for Class' |
|
624 |
itemValue: findFirstForClass |
|
625 |
) |
|
626 |
(MenuItem |
|
627 |
enabled: hasSelection |
|
628 |
label: 'Previous for Class' |
|
629 |
itemValue: findPreviousForClass |
|
630 |
) |
|
631 |
(MenuItem |
|
632 |
enabled: hasSelection |
|
633 |
label: 'Next for Class' |
|
634 |
itemValue: findNextForClass |
|
635 |
) |
|
636 |
(MenuItem |
|
637 |
enabled: hasSelection |
|
638 |
label: 'Last for Class' |
|
639 |
itemValue: findLastForClass |
|
640 |
) |
|
641 |
(MenuItem |
|
642 |
label: '-' |
|
643 |
) |
|
644 |
(MenuItem |
|
645 |
label: 'Selector...' |
|
646 |
itemValue: findSelector |
|
647 |
) |
|
648 |
(MenuItem |
|
649 |
enabled: hasSelection |
|
650 |
label: 'Previous for Selector' |
|
651 |
itemValue: findPreviousForSelector |
|
652 |
) |
|
653 |
(MenuItem |
|
654 |
enabled: hasSelection |
|
655 |
label: 'Next for Selector' |
|
656 |
itemValue: findNextForSelector |
|
657 |
) |
|
658 |
(MenuItem |
|
659 |
label: '-' |
|
660 |
) |
|
661 |
(MenuItem |
|
662 |
label: 'String...' |
|
663 |
itemValue: findString |
|
664 |
) |
|
665 |
(MenuItem |
|
666 |
enabled: hasSelection |
|
667 |
label: 'Previous with String' |
|
668 |
itemValue: findPreviousForString |
|
669 |
) |
|
670 |
(MenuItem |
|
671 |
enabled: hasSelection |
|
672 |
label: 'Next with String' |
|
673 |
itemValue: findNextForString |
|
674 |
) |
|
675 |
(MenuItem |
|
676 |
label: '-' |
|
677 |
) |
|
678 |
(MenuItem |
|
679 |
enabled: hasSelection |
|
680 |
label: 'Previous Difference' |
|
681 |
itemValue: findPreviousDifference |
|
682 |
) |
|
683 |
(MenuItem |
|
684 |
enabled: hasSelection |
|
685 |
label: 'Next Difference' |
|
686 |
itemValue: findNextDifference |
|
687 |
) |
|
688 |
(MenuItem |
|
689 |
label: '-' |
|
690 |
) |
|
691 |
(MenuItem |
|
692 |
enabled: hasSelection |
|
693 |
label: 'Previous Snapshot' |
|
694 |
itemValue: findPreviousSnapshot |
|
695 |
) |
|
696 |
(MenuItem |
|
697 |
enabled: hasSelection |
|
698 |
label: 'Next Snapshot' |
|
699 |
itemValue: findNextSnapshot |
|
700 |
) |
|
701 |
(MenuItem |
|
702 |
label: 'Last Snapshot' |
|
703 |
itemValue: findLastSnapshot |
|
704 |
) |
|
705 |
) |
|
706 |
nil |
|
707 |
nil |
|
708 |
) |
|
709 |
! |
|
710 |
||
711 |
menuSpecSettings |
|
712 |
"This resource specification was automatically generated |
|
713 |
by the MenuEditor of ST/X." |
|
714 |
||
715 |
"Do not manually edit this!! If it is corrupted, |
|
716 |
the MenuEditor may not be able to read the specification." |
|
717 |
||
718 |
||
719 |
" |
|
720 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpecSettings |
|
721 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpecSettings)) startUp |
|
722 |
" |
|
723 |
||
724 |
<resource: #menu> |
|
725 |
||
726 |
^ |
|
727 |
#(Menu |
|
728 |
( |
|
729 |
(MenuItem |
|
730 |
label: 'Auto Compare' |
|
731 |
indication: autoCompare |
|
732 |
) |
|
733 |
(MenuItem |
|
734 |
label: 'Autoload As Required' |
|
735 |
indication: autoloadAsRequired |
|
736 |
) |
|
737 |
(MenuItem |
|
738 |
label: 'Show Diffs' |
|
739 |
indication: showingDiffs |
|
740 |
) |
|
741 |
(MenuItem |
|
742 |
label: 'Auto Update' |
|
743 |
indication: autoUpdate |
|
744 |
) |
|
745 |
(MenuItem |
|
746 |
label: '-' |
|
747 |
) |
|
748 |
(MenuItem |
|
749 |
label: 'Add to ChangeSet when Applying' |
|
750 |
indication: updateChangeSet |
|
751 |
) |
|
752 |
(MenuItem |
|
753 |
label: 'Ignore Public/Private in Categories (Dolphin code)' |
|
754 |
itemValue: ignorePublicPrivateCategories: |
|
755 |
isVisible: false |
|
756 |
indication: ignorePublicPrivateCategories |
|
757 |
) |
|
758 |
(MenuItem |
|
759 |
label: '-' |
|
760 |
) |
|
761 |
(MenuItem |
|
762 |
label: 'Apply into Package...' |
|
763 |
itemValue: setEnforcedPackage |
|
764 |
) |
|
765 |
(MenuItem |
|
766 |
label: 'Apply into NameSpace...' |
|
767 |
itemValue: setEnforcedNameSpace |
|
768 |
) |
|
769 |
(MenuItem |
|
770 |
label: '-' |
|
771 |
) |
|
772 |
(MenuItem |
|
773 |
label: 'Settings...' |
|
774 |
itemValue: openSettingsDialog |
|
7096 | 775 |
) |
776 |
) |
|
777 |
nil |
|
778 |
nil |
|
3202 | 779 |
) |
10681 | 780 |
! |
781 |
||
782 |
toolbarMenuSpec |
|
783 |
"This resource specification was automatically generated |
|
784 |
by the MenuEditor of ST/X." |
|
785 |
||
786 |
"Do not manually edit this!! If it is corrupted, |
|
787 |
the MenuEditor may not be able to read the specification." |
|
788 |
||
789 |
||
790 |
" |
|
791 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#toolbarMenuSpec |
|
792 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser toolbarMenuSpec)) startUp |
|
793 |
" |
|
794 |
||
795 |
<resource: #menu> |
|
796 |
||
797 |
^ |
|
798 |
#(Menu |
|
799 |
( |
|
800 |
(MenuItem |
|
801 |
activeHelpKey: applyChange |
|
802 |
enabled: hasSelectionHolder |
|
803 |
label: 'Apply' |
|
804 |
itemValue: doApply |
|
805 |
translateLabel: true |
|
806 |
isButton: true |
|
807 |
labelImage: (ResourceRetriever ToolbarIconLibrary executeMethod20x20Icon) |
|
808 |
) |
|
809 |
(MenuItem |
|
810 |
label: '-' |
|
811 |
) |
|
812 |
(MenuItem |
|
813 |
activeHelpKey: deleteAllForClass |
|
814 |
enabled: hasSelectionHolder |
|
15016 | 815 |
isVisible: canDeleteChanges |
10681 | 816 |
label: 'Delete all for Class' |
817 |
itemValue: doDeleteClassAll |
|
818 |
translateLabel: true |
|
819 |
isButton: true |
|
820 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteClass24x24Icon) |
|
821 |
) |
|
13991 | 822 |
(MenuItem |
16022 | 823 |
activeHelpKey: deleteForClassFromBegin |
824 |
enabled: hasSelectionHolder |
|
825 |
isVisible: canDeleteChanges |
|
826 |
label: 'Delete for Class from Beginning' |
|
827 |
itemValue: doDeleteClassFromBeginning |
|
828 |
translateLabel: true |
|
829 |
isButton: true |
|
830 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteClassFromStart24x24Icon) |
|
831 |
) |
|
832 |
(MenuItem |
|
13991 | 833 |
activeHelpKey: deleteForClassToEnd |
834 |
enabled: hasSelectionHolder |
|
15016 | 835 |
isVisible: canDeleteChanges |
13991 | 836 |
label: 'Delete for Class to End' |
837 |
itemValue: doDeleteClassRest |
|
838 |
translateLabel: true |
|
839 |
isButton: true |
|
840 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteClassToEnd24x24Icon) |
|
841 |
) |
|
10681 | 842 |
) |
843 |
nil |
|
844 |
nil |
|
845 |
) |
|
3202 | 846 |
! ! |
847 |
||
3674 | 848 |
!ChangesBrowser class methodsFor:'private-changeFile access'! |
849 |
||
850 |
readXMLChangesFrom:aStream inBackground:inBackground |
|
851 |
"read an XML source file (format as in campSmalltalk DTD)" |
|
852 |
||
853 |
|changeSet| |
|
854 |
||
855 |
(XML isNil or:[XML::SourceNodeBuilder isNil or:[XML::XMLParser isNil]]) ifTrue:[ |
|
6288 | 856 |
Smalltalk loadPackage:'stx:goodies/xml/vw'. |
857 |
(XML isNil or:[XML::SourceNodeBuilder isNil or:[XML::XMLParser isNil]]) ifTrue:[ |
|
858 |
self error:'Could not load XML package(s) from ''stx:goodies/xml/vw'''. |
|
859 |
] |
|
3674 | 860 |
]. |
861 |
||
862 |
changeSet := ChangeSet new. |
|
6288 | 863 |
XML::SourceScannerNodeBuilder new |
864 |
scanFile:aStream |
|
865 |
do:[:eachChange | |
|
866 |
changeSet addChange:eachChange. |
|
867 |
]. |
|
3674 | 868 |
^ changeSet |
869 |
||
870 |
"/ builder := XML::SourceScannerNodeBuilder new. |
|
871 |
"/ parser := XML::XMLParser on:aStream. |
|
872 |
"/ parser builder:builder. |
|
873 |
"/ parser validate:false. |
|
874 |
"/ parser scanDocument. |
|
875 |
! |
|
876 |
||
877 |
readXMLChangesFromFile:changeFileName inBackground:inBackground |
|
14011 | 878 |
|set| |
879 |
||
880 |
changeFileName asFilename readingFileDo:[:s| |
|
881 |
set := self readXMLChangesFrom:s inBackground:false. |
|
882 |
]. |
|
3674 | 883 |
^ set. |
884 |
! ! |
|
885 |
||
886 |
!ChangesBrowser class methodsFor:'utilities'! |
|
887 |
||
888 |
isXMLFile:aFilename |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
889 |
|stream first| |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
890 |
|
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
891 |
stream := aFilename asFilename readStreamOrNil. |
3674 | 892 |
stream isNil ifTrue:[^ false]. |
893 |
||
894 |
stream skipSeparators. |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
895 |
first := stream peek. |
3674 | 896 |
stream close. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
897 |
^ first == $< |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
898 |
! |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
899 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
900 |
methodDefinitionSelectors |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
901 |
^ #( |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
902 |
#'methodsFor:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
903 |
#'privateMethodsFor:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
904 |
#'publicMethodsFor:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
905 |
#'ignoredMethodsFor:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
906 |
#'protectedMethodsFor:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
907 |
#'methodsFor:stamp:' "/ Squeak support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
908 |
#'commentStamp:prior:' "/ Squeak support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
909 |
#methodsFor "/ Dolphin support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
910 |
#categoriesForClass "/ Dolphin support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
911 |
#'categoriesFor:' "/ Dolphin support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
912 |
#methods "/ STV support |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
913 |
#publicMethods "/ STV / V'Age support |
6532 | 914 |
#privateMethods "/ STV / V'Age support |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
915 |
#'methodsForUndefined:' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
916 |
) |
3674 | 917 |
! ! |
918 |
||
3202 | 919 |
!ChangesBrowser methodsFor:'aspects'! |
920 |
||
921 |
applyInOriginalNameSpace |
|
922 |
^ applyInOriginalNameSpace |
|
923 |
! |
|
924 |
||
3472 | 925 |
applyNotInOriginalNameSpace |
6288 | 926 |
^ BlockValue forLogicalNot:self applyInOriginalNameSpace |
3472 | 927 |
! |
928 |
||
3202 | 929 |
autoCompare |
930 |
^ autoCompare |
|
931 |
! |
|
932 |
||
933 |
autoUpdate |
|
934 |
"enabled/disable automatic update from the change-file (for monitoring)" |
|
935 |
||
936 |
^ autoUpdate |
|
937 |
||
938 |
"Created: 3.12.1995 / 14:14:24 / cg" |
|
939 |
"Modified: 3.12.1995 / 14:20:45 / cg" |
|
940 |
! |
|
941 |
||
6216 | 942 |
autoloadAsRequired |
943 |
^ autoloadAsRequired |
|
944 |
! |
|
945 |
||
15016 | 946 |
canDeleteChanges |
947 |
"makes the delete buttons in the toolbar visible" |
|
948 |
||
949 |
^ true. |
|
950 |
! |
|
951 |
||
11048 | 952 |
changeListSelectionHolder |
953 |
changeListSelectionHolder isNil ifTrue:[ |
|
954 |
changeListSelectionHolder := nil asValue. |
|
955 |
]. |
|
956 |
^ changeListSelectionHolder |
|
957 |
||
958 |
"Created: / 03-01-2012 / 15:19:25 / cg" |
|
959 |
! |
|
960 |
||
3202 | 961 |
editingClassSource |
3203 | 962 |
^ editingClassSource ? false |
3202 | 963 |
! |
964 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
965 |
hasMultiSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
966 |
^ self hasSelection and:[self hasSingleSelection not] |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
967 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
968 |
|
11028 | 969 |
hasMultiSelectionHolder |
970 |
^ [ self hasMultiSelection ] |
|
971 |
||
972 |
"Created: / 25-12-2011 / 11:21:52 / cg" |
|
973 |
! |
|
974 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
975 |
hasNoMultiSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
976 |
^ self hasMultiSelection not |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
977 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
978 |
|
11028 | 979 |
hasNoMultiSelectionHolder |
980 |
^ [ self hasNoMultiSelection ] |
|
981 |
||
982 |
"Created: / 25-12-2011 / 11:21:20 / cg" |
|
983 |
! |
|
984 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
985 |
hasNoSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
986 |
^ self hasSelection not |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
987 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
988 |
|
3202 | 989 |
hasSelection |
6288 | 990 |
^ changeListView hasSelection |
3202 | 991 |
! |
992 |
||
11048 | 993 |
hasSelectionHolder |
994 |
^ BlockValue |
|
995 |
with:[:v | v notEmptyOrNil ] |
|
996 |
argument:(self changeListSelectionHolder) |
|
997 |
||
998 |
"Created: / 03-01-2012 / 15:15:47 / cg" |
|
999 |
! |
|
1000 |
||
3211 | 1001 |
hasSingleSelection |
1002 |
changeListView multipleSelectOk ifTrue:[ |
|
6288 | 1003 |
^ changeListView selection size == 1 |
3211 | 1004 |
]. |
1005 |
^ changeListView hasSelection |
|
1006 |
! |
|
1007 |
||
10719 | 1008 |
ignorePublicPrivateCategories |
1009 |
^ ignorePublicPrivateCategories |
|
1010 |
||
1011 |
"Created: / 23-09-2011 / 19:42:46 / cg" |
|
1012 |
! |
|
1013 |
||
3202 | 1014 |
notEditingClassSource |
1015 |
^ self editingClassSource not |
|
3211 | 1016 |
! |
1017 |
||
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1018 |
notEditingClassSourceAndNotReadOnly |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1019 |
^ (self editingClassSource or:[readOnly == true]) not |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1020 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1021 |
|
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1022 |
notReadOnly |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1023 |
^ (readOnly ~~ true) |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1024 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1025 |
|
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1026 |
readOnly:aBoolean |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1027 |
readOnly := aBoolean |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1028 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1029 |
|
4487 | 1030 |
showingDiffs |
1031 |
showingDiffs isNil ifTrue:[ |
|
6288 | 1032 |
showingDiffs := self showingDiffsDefault asValue. |
1033 |
showingDiffs |
|
1034 |
onChangeEvaluate:[ |
|
1035 |
showingDiffs value ifTrue:[ |
|
1036 |
self updateDiffView. |
|
1037 |
self makeDiffViewVisible |
|
1038 |
] ifFalse:[ |
|
1039 |
self makeDiffViewInvisible |
|
1040 |
]. |
|
1041 |
DefaultShowingDiffs := showingDiffs value. |
|
1042 |
] |
|
4487 | 1043 |
]. |
1044 |
^ showingDiffs |
|
1045 |
! |
|
1046 |
||
4943 | 1047 |
showingDiffsDefault |
1048 |
^ (DefaultShowingDiffs ? true) |
|
1049 |
! |
|
1050 |
||
3211 | 1051 |
theSingleSelection |
1052 |
|sel| |
|
1053 |
||
1054 |
sel := changeListView selection. |
|
1055 |
changeListView multipleSelectOk ifTrue:[ |
|
6288 | 1056 |
sel size == 1 ifTrue:[ |
1057 |
^ sel first |
|
1058 |
]. |
|
1059 |
^ nil |
|
3211 | 1060 |
]. |
1061 |
^ sel. |
|
3319 | 1062 |
! |
1063 |
||
1064 |
updateChangeSet |
|
1065 |
^ updateChangeSet |
|
3202 | 1066 |
! ! |
1067 |
||
202 | 1068 |
!ChangesBrowser methodsFor:'compiler interface'! |
1069 |
||
1070 |
wantChangeLog |
|
1071 |
"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
|
1072 |
be written when compiling. Return false here." |
202 | 1073 |
|
1074 |
^ false |
|
1075 |
! ! |
|
1076 |
||
4869 | 1077 |
!ChangesBrowser methodsFor:'compiler interface-error handling'! |
202 | 1078 |
|
1079 |
correctableError:aString position:relPos to:relEndPos from:aCompiler |
|
12656 | 1080 |
"compiler notifies us of an error - this should really not happen since |
202 | 1081 |
changes ought to be correct (did someone edit the changes file ??). |
1082 |
Show the bad change in the codeView and let codeView hilight the error; |
|
1083 |
no corrections allowed here therefore return false" |
|
1084 |
||
2293 | 1085 |
ShowWarningDialogs == true ifTrue:[ |
12656 | 1086 |
self error:aString position:relPos to:relEndPos from:aCompiler. |
2293 | 1087 |
] ifFalse:[ |
12656 | 1088 |
Transcript showCR:aString. |
2293 | 1089 |
]. |
202 | 1090 |
^ false |
1091 |
! |
|
1092 |
||
2555 | 1093 |
correctableSelectorWarning:aString position:relPos to:relEndPos from:aCompiler |
12656 | 1094 |
"compiler notifies us of a warning" |
2555 | 1095 |
|
1096 |
^ false |
|
1097 |
||
1098 |
"Modified: / 19.1.2000 / 16:25:31 / cg" |
|
1099 |
"Created: / 19.1.2000 / 16:27:23 / cg" |
|
1100 |
! |
|
1101 |
||
9621
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1102 |
correctableWarning:aString position:relPos to:relEndPos from:aCompiler |
12656 | 1103 |
"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
|
1104 |
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
|
1105 |
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
|
1106 |
no corrections allowed here therefore return false" |
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1107 |
|
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1108 |
^ self correctableError:aString position:relPos to:relEndPos from:aCompiler |
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1109 |
|
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1110 |
"Created: / 02-11-2010 / 13:29:52 / cg" |
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1111 |
! |
2353a178d5c7
added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents:
9604
diff
changeset
|
1112 |
|
202 | 1113 |
error:aString position:relPos to:relEndPos from:aCompiler |
12656 | 1114 |
"compiler notifies us of an error - this should really not happen since |
202 | 1115 |
changes ought to be correct (did someone edit the changes file ??). |
1116 |
Show the bad change in the codeView and let codeView hilight the error" |
|
1117 |
||
1118 |
|action| |
|
1119 |
||
1120 |
(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
|
1121 |
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
|
1122 |
]. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1123 |
|
12973 | 1124 |
"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
|
1125 |
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
|
1126 |
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
|
1127 |
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
|
1128 |
|box| |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1129 |
|
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1130 |
" |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1131 |
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
|
1132 |
" |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1133 |
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
|
1134 |
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
|
1135 |
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
|
1136 |
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
|
1137 |
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
|
1138 |
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
|
1139 |
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
|
1140 |
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
|
1141 |
]. |
2293 | 1142 |
|
1143 |
"/ action == #shutUp ifTrue:[ |
|
1144 |
"/ aCompiler ignoreWarnings. |
|
6288 | 1145 |
"/ ^ false |
2293 | 1146 |
"/ ]. |
1147 |
||
7783
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1148 |
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
|
1149 |
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
|
1150 |
^ false |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1151 |
]. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1152 |
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
|
1153 |
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
|
1154 |
^ false |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1155 |
]. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
1156 |
^ false |
202 | 1157 |
]. |
1158 |
^ codeView error:aString position:relPos to:relEndPos from:aCompiler |
|
373 | 1159 |
|
3436
c4fe19deba58
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3406
diff
changeset
|
1160 |
"Modified: / 16.11.2001 / 17:38:10 / cg" |
202 | 1161 |
! |
1162 |
||
3064 | 1163 |
unusedVariableWarning:aString position:relPos to:relEndPos from:aCompiler |
1164 |
"compiler notifies us of a (or some) unused variables; |
|
1165 |
hilight the error (relPos to relEndPos) and show a Box asking for continue/correct/abort; |
|
1166 |
this method should return true to the compiler if user wants the error |
|
1167 |
to be corrected; false otherwise" |
|
1168 |
||
1169 |
^ false |
|
1170 |
! |
|
1171 |
||
202 | 1172 |
warning:aString position:relPos to:relEndPos from:aCompiler |
12656 | 1173 |
"compiler notifies us of a warning - ignore it" |
202 | 1174 |
|
1175 |
^ self |
|
1176 |
! ! |
|
1177 |
||
2604 | 1178 |
!ChangesBrowser methodsFor:'event handling'! |
202 | 1179 |
|
1180 |
handlesKeyPress:key inView:view |
|
1181 |
"this method is reached via delegation: are we prepared to handle |
|
1182 |
a keyPress in some other view ?" |
|
1183 |
||
1127 | 1184 |
<resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)> |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1185 |
|
202 | 1186 |
view == changeListView ifTrue:[ |
6288 | 1187 |
(key == #Delete |
1188 |
or:[key == #BackSpace |
|
1189 |
or:[key == #Accept |
|
1190 |
or:[key == #Find |
|
1191 |
or:[key == #FindPrev |
|
1192 |
or:[key == #FindNext]]]]]) ifTrue:[^ true]. |
|
202 | 1193 |
]. |
1194 |
^ false |
|
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1195 |
|
1127 | 1196 |
"Modified: 8.4.1997 / 11:01:42 / cg" |
0 | 1197 |
! |
1198 |
||
202 | 1199 |
keyPress:key x:x y:y view:view |
1200 |
"this method is reached via delegation from the changeListView" |
|
1201 |
||
1127 | 1202 |
<resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)> |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1203 |
|
3249 | 1204 |
(key == #Delete) ifTrue:[ |
13078 | 1205 |
self sensor shiftDown ifTrue:[ |
1206 |
self doDeleteAndSelectPrevious. |
|
1207 |
] ifFalse:[ |
|
1208 |
self doDelete. |
|
1209 |
]. |
|
1210 |
^ self |
|
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1211 |
]. |
3249 | 1212 |
(key == #BackSpace) ifTrue:[ |
13078 | 1213 |
self doDelete. "/ doDeleteAndSelectPrevious. |
1214 |
^ self |
|
3249 | 1215 |
]. |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1216 |
(key == #Accept) ifTrue:[ |
13078 | 1217 |
self doApply. |
1218 |
^ self |
|
202 | 1219 |
]. |
1127 | 1220 |
(key == #Find) ifTrue:[ |
13078 | 1221 |
self findClass. |
1222 |
^ self |
|
1127 | 1223 |
]. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1224 |
(key == #FindPrev) ifTrue:[ |
13078 | 1225 |
self findPrevious. |
1226 |
^ self |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1227 |
]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1228 |
(key == #FindNext) ifTrue:[ |
13078 | 1229 |
self findNext. |
1230 |
^ self |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1231 |
]. |
202 | 1232 |
changeListView keyPress:key x:x y:y |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
1233 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1234 |
"Modified: / 18.6.1998 / 22:15:36 / cg" |
202 | 1235 |
! ! |
1236 |
||
3327 | 1237 |
!ChangesBrowser methodsFor:'help'! |
202 | 1238 |
|
16022 | 1239 |
flyByHelpSpec |
1240 |
^ self class flyByHelpSpec |
|
1241 |
! |
|
1242 |
||
394 | 1243 |
showActivity:someMessage |
502 | 1244 |
"some activityNotification to be forwarded to the user; |
1245 |
show it in the windows title area here." |
|
1246 |
||
11346 | 1247 |
someMessage isNil ifTrue:[ |
1248 |
self newLabel:'' |
|
11347 | 1249 |
] ifFalse:[ |
1250 |
self label:someMessage |
|
1251 |
]. |
|
394 | 1252 |
|
1253 |
"Created: 24.2.1996 / 19:35:42 / cg" |
|
502 | 1254 |
"Modified: 23.4.1996 / 21:39:36 / cg" |
202 | 1255 |
! ! |
1256 |
||
4868 | 1257 |
!ChangesBrowser methodsFor:'initialization & release'! |
202 | 1258 |
|
3202 | 1259 |
autoCompareChanged |
1260 |
"sent from the compare-toggle" |
|
1261 |
||
3534 | 1262 |
|doCompare| |
1263 |
||
13373 | 1264 |
self askIfChangesAreToBeWrittenBack. |
1265 |
||
3534 | 1266 |
doCompare := autoCompare value. |
1267 |
DefaultAutoCompare := doCompare. |
|
1268 |
self setupTabSpec. |
|
1269 |
doCompare ifTrue:[ |
|
13373 | 1270 |
self doUpdate |
3202 | 1271 |
] ifFalse:[ |
13373 | 1272 |
changeListView invalidate. "/ clear; redraw. |
3202 | 1273 |
] |
1274 |
! |
|
1275 |
||
202 | 1276 |
changeListMenu |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1277 |
"return the menu for the change (upper) list" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1278 |
|
586 | 1279 |
<resource: #keyboard ( #Accept #Delete ) > |
1359 | 1280 |
<resource: #programMenu > |
586 | 1281 |
|
3211 | 1282 |
|items m replNext replPrev sel| |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1283 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1284 |
self sensor ctrlDown ifTrue:[ |
7360 | 1285 |
"/ notice - findNext/prev shortKeys will search for the same thing again. |
1286 |
items := #( |
|
1287 |
('Search Class...' findClass #Find ) |
|
1288 |
('Previous for this Class' findPreviousForClass #FindPrevClass ) |
|
1289 |
('Next for this Class' findNextForClass #FindNextClass ) |
|
1290 |
('-' ) |
|
1291 |
('Search Selector...' findSelector ) |
|
1292 |
('Previous with this Selector' findPreviousForSelector #FindPrevSelector ) |
|
1293 |
('Next with this Selector' findNextForSelector #FindNextSelector ) |
|
1294 |
('-' ) |
|
1295 |
('Search String...' findString ) |
|
1296 |
('Previous with this String' findPreviousForString #FindPrevString ) |
|
1297 |
('Next with this String' findNextForString #FindNextString ) |
|
1298 |
('-' ) |
|
1299 |
('Previous Snapshot' findPreviousSnapshot #FindPrevSnapshot ) |
|
1300 |
('Next Snapshot' findNextSnapshot #FindNextSnapshot ) |
|
1301 |
). |
|
1302 |
||
1303 |
lastSearchType == #selector ifTrue:[ |
|
1304 |
replNext := #FindNextSelector. |
|
1305 |
replPrev := #FindPrevSelector. |
|
1306 |
] ifFalse:[ |
|
1307 |
lastSearchType == #snapshot ifTrue:[ |
|
1308 |
replNext := #FindNextSnapshot. |
|
1309 |
replPrev := #FindPrevSnapshot. |
|
1310 |
] ifFalse:[ |
|
1311 |
lastSearchType == #string ifTrue:[ |
|
1312 |
replNext := #FindNextString. |
|
1313 |
replPrev := #FindPrevString. |
|
1314 |
] ifFalse:[ |
|
1315 |
replNext := #FindNextClass. |
|
1316 |
replPrev := #FindPrevClass. |
|
1317 |
] |
|
1318 |
] |
|
1319 |
]. |
|
1320 |
items := items deepCopy. |
|
1321 |
items do:[:each | |
|
1322 |
each replaceAll:replNext with:#FindNext. |
|
1323 |
each replaceAll:replPrev with:#FindPrev. |
|
1324 |
each replaceAny:#(FindNextClass FindPrevClass |
|
1325 |
FindNextSelector FindPrevSelector |
|
1326 |
FindNextSnapshot FindPrevSnapshot |
|
1327 |
FindNextString FindPrevString) |
|
1328 |
with:nil. |
|
1329 |
]. |
|
1330 |
||
1331 |
^ PopUpMenu itemList:items resources:resources. |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1332 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1333 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1334 |
items := #( |
7360 | 1335 |
('Apply' doApply Accept) |
1336 |
('Apply to End' doApplyRest ) |
|
1337 |
('Apply from Begin' doApplyFromBeginning ) |
|
1338 |
('Apply for Class to End' doApplyClassRest ) |
|
1339 |
('Apply for Class from Begin' doApplyClassFromBeginning ) |
|
1340 |
('Apply All' doApplyAll ) |
|
1341 |
('-' ) |
|
1342 |
('Delete' doDelete Delete) |
|
1343 |
('Delete to End' doDeleteRest ) |
|
1344 |
('Delete for Class to End' doDeleteClassRest ) |
|
1345 |
('Delete for Class from Begin' doDeleteClassFromBeginning ) |
|
1346 |
). |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1347 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1348 |
(self hasSelection and:[self hasSingleSelection not]) ifTrue:[ |
7360 | 1349 |
items := items , |
1350 |
#( |
|
15187 | 1351 |
('Delete all for Classes' doDeleteClassAll ) |
1352 |
('Delete all for Classes & their Private Classes' doDeleteClassAndPrivateClassesAll ) |
|
7360 | 1353 |
). |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1354 |
] ifFalse:[ |
7360 | 1355 |
items := items , |
1356 |
#( |
|
15187 | 1357 |
('Delete all for Class' doDeleteClassAll ) |
1358 |
('Delete all for Class & its Private Classes' doDeleteClassAndPrivateClassesAll ) |
|
7360 | 1359 |
). |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1360 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1361 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1362 |
items := items , |
7360 | 1363 |
#( |
1364 |
('-' ) |
|
1365 |
('Compress' doCompress ) |
|
1366 |
('Compress for Class' doCompressClass ) |
|
1367 |
('Compare and Compress' doCompareAndCompress ) |
|
1368 |
('-' ) |
|
1369 |
('Compare with current Version' doCompare ) |
|
1370 |
('Browse Class' doBrowse ) |
|
1371 |
('-' ) |
|
1372 |
('Make Change a Patch' doMakePatch ) |
|
1373 |
). |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1374 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1375 |
editingClassSource ifFalse:[ |
7360 | 1376 |
items := items , #( |
15187 | 1377 |
('Fileout & Delete all for Class' doFileoutAndDeleteClassAll ) |
1378 |
('CheckIn & Delete all for Class' doCheckinAndDeleteClassAll ) |
|
7360 | 1379 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1380 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1381 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1382 |
items := items , #( |
7360 | 1383 |
('-' ) |
1384 |
('Save in...' doSave ) |
|
1385 |
('Save to End In...' doSaveRest ) |
|
1386 |
('Save for Class to End In...' doSaveClassRest ) |
|
1387 |
('Save all for Class In...' doSaveClassAll ) |
|
1388 |
('-' ) |
|
1389 |
). |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1390 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1391 |
editingClassSource ifTrue:[ |
7360 | 1392 |
items := items , #( |
1393 |
('Writeback ClassFile' doWriteBack ) |
|
1394 |
) |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1395 |
] ifFalse:[ |
7360 | 1396 |
items := items , #( |
1397 |
('Writeback ChangeFile' doWriteBack ) |
|
1398 |
) |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1399 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1400 |
|
1833
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
1401 |
items := items , #( |
7360 | 1402 |
('-' ) |
1403 |
('Update' doUpdate ) |
|
1404 |
). |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1405 |
|
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1406 |
m := PopUpMenu itemList:items resources:resources. |
202 | 1407 |
|
255 | 1408 |
"/ |
1409 |
"/ disable those that require a selected entry |
|
1410 |
"/ |
|
3202 | 1411 |
self hasSelection ifFalse:[ |
7360 | 1412 |
m disableAll:#(doApply doApplyClassRest doApplyRest doDelete doDeleteRest doDeleteClassRest |
1413 |
doDeleteClassFromBeginning doDeleteClassAll doDeleteClassAndPrivateClassesAll |
|
1414 |
doCompare doCompressClass doMakePatch doSaveChangeInFile doMakePermanent |
|
1415 |
doSave doSaveRest doSaveClassAll doSaveClassRest doBrowse |
|
1416 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll) |
|
1368 | 1417 |
] ifTrue:[ |
7360 | 1418 |
sel := self theSingleSelection. |
1419 |
sel isNil ifTrue:[ |
|
1420 |
"/ multiple selections |
|
1421 |
m disableAll:#(doApplyClassRest doApplyRest doDeleteClassRest doDeleteRest |
|
1422 |
doDeleteClassFromBeginning |
|
1423 |
doCompressClass doCompare |
|
1424 |
doSaveClassAll doSaveClassRest doSaveRest doBrowse |
|
1425 |
doFileoutAndDeleteClassAll) |
|
1426 |
] ifFalse:[ |
|
1427 |
(self classNameOfChange:sel) isNil ifTrue:[ |
|
1428 |
m disableAll:#(doApplyClassRest doDeleteClassRest |
|
1429 |
doDeleteClassFromBeginning doDeleteClassAll doDeleteClassAndPrivateClassesAll |
|
1430 |
doCompressClass doCompare doMakePatch |
|
1431 |
doSaveClassAll doSaveClassRest doBrowse |
|
1432 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll) |
|
1433 |
] |
|
1434 |
] |
|
255 | 1435 |
]. |
1436 |
||
1437 |
"/ |
|
1438 |
"/ disable those that do not make sense with autoUpdate |
|
1439 |
"/ ('cause this would be overwritten by next update operation) |
|
1440 |
"/ |
|
3202 | 1441 |
autoUpdate value ifTrue:[ |
7360 | 1442 |
m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll |
1443 |
doDeleteClassAndPrivateClassesAll doCompress |
|
1444 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll |
|
1445 |
doWriteBack) |
|
202 | 1446 |
]. |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1447 |
readOnly == true ifTrue:[ |
7360 | 1448 |
m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll |
1449 |
doDeleteClassAndPrivateClassesAll doCompress |
|
1450 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll |
|
1451 |
doWriteBack doSaveBack doUpdate |
|
1452 |
doApplyAll doApplyRest) |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1453 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1454 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1455 |
self hasSelection ifTrue:[ |
7360 | 1456 |
m disable:#doApplyAll |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1457 |
]. |
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1458 |
|
202 | 1459 |
^ m |
1460 |
||
7360 | 1461 |
"Modified: / 06-09-1995 / 17:14:22 / claus" |
1462 |
"Modified: / 06-10-2006 / 11:17:06 / cg" |
|
202 | 1463 |
! |
1464 |
||
2114 | 1465 |
destroy |
1466 |
"destroy the receiver; make certain, that boxes are destroyed too" |
|
1467 |
||
1468 |
Processor removeTimedBlock:checkBlock. |
|
1469 |
ObjectMemory removeDependent:self. |
|
1470 |
super destroy |
|
1471 |
! |
|
1472 |
||
202 | 1473 |
initialize |
16467 | 1474 |
|panel infoLabel v upperFrame buttonPanel menuPanel mH toolbarMenu tmH |
9168 | 1475 |
checkBox oldStyle codeViewBox lbl applyInOriginal| |
3202 | 1476 |
|
3211 | 1477 |
"/ oldStyle := true. |
3202 | 1478 |
oldStyle := false. |
202 | 1479 |
|
1480 |
super initialize. |
|
1481 |
||
5702 | 1482 |
changeFileName := ObjectMemory nameForChanges. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
1483 |
encodingIfKnown := nil. |
3534 | 1484 |
autoCompare := (DefaultAutoCompare ? false) asValue. |
3202 | 1485 |
autoCompare onChangeSend:#autoCompareChanged to:self. |
1486 |
autoUpdate := false asValue. |
|
6216 | 1487 |
autoloadAsRequired := false asValue. |
10719 | 1488 |
ignorePublicPrivateCategories := false asValue. |
9168 | 1489 |
|
1490 |
applyInOriginal := true. |
|
1491 |
KeepEnforcedNameSpace == true ifTrue:[ |
|
1492 |
enforcedNameSpace := LastEnforcedNameSpace. |
|
1493 |
applyInOriginal := false. |
|
1494 |
]. |
|
1495 |
||
1496 |
applyInOriginalNameSpace := applyInOriginal asValue. |
|
6288 | 1497 |
applyInOriginalNameSpace |
6357 | 1498 |
onChangeEvaluate:[ |
1499 |
autoCompare value ifTrue:[ |
|
1500 |
self doUpdate |
|
1501 |
]. |
|
1502 |
]. |
|
9168 | 1503 |
|
4897 | 1504 |
updateChangeSet := true "false" asValue. |
8026
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
1505 |
classesNotToBeAutoloaded := Set new. |
221 | 1506 |
|
1099
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1507 |
" |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1508 |
checkBlock is executed by the Processor. |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1509 |
We use #pushEvent: to perform the update |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1510 |
in our windowgroups process. |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1511 |
" |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1512 |
checkBlock := [self pushEvent:#checkIfFileHasChanged]. |
202 | 1513 |
|
3202 | 1514 |
oldStyle ifFalse:[ |
6357 | 1515 |
menuPanel := MenuPanel in:self. |
1516 |
"/ menuPanel level:1. |
|
1517 |
menuPanel verticalLayout:false. |
|
1518 |
menuPanel receiver:self. |
|
1519 |
menuPanel menu:(self pullDownMenu). |
|
1520 |
||
8164
ee17624160a6
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8102
diff
changeset
|
1521 |
mH := menuPanel preferredHeight. |
6357 | 1522 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
1523 |
mH := mH + 1. |
|
10681 | 1524 |
|
1525 |
toolbarMenu := MenuPanel in:self. |
|
1526 |
toolbarMenu verticalLayout:false. |
|
1527 |
toolbarMenu receiver:self. |
|
1528 |
toolbarMenu menu:(self toolbarMenu). |
|
16022 | 1529 |
toolbarMenu flyByHelpSpecProvider:self. "/ for helpTexts |
10681 | 1530 |
|
1531 |
tmH := toolbarMenu preferredHeight. |
|
1532 |
toolbarMenu origin:(0.0 @ mH) corner:(1.0 @ (mH+tmH)). |
|
1533 |
mH := mH + tmH + 1. |
|
3202 | 1534 |
] ifTrue:[ |
6357 | 1535 |
mH := 0.0 |
3202 | 1536 |
]. |
1537 |
||
16467 | 1538 |
panel := VariableVerticalPanel in:self. |
1539 |
"/ panel origin:(0.0 @ mH) corner:(1.0 @ 1.0) |
|
1540 |
panel layout:(LayoutFrame |
|
1541 |
leftFraction:0.0 offset:0 |
|
1542 |
rightFraction:1.0 offset:0 |
|
1543 |
topFraction:0.0 offset:mH |
|
1544 |
bottomFraction:1.0 offset:-30). |
|
1545 |
panel borderWidth:0. |
|
1546 |
||
1547 |
infoLabel := Label in:self. |
|
1548 |
infoLabel layout:(LayoutFrame |
|
1549 |
leftFraction:0.0 offset:0 |
|
1550 |
rightFraction:1.0 offset:0 |
|
1551 |
topFraction:1.0 offset:-28 |
|
1552 |
bottomFraction:1.0 offset:-2). |
|
1553 |
infoLabel borderWidth:0. |
|
1554 |
infoLabel sizeFixed:true. |
|
1555 |
infoLabel level:-1. |
|
1556 |
infoLabel adjust:#left. |
|
1557 |
infoLabel labelChannel:(infoHolder := '' asValue). |
|
1558 |
||
3202 | 1559 |
upperFrame := panel. |
1560 |
oldStyle ifTrue:[ |
|
6357 | 1561 |
upperFrame := VariableHorizontalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 0.3) in:panel. |
3202 | 1562 |
]. |
202 | 1563 |
|
1564 |
v := HVScrollableView for:SelectionInListView miniScrollerH:true in:upperFrame. |
|
3202 | 1565 |
oldStyle ifTrue:[ |
6357 | 1566 |
v origin:(0.0 @ 0.0) corner:(0.75 @ 1.0). |
3202 | 1567 |
] ifFalse:[ |
6357 | 1568 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.3). |
3202 | 1569 |
]. |
3090 | 1570 |
|
202 | 1571 |
changeListView := v scrolledView. |
1572 |
changeListView delegate:self. |
|
1573 |
changeListView menuHolder:self; menuPerformer:self; menuMessage:#changeListMenu. |
|
1471 | 1574 |
changeListView doubleClickAction:[:line | self doubleClickOnChange:line]. |
3211 | 1575 |
oldStyle ifFalse:[ |
6357 | 1576 |
changeListView multipleSelectOk:true. |
3211 | 1577 |
]. |
202 | 1578 |
|
3202 | 1579 |
oldStyle ifTrue:[ |
6357 | 1580 |
buttonPanel := VerticalPanelView in:upperFrame. |
1581 |
buttonPanel origin:(0.75 @ 0.0) corner:(1.0 @ 1.0). |
|
1582 |
buttonPanel verticalLayout:#topSpace; horizontalLayout:#leftSpace. |
|
1583 |
||
1584 |
checkBox := CheckBox new model:autoCompare. |
|
1585 |
checkBox label:(resources string:'Auto Compare'). |
|
1586 |
checkBox action:[:val | autoCompare value:val]. |
|
1587 |
buttonPanel addSubView:checkBox. |
|
1588 |
||
1589 |
checkBox := CheckBox new model:autoUpdate. |
|
1590 |
checkBox label:(resources string:'Auto Update'). |
|
1591 |
checkBox action:[:val | autoUpdate value:val]. |
|
1592 |
buttonPanel addSubView:checkBox. |
|
1593 |
||
1594 |
checkBox := CheckBox new. |
|
1595 |
checkBox label:(resources stringWithCRs:'Apply in original NameSpace'). |
|
1596 |
checkBox model:applyInOriginalNameSpace. |
|
1597 |
buttonPanel addSubView:checkBox. |
|
3202 | 1598 |
]. |
2301 | 1599 |
|
3090 | 1600 |
"/ protectExistingMethods := CheckBox new. |
1601 |
"/ protectExistingMethods label:(resources string:'Protect existing code' withCRs). |
|
1602 |
"/ protectExistingMethods model:protectExistingMethods. |
|
1603 |
"/ buttonPanel addSubView:protectExistingMethods. |
|
1604 |
||
4487 | 1605 |
codeViewBox := View in:panel. |
1606 |
codeViewBox origin:(0.0 @ 0.3) corner:(1.0 @ 1.0). |
|
1607 |
||
1608 |
v := HVScrollableView for:CodeView miniScrollerH:true miniScrollerV:false in:codeViewBox. |
|
1609 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
202 | 1610 |
codeView := v scrolledView. |
1996 | 1611 |
codeView readOnly:true. |
202 | 1612 |
|
4487 | 1613 |
diffViewBox := View in:codeViewBox. |
1614 |
diffViewBox origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
1615 |
||
1616 |
lbl := Label label:'Current' in:diffViewBox. |
|
1617 |
lbl layout:(LayoutFrame |
|
6357 | 1618 |
leftFraction:0.0 offset:0 |
1619 |
rightFraction:0.5 offset:0 |
|
1620 |
topFraction:0.0 offset:0 |
|
1621 |
bottomFraction:0.0 offset:20). |
|
4487 | 1622 |
lbl := Label label:'Change' in:diffViewBox. |
1623 |
lbl layout:(LayoutFrame |
|
6357 | 1624 |
leftFraction:0.5 offset:0 |
1625 |
rightFraction:1.0 offset:0 |
|
1626 |
topFraction:0.0 offset:0 |
|
1627 |
bottomFraction:0.0 offset:20). |
|
4487 | 1628 |
|
1629 |
"/ diffView := DiffTextView in:diffViewBox. |
|
1630 |
"/ diffView layout:(LayoutFrame |
|
1631 |
"/ leftFraction:0.0 offset:0 |
|
1632 |
"/ rightFraction:1.0 offset:0 |
|
1633 |
"/ topFraction:0.0 offset:20 |
|
1634 |
"/ bottomFraction:1.0 offset:0). |
|
1635 |
||
8102 | 1636 |
v := HVScrollableView for:DiffCodeView miniScrollerH:true miniScrollerV:false in:diffViewBox. |
4487 | 1637 |
v layout:(LayoutFrame |
6357 | 1638 |
leftFraction:0.0 offset:0 |
1639 |
rightFraction:1.0 offset:0 |
|
1640 |
topFraction:0.0 offset:20 |
|
1641 |
bottomFraction:1.0 offset:0). |
|
4487 | 1642 |
diffView := v scrolledView. |
1643 |
||
1644 |
self showingDiffs value ifFalse:[ |
|
6357 | 1645 |
self makeDiffViewInvisible |
4487 | 1646 |
]. |
1647 |
||
202 | 1648 |
anyChanges := false. |
1649 |
ObjectMemory addDependent:self. "to get shutdown-update" |
|
1650 |
||
1651 |
tabSpec := TabulatorSpecification new. |
|
1652 |
tabSpec unit:#inch. |
|
1653 |
tabSpec positions:#(-1 0 5 8.5 ). |
|
1654 |
" +/- cls>>sel type info" |
|
1655 |
tabSpec align: #(#left #left #left #left). |
|
1656 |
||
10681 | 1657 |
"Modified: / 27-03-1997 / 11:07:07 / stefan" |
11048 | 1658 |
"Modified: / 03-01-2012 / 15:28:45 / cg" |
202 | 1659 |
! |
1660 |
||
1246
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1661 |
postRealize |
3534 | 1662 |
self setupTabSpec. |
202 | 1663 |
self readChangesFileInBackground:true. |
1664 |
self setChangeList. |
|
16467 | 1665 |
changeListView action:[:lineNrOrCollection | self changeSelection:lineNrOrCollection]. |
202 | 1666 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
1246
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1667 |
|
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1668 |
"Created: 24.7.1997 / 18:06:12 / cg" |
202 | 1669 |
! |
1670 |
||
3202 | 1671 |
pullDownMenu |
1672 |
"return the top (pullDown) menu" |
|
1673 |
||
1674 |
<resource: #programMenu> |
|
1675 |
||
3330 | 1676 |
^ self menuFromSpec:self class menuSpec. |
1677 |
||
1678 |
"/ |m| |
|
1679 |
"/ |
|
1680 |
"/ m := self class menuSpec. |
|
1681 |
"/ m := m decodeAsLiteralArray. |
|
1682 |
"/ m receiver:self. |
|
1683 |
"/ m findGuiResourcesIn:self. |
|
1684 |
"/ ^ m. |
|
3202 | 1685 |
! |
1686 |
||
3534 | 1687 |
setupTabSpec |
1688 |
autoCompare value ifTrue:[ |
|
9515 | 1689 |
tabSpec positions:#(0 0.15 7 9.5 ). |
3534 | 1690 |
] ifFalse:[ |
9515 | 1691 |
"/ |
1692 |
"/ set tabs to hide compare-column |
|
1693 |
"/ |
|
1694 |
tabSpec positions:#(-1 0 7 9.5 ). |
|
3534 | 1695 |
] |
9515 | 1696 |
|
1697 |
"Modified: / 10-07-2010 / 10:59:49 / cg" |
|
3534 | 1698 |
! |
1699 |
||
10681 | 1700 |
toolbarMenu |
1701 |
"return the top (pullDown) menu" |
|
1702 |
||
1703 |
<resource: #programMenu> |
|
1704 |
||
1705 |
^ self menuFromSpec:self class toolbarMenuSpec. |
|
1706 |
||
1707 |
"Created: / 07-09-2011 / 16:03:41 / cg" |
|
1708 |
! |
|
1709 |
||
627 | 1710 |
update:what with:aParameter from:changedObject |
202 | 1711 |
|box| |
1712 |
||
8558
a85166102cb7
Wait for #aboutToQuit change message instead of obsolete #aboutToExit
Stefan Vogel <sv@exept.de>
parents:
8515
diff
changeset
|
1713 |
(what == #aboutToQuit) ifTrue:[ |
6639 | 1714 |
" |
1715 |
smalltalk is about to shut down - |
|
1716 |
- if change list was modified, ask user and save if requested. |
|
1717 |
" |
|
1718 |
anyChanges ifTrue:[ |
|
1719 |
self raiseDeiconified. |
|
1720 |
||
1721 |
box := YesNoBox new. |
|
1722 |
box title:('The modified changelist has not been written back to the change file.\\Write change file before exiting ?') withCRs. |
|
1723 |
box okText:(resources string:'Write') noText:(resources string:'Don''t write'). |
|
1724 |
box yesAction:[self writeBackChanges] |
|
1725 |
noAction:[]. |
|
1726 |
box showAtPointer. |
|
1727 |
box destroy |
|
1728 |
]. |
|
1729 |
^ self |
|
202 | 1730 |
]. |
11048 | 1731 |
|
8558
a85166102cb7
Wait for #aboutToQuit change message instead of obsolete #aboutToExit
Stefan Vogel <sv@exept.de>
parents:
8515
diff
changeset
|
1732 |
super update:what with:aParameter from:changedObject |
627 | 1733 |
|
11048 | 1734 |
"Created: / 15-06-1996 / 15:26:30 / cg" |
1735 |
"Modified: / 24-08-1999 / 09:45:06 / stefan" |
|
1736 |
"Modified: / 03-01-2012 / 15:23:13 / cg" |
|
202 | 1737 |
! ! |
1738 |
||
3202 | 1739 |
!ChangesBrowser methodsFor:'menu actions'! |
1740 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1741 |
doApply |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1742 |
"user wants a change to be applied" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1743 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1744 |
self withSelectedChangesDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1745 |
(self applyChange:changeNr) ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1746 |
^ self "/ cancel |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1747 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1748 |
self autoSelect:(changeNr + 1) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1749 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1750 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1751 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1752 |
doApplyAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1753 |
"user wants all changes to be applied" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1754 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1755 |
self withExecuteCursorDo:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1756 |
|lastNr "{ Class: SmallInteger }" | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1757 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1758 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1759 |
lastNr := self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1760 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1761 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1762 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1763 |
multipleApply := lastNr > 1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1764 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1765 |
1 to:lastNr do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1766 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1767 |
self applyChange:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1768 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1769 |
self autoSelectLast |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1770 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1771 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1772 |
"Modified: 21.1.1997 / 22:26:30 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1773 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1774 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1775 |
doApplyClassFromBeginning |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1776 |
"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
|
1777 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1778 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1779 |
|thisClassName classNameToApply lastChange |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1780 |
lastNr "{ Class: SmallInteger }" | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1781 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1782 |
classNameToApply := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1783 |
classNameToApply notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1784 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1785 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1786 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1787 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1788 |
multipleApply := changeNr ~= 1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1789 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1790 |
1 to:changeNr do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1791 |
thisClassName := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1792 |
thisClassName = classNameToApply ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1793 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1794 |
self applyChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1795 |
lastChange := changeNr |
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 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1798 |
self autoSelect:changeNr+1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1799 |
] |
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1802 |
"Modified: 21.1.1997 / 22:26:04 / cg" |
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 |
doApplyClassRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1806 |
"user wants all changes for this class from changeNr 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 withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1809 |
|thisClassName classNameToApply lastChange |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1810 |
lastNr "{ Class: SmallInteger }" | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1811 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1812 |
classNameToApply := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1813 |
classNameToApply notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1814 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1815 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1816 |
lastNr := self numberOfChanges. |
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 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1819 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1820 |
multipleApply := (lastNr - changeNr) > 1. |
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 |
changeNr to:lastNr do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1823 |
thisClassName := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1824 |
thisClassName = classNameToApply ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1825 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1826 |
self applyChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1827 |
lastChange := changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1828 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1829 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1830 |
self autoSelect:lastChange. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1831 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1832 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1833 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1834 |
"Modified: 21.1.1997 / 22:26:04 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1835 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1836 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1837 |
doApplyFromBeginning |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1838 |
"user wants all changes from 1 to changeNr to be applied" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1839 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1840 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1841 |
|lastNr "{ Class: SmallInteger }" | |
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 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1844 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1845 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1846 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1847 |
multipleApply := changeNr ~= 1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1848 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1849 |
1 to:changeNr do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1850 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1851 |
self applyChange:changeNr |
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 |
self autoSelect:changeNr+1. |
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 |
! |
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 |
doApplyRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1858 |
"apply all changes from changeNr to the end" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1859 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1860 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1861 |
|lastNr "{ Class: SmallInteger }" | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1862 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1863 |
self clearCodeView. |
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 |
lastNr := self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1866 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1867 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1868 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1869 |
multipleApply := (lastNr - changeNr) > 1. |
15087 | 1870 |
AbortAllOperationRequest handle:[:ex | |
1871 |
ex return |
|
1872 |
] do:[ |
|
1873 |
changeNr to:lastNr do:[:changeNr | |
|
1874 |
changeListView setSelection:changeNr. |
|
1875 |
self applyChange:changeNr |
|
1876 |
]. |
|
1877 |
self autoSelect:self numberOfChanges. |
|
1878 |
] |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1879 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1880 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1881 |
"Modified: 21.1.1997 / 22:25:29 / cg" |
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1884 |
doApplyToConflictOrEnd |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1885 |
"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
|
1886 |
or the end." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1887 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1888 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1889 |
|lastNr "{ Class: SmallInteger }"| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1890 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1891 |
self clearCodeView. |
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 |
lastNr := self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1894 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1895 |
"if we apply multiple changes, and an error occurs, |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1896 |
ask the user if all operations should be aborted..." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1897 |
multipleApply := (lastNr - changeNr) > 1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1898 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1899 |
changeNr to:lastNr do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1900 |
| cls sel | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1901 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1902 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1903 |
((cls := self classOfChange:changeNr ifAbsent:[:className| nil]) notNil |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1904 |
and:[(sel := self selectorOfMethodChange:changeNr) notNil]) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1905 |
ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1906 |
(cls includesSelector:sel) ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1907 |
self autoSelect:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1908 |
^ self |
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 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1911 |
self applyChange:changeNr |
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 autoSelect:self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1914 |
] |
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1917 |
doBrowse |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1918 |
"user wants a browser on the class of a change" |
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 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1921 |
|cls| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1922 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1923 |
cls := self classOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1924 |
cls notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1925 |
UserPreferences systemBrowserClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1926 |
openInClass:cls |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1927 |
selector:(self selectorOfMethodChange:changeNr) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1928 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1929 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1930 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1931 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1932 |
doBrowseImplementors |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1933 |
"open an implementors-browser" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1934 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1935 |
|changeNr initial selector| |
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 |
(changeNr := self theSingleSelection) notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1938 |
initial := self selectorOfMethodChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1939 |
]. |
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 |
selector := Dialog |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1942 |
request:'Selector to browse implementors of:' |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1943 |
initialAnswer:(initial ? ''). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1944 |
selector size ~~ 0 ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1945 |
UserPreferences systemBrowserClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1946 |
browseImplementorsMatching:selector. |
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 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1949 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1950 |
doBrowseSenders |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1951 |
"user wants a browser on the class of a change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1952 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1953 |
|changeNr initial selector| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1954 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1955 |
(changeNr := self theSingleSelection) notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1956 |
initial := self selectorOfMethodChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1957 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1958 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1959 |
selector := Dialog |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1960 |
request:'Selector to browse senders of:' |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1961 |
initialAnswer:(initial ? ''). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1962 |
selector size ~~ 0 ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1963 |
UserPreferences systemBrowserClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1964 |
browseAllCallsOn:selector asSymbol. |
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 |
! |
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 |
doCheckinAndDeleteClassAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1969 |
"first checkin the selected changes class then delete all changes |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1970 |
for it." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1971 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1972 |
|classes answer logTitle checkinInfo| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1973 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1974 |
"/ self theSingleSelection isNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1975 |
"/ ^ self information:'Only possible if a single change is selected.'. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1976 |
"/ ]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1977 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1978 |
self withExecuteCursorDo:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1979 |
classes := IdentitySet new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1980 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1981 |
self withSelectedChangesDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1982 |
| className class | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1983 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1984 |
className := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1985 |
className notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1986 |
class := Smalltalk classNamed:className. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1987 |
class isNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1988 |
self error:'oops - no class: ', className mayProceed:true. |
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 |
class notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1991 |
class := class theNonMetaclass. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1992 |
(classes includes:class) ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1993 |
class isPrivate ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1994 |
(classes includes:class owningClass) ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1995 |
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
|
1996 |
bindWith:class owningClass name allBold) withCRs. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1997 |
answer isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1998 |
answer ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
1999 |
classes add:class owningClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2000 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2001 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2002 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2003 |
classes add:class |
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 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2007 |
] |
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2010 |
classes size == 1 ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2011 |
logTitle := classes first name. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2012 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2013 |
logTitle := '%1 classes' bindWith:classes size. |
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 |
checkinInfo := SourceCodeManagerUtilities default |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2016 |
getCheckinInfoFor:logTitle |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2017 |
initialAnswer:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2018 |
checkinInfo isNil ifTrue:[^ self ]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2019 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2020 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2021 |
classes do:[:eachClass | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2022 |
(SourceCodeManagerUtilities default checkinClass:eachClass withInfo:checkinInfo) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2023 |
ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2024 |
self silentDeleteChangesForClassAndPrivateClasses:eachClass name |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2025 |
from:1 to:(self numberOfChanges). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2026 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2027 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2028 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2029 |
] |
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 |
"Modified: / 6.9.1995 / 17:11:16 / claus" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2032 |
"Modified: / 17.11.2001 / 14:21:13 / cg" |
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 |
doCompare |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2036 |
"compare change with current system version" |
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 |
classesNotToBeAutoloaded removeAll. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2039 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2040 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2041 |
self withExecuteCursorDo:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2042 |
self compareChange:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2043 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2044 |
self newLabel:'' |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2045 |
]. |
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 |
"Modified: 24.2.1996 / 19:37:19 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2048 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2049 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2050 |
doCompareAndCompress |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2051 |
"remove all changes, which are equivalent to the current image version" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2052 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2053 |
|toDelete| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2054 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2055 |
classesNotToBeAutoloaded removeAll. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2056 |
toDelete := OrderedCollection new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2057 |
self withExecuteCursorDo:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2058 |
1 to:self numberOfChanges do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2059 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2060 |
toDelete add:changeNr |
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 |
toDelete reverseDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2066 |
self silentDeleteChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2067 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2068 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2069 |
" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2070 |
scroll back a bit, if we are left way behind the list |
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 |
changeListView firstLineShown > self numberOfChanges ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2073 |
changeListView makeLineVisible:self numberOfChanges |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2074 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2075 |
self clearCodeView. |
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 |
self newLabel:''. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2078 |
classesNotToBeAutoloaded removeAll. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2079 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2080 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2081 |
doCompress |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2082 |
"compress the change-set; this replaces multiple method-changes by the last |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2083 |
(i.e. the most recent) change" |
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 compressForClass:nil |
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 |
"Modified: / 29.10.1997 / 01:03:26 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2088 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2089 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2090 |
doCompressClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2091 |
"compress changes for the selected class. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2092 |
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
|
2093 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2094 |
self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2095 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2096 |
self selectedClassNames do:[:classNameToCompress | |
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2097 |
self compressForClass:classNameToCompress. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2098 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2099 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2100 |
"Created: / 29.10.1997 / 01:05:16 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2101 |
"Modified: / 19.11.2001 / 21:55:17 / cg" |
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 |
doCompressSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2105 |
"compress changes for the selected class & selector. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2106 |
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
|
2107 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2108 |
|classSelectorPairs| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2109 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2110 |
self checkSingleSelectedChange. |
11499
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 |
classSelectorPairs := Set new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2113 |
self withSelectedChangesDo:[:changeNr | |
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2114 |
| classNameToCompress selector | |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2115 |
|
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2116 |
classNameToCompress := self classNameOfChange:changeNr. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2117 |
classNameToCompress notNil ifTrue:[ |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2118 |
selector := self selectorOfMethodChange:changeNr. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2119 |
selector notNil ifTrue:[ |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2120 |
classSelectorPairs add:(classNameToCompress -> selector). |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2121 |
] |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2122 |
] |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2123 |
]. |
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 |
classSelectorPairs do:[:pair | |
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2126 |
self compressForClass:pair key selector:pair value. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2127 |
] |
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 |
"Created: / 19.11.2001 / 21:50:59 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2130 |
"Modified: / 19.11.2001 / 22:10:08 / cg" |
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 |
|
17096 | 2133 |
doCopyToClipboard |
2134 |
"user wants a change text to be copied to the clipboard" |
|
2135 |
||
2136 |
|text| |
|
2137 |
||
2138 |
self withSingleSelectedChangeDo:[:changeNr | |
|
2139 |
text := self sourceOfMethodChange:changeNr. |
|
2140 |
]. |
|
2141 |
text notEmptyOrNil ifTrue:[ |
|
2142 |
self window setClipboardText:text |
|
2143 |
] |
|
2144 |
||
2145 |
"Created: / 21-11-2016 / 23:38:11 / cg" |
|
2146 |
! |
|
2147 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2148 |
doDelete |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2149 |
"delete currently selected change(s)" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2150 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2151 |
|rangeEnd rangeStart firstDeleted| |
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 |
changeListView selection size <= 5 ifTrue:[ |
16467 | 2154 |
self withSelectedChangesReverseDo:[:changeNr | |
2155 |
self deleteChange:changeNr. |
|
2156 |
self autoSelectOrEnd:changeNr |
|
2157 |
]. |
|
2158 |
self showNumberOfChanges. |
|
2159 |
^ self |
|
11499
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2162 |
self withSelectedChangesReverseDo:[:changeNr | |
16467 | 2163 |
rangeEnd isNil ifTrue:[ |
2164 |
rangeEnd := rangeStart := changeNr |
|
2165 |
] ifFalse:[ |
|
2166 |
(changeNr = (rangeEnd + 1)) ifTrue:[ |
|
2167 |
rangeEnd := changeNr |
|
2168 |
] ifFalse:[ |
|
2169 |
(changeNr = (rangeStart - 1)) ifTrue:[ |
|
2170 |
rangeStart := changeNr |
|
2171 |
] ifFalse:[ |
|
2172 |
self deleteChangesFrom:rangeStart to:rangeEnd. |
|
2173 |
firstDeleted := (firstDeleted ? rangeStart) min:rangeStart. |
|
2174 |
rangeStart := rangeEnd := nil. |
|
2175 |
]. |
|
2176 |
]. |
|
2177 |
]. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2178 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2179 |
rangeStart notNil ifTrue:[ |
16467 | 2180 |
self deleteChangesFrom:rangeStart to:rangeEnd. |
2181 |
firstDeleted := (firstDeleted ? rangeStart) min:rangeStart. |
|
2182 |
]. |
|
2183 |
self autoSelectOrEnd:firstDeleted. |
|
2184 |
self showNumberOfChanges |
|
11499
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 |
|
12428 | 2187 |
doDeleteAllForNamespace |
2188 |
"delete all changes for classes with same namespace as currently selected change" |
|
2189 |
||
2190 |
|namespacesToDelete lastChangeNr overAllNumDeletedBefore| |
|
2191 |
||
2192 |
lastChangeNr := -1. |
|
2193 |
namespacesToDelete := Set new. |
|
2194 |
self withSelectedChangesDo:[:changeNr | |
|
2195 |
|namespaceToDelete| |
|
2196 |
||
2197 |
namespaceToDelete := self namespaceOfChange:changeNr. |
|
2198 |
namespaceToDelete notNil ifTrue:[ |
|
2199 |
namespacesToDelete add:namespaceToDelete |
|
2200 |
]. |
|
2201 |
lastChangeNr := lastChangeNr max:changeNr. |
|
2202 |
]. |
|
2203 |
namespacesToDelete isEmpty ifTrue:[^ self]. |
|
2204 |
||
2205 |
overAllNumDeletedBefore := 0. |
|
2206 |
changeListView setSelection:nil. |
|
2207 |
||
2208 |
self withExecuteCursorDo:[ |
|
2209 |
namespacesToDelete do:[:namespaceToDelete | |
|
2210 |
|numDeletedBefore| |
|
2211 |
||
2212 |
self |
|
2213 |
silentDeleteChangesForNamespace:namespaceToDelete |
|
2214 |
from:lastChangeNr |
|
2215 |
to:(self numberOfChanges). |
|
2216 |
numDeletedBefore := self |
|
2217 |
silentDeleteChangesForNamespace:namespaceToDelete |
|
2218 |
from:1 |
|
2219 |
to:(lastChangeNr-1). |
|
2220 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
2221 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
2222 |
]. |
|
2223 |
]. |
|
2224 |
||
2225 |
self setChangeList. |
|
16467 | 2226 |
self autoSelectOrEnd:lastChangeNr. |
12428 | 2227 |
! |
2228 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2229 |
doDeleteAndSelectPrevious |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2230 |
"delete currently selected change(s)" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2231 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2232 |
self withSelectedChangesReverseDo:[:changeNr | |
16467 | 2233 |
self deleteChange:changeNr. |
2234 |
self autoSelectOrEnd:changeNr-1 |
|
2235 |
]. |
|
2236 |
||
2237 |
"/mh - don't we need a |
|
2238 |
"/ self setChangeList |
|
2239 |
"/ here? |
|
2240 |
self showNumberOfChanges |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2241 |
! |
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 |
doDeleteClassAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2244 |
"delete all changes with same class as currently selected change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2245 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2246 |
|classNamesToDelete lastChangeNr overAllNumDeletedBefore| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2247 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2248 |
lastChangeNr := -1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2249 |
classNamesToDelete := Set new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2250 |
self withSelectedChangesDo:[:changeNr | |
16467 | 2251 |
|classNameToDelete| |
2252 |
||
2253 |
classNameToDelete := self classNameOfChange:changeNr. |
|
2254 |
classNameToDelete notNil ifTrue:[ |
|
2255 |
classNamesToDelete add:classNameToDelete. |
|
2256 |
]. |
|
2257 |
lastChangeNr := lastChangeNr max:changeNr. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2258 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2259 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2260 |
overAllNumDeletedBefore := 0. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2261 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2262 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2263 |
self withExecuteCursorDo:[ |
16467 | 2264 |
classNamesToDelete do:[:classNameToDelete | |
2265 |
|numDeletedBefore| |
|
2266 |
||
2267 |
self silentDeleteChangesFor:classNameToDelete |
|
2268 |
from:lastChangeNr |
|
2269 |
to:(self numberOfChanges). |
|
2270 |
numDeletedBefore := self |
|
2271 |
silentDeleteChangesFor:classNameToDelete |
|
2272 |
from:1 |
|
2273 |
to:(lastChangeNr-1). |
|
2274 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
2275 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
2276 |
]. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2277 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2278 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2279 |
self setChangeList. |
16467 | 2280 |
self autoSelectOrEnd:lastChangeNr. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2281 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2282 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2283 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2284 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2285 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2286 |
doDeleteClassAndPrivateClassesAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2287 |
"delete all changes with same class and private classes |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2288 |
as currently selected change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2289 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2290 |
|lastChangeNr classNamesToDelete overAllNumDeletedBefore| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2291 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2292 |
lastChangeNr := -1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2293 |
classNamesToDelete := Set new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2294 |
self withSelectedChangesDo:[:changeNr | |
16467 | 2295 |
|classNameToDelete| |
2296 |
||
2297 |
classNameToDelete := self ownerClassNameOfChange:changeNr. |
|
2298 |
classNameToDelete notNil ifTrue:[ |
|
2299 |
classNamesToDelete add:classNameToDelete. |
|
2300 |
]. |
|
2301 |
lastChangeNr := lastChangeNr max:changeNr. |
|
11499
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2304 |
overAllNumDeletedBefore := 0. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2305 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2306 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2307 |
self withExecuteCursorDo:[ |
16467 | 2308 |
classNamesToDelete do:[:classNameToDelete | |
2309 |
| changeNr numDeletedBefore| |
|
2310 |
||
2311 |
classNameToDelete notNil ifTrue:[ |
|
2312 |
changeListView setSelection:nil. |
|
2313 |
self silentDeleteChangesForClassAndPrivateClasses:classNameToDelete |
|
2314 |
from:lastChangeNr |
|
2315 |
to:(self numberOfChanges). |
|
2316 |
numDeletedBefore := self |
|
2317 |
silentDeleteChangesForClassAndPrivateClasses:classNameToDelete |
|
2318 |
from:1 |
|
2319 |
to:(lastChangeNr-1). |
|
2320 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
2321 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
2322 |
] |
|
2323 |
] |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2324 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2325 |
self setChangeList. |
16467 | 2326 |
self autoSelectOrEnd:lastChangeNr. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2327 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2328 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2329 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2330 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2331 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2332 |
doDeleteClassFromBeginning |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2333 |
"delete changes with same class as currently selected change from the beginning |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2334 |
up to the selected change. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2335 |
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
|
2336 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2337 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2338 |
|classNameToDelete prevSelection numDeleted| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2339 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2340 |
classNameToDelete := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2341 |
classNameToDelete notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2342 |
prevSelection := changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2343 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2344 |
numDeleted := self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2345 |
silentDeleteChangesFor:classNameToDelete |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2346 |
from:1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2347 |
to:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2348 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2349 |
self autoSelectOrEnd:(changeNr + 1 - numDeleted) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2350 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2351 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2352 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2353 |
"Created: 13.12.1995 / 15:41:58 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2354 |
"Modified: 25.5.1996 / 12:26:34 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2355 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2356 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2357 |
doDeleteClassRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2358 |
"delete rest of changes with same class as currently selected change" |
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 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2361 |
| classNameToDelete | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2362 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2363 |
classNameToDelete := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2364 |
classNameToDelete notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2365 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2366 |
self silentDeleteChangesFor:classNameToDelete |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2367 |
from:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2368 |
to:(self numberOfChanges). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2369 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2370 |
self autoSelectOrEnd:changeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2371 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2372 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2373 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2374 |
"Modified: / 18.5.1998 / 14:25:07 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2375 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2376 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2377 |
doDeleteClassSelectorAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2378 |
"delete all changes with same class and selector as currently selected change" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2379 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2380 |
|classNameSelectorPairsToDelete lastChangeNr overAllNumDeletedBefore| |
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 |
lastChangeNr := -1. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2383 |
classNameSelectorPairsToDelete := Set new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2384 |
self withSelectedChangesDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2385 |
|className selector| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2386 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2387 |
className := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2388 |
selector := self selectorOfMethodChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2389 |
selector notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2390 |
(className notNil and:[selector notNil]) ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2391 |
classNameSelectorPairsToDelete add:(className -> selector). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2392 |
] |
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 |
lastChangeNr := lastChangeNr max:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2395 |
]. |
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 |
overAllNumDeletedBefore := 0. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2398 |
changeListView setSelection:nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2399 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2400 |
self withExecuteCursorDo:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2401 |
classNameSelectorPairsToDelete do:[:pair | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2402 |
|numDeletedBefore className selector| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2403 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2404 |
className := pair key. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2405 |
selector := pair value. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2406 |
self silentDeleteChangesFor:className selector:selector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2407 |
from:lastChangeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2408 |
to:(self numberOfChanges). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2409 |
numDeletedBefore := self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2410 |
silentDeleteChangesFor:className selector:selector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2411 |
from:1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2412 |
to:(lastChangeNr-1). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2413 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2414 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2415 |
]. |
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2418 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2419 |
self autoSelectOrEnd:lastChangeNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2420 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2421 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2422 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2423 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2424 |
|
16475 | 2425 |
doDeleteClassSelectorOlder |
2426 |
"delete older changes with same class and selector as currently selected change(s)" |
|
2427 |
||
2428 |
|classNameSelectorPairsToDelete upToPerClassAndSelector lastChangeNr overAllNumDeletedBefore| |
|
2429 |
||
2430 |
lastChangeNr := -1. |
|
2431 |
classNameSelectorPairsToDelete := Set new. |
|
2432 |
upToPerClassAndSelector := Dictionary new. |
|
2433 |
||
2434 |
"/ collect what is to be deleted |
|
2435 |
self withSelectedChangesDo:[:changeNr | |
|
2436 |
|className selector| |
|
2437 |
||
2438 |
className := self classNameOfChange:changeNr. |
|
2439 |
selector := self selectorOfMethodChange:changeNr. |
|
2440 |
selector notNil ifTrue:[ |
|
2441 |
(className notNil and:[selector notNil]) ifTrue:[ |
|
2442 |
classNameSelectorPairsToDelete add:(className -> selector). |
|
2443 |
upToPerClassAndSelector at:(className -> selector) put:changeNr. |
|
2444 |
] |
|
2445 |
]. |
|
2446 |
lastChangeNr := lastChangeNr max:changeNr. |
|
2447 |
]. |
|
2448 |
||
2449 |
overAllNumDeletedBefore := 0. |
|
2450 |
changeListView setSelection:nil. |
|
2451 |
||
2452 |
self withExecuteCursorDo:[ |
|
2453 |
classNameSelectorPairsToDelete do:[:pair | |
|
2454 |
|numDeletedBefore className selector lastToDelete| |
|
2455 |
||
2456 |
className := pair key. |
|
2457 |
selector := pair value. |
|
2458 |
lastToDelete := (upToPerClassAndSelector at:pair) - 1. |
|
2459 |
||
2460 |
numDeletedBefore := self |
|
2461 |
silentDeleteChangesFor:className selector:selector |
|
2462 |
from:1 |
|
2463 |
to:lastToDelete. |
|
2464 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
2465 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
2466 |
]. |
|
2467 |
]. |
|
2468 |
||
2469 |
self setChangeList. |
|
2470 |
self autoSelectOrEnd:lastChangeNr |
|
2471 |
! |
|
2472 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2473 |
doDeleteFromBeginning |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2474 |
"delete all changes from 1 to the current" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2475 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2476 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2477 |
self deleteChangesFrom:1 to:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2478 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2479 |
self autoSelectOrEnd:changeNr |
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 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2482 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2483 |
doDeleteRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2484 |
"delete all changes from current to the end" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2485 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2486 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2487 |
self deleteChangesFrom:changeNr to:(self numberOfChanges). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2488 |
self clearCodeView. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2489 |
self autoSelectOrEnd:changeNr-1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2490 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2491 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2492 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2493 |
doFileoutAndDeleteClassAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2494 |
"first fileOut the selected changes class then delete all changes |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2495 |
for it." |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2496 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2497 |
self withSingleSelectedChangeDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2498 |
| className class | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2499 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2500 |
className := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2501 |
className notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2502 |
class := Smalltalk classNamed:className. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2503 |
class notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2504 |
Class fileOutErrorSignal handle:[:ex | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2505 |
self warn:('fileout failed: ' , ex description). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2506 |
] do:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2507 |
class fileOut. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2508 |
self doDeleteClassAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2509 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2510 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2511 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2512 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2513 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2514 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2515 |
"Modified: 6.9.1995 / 17:11:16 / claus" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2516 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2517 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2518 |
doMakePatch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2519 |
"user wants a change to be made a patch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2520 |
- copy it over to the patches file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2521 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2522 |
self withSelectedChangesDo:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2523 |
self makeChangeAPatch:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2524 |
self autoSelect:(changeNr + 1) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2525 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2526 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2527 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2528 |
doMakePermanent |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2529 |
"user wants a change to be made permanent |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2530 |
- rewrite the source file where this change has to go" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2531 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2532 |
|yesNoBox| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2533 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2534 |
self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2535 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2536 |
yesNoBox := YesNoBox new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2537 |
yesNoBox title:(resources string:'Warning: this operation cannot be undone'). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2538 |
yesNoBox okText:(resources string:'continue') noText:(resources string:'abort'). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2539 |
yesNoBox okAction:[ |changeNr| |
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 |
changeNr := self theSingleSelection. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2542 |
changeNr notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2543 |
self makeChangePermanent:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2544 |
self autoSelect:(changeNr + 1) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2545 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2546 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2547 |
yesNoBox showAtPointer. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2548 |
yesNoBox destroy |
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 |
"Modified: 7.1.1997 / 23:03:33 / cg" |
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2553 |
doSave |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2554 |
"user wants a change to be appended to a file" |
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 |
|fileName| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2557 |
|
13651 | 2558 |
fileName := Dialog |
2559 |
requestFileNameForSave:(resources string:'Append change to:') |
|
2560 |
default:(lastSaveFileName ? '') |
|
2561 |
ok:(resources string:'Append') |
|
2562 |
abort:(resources string:'Abort') |
|
2563 |
pattern:'*.chg'. |
|
2564 |
fileName isEmptyOrNil ifTrue:[ |
|
2565 |
^ self |
|
2566 |
]. |
|
2567 |
lastSaveFileName := fileName. |
|
2568 |
||
2569 |
self withWriteCursorDo:[ |
|
2570 |
self withSelectedChangesDo:[:changeNr | |
|
2571 |
self appendChange:changeNr toFile:fileName. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2572 |
self autoSelect:(changeNr + 1) |
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 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2575 |
|
11685 | 2576 |
"Modified: / 27-07-2012 / 09:46:14 / cg" |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2577 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2578 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2579 |
doSaveClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2580 |
"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
|
2581 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2582 |
self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2583 |
self doSaveClassFrom: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 |
doSaveClassAll |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2587 |
"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
|
2588 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2589 |
self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2590 |
self doSaveClassFrom:1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2591 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2592 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2593 |
doSaveClassFrom:startNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2594 |
"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
|
2595 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2596 |
|changeNr classNameToSave| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2597 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2598 |
changeNr := self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2599 |
classNameToSave := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2600 |
classNameToSave notNil ifTrue:[ |
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2601 |
self saveClass:classNameToSave from:startNr |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2602 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2603 |
! |
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 |
doSaveClassRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2606 |
"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
|
2607 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2608 |
|changeNr| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2609 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
2610 |
changeNr := self checkSingleSelectedChange. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2611 |
self doSaveClassFrom:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2612 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2613 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2614 |
"/ self changeSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2615 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2616 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2617 |
doSaveRest |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2618 |
"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
|
2619 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2620 |
|changeNr fileName| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2621 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2622 |
(changeNr := self theSingleSelection) isNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2623 |
^ self information:(resources string:'Only possible if a single change is selected.'). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2624 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2625 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2626 |
fileName := Dialog |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2627 |
requestFileNameForSave:(resources string:'Append changes to:') |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2628 |
default:(lastSaveFileName ? '') |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2629 |
ok:(resources string:'Append') |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2630 |
abort:(resources string:'Abort') |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2631 |
pattern:'*.chg'. |
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 |
fileName notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2634 |
lastSaveFileName := fileName. |
11685 | 2635 |
self withWriteCursorDo:[ |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2636 |
changeNr to:(self numberOfChanges) do:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2637 |
changeListView setSelection:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2638 |
(self appendChange:changeNr toFile:fileName) ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2639 |
^ self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2640 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2641 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2642 |
] |
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 |
|
11685 | 2645 |
"Modified: / 27-07-2012 / 09:46:09 / cg" |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2646 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2647 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2648 |
doUpdate |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2649 |
"reread the changes-file" |
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 |
self readChangesFileInBackground:true. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2652 |
self newLabel:''. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2653 |
realized ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2654 |
self setChangeList. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2655 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2656 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2657 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2658 |
doWriteBack |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2659 |
"write back the list onto the changes file" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2660 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2661 |
anyChanges ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2662 |
(self writeBackChanges) ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2663 |
realized ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2664 |
self readChangesFile. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2665 |
realized ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2666 |
self setChangeList |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2667 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2668 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2669 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2670 |
] |
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 |
"Modified: 5.9.1996 / 17:19:46 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2673 |
! |
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 |
findClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2676 |
"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
|
2677 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2678 |
|current| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2679 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2680 |
changeNrShown notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2681 |
current := self classNameOfChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2682 |
]. |
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 |
self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2685 |
askForSearch:'Class to search for:' |
17394 | 2686 |
initialAnswer:(current ? lastSearchString) |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2687 |
thenSearchUsing:[:searchString :changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2688 |
|thisClassName| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2689 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2690 |
thisClassName := self classNameOfChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2691 |
thisClassName notNil |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2692 |
and:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2693 |
(thisClassName sameAs: searchString) |
13440 | 2694 |
or:[searchString includesMatchCharacters and:[searchString match:thisClassName caseSensitive:false]]] |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2695 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2696 |
onCancel:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2697 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2698 |
lastSearchType := #class. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2699 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
17382 | 2700 |
|
17394 | 2701 |
"Modified: / 12-02-2017 / 11:31:47 / cg" |
11499
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2704 |
findFirstForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2705 |
"findNextForClass menu action: select the next change for the selected changes class" |
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 |
self findNextForClassStartingAt:1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2708 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2709 |
"Created: / 20-11-2006 / 16:37:56 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2710 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2711 |
|
15674 | 2712 |
findFirstForClass:className |
2713 |
"findNextForClass menu action: select the next change for the selected changes class" |
|
2714 |
||
2715 |
self findNextForClass:className startingAt:1 |
|
2716 |
! |
|
2717 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2718 |
findLastForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2719 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2720 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2721 |
self findPreviousForClassStartingAt:(self numberOfChanges) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2722 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2723 |
"Created: / 20-11-2006 / 16:39:15 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2724 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2725 |
|
15674 | 2726 |
findLastForClass:className |
2727 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
|
2728 |
||
2729 |
self findPreviousForClass:className startingAt:(self numberOfChanges) |
|
2730 |
||
2731 |
"Created: / 20-11-2006 / 16:39:15 / cg" |
|
2732 |
! |
|
2733 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2734 |
findLastSnapshot |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2735 |
"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
|
2736 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2737 |
"/ lastSearchType := #snapshot. |
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 |
self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2740 |
findPreviousForWhich: [:changeNr | self changeIsSnapShotInfo:changeNr ] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2741 |
startingAt:(self numberOfChanges) |
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 |
"Created: / 06-10-2006 / 11:03:39 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2744 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2745 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2746 |
findNext |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2747 |
"findNext menu action: select the next change. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2748 |
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
|
2749 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2750 |
lastSearchType == #selector ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2751 |
^ self findNextForSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2752 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2753 |
lastSearchType == #snapshot ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2754 |
^ self findNextSnapshot |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2755 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2756 |
lastSearchType == #string ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2757 |
^ self findNextForString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2758 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2759 |
lastSearchType == #difference ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2760 |
^ self findNextDifference |
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 |
^ self findNextForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2764 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2765 |
"Created: / 18.6.1998 / 22:15:00 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2766 |
"Modified: / 18.6.1998 / 22:15:25 / cg" |
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2769 |
findNextDifference |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2770 |
lastSearchType := #difference. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2771 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2772 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2773 |
self findNextForWhich:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2774 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2775 |
"/ same |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2776 |
false |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2777 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2778 |
"/ different |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2779 |
true |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2780 |
] |
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 |
! |
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 |
findNextForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2785 |
"findNextForClass menu action: select the next change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2786 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2787 |
self findNextForClassStartingAt: changeNrShown + 1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2788 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2789 |
"Modified: / 20-11-2006 / 16:37:49 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2790 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2791 |
|
15674 | 2792 |
findNextForClass:className startingAt:startNr |
2793 |
"findNextForClass menu action: select the next change for the selected changes class" |
|
2794 |
||
2795 |
lastSearchType := #class. |
|
2796 |
||
2797 |
self |
|
2798 |
findNextForWhich:[:changeNr | |
|
2799 |
|thisClass| |
|
2800 |
||
2801 |
thisClass := self classNameOfChange:changeNr. |
|
2802 |
(thisClass = className |
|
2803 |
or:[className includesMatchCharacters |
|
2804 |
and:[className match:thisClass]])] |
|
2805 |
startingAt:startNr |
|
2806 |
! |
|
2807 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2808 |
findNextForClassStartingAt:startNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2809 |
"findNextForClass menu action: select the next change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2810 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2811 |
|cls| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2812 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2813 |
lastSearchType := #class. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2814 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2815 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2816 |
cls := self classNameOfChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2817 |
cls isNil ifTrue:[^ self]. |
15674 | 2818 |
self findNextForClass:cls startingAt:startNr. |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2819 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2820 |
"Created: / 20-11-2006 / 16:37:37 / cg" |
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2823 |
findNextForSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2824 |
"findNextForSelector menu action: select the next change for the selected changes selector" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2825 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2826 |
|sel| |
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 |
lastSearchType := #selector. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2829 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2830 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2831 |
sel := self selectorOfMethodChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2832 |
sel isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2833 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2834 |
self findNextForWhich: [:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2835 |
|thisSelector| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2836 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2837 |
thisSelector := self selectorOfMethodChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2838 |
(thisSelector = sel or:[sel includesMatchCharacters and:[sel match:thisSelector]]) |
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 |
findNextForString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2844 |
lastSearchString isNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2845 |
^ self findString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2846 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2847 |
self findNextWithString:lastSearchString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2848 |
! |
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 |
findNextForWhich:aBlock |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2851 |
"helper: select the next change for which aBlock evaluates to true" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2852 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2853 |
^ self findNextForWhich:aBlock startingAt:changeNrShown + 1 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2854 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2855 |
"Modified: / 20-11-2006 / 16:34:23 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2856 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2857 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2858 |
findNextForWhich:aBlock startingAt:changeNrToStartSearch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2859 |
"helper: select the next change for which aBlock evaluates to true" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2860 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2861 |
^ self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2862 |
findNextOrPrevious:#next |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2863 |
forWhich:aBlock startingAt:changeNrToStartSearch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2864 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2865 |
"Created: / 20-11-2006 / 16:34:06 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2866 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2867 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2868 |
findNextOrPrevious:direction forWhich:aBlock startingAt:changeNrToStartSearch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2869 |
"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
|
2870 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2871 |
self withCursor:Cursor questionMark do:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2872 |
Object userInterruptSignal handle:[:ex | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2873 |
self beep. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2874 |
^ 0 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2875 |
] do:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2876 |
|increment nr lastNr| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2877 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2878 |
increment := (direction == #previous) ifTrue:[-1] ifFalse:[1]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2879 |
lastNr := self numberOfChanges. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2880 |
nr := changeNrToStartSearch. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2881 |
[ (direction == #previous and:[nr >= 1]) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2882 |
or:[ direction == #next and:[ nr <= lastNr]] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2883 |
] whileTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2884 |
(aBlock value:nr) ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2885 |
changeListView setSelection:nr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2886 |
self changeSelection:nr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2887 |
^ nr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2888 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2889 |
nr := nr + increment. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2890 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2891 |
] |
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 showNotFound. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2894 |
self windowGroup sensor flushKeyboard. "/ avoid multiple beeps, in case of type ahead |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2895 |
^ 0 |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2896 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2897 |
"Created: / 08-03-2012 / 11:57:26 / cg" |
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 |
findNextSnapshot |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2901 |
"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
|
2902 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2903 |
lastSearchType := #snapshot. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2904 |
changeNrShown isNil ifTrue:[^ self]. |
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 findNextForWhich: [:changeNr | self changeIsSnapShotInfo:changeNr ] |
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 |
findNextWithString:searchString |
14939 | 2910 |
|includesMatchCharacters| |
2911 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2912 |
lastSearchType := #string. |
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 |
lastSearchString := searchString. |
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 |
changeNrShown isNil ifTrue:[ |
14939 | 2917 |
changeNrShown := 0. |
2918 |
]. |
|
2919 |
||
2920 |
includesMatchCharacters := searchString includesMatchCharacters. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2921 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2922 |
self findNextForWhich: |
14939 | 2923 |
[:changeNr | |
2924 |
|s| |
|
2925 |
||
2926 |
s := self sourceOfMethodChange:changeNr. |
|
2927 |
s notNil and:[ |
|
2928 |
(includesMatchCharacters not and:[(s findString:searchString) ~~ 0]) |
|
2929 |
or:[ includesMatchCharacters and:[('*' , searchString , '*') match:s ]]] |
|
2930 |
]. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2931 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2932 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2933 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2934 |
codeView setSearchPattern:searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2935 |
codeView |
14939 | 2936 |
searchFwd:searchString |
2937 |
ignoreCase:false |
|
2938 |
startingAtLine:1 col:0 |
|
2939 |
ifAbsent:nil. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2940 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2941 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2942 |
findPrevious |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2943 |
"findPrevious menu action: select the previous change. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2944 |
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
|
2945 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2946 |
lastSearchType == #selector ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2947 |
^ self findPreviousForSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2948 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2949 |
lastSearchType == #snapshot ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2950 |
^ self findPreviousSnapshot |
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 |
lastSearchType == #string ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2953 |
^ self findPreviousForString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2954 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2955 |
lastSearchType == #difference ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2956 |
^ self findPreviousDifference |
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 |
^ self findPreviousForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2960 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2961 |
"Created: / 18.6.1998 / 22:15:15 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2962 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2963 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2964 |
findPreviousDifference |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2965 |
lastSearchType := #difference. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2966 |
changeNrShown isNil ifTrue:[^ self]. |
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 |
self findPreviousForWhich:[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2969 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2970 |
"/ same |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2971 |
false |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2972 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2973 |
"/ different |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2974 |
true |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2975 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2976 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2977 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2978 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2979 |
findPreviousForClass |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2980 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2981 |
|
12738 | 2982 |
self findPreviousForClassStartingAt:((changeNrShown ? 1) - 1) |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2983 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2984 |
"Modified: / 20-11-2006 / 16:39:04 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2985 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
2986 |
|
15674 | 2987 |
findPreviousForClass:className startingAt:startNr |
2988 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
|
2989 |
||
2990 |
lastSearchType := #class. |
|
2991 |
||
2992 |
self |
|
2993 |
findPreviousForWhich: |
|
2994 |
[:changeNr | |
|
2995 |
|thisClass| |
|
2996 |
||
2997 |
thisClass := self classNameOfChange:changeNr. |
|
2998 |
(thisClass = className |
|
2999 |
or:[className includesMatchCharacters |
|
3000 |
and:[className match:thisClass]])] |
|
3001 |
startingAt:startNr |
|
3002 |
! |
|
3003 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3004 |
findPreviousForClassStartingAt:startNr |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3005 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3006 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3007 |
|cls| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3008 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3009 |
lastSearchType := #class. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3010 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3011 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3012 |
cls := self classNameOfChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3013 |
cls isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3014 |
|
15674 | 3015 |
self findPreviousForClass:cls startingAt:startNr |
11499
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 |
"Created: / 20-11-2006 / 16:38:37 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3018 |
! |
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 |
findPreviousForSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3021 |
"findPreviousForSelector menu action: select the previous change for the selected changes selector" |
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 |
|sel| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3024 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3025 |
lastSearchType := #selector. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3026 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3027 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3028 |
sel := self selectorOfMethodChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3029 |
sel isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3030 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3031 |
self findPreviousForWhich: |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3032 |
[:changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3033 |
|thisSelector| |
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 |
thisSelector := self selectorOfMethodChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3036 |
(thisSelector = sel |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3037 |
or:[sel includesMatchCharacters and:[sel match:thisSelector]]) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3038 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3039 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3040 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3041 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3042 |
findPreviousForString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3043 |
lastSearchString isNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3044 |
^ self findString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3045 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3046 |
self findPreviousWithString:lastSearchString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3047 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3048 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3049 |
findPreviousForWhich:aBlock |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3050 |
"helper: select the previous change for which aBlock evaluates to true" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3051 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3052 |
^ self findPreviousForWhich:aBlock startingAt:(changeNrShown - 1) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3053 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3054 |
"Modified: / 06-10-2006 / 11:01:38 / cg" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3055 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3056 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3057 |
findPreviousForWhich:aBlock startingAt:changeNrToStartSearch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3058 |
"helper: select the previous change for which aBlock evaluates to true" |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3059 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3060 |
^ self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3061 |
findNextOrPrevious:#previous |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3062 |
forWhich:aBlock startingAt:changeNrToStartSearch |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3063 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3064 |
"Created: / 06-10-2006 / 11:01:09 / cg" |
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3067 |
findPreviousSnapshot |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3068 |
"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
|
3069 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3070 |
lastSearchType := #snapshot. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3071 |
changeNrShown isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3072 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3073 |
self findPreviousForWhich: [:changeNr | self changeIsSnapShotInfo:changeNr ] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3074 |
! |
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 |
findPreviousWithString:searchString |
14939 | 3077 |
|includesMatchCharacters| |
3078 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3079 |
lastSearchType := #string. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3080 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3081 |
lastSearchString := searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3082 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3083 |
changeNrShown isNil ifTrue:[ |
14939 | 3084 |
changeNrShown := 0. |
3085 |
]. |
|
3086 |
||
3087 |
includesMatchCharacters := searchString includesMatchCharacters. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3088 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3089 |
self findPreviousForWhich: |
14939 | 3090 |
[:changeNr | |
3091 |
|s | |
|
3092 |
||
3093 |
s := self sourceOfMethodChange:changeNr. |
|
3094 |
s notNil and:[ |
|
3095 |
(includesMatchCharacters not and:[(s findString:searchString) ~~ 0]) |
|
3096 |
or:[includesMatchCharacters and:[('*' , searchString , '*') match:s ]]] |
|
3097 |
]. |
|
11499
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 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
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 |
codeView setSearchPattern:searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3102 |
codeView |
14939 | 3103 |
searchFwd:searchString |
3104 |
ignoreCase:false |
|
3105 |
startingAtLine:1 col:0 |
|
3106 |
ifAbsent:nil. |
|
11499
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 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3109 |
findSelector |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3110 |
"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
|
3111 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3112 |
|current| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3113 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3114 |
changeNrShown notNil ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3115 |
current := self selectorOfMethodChange:changeNrShown. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3116 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3117 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3118 |
self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3119 |
askForSearch:'Selector to search for:' |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3120 |
initialAnswer:current |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3121 |
thenSearchUsing:[:searchString :changeNr | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3122 |
|thisSelector| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3123 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3124 |
thisSelector := self selectorOfMethodChange:changeNr. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3125 |
(thisSelector = searchString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3126 |
or:[searchString includesMatchCharacters and:[searchString match:thisSelector]]) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3127 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3128 |
onCancel:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3129 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3130 |
lastSearchType := #selector. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3131 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3132 |
! |
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 |
findString |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3135 |
|searchString directionHolder| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3136 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3137 |
lastSearchType := #string. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3138 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3139 |
searchString := codeView selection. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3140 |
searchString size == 0 ifTrue:[searchString := lastSearchString]. |
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 |
searchString := self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3143 |
askForSearchString:'String to search for:' |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3144 |
initialAnswer:(searchString ? '') |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3145 |
directionInto:(directionHolder := ValueHolder new). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3146 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3147 |
searchString size == 0 ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3148 |
^ self |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3149 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3150 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3151 |
directionHolder value == #backward ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3152 |
self findPreviousWithString:searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3153 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3154 |
self findNextWithString:searchString. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3155 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3156 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3157 |
|
10719 | 3158 |
ignorePublicPrivateCategories:aBoolean |
3159 |
UserPreferences current ignorePublicPrivateCategories:aBoolean |
|
3160 |
||
3161 |
"Created: / 23-09-2011 / 19:52:21 / cg" |
|
3162 |
! |
|
3163 |
||
3202 | 3164 |
menuExit |
3204 | 3165 |
self closeRequest |
3202 | 3166 |
! |
3167 |
||
3168 |
openAboutThisApplication |
|
3169 |
"opens an about box for this application." |
|
3170 |
||
7115 | 3171 |
Dialog aboutClass:self class. |
3172 |
||
3173 |
"Modified: / 12-09-2006 / 17:20:22 / cg" |
|
3202 | 3174 |
! |
3175 |
||
3176 |
openHTMLDocument:relativeDocPath |
|
3177 |
HTMLDocumentView openFullOnDocumentationFile:relativeDocPath |
|
3178 |
! |
|
3179 |
||
9055 | 3180 |
openSettingsDialog |
14558 | 3181 |
|settingsList| |
9055 | 3182 |
|
3183 |
settingsList := |
|
3184 |
#( |
|
3185 |
#('Editor' #'AbstractSettingsApplication::EditSettingsAppl' ) |
|
3186 |
"/ #('Syntax Color' #'AbstractSettingsApplication::SyntaxColorSettingsAppl' ) |
|
3187 |
"/ #('Code Format' #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl' ) |
|
3188 |
"/ #('System Browser' #'AbstractSettingsApplication::SystemBrowserSettingsAppl' ) |
|
3189 |
#('Compiler' #'AbstractSettingsApplication::GeneralCompilerSettingsAppl' ) |
|
3190 |
#('Compiler/ByteCode' #'AbstractSettingsApplication::ByteCodeCompilerSettingsAppl' ) |
|
3191 |
"/ #('Source Code Management' #'AbstractSettingsApplication::SourceCodeManagementSettingsAppl') |
|
3192 |
). |
|
3193 |
||
14558 | 3194 |
SettingsDialog |
3195 |
openWithList:settingsList |
|
3196 |
label:(resources string:'Change Browser Settings'). |
|
9055 | 3197 |
! |
3198 |
||
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3199 |
setEnforcedNameSpace |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3200 |
|nsName listOfKnownNameSpaces keepAsDefaultHolder| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3201 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3202 |
listOfKnownNameSpaces := Set new. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3203 |
NameSpace |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3204 |
allNameSpaces |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3205 |
do:[:eachNameSpace | |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3206 |
listOfKnownNameSpaces add:eachNameSpace name |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3207 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3208 |
listOfKnownNameSpaces := listOfKnownNameSpaces asOrderedCollection sort. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3209 |
|
15450 | 3210 |
Dialog modifyingBoxWith:[:box | |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3211 |
keepAsDefaultHolder := true asValue. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3212 |
box verticalPanel |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3213 |
add:((CheckBox |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3214 |
label:(resources string:'Use this as default in the future')) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3215 |
model:keepAsDefaultHolder). |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3216 |
] do:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3217 |
nsName := Dialog |
15450 | 3218 |
request:(resources string:'When applying, new classes are created in nameSpace:') |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3219 |
initialAnswer:(enforcedNameSpace ? LastEnforcedNameSpace ? Class nameSpaceQuerySignal query name) |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3220 |
list:listOfKnownNameSpaces. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3221 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3222 |
nsName isNil ifTrue:[^ self]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3223 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3224 |
(nsName isEmpty or:[nsName = 'Smalltalk']) ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3225 |
applyInOriginalNameSpace value:true. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3226 |
LastEnforcedNameSpace := enforcedNameSpace := nil. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3227 |
] ifFalse:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3228 |
applyInOriginalNameSpace value:false. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3229 |
LastEnforcedNameSpace := enforcedNameSpace := NameSpace name:nsName. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3230 |
autoCompare value ifTrue:[ |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3231 |
self doUpdate |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3232 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3233 |
]. |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3234 |
KeepEnforcedNameSpace := keepAsDefaultHolder value. |
11680
5b1a15736f97
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11499
diff
changeset
|
3235 |
codeView nameSpaceForDoits:enforcedNameSpace. |
5b1a15736f97
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11499
diff
changeset
|
3236 |
diffView textViews do:[:each | each nameSpaceForDoits:enforcedNameSpace]. |
5b1a15736f97
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11499
diff
changeset
|
3237 |
|
5b1a15736f97
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11499
diff
changeset
|
3238 |
"Modified: / 26-07-2012 / 23:06:23 / cg" |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3239 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3240 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3241 |
setEnforcedPackage |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3242 |
|pkg listOfKnownPackages| |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3243 |
|
16207 | 3244 |
listOfKnownPackages := Smalltalk allPackageIDs. |
12645 | 3245 |
"/ Smalltalk allClassesDo:[:eachClass | |
3246 |
"/ |package| |
|
3247 |
"/ |
|
3248 |
"/ package := eachClass package. |
|
3249 |
"/ package size > 0 ifTrue:[ |
|
3250 |
"/ listOfKnownPackages add:package |
|
3251 |
"/ ] |
|
3252 |
"/ ]. |
|
3253 |
listOfKnownPackages := listOfKnownPackages asNewOrderedCollection sort. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3254 |
|
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3255 |
pkg := Dialog |
12645 | 3256 |
request:'When applying, changes go into package:' |
3257 |
initialAnswer:(enforcedPackage ? Class packageQuerySignal query) |
|
3258 |
list:listOfKnownPackages. |
|
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3259 |
pkg size ~~ 0 ifTrue:[ |
12645 | 3260 |
enforcedPackage := pkg |
11499
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3261 |
] |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3262 |
! |
dcd14a0cdbc5
changed: #setEnforcedNameSpace
Claus Gittinger <cg@exept.de>
parents:
11477
diff
changeset
|
3263 |
|
3202 | 3264 |
showAboutSTX |
3265 |
ToolApplicationModel openAboutSTX |
|
3266 |
! ! |
|
3267 |
||
202 | 3268 |
!ChangesBrowser methodsFor:'private'! |
3269 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3270 |
autoSelect:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3271 |
"select a change" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3272 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3273 |
self class autoSelectNext ifTrue:[ |
6288 | 3274 |
(changeNr <= self numberOfChanges) ifTrue:[ |
3275 |
changeListView setSelection:changeNr. |
|
3276 |
self changeSelection:changeNr. |
|
3277 |
^ self |
|
3278 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3279 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3280 |
self clearCodeView. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3281 |
changeListView setSelection:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3282 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3283 |
"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
|
3284 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3285 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3286 |
autoSelectLast |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3287 |
"select the last change" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3288 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3289 |
self autoSelect:(self numberOfChanges) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3290 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3291 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3292 |
autoSelectOrEnd:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3293 |
"select the next change or the last" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3294 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3295 |
|last| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3296 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3297 |
last := self numberOfChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3298 |
changeNr < last ifTrue:[ |
6288 | 3299 |
self autoSelect:changeNr |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3300 |
] ifFalse:[ |
6288 | 3301 |
last == 0 ifTrue:[ |
3302 |
last := nil |
|
3303 |
]. |
|
3304 |
changeListView setSelection:last . |
|
3305 |
self changeSelection:last. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3306 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3307 |
|
3406
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
3308 |
"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
|
3309 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3310 |
|
8619 | 3311 |
beep |
15136 | 3312 |
"output an audible beep or bell on my screen device" |
3313 |
||
8619 | 3314 |
UserPreferences current beepInEditor ifTrue:[ |
3315 |
super beep |
|
3316 |
] |
|
3317 |
! |
|
3318 |
||
16372 | 3319 |
changeChunkAt:index |
3320 |
^ (changeInfoList at:index) chunk |
|
3321 |
"/ ^ changeChunks at:index |
|
3322 |
||
3323 |
"Created: / 01-05-2016 / 18:24:28 / cg" |
|
3324 |
! |
|
3325 |
||
3326 |
changeClassNameAt:index |
|
3327 |
^ (changeInfoList at:index) className |
|
3328 |
||
3329 |
"Created: / 01-05-2016 / 18:28:13 / cg" |
|
3330 |
"Modified: / 01-05-2016 / 19:32:42 / cg" |
|
3331 |
! |
|
3332 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3333 |
checkClassIsLoaded:aClass |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3334 |
"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
|
3335 |
|
6162
5ab2371c63a1
Compare and Compress: continue comparing even if the user doesn't
Stefan Vogel <sv@exept.de>
parents:
6048
diff
changeset
|
3336 |
|cls answer| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3337 |
|
3359
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
3338 |
cls := aClass theNonMetaclass. |
5825 | 3339 |
cls isLoaded ifTrue:[ |
6357 | 3340 |
^ true. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3341 |
]. |
11805 | 3342 |
(classesNotToBeAutoloaded includes:#all) ifTrue:[ |
3343 |
^ false. |
|
3344 |
]. |
|
8026
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3345 |
(classesNotToBeAutoloaded includes:cls) ifTrue:[ |
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3346 |
^ false. |
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3347 |
]. |
5825 | 3348 |
|
6216 | 3349 |
autoloadAsRequired value == true ifTrue:[ |
6357 | 3350 |
answer := true |
6216 | 3351 |
] ifFalse:[ |
11805 | 3352 |
answer := Dialog |
3353 |
confirmWithCancel:(resources |
|
17400 | 3354 |
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 | 3355 |
with:cls name allBold) |
3356 |
labels:(resources array:#('Cancel' 'No for All' 'No' 'Yes')) |
|
3357 |
values:#(nil #never false true) |
|
3358 |
default:4. |
|
3359 |
answer isNil ifTrue:[ |
|
3360 |
"cancel the operation" |
|
3361 |
AbortAllOperationRequest raise. |
|
3362 |
"not reached" |
|
3363 |
]. |
|
3364 |
answer == #never ifTrue:[ |
|
3365 |
classesNotToBeAutoloaded add:#all. |
|
3366 |
^ false. |
|
3367 |
]. |
|
8026
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3368 |
]. |
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3369 |
|
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3370 |
answer ifTrue:[ |
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3371 |
Autoload autoloadFailedSignal catch:[ |
6357 | 3372 |
^ cls autoload isLoaded |
3373 |
] |
|
5825 | 3374 |
]. |
6162
5ab2371c63a1
Compare and Compress: continue comparing even if the user doesn't
Stefan Vogel <sv@exept.de>
parents:
6048
diff
changeset
|
3375 |
|
8026
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3376 |
classesNotToBeAutoloaded add:cls. |
48f053eed5b8
on #compareAndCompress - ask only once for each unloaded class
Stefan Vogel <sv@exept.de>
parents:
8000
diff
changeset
|
3377 |
|
6162
5ab2371c63a1
Compare and Compress: continue comparing even if the user doesn't
Stefan Vogel <sv@exept.de>
parents:
6048
diff
changeset
|
3378 |
^ false. |
17400 | 3379 |
|
3380 |
"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
|
3381 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3382 |
|
11896
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3383 |
checkSingleSelectedChange |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3384 |
"just a helper, check for a single selection" |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3385 |
|
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3386 |
|changeNr| |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3387 |
|
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3388 |
(changeNr := self theSingleSelection) isNil ifTrue:[ |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3389 |
self information:'Only possible if a single change is selected.'. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3390 |
AbortSignal raise. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3391 |
^ nil. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3392 |
]. |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3393 |
^ changeNr |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3394 |
! |
627b63f51074
added: #checkSingleSelectedChange
Claus Gittinger <cg@exept.de>
parents:
11805
diff
changeset
|
3395 |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3396 |
classFromEvaluatingTree:aParseTree |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3397 |
|thisClass| |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3398 |
|
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3399 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3400 |
do:[ |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3401 |
thisClass := Parser undefinedVariableError handle:[:ex | ] do:[ aParseTree evaluate ]. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3402 |
]. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3403 |
^ thisClass |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3404 |
|
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3405 |
"Created: / 05-03-2012 / 14:28:01 / cg" |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3406 |
! |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3407 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3408 |
clearCodeView |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3409 |
"clear the (lower) code view." |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3410 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3411 |
self unselect "changeListView deselect". |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3412 |
codeView contents:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3413 |
changeNrShown := nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3414 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3415 |
|
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3416 |
currentSourceForParseTree:parseTree |
12845 | 3417 |
|selector thisClass method mClass thisClassSym ownerClass receiver classGlobalNode| |
4857 | 3418 |
|
6288 | 3419 |
(parseTree isNil |
3420 |
or:[parseTree == #Error |
|
4857 | 3421 |
or:[ parseTree isMessage not ]]) ifTrue:[ |
6614 | 3422 |
^ nil |
4857 | 3423 |
]. |
3424 |
||
3425 |
selector := parseTree selector. |
|
3426 |
receiver := parseTree receiver. |
|
3427 |
||
3428 |
selector == #'removeSelector:' ifTrue:[ |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3429 |
thisClass := self classFromEvaluatingTree:receiver. |
6614 | 3430 |
thisClass isBehavior ifTrue:[ |
3431 |
thisClass isLoaded ifTrue:[ |
|
3432 |
selector := (parseTree arg1 evaluate). |
|
3433 |
(thisClass includesSelector:selector) ifTrue:[ |
|
3434 |
^ (thisClass compiledMethodAt:selector) source. |
|
3435 |
] |
|
3436 |
] ifFalse:[ |
|
3437 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
3438 |
] |
|
3439 |
] ifFalse:[ |
|
3440 |
^ 'Cannot compare this change (class not present)'. |
|
3441 |
]. |
|
4857 | 3442 |
]. |
3443 |
selector == #'comment:' ifTrue:[ |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3444 |
thisClass := self classFromEvaluatingTree:receiver. |
6614 | 3445 |
thisClass isBehavior ifTrue:[ |
3446 |
thisClass isLoaded ifTrue:[ |
|
3447 |
^ thisClass name , ' comment: ' , thisClass comment storeString. |
|
3448 |
] ifFalse:[ |
|
3449 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
3450 |
] |
|
3451 |
] ifFalse:[ |
|
3452 |
^ 'Cannot compare this change (class not present)'. |
|
3453 |
]. |
|
4857 | 3454 |
]. |
3455 |
||
7953 | 3456 |
(#(#'category:' #'package:') includes:selector) ifTrue:[ |
6614 | 3457 |
receiver isMessage ifTrue:[ |
3458 |
receiver selector == #compiledMethodAt: ifTrue:[ |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3459 |
"/ thisClass := self classFromEvaluatingTree:receiver receiver. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3460 |
"/ thisClass isNil ifTrue:[ |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3461 |
"/ ^ 'Class does not exist.'. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3462 |
"/ ]. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3463 |
|
6614 | 3464 |
classGlobalNode := receiver receiver. |
3465 |
(classGlobalNode isMessage and:[classGlobalNode selector == #class]) ifTrue:[ |
|
3466 |
classGlobalNode := classGlobalNode receiver |
|
3467 |
]. |
|
3468 |
classGlobalNode isUndeclared ifTrue:[ |
|
3469 |
^ 'Class does not exist.'. |
|
3470 |
]. |
|
3471 |
Error handle:[method := nil] do:[method := receiver evaluate]. |
|
7953 | 3472 |
method isMethod ifFalse:[ |
3473 |
^ 'There is no such method'. |
|
3474 |
]. |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3475 |
mClass := method mclass. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3476 |
|
7953 | 3477 |
selector == #category: ifTrue:[ |
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3478 |
"/ method category = parseTree arg1 evaluate ifFalse:[ |
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3479 |
^ '(' , mClass name , ' compiledMethodAt: ' , method selector storeString , ') category: ' , method category storeString. |
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3480 |
"/ ]. |
6614 | 3481 |
] ifFalse:[ |
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3482 |
"/ method package = parseTree arg1 evaluate ifFalse:[ |
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3483 |
^ '(' , mClass name , ' compiledMethodAt: ' , method selector storeString , ') package: ' , method package storeString. |
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3484 |
"/ ]. |
7953 | 3485 |
]. |
3486 |
^ nil |
|
6614 | 3487 |
] |
3488 |
] |
|
4857 | 3489 |
]. |
3490 |
||
3491 |
selector == #'instanceVariableNames:' ifTrue:[ |
|
6614 | 3492 |
receiver isMessage ifTrue:[ |
3493 |
receiver selector == #class ifTrue:[ |
|
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
3494 |
thisClass := self classFromEvaluatingTree:receiver. |
6614 | 3495 |
thisClass isBehavior ifTrue:[ |
3496 |
thisClass isLoaded ifTrue:[ |
|
4857 | 3497 |
"/ varsHere := thisClass instanceVariableString asCollectionOfWords. |
3498 |
"/ varsInChange := (parseTree arguments at:1) evaluate asCollectionOfWords. |
|
6614 | 3499 |
^ thisClass definition. |
3500 |
] ifFalse:[ |
|
3501 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
3502 |
]. |
|
3503 |
] ifFalse:[ |
|
3504 |
^ 'Cannot compare this change (class not present)'. |
|
3505 |
] |
|
3506 |
]. |
|
3507 |
] |
|
4857 | 3508 |
]. |
3509 |
||
3510 |
(Class definitionSelectors includes:selector) |
|
6288 | 3511 |
"/ selector == #'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' |
4857 | 3512 |
ifTrue:[ |
6614 | 3513 |
"/ Class nameSpaceQuerySignal |
3514 |
"/ answer:(self nameSpaceForApply) |
|
3515 |
"/ do:[ |
|
3516 |
"/ superClass := receiver evaluate. |
|
3517 |
"/ ]. |
|
3518 |
"/ superClass isBehavior ifFalse:[ |
|
3519 |
"/ self nameSpaceForApply classNamed:receiver name |
|
3520 |
"/ ]. |
|
3521 |
"/ superClass isBehavior ifFalse:[ |
|
3522 |
"/ |rest matchingKeys superClassName| |
|
3523 |
"/ |
|
3524 |
"/ rest := '::' , receiver name. |
|
3525 |
"/ matchingKeys := Smalltalk keys select:[:nm | nm endsWith:rest]. |
|
3526 |
"/ superClassName := Dialog choose:'Which Class ?' fromList:matchingKeys lines:10. |
|
3527 |
"/ superClassName notEmptyOrNil ifTrue:[ |
|
3528 |
"/ superClass := Smalltalk at:superClassName asSymbol. |
|
3529 |
"/ ]. |
|
3530 |
"/ ]. |
|
3531 |
"/ superClass isBehavior ifFalse:[ |
|
3532 |
"/ ^ 'Cannot compare this change\\(no such superclass).' withCRs. |
|
3533 |
"/ ]. |
|
3534 |
"/ superClass isLoaded ifFalse:[ |
|
3535 |
"/ ^ 'Cannot compare this change\\(superclass not loaded).' withCRs. |
|
3536 |
"/ ]. |
|
3537 |
||
3538 |
thisClassSym := (parseTree arguments at:1) evaluate. |
|
3539 |
||
3540 |
(selector endsWith:':privateIn:') ifTrue:[ |
|
3541 |
ownerClass := (parseTree arguments at:5). |
|
3542 |
ownerClass isUndeclared ifFalse:[ |
|
3543 |
ownerClass := ownerClass evaluate. |
|
3544 |
] ifTrue:[ |
|
3545 |
ownerClass := nil. |
|
3546 |
]. |
|
3547 |
ownerClass isNil ifTrue:[ |
|
3548 |
^ 'Cannot compare this change\\(owning class is not loaded).' withCRs. |
|
3549 |
]. |
|
3550 |
thisClass := ownerClass privateClassesAt:thisClassSym. |
|
3551 |
] ifFalse:[ |
|
3552 |
thisClass := (self nameSpaceForApply) at:thisClassSym ifAbsent:nil. |
|
3553 |
]. |
|
3554 |
thisClass notNil ifTrue:[ |
|
3555 |
thisClass isLoaded ifFalse:[ |
|
3556 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
3557 |
] ifTrue:[ |
|
3558 |
^ thisClass definition. |
|
3559 |
] |
|
3560 |
] |
|
4857 | 3561 |
]. |
3562 |
||
3563 |
^ nil. |
|
9570
f81993219003
changed: #oldSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
9548
diff
changeset
|
3564 |
|
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3565 |
"Created: / 15-02-2012 / 15:11:15 / cg" |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3566 |
! |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3567 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3568 |
isChangeSetBrowser |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3569 |
^ false |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3570 |
! |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3571 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3572 |
makeDiffViewInvisible |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3573 |
diffViewBox lower |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3574 |
! |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3575 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3576 |
makeDiffViewVisible |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3577 |
diffViewBox raise |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3578 |
! |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3579 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3580 |
nameSpaceForApply |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3581 |
applyInOriginalNameSpace value ifFalse:[ |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3582 |
^ enforcedNameSpace ? Class nameSpaceQuerySignal query. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3583 |
]. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3584 |
^ Smalltalk. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3585 |
! |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3586 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3587 |
newLabel:how |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3588 |
|l| |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3589 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3590 |
l := self class defaultLabel. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3591 |
(changeFileName notNil and:[changeFileName ~= 'changes']) ifTrue:[ |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3592 |
l := l , ': ', changeFileName |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3593 |
]. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3594 |
l := l , ' ' , how. |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3595 |
self label:l |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3596 |
|
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3597 |
"Created: / 08-09-1995 / 19:32:04 / claus" |
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
3598 |
"Modified: / 12-11-2006 / 16:23:53 / cg" |
4857 | 3599 |
! |
3600 |
||
8665 | 3601 |
parseExpression:chunk |
3602 |
^ self parseExpression:chunk inNameSpace:(self nameSpaceForApply). |
|
3603 |
! |
|
3604 |
||
3605 |
parseExpression:text inNameSpace:nameSpace |
|
3606 |
|parser p| |
|
3607 |
||
3608 |
"/ old: |
|
3609 |
"/ does not care for VW qualified names |
|
3610 |
"/ ^ Parser parseExpression:text inNameSpace:nameSpace. |
|
3611 |
||
17094 | 3612 |
(text includesString:'§') ifTrue:[self halt]. |
3613 |
||
8665 | 3614 |
"/ new: |
3615 |
parser := Parser for:(ReadStream on:text). |
|
3616 |
parser parserFlags allowQualifiedNames:true. |
|
17094 | 3617 |
parser parserFlags allowDollarInIdentifier:true. |
3618 |
parser parserFlags allowParagraphInIdentifier:true. |
|
9228
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3619 |
Error handle:[:ex | |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3620 |
^ nil |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3621 |
] do:[ |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3622 |
p := parser |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3623 |
parseExpressionWithSelf:nil |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3624 |
notifying:nil |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3625 |
ignoreErrors:true |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3626 |
ignoreWarnings:true |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3627 |
inNameSpace:nameSpace. |
c99c25eb54db
changed: #parseExpression:inNameSpace:
Claus Gittinger <cg@exept.de>
parents:
9168
diff
changeset
|
3628 |
]. |
8665 | 3629 |
^ p |
17094 | 3630 |
|
3631 |
"Modified: / 21-11-2016 / 23:25:48 / cg" |
|
8665 | 3632 |
! |
3633 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3634 |
queryCloseText |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3635 |
"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
|
3636 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3637 |
^ 'Quit without updating changeFile ?' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3638 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3639 |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3640 |
selectedClassNames |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3641 |
|classes| |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3642 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3643 |
classes := Set new. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3644 |
self withSelectedChangesDo:[:changeNr | |
6288 | 3645 |
| classNameToCompress | |
3646 |
||
3647 |
classNameToCompress := self classNameOfChange:changeNr. |
|
3648 |
classNameToCompress notNil ifTrue:[ |
|
3649 |
classes add:classNameToCompress. |
|
3650 |
] |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3651 |
]. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3652 |
^ classes |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3653 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3654 |
"Created: / 19.11.2001 / 21:54:59 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3655 |
! |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3656 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3657 |
setChangeList |
16467 | 3658 |
"update the selection-list; |
3659 |
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
|
3660 |
|
16372 | 3661 |
|headerList| |
3662 |
||
3663 |
headerList := changeInfoList collect:[:info | info headerLine]. |
|
3664 |
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
|
3665 |
changeListView invalidate. |
16467 | 3666 |
self showNumberOfChanges. |
3667 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3668 |
"/ changeListView deselect. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3669 |
|
16372 | 3670 |
"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
|
3671 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3672 |
|
3211 | 3673 |
setSingleSelection:changeNr |
3674 |
changeListView multipleSelectOk ifFalse:[ |
|
6288 | 3675 |
changeListView setSelection:changeNr. |
3211 | 3676 |
] ifTrue:[ |
6288 | 3677 |
changeListView setSelection:(Array with:changeNr). |
3211 | 3678 |
]. |
3679 |
! |
|
3680 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3681 |
showNotFound |
14483 | 3682 |
self withCursor:(Cursor cross) do:[ |
3683 |
self beep. |
|
3684 |
Delay waitForMilliseconds:300. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3685 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3686 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3687 |
"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
|
3688 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3689 |
|
16467 | 3690 |
showNumberOfChanges |
3691 |
infoHolder value:(resources string:'%1 changes.' with:changeInfoList size). |
|
3692 |
! |
|
3693 |
||
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3694 |
sourceOfChange:changeNr |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3695 |
|aStream sawExcla chunk| |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3696 |
|
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3697 |
aStream := self streamForChange:changeNr. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3698 |
aStream isNil ifTrue:[ |
6288 | 3699 |
^ nil |
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3700 |
]. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3701 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3702 |
chunk := aStream nextChunk. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3703 |
sawExcla ifTrue:[ |
6288 | 3704 |
chunk := aStream nextChunk |
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3705 |
]. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3706 |
aStream close. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3707 |
^ chunk |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3708 |
! |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
3709 |
|
12599
827681c8f7d4
timestamp printing extracted
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3710 |
timeStampPrintStringOf:ts |
827681c8f7d4
timestamp printing extracted
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3711 |
^ ts printString |
827681c8f7d4
timestamp printing extracted
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3712 |
! |
827681c8f7d4
timestamp printing extracted
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3713 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3714 |
unselect |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3715 |
"common unselect" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3716 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3717 |
changeListView setSelection:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3718 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3719 |
"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
|
3720 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3721 |
|
3211 | 3722 |
withSelectedChangesDo:aBlock |
3723 |
"just a helper, check for a selected change and evaluate aBlock |
|
3724 |
with busy cursor" |
|
3725 |
||
3726 |
self withSelectedChangesInOrder:nil do:aBlock |
|
3727 |
! |
|
3728 |
||
3729 |
withSelectedChangesInOrder:order do:aBlock |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3730 |
"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
|
3731 |
with busy cursor" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3732 |
|
3211 | 3733 |
|changeNrSelection| |
3734 |
||
3735 |
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
|
3736 |
|
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3737 |
"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
|
3738 |
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
|
3739 |
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
|
3740 |
|
3211 | 3741 |
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
|
3742 |
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
|
3743 |
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
|
3744 |
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
|
3745 |
] |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3746 |
] |
3211 | 3747 |
] 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
|
3748 |
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
|
3749 |
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
|
3750 |
|changeNumbers| |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3751 |
|
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3752 |
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
|
3753 |
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
|
3754 |
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
|
3755 |
]. |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3756 |
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
|
3757 |
] |
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
3758 |
] |
3211 | 3759 |
]. |
3760 |
! |
|
3761 |
||
3762 |
withSelectedChangesReverseDo:aBlock |
|
3763 |
"just a helper, check for a selected change and evaluate aBlock |
|
3764 |
with busy cursor" |
|
3765 |
||
3766 |
self withSelectedChangesInOrder:#reverse do:aBlock |
|
3668 | 3767 |
! |
3768 |
||
3769 |
withSingleSelectedChangeDo:aBlock |
|
3770 |
"just a helper, check for a single selection, and evaluate aBlock |
|
3771 |
with busy cursor" |
|
3772 |
||
3773 |
self theSingleSelection isNil ifTrue:[ |
|
6288 | 3774 |
^ self information:'Only possible if a single change is selected.'. |
3668 | 3775 |
]. |
3776 |
||
3777 |
self withSelectedChangesInOrder:nil do:aBlock |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3778 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3779 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3780 |
!ChangesBrowser methodsFor:'private-change access'! |
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 |
changeIsFollowupMethodChange:changeNr |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3783 |
"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
|
3784 |
in a bunch of methodsFor-changes)" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3785 |
|
16372 | 3786 |
^ (changeInfoList at:changeNr) isFollowupChange |
3787 |
||
3788 |
"Created: / 06-02-1998 / 13:03:39 / cg" |
|
3789 |
"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
|
3790 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3791 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3792 |
changeIsSnapShotInfo:changeNr |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3793 |
"return true, if a change is a snapShot info chunk" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3794 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3795 |
|words chunk| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3796 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3797 |
(self classNameOfChange:changeNr) isNil ifTrue:[ |
16372 | 3798 |
" |
3799 |
get the chunk |
|
3800 |
" |
|
3801 |
chunk := self changeChunkAt:changeNr. |
|
3802 |
"mhmh - empty ??" |
|
3803 |
chunk notNil ifTrue:[ |
|
3804 |
(chunk startsWith:'''---') ifTrue:[ |
|
3805 |
words := chunk asCollectionOfWords. |
|
3806 |
words size > 2 ifTrue:[ |
|
3807 |
(words at:2) = 'snapshot' ifTrue:[ |
|
3808 |
^ true |
|
3809 |
]. |
|
3810 |
]. |
|
3811 |
]. |
|
3812 |
]. |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3813 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3814 |
^ false |
16372 | 3815 |
|
3816 |
"Modified: / 01-05-2016 / 18:25:25 / cg" |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3817 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3818 |
|
11396 | 3819 |
classNameFromAttributeChangeParseTree:aParseTree |
3820 |
"mhmh - seems to always return the name of the nonMeta class - is this OK?" |
|
3821 |
||
11397 | 3822 |
|recTree isMeta name| |
11396 | 3823 |
|
3824 |
recTree := aParseTree receiver. |
|
3825 |
||
3826 |
(recTree notNil |
|
3827 |
and:[recTree ~~ #Error |
|
3828 |
and:[recTree isMessage |
|
3829 |
and:[recTree selector == #compiledMethodAt:]]]) ifTrue:[ |
|
3830 |
isMeta := false. |
|
3831 |
recTree := recTree receiver. |
|
3832 |
recTree isUnaryMessage ifTrue:[ |
|
3833 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
|
3834 |
"id class " |
|
3835 |
recTree := recTree receiver |
|
3836 |
]. |
|
3837 |
recTree isPrimary ifTrue:[ |
|
3838 |
name := recTree name. |
|
3839 |
isMeta ifTrue:[ |
|
3840 |
^ name , ' class'. |
|
3841 |
]. |
|
3842 |
^ name |
|
3843 |
] |
|
3844 |
]. |
|
3845 |
"very strange" |
|
3846 |
^ nil |
|
3847 |
||
3848 |
"Created: / 08-03-2012 / 09:42:36 / cg" |
|
3849 |
! |
|
3850 |
||
3851 |
classNameFromClassDefinitionChange:changeNr |
|
11397 | 3852 |
|changeStream chunk fullParseTree sel arg1Tree ownerTree ownerName name| |
11396 | 3853 |
|
3854 |
"/ must parse the full changes text, to get privacy information. |
|
3855 |
||
3856 |
changeStream := self streamForChange:changeNr. |
|
3857 |
changeStream isNil ifTrue:[ ^ nil]. |
|
3858 |
||
3859 |
chunk := changeStream nextChunk. |
|
3860 |
changeStream close. |
|
3861 |
fullParseTree := self parseExpression:chunk. |
|
3862 |
(fullParseTree isNil or:[fullParseTree == #Error]) ifTrue:[ |
|
3863 |
^ nil |
|
3864 |
]. |
|
3865 |
fullParseTree isMessage ifFalse:[ |
|
3866 |
^ nil |
|
3867 |
]. |
|
3868 |
||
3869 |
sel := fullParseTree selector. |
|
3870 |
arg1Tree := fullParseTree arg1. |
|
16390 | 3871 |
(arg1Tree notNil and:[arg1Tree isLiteral]) ifTrue:[ |
11396 | 3872 |
name := arg1Tree value asString. |
3873 |
||
3874 |
"/ is it a private-class ? |
|
3875 |
('*privateIn:' match:sel) ifTrue:[ |
|
3876 |
ownerTree := fullParseTree args last. |
|
3877 |
ownerName := ownerTree name asString. |
|
3878 |
^ ownerName , '::' , name |
|
3879 |
]. |
|
3880 |
^ name |
|
3881 |
]. |
|
3882 |
"very strange" |
|
3883 |
^ nil |
|
3884 |
||
3885 |
"Created: / 08-03-2012 / 09:34:04 / cg" |
|
3886 |
! |
|
3887 |
||
3888 |
classNameFromReceiverInParseTree:aParseTree |
|
3889 |
"extrat the class name from a method-change, methodRemove or comment-change's |
|
3890 |
parse tree" |
|
3891 |
||
3892 |
|recTree isMeta cls name| |
|
3893 |
||
3894 |
recTree := aParseTree receiver. |
|
3895 |
(recTree isNil or:[recTree == #Error]) ifTrue:[ |
|
3896 |
"more strange things" |
|
3897 |
^ nil |
|
3898 |
]. |
|
3899 |
||
3900 |
isMeta := false. |
|
3901 |
recTree isUnaryMessage ifTrue:[ |
|
3902 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
|
3903 |
"id class methodsFor:..." |
|
3904 |
recTree := recTree receiver. |
|
3905 |
isMeta := true. |
|
3906 |
]. |
|
3907 |
recTree isPrimary ifTrue:[ |
|
3908 |
cls := self classFromEvaluatingTree:recTree. |
|
3909 |
cls notNil ifTrue:[^ cls name]. |
|
3910 |
||
3911 |
name := recTree name. |
|
3912 |
isMeta ifTrue:[ |
|
3913 |
^ name , ' class'. |
|
3914 |
]. |
|
3915 |
^ name |
|
3916 |
]. |
|
3917 |
||
3918 |
"more strange things" |
|
3919 |
^ nil |
|
3920 |
||
3921 |
"Created: / 08-03-2012 / 09:26:57 / cg" |
|
3922 |
! |
|
3923 |
||
3924 |
classNameFromRemoveClassParseTree:aParseTree |
|
11397 | 3925 |
"tree is: Smalltalk removeClass: class" |
3926 |
||
11396 | 3927 |
|recTree arg1Tree| |
3928 |
||
3929 |
recTree := aParseTree receiver. |
|
3930 |
||
3931 |
(recTree notNil |
|
3932 |
and:[recTree ~~ #Error |
|
3933 |
and:[recTree isPrimary |
|
3934 |
and:[recTree name = 'Smalltalk']]]) ifTrue:[ |
|
3935 |
arg1Tree := aParseTree arg1. |
|
13663 | 3936 |
(arg1Tree notNil and:[arg1Tree isVariable]) ifTrue:[ |
11397 | 3937 |
^ arg1Tree name. |
11396 | 3938 |
]. |
3939 |
]. |
|
3940 |
"very strange" |
|
3941 |
^ nil |
|
3942 |
||
3943 |
"Created: / 08-03-2012 / 09:36:59 / cg" |
|
3944 |
! |
|
3945 |
||
11397 | 3946 |
classNameFromRenameClassParseTree:aParseTree |
3947 |
"tree is: Smalltalk renameClass: oldClass to: 'newName'" |
|
3948 |
||
3949 |
|recTree arg1Tree arg2Tree oldName newName| |
|
3950 |
||
3951 |
recTree := aParseTree receiver. |
|
3952 |
||
3953 |
(recTree notNil |
|
3954 |
and:[recTree ~~ #Error |
|
3955 |
and:[recTree isPrimary |
|
3956 |
and:[recTree name = 'Smalltalk']]]) ifTrue:[ |
|
3957 |
arg1Tree := aParseTree arg1. |
|
3958 |
(arg1Tree notNil and:[arg1Tree isPrimary]) ifTrue:[ |
|
3959 |
oldName := arg1Tree name. |
|
3960 |
arg2Tree := aParseTree arg2. |
|
16390 | 3961 |
(arg2Tree notNil and:[arg2Tree isLiteral]) ifTrue:[ |
11397 | 3962 |
newName := arg2Tree evaluate. |
3963 |
(Smalltalk classNamed:oldName) notNil ifTrue:[^ oldName ]. |
|
3964 |
(Smalltalk classNamed:newName) notNil ifTrue:[^ newName ]. |
|
3965 |
]. |
|
3966 |
]. |
|
3967 |
]. |
|
3968 |
"very strange" |
|
3969 |
^ nil |
|
3970 |
||
3971 |
"Created: / 08-03-2012 / 11:42:25 / cg" |
|
3972 |
! |
|
3973 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3974 |
classNameOfChange:changeNr |
6288 | 3975 |
"return the classname of a change |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3976 |
(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
|
3977 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3978 |
|name| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3979 |
|
3364 | 3980 |
name := self realClassNameOfChange:changeNr. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3981 |
name isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3982 |
(name endsWith:' class') ifTrue:[ |
12704
6f20f7d39e75
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12656
diff
changeset
|
3983 |
name := name copyButLast:6 |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3984 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3985 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3986 |
|
3364 | 3987 |
"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
|
3988 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3989 |
|
3202 | 3990 |
extractSelectorOfMethodChange:changeNr |
17400 | 3991 |
"return a method-changes selector, or nil if it's not a methodChange" |
3202 | 3992 |
|
3993 |
|source parser sel chunk aParseTree | |
|
3994 |
||
3995 |
source := self sourceOfMethodChange:changeNr. |
|
3996 |
source isNil ifTrue:[ |
|
8665 | 3997 |
(self classNameOfChange:changeNr) notNil ifTrue:[ |
16372 | 3998 |
chunk := self changeChunkAt:changeNr. |
8665 | 3999 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
4000 |
||
4001 |
aParseTree := self parseExpression:chunk. |
|
4002 |
(aParseTree isNil |
|
4003 |
or:[aParseTree == #Error |
|
4004 |
or:[aParseTree isMessage not]]) ifTrue:[ |
|
4005 |
^ nil "seems strange ... (could be a comment)" |
|
4006 |
]. |
|
4007 |
sel := aParseTree selector. |
|
4008 |
(#( |
|
4009 |
#'removeSelector:' |
|
4010 |
) includes:sel) ifTrue:[ |
|
4011 |
sel := aParseTree arguments at:1. |
|
16390 | 4012 |
sel isLiteral ifTrue:[ |
8665 | 4013 |
sel := sel evaluate. |
4014 |
sel isSymbol ifTrue:[ |
|
4015 |
^ sel |
|
4016 |
] |
|
4017 |
] |
|
4018 |
] |
|
4019 |
]. |
|
4020 |
^ nil |
|
3202 | 4021 |
]. |
4022 |
||
4023 |
||
6288 | 4024 |
parser := Parser |
8665 | 4025 |
parseMethodArgAndVarSpecification:source |
4026 |
in:nil |
|
4027 |
ignoreErrors:true |
|
4028 |
ignoreWarnings:true |
|
4029 |
parseBody:false. |
|
3202 | 4030 |
|
4031 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
8665 | 4032 |
sel := parser selector. |
3202 | 4033 |
]. |
4034 |
^ sel |
|
4035 |
||
16372 | 4036 |
"Created: / 24-11-1995 / 14:30:46 / cg" |
4037 |
"Modified: / 01-05-2016 / 18:25:39 / cg" |
|
17400 | 4038 |
"Modified (comment): / 13-02-2017 / 19:57:20 / cg" |
3202 | 4039 |
! |
4040 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4041 |
fullClassNameOfChange:changeNr |
6288 | 4042 |
"return the full classname of a change |
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4043 |
(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
|
4044 |
|
11396 | 4045 |
|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
|
4046 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4047 |
changeNr isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4048 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4049 |
first look, if not already known |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4050 |
" |
16372 | 4051 |
name := self changeClassNameAt:changeNr. |
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4052 |
name notNil ifTrue:[ |
7953 | 4053 |
name == #nil ifTrue:[^ nil]. |
4054 |
^ name |
|
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4055 |
]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4056 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4057 |
prevMethodDefNr := changeNr. |
16372 | 4058 |
[ (changeInfoList at:prevMethodDefNr) isFollowupChange ] whileTrue:[ |
7953 | 4059 |
prevMethodDefNr := prevMethodDefNr - 1. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4060 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4061 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4062 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4063 |
get the chunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4064 |
" |
16372 | 4065 |
chunk := self changeChunkAt:prevMethodDefNr. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4066 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4067 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4068 |
(chunk startsWith:'''---') ifTrue:[ |
7953 | 4069 |
words := chunk asCollectionOfWords. |
4070 |
words size > 2 ifTrue:[ |
|
4071 |
(words at:2) = 'checkin' ifTrue:[ |
|
4072 |
name := words at:3. |
|
4073 |
^ name |
|
4074 |
] |
|
4075 |
]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4076 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4077 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4078 |
"/ fix it - otherwise, it cannot be parsed |
11396 | 4079 |
((chunk endsWith:'primitiveDefinitions:') |
4080 |
or:[(chunk endsWith:'primitiveFunctions:') |
|
4081 |
or:[(chunk endsWith:'primitiveVariables:')]]) ifTrue:[ |
|
7953 | 4082 |
chunk := chunk , '''''' |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4083 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4084 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4085 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4086 |
use parser to construct a parseTree |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4087 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4088 |
oldDollarSetting := Parser allowDollarInIdentifier. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4089 |
[ |
7953 | 4090 |
Parser allowDollarInIdentifier:true. |
5014 | 4091 |
"/ Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
4092 |
"/ do:[ |
|
8665 | 4093 |
aParseTree := self parseExpression:chunk. |
5014 | 4094 |
"/ ]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4095 |
|
7953 | 4096 |
aParseTree == #Error ifTrue:[ |
4097 |
(chunk includesString:'comment') ifTrue:[ |
|
4098 |
"/ could be a comment ... |
|
8665 | 4099 |
aParseTree := self parseExpression:chunk , ''''. |
7953 | 4100 |
] |
4101 |
]. |
|
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3586
diff
changeset
|
4102 |
] ensure:[ |
7953 | 4103 |
Parser allowDollarInIdentifier:oldDollarSetting |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4104 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4105 |
(aParseTree isNil or:[aParseTree == #Error]) ifTrue:[ |
7953 | 4106 |
^ 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
|
4107 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4108 |
aParseTree isMessage ifFalse:[ |
7953 | 4109 |
^ nil "very strange ... (whats that ?)" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4110 |
]. |
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 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4113 |
ask parser for selector |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4114 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4115 |
sel := aParseTree selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4116 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4117 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4118 |
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
|
4119 |
" |
6288 | 4120 |
(#(#'methodsFor:' |
4121 |
#'privateMethodsFor:' |
|
4122 |
#'protectedMethodsFor:' |
|
4123 |
#'ignoredMethodsFor:' |
|
4124 |
#'publicMethodsFor:' |
|
4125 |
#'removeSelector:' |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4126 |
#'comment:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4127 |
#'primitiveDefinitions:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4128 |
#'primitiveFunctions:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4129 |
#'primitiveVariables:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4130 |
#'renameCategory:to:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4131 |
#'instanceVariableNames:' |
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 |
#'methodsFor:stamp:' "/ Squeak support |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4134 |
#'commentStamp:prior:' "/ Squeak support |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4135 |
#'addClassVarName:' "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
4136 |
#methodsFor "/ Dolphin support |
3472 | 4137 |
#categoriesForClass "/ Dolphin support |
4138 |
#categoriesFor: "/ Dolphin support |
|
2606 | 4139 |
#methods "/ STV support |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4140 |
) includes:sel) ifTrue:[ |
7953 | 4141 |
" |
4142 |
yes, the className is the receiver |
|
4143 |
" |
|
11396 | 4144 |
^ self classNameFromReceiverInParseTree:aParseTree |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4145 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4146 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4147 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4148 |
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
|
4149 |
" |
6288 | 4150 |
(('subclass:*' match:sel) |
2322 | 4151 |
or:[('variable*ubclass:*' match:sel)]) ifTrue:[ |
7953 | 4152 |
"/ must parse the full changes text, to get |
4153 |
"/ privacy information. |
|
11396 | 4154 |
^ self classNameFromClassDefinitionChange:changeNr |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4155 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4156 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4157 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4158 |
is it a class remove ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4159 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4160 |
(sel == #removeClass:) ifTrue:[ |
11396 | 4161 |
^ self classNameFromRemoveClassParseTree:aParseTree |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4162 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4163 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4164 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4165 |
is it a method category change ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4166 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4167 |
((sel == #category:) |
7953 | 4168 |
or:[sel == #package: |
4169 |
or:[sel == #privacy:]]) ifTrue:[ |
|
11396 | 4170 |
^ self classNameFromAttributeChangeParseTree:aParseTree |
4171 |
]. |
|
4172 |
||
4173 |
sel == #renameClass:to: ifTrue:[ |
|
11397 | 4174 |
^ self classNameFromRenameClassParseTree:aParseTree |
11396 | 4175 |
]. |
4176 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4177 |
^ nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4178 |
|
16372 | 4179 |
"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
|
4180 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4181 |
|
12428 | 4182 |
namespaceOfChange:changeNr |
4183 |
"return the namespace of a change or nil" |
|
4184 |
||
15116 | 4185 |
|className namespace idx| |
12428 | 4186 |
|
4187 |
className := self classNameOfChange:changeNr. |
|
4188 |
className isNil ifTrue:[ ^ nil ]. |
|
4189 |
||
15116 | 4190 |
idx := className indexOfSubCollection:'::'. |
4191 |
idx == 0 ifTrue:[ ^ nil ]. |
|
4192 |
namespace := className copyTo:idx-1. |
|
12428 | 4193 |
^ namespace |
4194 |
! |
|
4195 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4196 |
numberOfChanges |
16372 | 4197 |
^ changeInfoList size |
4198 |
||
4199 |
"Created: / 03-12-1995 / 18:15:39 / cg" |
|
4200 |
"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
|
4201 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4202 |
|
2511 | 4203 |
ownerClassNameOfChange:changeNr |
6288 | 4204 |
"return the owner classname of a change |
2511 | 4205 |
For a normal class, this is the className; |
4206 |
for a private class, this is the name of the owning class" |
|
4207 |
||
4706 | 4208 |
|name "ns idx" cls| |
2511 | 4209 |
|
4210 |
name := self classNameOfChange:changeNr. |
|
4211 |
name isNil ifTrue:[^ nil]. |
|
4212 |
cls := Smalltalk at:name asSymbol. |
|
4213 |
(cls notNil and:[cls isBehavior]) ifTrue:[ |
|
6288 | 4214 |
cls owningClass notNil ifTrue:[ |
4215 |
^ cls owningClass name |
|
4216 |
]. |
|
4217 |
^ cls name |
|
2511 | 4218 |
]. |
4219 |
||
4220 |
"/ (name includes:$:) ifTrue:[ |
|
4221 |
"/ idx := name indexOf:$:. |
|
4222 |
"/ ns := name copyTo:idx-1. |
|
4223 |
"/ ns := Smalltalk at:ns asSymbol. |
|
4224 |
"/ ns notNil ifTrue:[ |
|
6288 | 4225 |
"/ |
2511 | 4226 |
"/ ]. |
4227 |
"/ |
|
4228 |
"/ name := name copyFrom:idx+2. |
|
4229 |
"/ (Smalltalk at:ns asSymbol) notNil ifTrue:[ |
|
4230 |
"/ cls |
|
4231 |
"/ ]. |
|
13851 | 4232 |
"/ ^ name copyButLast:6 |
2511 | 4233 |
"/ ]. |
4234 |
^ name |
|
4235 |
||
4236 |
"Modified: 6.12.1995 / 17:06:31 / cg" |
|
4237 |
! |
|
4238 |
||
3364 | 4239 |
realClassNameOfChange:changeNr |
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4240 |
"return the classname of a change. |
6288 | 4241 |
- 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
|
4242 |
changeClassNames for the next query" |
3364 | 4243 |
|
4244 |
|name| |
|
4245 |
||
16372 | 4246 |
name := self changeClassNameAt:changeNr. |
3364 | 4247 |
name isNil ifTrue:[ |
16372 | 4248 |
name := self fullClassNameOfChange:changeNr. |
4249 |
name isNil ifTrue:[ |
|
4250 |
(changeInfoList at:changeNr) className:#nil. |
|
4251 |
]. |
|
3364 | 4252 |
]. |
5806
eaaab48a7e8b
tuning (cache class name of change)
Claus Gittinger <cg@exept.de>
parents:
5735
diff
changeset
|
4253 |
name == #nil ifTrue:[^ nil]. |
3364 | 4254 |
^ name |
4255 |
||
16372 | 4256 |
"Created: / 05-11-2001 / 18:09:46 / cg" |
4257 |
"Modified: / 01-05-2016 / 19:24:53 / cg" |
|
3364 | 4258 |
! |
4259 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4260 |
selectorOfMethodChange:changeNr |
16467 | 4261 |
"return a method-changes selector, |
4262 |
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
|
4263 |
|
3202 | 4264 |
|sel | |
4265 |
||
16372 | 4266 |
changeInfoList size >= changeNr ifTrue:[ |
4267 |
sel := (changeInfoList at:changeNr) selector. |
|
15652 | 4268 |
sel notNil ifTrue:[ ^ sel ]. |
3202 | 4269 |
]. |
4270 |
||
4271 |
sel := self extractSelectorOfMethodChange:changeNr. |
|
4272 |
sel notNil ifTrue:[ |
|
16372 | 4273 |
(changeInfoList at:changeNr) selector:sel. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4274 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4275 |
^ sel |
16372 | 4276 |
|
4277 |
"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
|
4278 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4279 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4280 |
sourceOfMethodChange:changeNr |
17400 | 4281 |
"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
|
4282 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4283 |
|aStream chunk sawExcla parseTree sourceChunk sel| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4284 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4285 |
aStream := self streamForChange:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4286 |
aStream isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4287 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4288 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
8665 | 4289 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
4290 |
chunk := aStream nextChunk. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4291 |
] ifTrue:[ |
16372 | 4292 |
chunk := self changeChunkAt:changeNr. |
8665 | 4293 |
sawExcla := true. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4294 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4295 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4296 |
sawExcla ifTrue:[ |
8665 | 4297 |
parseTree := self parseExpression:chunk. |
4298 |
(parseTree notNil |
|
4299 |
and:[parseTree ~~ #Error |
|
4300 |
and:[parseTree isMessage]]) ifTrue:[ |
|
4301 |
sel := parseTree selector. |
|
4302 |
(#( |
|
4303 |
#methodsFor: |
|
4304 |
#privateMethodsFor: |
|
4305 |
#publicMethodsFor: |
|
4306 |
#ignoredMethodsFor: |
|
4307 |
#protectedMethodsFor: |
|
4308 |
||
4309 |
#methodsFor:stamp: "/ Squeak support |
|
4310 |
#commentStamp:prior: "/ Squeak support |
|
4311 |
#methodsFor "/ Dolphin support |
|
4312 |
#methods "/ STV support |
|
4313 |
) |
|
4314 |
includes:sel) ifTrue:[ |
|
4315 |
sourceChunk := aStream nextChunk. |
|
4316 |
] |
|
4317 |
]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4318 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4319 |
aStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4320 |
^ sourceChunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4321 |
|
16372 | 4322 |
"Created: / 05-09-1996 / 17:11:32 / cg" |
4323 |
"Modified: / 01-05-2016 / 18:25:53 / cg" |
|
17400 | 4324 |
"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
|
4325 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4326 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4327 |
streamForChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4328 |
"answer a stream for change" |
6288 | 4329 |
|
15858 | 4330 |
|aStream encoding| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4331 |
|
16372 | 4332 |
(changeNr between:1 and:changeInfoList size) ifFalse:[^ nil]. |
5702 | 4333 |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
4334 |
aStream := changeFileName asFilename readStreamOrNil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4335 |
aStream isNil ifTrue:[^ nil]. |
5702 | 4336 |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4337 |
encodingIfKnown isNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4338 |
encoding := CharacterEncoder guessEncodingOfStream:aStream. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4339 |
encodingIfKnown := encoding ? #none |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4340 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4341 |
(encodingIfKnown notNil and:[encodingIfKnown ~~ #none]) ifTrue:[ |
15858 | 4342 |
aStream := EncodedStream stream:aStream encoding:encodingIfKnown. |
5702 | 4343 |
]. |
4344 |
||
16372 | 4345 |
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
|
4346 |
^ aStream |
16372 | 4347 |
|
4348 |
"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
|
4349 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4350 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4351 |
!ChangesBrowser methodsFor:'private-changeFile access'! |
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 |
changeFileName:aFileName |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4354 |
"set the name of the changeFile" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4355 |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4356 |
changeFileName := aFileName. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
4357 |
encodingIfKnown := nil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4358 |
! |
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 |
checkIfFileHasChanged |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4361 |
"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
|
4362 |
install a timeout for rechecking after some time." |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4363 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4364 |
|f info | |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4365 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4366 |
Processor removeTimedBlock:checkBlock. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4367 |
f := changeFileName asFilename. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4368 |
(info := f info) isNil ifTrue:[ |
16092 | 4369 |
self newLabel:'(unaccessible)' |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4370 |
] ifFalse:[ |
16092 | 4371 |
(info modificationTime) > changeFileTimestamp ifTrue:[ |
4372 |
self newLabel:'(outdated)'. |
|
4373 |
autoUpdate value ifTrue:[ |
|
4374 |
self doUpdate |
|
4375 |
] |
|
4376 |
] ifFalse:[ |
|
4377 |
self newLabel:'' |
|
4378 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4379 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4380 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4381 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4382 |
"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
|
4383 |
"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
|
4384 |
"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
|
4385 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4386 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4387 |
readChangesFile |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4388 |
"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
|
4389 |
and a list of chunk-positions (changePositions)" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4390 |
|
5178 | 4391 |
self readChangesFileInBackground:false. |
4392 |
self newLabel:''. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4393 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4394 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4395 |
readChangesFileInBackground:inBackground |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4396 |
"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
|
4397 |
and a list of chunk-positions (changePositions). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4398 |
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
|
4399 |
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
|
4400 |
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
|
4401 |
'+' -> 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
|
4402 |
'-' -> 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
|
4403 |
'?' -> class does not exist currently |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4404 |
'=' -> 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
|
4405 |
'~' -> 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
|
4406 |
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
|
4407 |
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
|
4408 |
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
|
4409 |
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
|
4410 |
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
|
4411 |
4 timestamp |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4412 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4413 |
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
|
4414 |
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
|
4415 |
|
12635 | 4416 |
|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
|
4417 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4418 |
editingClassSource := false. |
2641 | 4419 |
askedForEditingClassSource := false. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4420 |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4421 |
"/ maxLen := 60. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4422 |
|
3674 | 4423 |
self newLabel:'updating ...'. |
4424 |
||
4425 |
(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
|
4426 |
^ self class readXMLChangesFromFile:changeFileName inBackground:inBackground |
3674 | 4427 |
]. |
4428 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4429 |
f := changeFileName asFilename. |
7346 | 4430 |
f exists ifFalse:[^ self]. |
12635 | 4431 |
inStream := EncodedStream decodedStreamFor:(f readStream). |
5696 | 4432 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4433 |
i := f info. |
3965
e499c0dae8fc
use #fileSize instead of #size
Claus Gittinger <cg@exept.de>
parents:
3962
diff
changeset
|
4434 |
changeFileSize := i fileSize. |
3962
3906b10c42fd
modified -> modificationTime
Claus Gittinger <cg@exept.de>
parents:
3930
diff
changeset
|
4435 |
changeFileTimestamp := i modificationTime. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4436 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4437 |
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
|
4438 |
" |
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
|
4439 |
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
|
4440 |
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
|
4441 |
" |
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
|
4442 |
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
|
4443 |
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
|
4444 |
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
|
4445 |
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
|
4446 |
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
|
4447 |
]. |
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
|
4448 |
|
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
|
4449 |
[ |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4450 |
|reader| |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4451 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4452 |
reader := ChangeFileReader new. |
6516
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
4453 |
reader changeFileName:changeFileName. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4454 |
reader browser:self. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4455 |
reader enforcedNameSpace:enforcedNameSpace. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4456 |
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
|
4457 |
reader autoloadAsRequired:autoloadAsRequired. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4458 |
reader tabSpec:tabSpec. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4459 |
reader inStream:inStream. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4460 |
reader noColoring:(NoColoring == true). |
16467 | 4461 |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4462 |
reader readChangesFile. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4463 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
4464 |
editingClassSource := reader thisIsAClassSource. |
16372 | 4465 |
changeInfoList := reader changeInfo. |
16467 | 4466 |
|
4467 |
self showNumberOfChanges. |
|
7360 | 4468 |
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
|
4469 |
] 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
|
4470 |
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
|
4471 |
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
|
4472 |
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
|
4473 |
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
|
4474 |
]. |
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 |
]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4476 |
]. |
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 |
self checkIfFileHasChanged |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4479 |
|
7360 | 4480 |
"Modified: / 27-08-1995 / 23:06:55 / claus" |
16372 | 4481 |
"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
|
4482 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4483 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4484 |
writeBackChanges |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4485 |
"write back the changes file. To avoid problems when the disk is full |
6288 | 4486 |
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
|
4487 |
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
|
4488 |
rename the old change-file to a .bak file and finally rename the |
6288 | 4489 |
tempfile back to the change-file. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4490 |
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
|
4491 |
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
|
4492 |
|
15858 | 4493 |
|inFilename inStream outStream stamp encoding tempFilename| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4494 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4495 |
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
|
4496 |
(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
|
4497 |
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
|
4498 |
^ 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
|
4499 |
] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4500 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4501 |
|
13123 | 4502 |
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
|
4503 |
[ |
13123 | 4504 |
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
|
4505 |
] 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
|
4506 |
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
|
4507 |
^ 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
|
4508 |
]. |
9020 | 4509 |
[ |
4510 |
[ |
|
13123 | 4511 |
outStream := FileStream newTemporaryIn:inFilename directory. |
4512 |
tempFilename := outStream fileName. |
|
9020 | 4513 |
] on:FileStream openErrorSignal do:[:ex| |
4514 |
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
|
4515 |
^ false |
9020 | 4516 |
]. |
4517 |
||
11234 | 4518 |
outStream nextPutLine:'''---- encoding: utf8 ----''!!'. |
9020 | 4519 |
outStream := EncodedStream stream:outStream encoder:(CharacterEncoder encoderForUTF8). |
4520 |
||
4521 |
encoding := CharacterEncoder guessEncodingOfStream:inStream. |
|
4522 |
encoding notNil ifTrue:[ |
|
15858 | 4523 |
inStream := EncodedStream stream:inStream encoding:encoding. |
9020 | 4524 |
]. |
4525 |
||
11685 | 4526 |
self withWriteCursorDo:[ |
9020 | 4527 |
|excla sawExcla done first chunk |
4528 |
nChanges "{Class:SmallInteger}" | |
|
4529 |
||
4530 |
Stream writeErrorSignal handle:[:ex | |
|
4531 |
self warn:('Could not update the changes file.\\' , ex description) withCRs. |
|
13123 | 4532 |
outStream close. |
4533 |
tempFilename remove. |
|
9020 | 4534 |
^ false |
4535 |
] do:[ |
|
4536 |
excla := inStream class chunkSeparator. |
|
4537 |
nChanges := self numberOfChanges. |
|
4538 |
||
4539 |
1 to:nChanges do:[:index | |
|
16372 | 4540 |
inStream position:((changeInfoList at:index) position)-1. |
9020 | 4541 |
sawExcla := inStream peekFor:excla. |
4542 |
chunk := inStream nextChunk. |
|
4543 |
||
4544 |
(chunk notNil |
|
4545 |
and:[(chunk startsWith:'''---- snap') not]) ifTrue:[ |
|
16372 | 4546 |
(stamp := (changeInfoList at:index) timestamp) notNil ifTrue:[ |
9020 | 4547 |
outStream nextPutAll:'''---- timestamp ' , stamp , ' ----'''. |
4548 |
outStream nextPut:excla; cr. |
|
4549 |
]. |
|
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
|
4550 |
]. |
9020 | 4551 |
|
4552 |
sawExcla ifTrue:[ |
|
4553 |
outStream nextPut:excla. |
|
4554 |
outStream nextChunkPut:chunk. |
|
4555 |
outStream cr; cr. |
|
4556 |
" |
|
4557 |
a method-definition chunk - output followups |
|
4558 |
" |
|
4559 |
done := false. |
|
4560 |
first := true. |
|
4561 |
[done] whileFalse:[ |
|
4562 |
chunk := inStream nextChunk. |
|
4563 |
chunk isNil ifTrue:[ |
|
4564 |
outStream cr; cr. |
|
4565 |
done := true |
|
4566 |
] ifFalse:[ |
|
4567 |
chunk isEmpty ifTrue:[ |
|
4568 |
outStream space; nextChunkPut:chunk; cr; cr. |
|
4569 |
done := true. |
|
4570 |
] ifFalse:[ |
|
4571 |
first ifFalse:[ |
|
4572 |
outStream cr; cr. |
|
4573 |
]. |
|
4574 |
outStream nextChunkPut:chunk. |
|
4575 |
]. |
|
4576 |
]. |
|
4577 |
first := false. |
|
4578 |
]. |
|
4579 |
] ifFalse:[ |
|
4580 |
outStream nextChunkPut:chunk. |
|
4581 |
outStream cr |
|
4582 |
] |
|
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
|
4583 |
]. |
9020 | 4584 |
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
|
4585 |
]. |
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
|
4586 |
inStream close. |
9020 | 4587 |
|
17376 | 4588 |
inFilename renameTo:inFilename asBackupFilename. |
13123 | 4589 |
tempFilename renameTo:changeFileName. |
9020 | 4590 |
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
|
4591 |
]. |
9020 | 4592 |
] ensure:[ |
4593 |
inStream close. |
|
4594 |
]. |
|
4595 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4596 |
^ true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4597 |
|
16372 | 4598 |
"Modified: / 01-05-2016 / 19:30:34 / cg" |
17376 | 4599 |
"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
|
4600 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4601 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4602 |
!ChangesBrowser methodsFor:'private-user interaction ops'! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
4603 |
|
5735 | 4604 |
appendChange:changeNr toFile:aFileNameOrFileNameString |
202 | 4605 |
"append change to a file. return true if ok." |
4606 |
||
5735 | 4607 |
|fileName changeInStream outStream chunk chunk2 sawExcla separator encoding| |
4608 |
||
4609 |
changeInStream := self streamForChange:changeNr. |
|
4610 |
changeInStream isNil ifTrue:[ |
|
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4611 |
self warn:'Cannot read change'. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4612 |
^ false |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4613 |
]. |
5735 | 4614 |
changeInStream skipSeparators. |
4615 |
||
4616 |
separator := changeInStream class chunkSeparator. |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4617 |
|
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4618 |
(self changeIsFollowupMethodChange:changeNr) ifTrue:[ |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4619 |
sawExcla := true. |
16372 | 4620 |
chunk := self changeChunkAt:changeNr. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4621 |
] ifFalse:[ |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4622 |
sawExcla := changeInStream peekFor:separator. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4623 |
chunk := changeInStream nextChunk. |
3991 | 4624 |
]. |
4625 |
chunk withoutSeparators isEmpty ifTrue:[ |
|
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4626 |
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
|
4627 |
^ false. |
5735 | 4628 |
]. |
4629 |
||
4630 |
fileName := aFileNameOrFileNameString asFilename. |
|
202 | 4631 |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
4632 |
[ |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4633 |
outStream := fileName readWriteStream. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
4634 |
] on:FileStream openErrorSignal do:[:ex| |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4635 |
self warn:'Cannot update file: ''%1''' with:fileName. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4636 |
^ false |
73 | 4637 |
]. |
202 | 4638 |
|
11476
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4639 |
outStream fileSize = 0 ifTrue:[ |
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4640 |
encoding := #utf8. |
15090 | 4641 |
outStream nextPutLine:'"{ Encoding: utf8 }" !!'. |
11476
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4642 |
] ifFalse:[ |
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4643 |
encoding := CharacterEncoder guessEncodingOfStream:outStream. |
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4644 |
]. |
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4645 |
|
5735 | 4646 |
encoding notNil ifTrue:[ |
15858 | 4647 |
outStream := EncodedStream stream:outStream encoding:encoding. |
11476
a4678acc1e78
changed: #appendChange:toFile:
Stefan Vogel <sv@exept.de>
parents:
11475
diff
changeset
|
4648 |
]. |
202 | 4649 |
outStream setToEnd. |
4650 |
||
4651 |
sawExcla ifTrue:[ |
|
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4652 |
outStream nextPut:separator |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4653 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4654 |
outStream nextChunkPut:chunk; cr. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4655 |
sawExcla ifTrue:[ |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4656 |
chunk2 := changeInStream nextChunk. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4657 |
chunk2 withoutSeparators isEmpty ifTrue:[ |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4658 |
self error:'Empty chunk - should not happen'. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4659 |
]. |
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4660 |
outStream nextChunkPut:chunk2; space |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4661 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4662 |
sawExcla ifTrue:[ |
7618
92c7128604a4
changed #appendChange:toFile: Make error proceedable
Stefan Vogel <sv@exept.de>
parents:
7528
diff
changeset
|
4663 |
outStream nextPut:separator |
202 | 4664 |
]. |
4665 |
outStream cr. |
|
5735 | 4666 |
|
4667 |
changeInStream close. |
|
202 | 4668 |
outStream close. |
4669 |
^ true |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4670 |
|
16372 | 4671 |
"Modified: / 01-05-2016 / 18:25:00 / cg" |
73 | 4672 |
! |
4673 |
||
51 | 4674 |
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
|
4675 |
"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
|
4676 |
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
|
4677 |
|
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
4678 |
|aStream applyAction nameSpace className changeClass ownerName ownerClass reader doItChunk methodsForChunk pkg |
4877 | 4679 |
alternativeClass shortName orgClassName nsClass aborted| |
45 | 4680 |
|
51 | 4681 |
aStream := self streamForChange:changeNr. |
12973 | 4682 |
aStream isNil ifTrue:[^ false]. |
51 | 4683 |
|
2965 | 4684 |
className := self classNameOfChange:changeNr. |
4685 |
className notNil ifTrue:[ |
|
6378 | 4686 |
className := className asSymbol. |
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
4687 |
enforcedNameSpace notNil ifTrue:[ |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
4688 |
changeClass := enforcedNameSpace at:className ifAbsent:nil. |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
4689 |
] ifFalse:[ |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
4690 |
changeClass := Smalltalk at:className ifAbsent:nil. |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
4691 |
]. |
6378 | 4692 |
changeClass isNil ifTrue:[ |
4693 |
changeClass := self classOfChange:changeNr. |
|
4694 |
]. |
|
8351
e99a28a6288b
changed #applyChange: load class before applying a change
Stefan Vogel <sv@exept.de>
parents:
8320
diff
changeset
|
4695 |
changeClass notNil ifTrue:[ |
e99a28a6288b
changed #applyChange: load class before applying a change
Stefan Vogel <sv@exept.de>
parents:
8320
diff
changeset
|
4696 |
"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
|
4697 |
will create a class without methods" |
e99a28a6288b
changed #applyChange: load class before applying a change
Stefan Vogel <sv@exept.de>
parents:
8320
diff
changeset
|
4698 |
changeClass autoload. |
e99a28a6288b
changed #applyChange: load class before applying a change
Stefan Vogel <sv@exept.de>
parents:
8320
diff
changeset
|
4699 |
]. |
51 | 4700 |
]. |
45 | 4701 |
|
51 | 4702 |
changeNrProcessed := changeNr. |
4877 | 4703 |
aborted := false. |
45 | 4704 |
|
6288 | 4705 |
applyAction := |
6378 | 4706 |
[ |
7783
a0c1578e65fb
"Cancel all" did not work, when an error occured while applying multiple changes
Stefan Vogel <sv@exept.de>
parents:
7710
diff
changeset
|
4707 |
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
|
4708 |
"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
|
4709 |
Send AbortAllOperationRequest to abort multiple operations" |
6378 | 4710 |
aborted := true. |
4711 |
ex return. |
|
4712 |
] do:[ |
|
4713 |
nameSpace := self nameSpaceForApply. |
|
4714 |
||
4715 |
pkg := enforcedPackage ? Class packageQuerySignal query. |
|
4716 |
Class packageQuerySignal answer:pkg |
|
4717 |
do:[ |
|
4718 |
Class nameSpaceQuerySignal answer:nameSpace |
|
4719 |
do:[ |
|
11244 | 4720 |
Class defaultApplicationQuerySignal handle:[:ex | |
4721 |
ex proceedWith:defaultApplicationForVAGEClasses |
|
4722 |
] do:[ |
|
4723 |
Class changeDefaultApplicationNotificationSignal handle:[:ex | |
|
4724 |
defaultApplicationForVAGEClasses := ex parameter. |
|
4725 |
] do:[ |
|
4726 |
||
4727 |
"/ a followup methodsFor: chunk ... |
|
4728 |
(self changeIsFollowupMethodChange:changeNr) ifTrue:[ |
|
16372 | 4729 |
methodsForChunk := self changeChunkAt:changeNr. |
11244 | 4730 |
] ifFalse:[ |
4731 |
doItChunk := aStream nextChunk. "/ an empty chunk sometimes ... |
|
4732 |
doItChunk notEmpty ifTrue:[ |
|
4733 |
doItChunk first = (Character value:16rFEFF) ifTrue:[ |
|
4734 |
doItChunk := doItChunk copyFrom:2. |
|
4735 |
]. |
|
4736 |
Compiler evaluate:doItChunk notifying:self. |
|
6378 | 4737 |
] ifFalse:[ |
11244 | 4738 |
methodsForChunk := aStream nextChunk. "/ the real one |
6378 | 4739 |
] |
4740 |
]. |
|
11244 | 4741 |
methodsForChunk notNil ifTrue:[ |
4742 |
changeClass isNil ifTrue:[ |
|
4743 |
orgClassName := className. |
|
4744 |
||
4745 |
(className includes:$:) ifTrue:[ |
|
4746 |
ownerName := className copyTo:(className lastIndexOf:$:) - 1. |
|
4747 |
(ownerName endsWith:$:) ifTrue:[ |
|
12704
6f20f7d39e75
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12656
diff
changeset
|
4748 |
ownerName := ownerName copyButLast:1. |
11244 | 4749 |
]. |
4750 |
||
4751 |
ownerClass := Smalltalk at:(ownerName asSymbol) ifAbsent:[]. |
|
4752 |
ownerClass notNil ifTrue:[ |
|
4753 |
ownerClass autoload |
|
4754 |
]. |
|
4755 |
]. |
|
4756 |
(nameSpace notNil and:[nameSpace ~~ Smalltalk]) ifTrue:[ |
|
4757 |
changeClass := nameSpace at:className ifAbsent:[]. |
|
4758 |
]. |
|
4759 |
changeClass isNil ifTrue:[ |
|
4760 |
changeClass := Smalltalk at:className ifAbsent:[]. |
|
4761 |
]. |
|
4762 |
[changeClass isNil] whileTrue:[ |
|
4763 |
(NameSpace allNameSpaces |
|
15683 | 4764 |
contains:[:ns | (nsClass := (ns at:className asSymbol)) notNil]) |
11244 | 4765 |
ifTrue:[ |
4766 |
shortName := nsClass name. |
|
4767 |
] ifFalse:[ |
|
4768 |
shortName := className copyFrom:(className lastIndexOf:$:) + 1. |
|
4769 |
shortName = className ifTrue:[ |
|
4770 |
shortName := '' |
|
4771 |
]. |
|
4772 |
]. |
|
4773 |
className := Dialog |
|
12973 | 4774 |
request:'No class ''' , className , ''' for change. Add to which class? (enter empty string to skip this change)' |
11244 | 4775 |
initialAnswer:shortName. |
4776 |
||
12973 | 4777 |
className isNil ifTrue:[ |
4778 |
AbortAllOperationRequest raise. |
|
4779 |
]. |
|
4780 |
className isEmpty ifTrue:[ |
|
4781 |
^ false |
|
11244 | 4782 |
]. |
4783 |
alternativeClass := Smalltalk classNamed:className. |
|
4784 |
alternativeClass notNil ifTrue:[ |
|
4785 |
changeClass := alternativeClass |
|
4786 |
] |
|
4787 |
]. |
|
4788 |
methodsForChunk := methodsForChunk copyFrom:(methodsForChunk indexOfSeparator). |
|
4789 |
methodsForChunk := changeClass name , methodsForChunk. |
|
4790 |
]. |
|
4791 |
reader := Compiler evaluate:methodsForChunk notifying:self. |
|
4792 |
reader fileInFrom:aStream notifying:self passChunk:false single:true. |
|
4793 |
] |
|
4794 |
] |
|
6378 | 4795 |
] |
4796 |
] |
|
4797 |
] |
|
4798 |
]. |
|
4799 |
changeNrProcessed := nil. |
|
4800 |
]. |
|
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4801 |
|
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4802 |
"/ |
17026 | 4803 |
"/ 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
|
4804 |
"/ |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4805 |
changeFileName = ObjectMemory nameForChanges ifTrue:[ |
6378 | 4806 |
Class withoutUpdatingChangesDo:[ |
4807 |
Class updateChangeListQuerySignal answer:updateChangeSet value do:applyAction |
|
4808 |
] |
|
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4809 |
] ifFalse:[ |
6378 | 4810 |
applyAction value |
45 | 4811 |
]. |
4877 | 4812 |
aStream close. |
4813 |
||
4814 |
^ aborted not |
|
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
4815 |
|
16372 | 4816 |
"Modified: / 01-05-2016 / 18:25:18 / cg" |
45 | 4817 |
! |
4818 |
||
7953 | 4819 |
compareCategoryChange:parseTree |
9888 | 4820 |
|receiverExpression method thisClass| |
7953 | 4821 |
|
4822 |
receiverExpression := parseTree receiver. |
|
4823 |
receiverExpression isMessage ifTrue:[ |
|
4824 |
receiverExpression selector == #compiledMethodAt: ifTrue:[ |
|
9888 | 4825 |
[ |
4826 |
thisClass := receiverExpression receiver evaluate. |
|
4827 |
] on:Parser undefinedVariableError do:[:ex| ]. |
|
4828 |
||
4829 |
(thisClass isBehavior |
|
7953 | 4830 |
and:[(method := receiverExpression evaluate) isMethod]) ifTrue:[ |
4831 |
method category = parseTree arg1 evaluate ifTrue:[ |
|
4832 |
^ true -> 'Change has no effect\\(same category)'. |
|
4833 |
] ifFalse:[ |
|
8173 | 4834 |
^ false -> ('Category is different (''' , method category , ''' vs. ''' , parseTree arg1 evaluate , ''')'). |
7953 | 4835 |
] |
4836 |
] ifFalse:[ |
|
4837 |
^ nil -> 'There is no such method'. |
|
4838 |
] |
|
4839 |
] |
|
4840 |
]. |
|
4841 |
^ nil -> 'Unhandled receiver' |
|
4842 |
! |
|
4843 |
||
255 | 4844 |
compareChange:changeNr |
2835 | 4845 |
"compare a change with the current (in-image) version; show the result of the compare (as dialog)" |
4846 |
||
4847 |
^ self compareChange:changeNr showResult:true |
|
4848 |
! |
|
4849 |
||
4850 |
compareChange:changeNr showResult:doShowResult |
|
4851 |
"compare a change with current version. |
|
4852 |
Return the result of the compare (same -> true, different -> false, uncomparable -> nil). |
|
4853 |
If doShowResult is true, the outcome is shown in a dialog/diffViewer." |
|
255 | 4854 |
|
15016 | 4855 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource outcome showDiff d selector isLoaded beep superClass thisClassSym varsHere varsInChange addedVars removedVars |
9888 | 4856 |
isSame ownerClass superClassHere superClassInChange sameAndOutcome| |
255 | 4857 |
|
4858 |
aStream := self streamForChange:changeNr. |
|
2835 | 4859 |
aStream isNil ifTrue:[^ nil]. |
255 | 4860 |
|
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
4861 |
showDiff := false. |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
4862 |
|
1472 | 4863 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
6357 | 4864 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
4865 |
chunk := aStream nextChunk. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4866 |
] ifTrue:[ |
16372 | 4867 |
chunk := self changeChunkAt:changeNr. |
6357 | 4868 |
sawExcla := true. |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4869 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
4870 |
|
2835 | 4871 |
isSame := nil. |
4872 |
||
761 | 4873 |
beep := false. |
255 | 4874 |
sawExcla ifFalse:[ |
6357 | 4875 |
outcome := 'cannot compare this change\\(i.e. this is not a method change).'. |
4876 |
||
4877 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
|
4878 |
do:[ |
|
8665 | 4879 |
parseTree := self parseExpression:chunk. |
6357 | 4880 |
]. |
4881 |
(parseTree notNil and:[parseTree ~~ #Error and:[ parseTree isMessage ]]) ifTrue:[ |
|
4882 |
selector := parseTree selector. |
|
4883 |
||
4884 |
selector == #'removeSelector:' ifTrue:[ |
|
7953 | 4885 |
sameAndOutcome := self compareRemoveSelectorChange:parseTree. |
4886 |
isSame := sameAndOutcome key. |
|
4887 |
outcome := sameAndOutcome value. |
|
4888 |
]. |
|
4889 |
selector == #'package:' ifTrue:[ |
|
4890 |
sameAndOutcome := self comparePackageChange:parseTree. |
|
4891 |
isSame := sameAndOutcome key. |
|
4892 |
outcome := sameAndOutcome value. |
|
6357 | 4893 |
]. |
4894 |
selector == #'category:' ifTrue:[ |
|
7953 | 4895 |
sameAndOutcome := self compareCategoryChange:parseTree. |
4896 |
isSame := sameAndOutcome key. |
|
4897 |
outcome := sameAndOutcome value. |
|
6357 | 4898 |
]. |
4899 |
selector == #'comment:' ifTrue:[ |
|
7953 | 4900 |
sameAndOutcome := self compareCommentChange:parseTree. |
4901 |
isSame := sameAndOutcome key. |
|
4902 |
outcome := sameAndOutcome value. |
|
6357 | 4903 |
]. |
4904 |
||
4905 |
selector == #'instanceVariableNames:' ifTrue:[ |
|
7953 | 4906 |
sameAndOutcome := self compareInstanceVariableNamesChange:parseTree. |
4907 |
isSame := sameAndOutcome key. |
|
4908 |
outcome := sameAndOutcome value. |
|
6357 | 4909 |
]. |
4910 |
||
4911 |
(Class definitionSelectors includes:selector) |
|
4912 |
"/ selector == #'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' |
|
4913 |
ifTrue:[ |
|
9888 | 4914 |
[ |
4915 |
superClass := parseTree receiver evaluate. |
|
4916 |
] on:Parser undefinedVariableError do:[:ex| ]. |
|
6357 | 4917 |
superClass isBehavior ifFalse:[ |
4918 |
outcome := 'Cannot compare this change\\(superclass not loaded).'. |
|
4919 |
isSame := nil. |
|
4920 |
] ifTrue:[ |
|
4921 |
(self checkClassIsLoaded:superClass) ifTrue:[ |
|
4922 |
thisClassSym := (parseTree arguments at:1) evaluate. |
|
4923 |
||
4924 |
(selector endsWith:':privateIn:') ifTrue:[ |
|
11475
b6fdfe902263
changed: #compareChange:showResult:
Stefan Vogel <sv@exept.de>
parents:
11397
diff
changeset
|
4925 |
Parser undefinedVariableError catch:[ |
b6fdfe902263
changed: #compareChange:showResult:
Stefan Vogel <sv@exept.de>
parents:
11397
diff
changeset
|
4926 |
ownerClass := (parseTree arguments at:5) evaluate. |
b6fdfe902263
changed: #compareChange:showResult:
Stefan Vogel <sv@exept.de>
parents:
11397
diff
changeset
|
4927 |
ownerClass isBehavior ifTrue:[ |
b6fdfe902263
changed: #compareChange:showResult:
Stefan Vogel <sv@exept.de>
parents:
11397
diff
changeset
|
4928 |
thisClass := ownerClass privateClassesAt:thisClassSym. |
b6fdfe902263
changed: #compareChange:showResult:
Stefan Vogel <sv@exept.de>
parents:
11397
diff
changeset
|
4929 |
]. |
6357 | 4930 |
]. |
4931 |
] ifFalse:[ |
|
4932 |
thisClass := (self nameSpaceForApply) at:thisClassSym ifAbsent:nil. |
|
4933 |
]. |
|
4934 |
thisClass isNil ifTrue:[ |
|
4935 |
outcome := 'Change defines the class: ' , thisClassSym allBold. |
|
4936 |
isSame := false. |
|
4937 |
] ifFalse:[ |
|
4938 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
|
4939 |
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'. |
|
4940 |
isSame := nil. |
|
4941 |
] ifTrue:[ |
|
4942 |
superClassHere := thisClass superclass name. |
|
4943 |
superClassInChange := parseTree receiver name. |
|
4944 |
superClassHere ~~ superClassInChange ifTrue:[ |
|
4945 |
outcome := 'Superclass is different.'. |
|
4946 |
isSame := false. |
|
4947 |
] ifFalse:[ |
|
4948 |
varsHere := thisClass instanceVariableString asCollectionOfWords. |
|
4949 |
varsInChange := (parseTree arguments at:2) evaluate asCollectionOfWords. |
|
4950 |
varsHere = varsInChange ifTrue:[ |
|
4951 |
thisClass classVariableString asCollectionOfWords = (parseTree arguments at:3) evaluate asCollectionOfWords ifTrue:[ |
|
9689
72819fbf329a
changed: #compareChange:showResult:
Claus Gittinger <cg@exept.de>
parents:
9621
diff
changeset
|
4952 |
((thisClass sharedPoolNames size == 0) and:[(parseTree arguments at:4) evaluate = '']) ifTrue:[ |
6357 | 4953 |
((selector endsWith:':category:') |
4954 |
and:[thisClass category ~= (parseTree arguments at:5) evaluate]) ifTrue:[ |
|
4955 |
outcome := 'Category is different'. |
|
4956 |
isSame := false. |
|
4957 |
] ifFalse:[ |
|
4958 |
outcome := 'Change has no effect\\(same definition)'. |
|
4959 |
isSame := true. |
|
4960 |
] |
|
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4961 |
"/ thisClass category = (parseTree arguments at:5) evaluate ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4962 |
"/ outcome := 'Change has no effect\\(same definition)'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4963 |
"/ isSame := true. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4964 |
"/ ] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4965 |
"/ outcome := 'Category is different'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4966 |
"/ isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4967 |
"/ ] |
6357 | 4968 |
] ifFalse:[ |
4969 |
outcome := 'SharedPool definition is different'. |
|
4970 |
isSame := false. |
|
4971 |
]. |
|
4972 |
] ifFalse:[ |
|
4973 |
outcome := 'ClassVariable definition is different'. |
|
4974 |
isSame := false. |
|
4975 |
] |
|
4976 |
] ifFalse:[ |
|
4977 |
outcome := 'InstanceVariable definition is different'. |
|
4978 |
isSame := false. |
|
12825 | 4979 |
addedVars := varsInChange reject:[:eachVar | (varsHere includes:eachVar)]. |
4980 |
removedVars := varsHere reject:[:eachVar | (varsInChange includes:eachVar)]. |
|
6357 | 4981 |
addedVars isEmpty ifTrue:[ |
4982 |
removedVars isEmpty ifTrue:[ |
|
4983 |
outcome := 'Change reorders instanceVariable(s)'. |
|
4984 |
] ifFalse:[ |
|
4985 |
removedVars := removedVars collect:[:eachVar | '''' , eachVar , '''']. |
|
4986 |
outcome := 'Change removes instanceVariable(s): ' , (removedVars asStringWith:Character space) allBold. |
|
4987 |
] |
|
4988 |
] ifFalse:[ |
|
4989 |
removedVars isEmpty ifTrue:[ |
|
4990 |
addedVars := addedVars collect:[:eachVar | '''' , eachVar , '''']. |
|
4991 |
outcome := 'Change adds instanceVariable(s): ' , (addedVars asStringWith:Character space) allBold. |
|
4992 |
]. |
|
4993 |
]. |
|
4994 |
] |
|
4995 |
] |
|
4996 |
] |
|
4997 |
] |
|
4998 |
] |
|
4999 |
] |
|
5000 |
] |
|
5001 |
] |
|
255 | 5002 |
] ifTrue:[ |
15016 | 5003 |
Class nameSpaceQuerySignal |
5004 |
answer:(self nameSpaceForApply) |
|
5005 |
do:[ |
|
5006 |
parseTree := self parseExpression:chunk. |
|
5007 |
]. |
|
5008 |
||
6357 | 5009 |
(parseTree notNil |
5010 |
and:[parseTree ~~ #Error |
|
5011 |
and:[parseTree isMessage]]) ifTrue:[ |
|
5012 |
"/ Squeak support (#methodsFor:***) |
|
5013 |
(#( |
|
5014 |
#methodsFor: |
|
5015 |
#privateMethodsFor: |
|
5016 |
#publicMethodsFor: |
|
5017 |
#ignoredMethodsFor: |
|
5018 |
#protectedMethodsFor: |
|
5019 |
||
5020 |
#methodsFor:stamp: "/ Squeak support |
|
5021 |
#methodsFor "/ Dolphin support |
|
5022 |
#methods "/ STV support |
|
5023 |
) |
|
5024 |
includes:parseTree selector) ifTrue:[ |
|
9888 | 5025 |
[ |
5026 |
thisClass := parseTree receiver evaluate. |
|
5027 |
] on:Parser undefinedVariableError do:[:ex| |
|
5028 |
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'. |
|
5029 |
isSame := nil. |
|
5030 |
]. |
|
5031 |
thisClass notNil ifTrue:[ |
|
5032 |
(thisClass isKindOf:UndefinedVariable) ifTrue:[ |
|
6357 | 5033 |
|thisName path| |
5034 |
||
5035 |
thisName := thisClass name. |
|
5036 |
path := thisName asCollectionOfSubstringsSeparatedByAll:'::'. |
|
5037 |
1 to:path size do:[:length | |
|
5038 |
|ownerName owner| |
|
5039 |
||
5040 |
ownerName := (path copyTo:length) asStringCollection asStringWith:'::'. |
|
6820
4e8815b9e661
Do not autoload class when comparing changes.
Stefan Vogel <sv@exept.de>
parents:
6682
diff
changeset
|
5041 |
owner := Smalltalk loadedClassNamed:ownerName. |
6357 | 5042 |
(owner notNil and:[owner isBehavior and:[owner isLoaded not]]) ifTrue:[ |
5043 |
self checkClassIsLoaded:owner. |
|
5044 |
]. |
|
5045 |
]. |
|
9888 | 5046 |
thisClass := parseTree receiver evaluate. |
6357 | 5047 |
]. |
5048 |
||
5049 |
thisClass isBehavior ifTrue:[ |
|
5050 |
parseTree selector == #methodsFor ifTrue:[ |
|
5051 |
cat := 'Dolphin methods'. |
|
5052 |
] ifFalse:[ |
|
5053 |
parseTree selector == #methods ifTrue:[ |
|
5054 |
cat := 'STV methods'. |
|
5055 |
] ifFalse:[ |
|
5056 |
cat := parseTree arg1 evaluate. |
|
5057 |
]. |
|
5058 |
]. |
|
5059 |
newSource := aStream nextChunk. |
|
5060 |
||
15016 | 5061 |
isSame := self |
5062 |
compareMethodSource:newSource |
|
5063 |
withVersionInClass:thisClass |
|
5064 |
into:[:outcomeResult :beepResult :oldSourceResult| |
|
5065 |
outcome := outcomeResult. |
|
5066 |
beep := beepResult. |
|
5067 |
oldSource := oldSourceResult. |
|
5068 |
]. |
|
5069 |
||
5070 |
isSame isNil ifTrue:[ |
|
5071 |
showDiff := false. |
|
5072 |
] ifFalse:[ |
|
5073 |
showDiff := isSame not. |
|
6357 | 5074 |
]. |
15016 | 5075 |
|
6357 | 5076 |
doShowResult ifTrue:[ |
5077 |
(showDiff and:[oldSource notNil and:[newSource notNil]]) ifTrue:[ |
|
8102 | 5078 |
d := DiffCodeView |
6639 | 5079 |
openOn:oldSource label:(resources string:'Current version (in image)') |
5080 |
and:newSource label:(resources string:'Change version'). |
|
6357 | 5081 |
d label:'method differences'. |
5082 |
] |
|
5083 |
] |
|
5084 |
] ifFalse:[ |
|
5085 |
beep := true. |
|
5086 |
outcome := 'Class does not exist.'. |
|
5087 |
isSame := nil. |
|
5088 |
] |
|
9888 | 5089 |
]] ifFalse:[ |
6357 | 5090 |
beep := true. |
5091 |
outcome := 'Not comparable.'. |
|
5092 |
isSame := nil. |
|
5093 |
] |
|
5094 |
] ifFalse:[ |
|
5095 |
beep := true. |
|
5096 |
outcome := 'Not comparable.'. |
|
5097 |
isSame := nil. |
|
5098 |
] |
|
255 | 5099 |
]. |
5100 |
aStream close. |
|
2835 | 5101 |
|
5102 |
doShowResult ifTrue:[ |
|
6357 | 5103 |
showDiff ifFalse:[ |
5104 |
outcome := (resources stringWithCRs:outcome). |
|
5105 |
beep ifTrue:[ |
|
5106 |
self warn:outcome. |
|
5107 |
] ifFalse:[ |
|
5108 |
self information:outcome. |
|
5109 |
] |
|
5110 |
]. |
|
255 | 5111 |
]. |
2835 | 5112 |
^ isSame. |
255 | 5113 |
|
9689
72819fbf329a
changed: #compareChange:showResult:
Claus Gittinger <cg@exept.de>
parents:
9621
diff
changeset
|
5114 |
"Created: / 24-11-1995 / 14:30:46 / cg" |
16372 | 5115 |
"Modified: / 01-05-2016 / 18:25:32 / cg" |
255 | 5116 |
! |
5117 |
||
7953 | 5118 |
compareCommentChange:parseTree |
5119 |
|thisClass| |
|
5120 |
||
9888 | 5121 |
[ |
5122 |
thisClass := parseTree receiver evaluate. |
|
5123 |
] on:Parser undefinedVariableError do:[:ex| ]. |
|
5124 |
||
7953 | 5125 |
thisClass isBehavior ifTrue:[ |
5126 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
5127 |
(thisClass comment = parseTree arg1 evaluate) ifTrue:[ |
|
5128 |
^ true -> 'Change has no effect\\(same comment)'. |
|
5129 |
] ifFalse:[ |
|
5130 |
^ false -> 'Comment is different'. |
|
5131 |
] |
|
5132 |
] ifFalse:[ |
|
5133 |
^ nil -> 'Cannot compare this change (compare requires class to be loaded).'. |
|
5134 |
] |
|
5135 |
]. |
|
5136 |
^ nil -> 'Cannot compare this change (class not present)'. |
|
5137 |
! |
|
5138 |
||
5139 |
compareInstanceVariableNamesChange:parseTree |
|
5140 |
|receiverExpression thisClass varsHere varsInChange | |
|
5141 |
||
5142 |
receiverExpression := parseTree receiver. |
|
5143 |
receiverExpression isMessage ifTrue:[ |
|
5144 |
receiverExpression selector == #class ifTrue:[ |
|
9888 | 5145 |
[ |
5146 |
thisClass := receiverExpression evaluate. |
|
5147 |
] on:Parser undefinedVariableError do:[:ex| |
|
5148 |
^ nil -> 'Class is not loaded'. |
|
5149 |
]. |
|
5150 |
||
7953 | 5151 |
varsHere := thisClass instanceVariableString asCollectionOfWords. |
5152 |
varsInChange := (parseTree arguments at:1) evaluate asCollectionOfWords. |
|
5153 |
varsHere = varsInChange ifTrue:[ |
|
5154 |
^ true -> 'Change has no effect\\(same definition)'. |
|
5155 |
] ifFalse:[ |
|
5156 |
^ false -> 'Class-instanceVariable definition is different'. |
|
5157 |
]. |
|
5158 |
]. |
|
5159 |
]. |
|
5160 |
^ nil -> 'Unhandled receiver' |
|
5161 |
! |
|
5162 |
||
15016 | 5163 |
compareMethodSource:newSource withVersionInClass:thisClass into:aThreeArgBlock |
5164 |
"returns true/false/nil if same,different,undecided; |
|
5165 |
also provides a message and a beep-boolean via the passed in block" |
|
5166 |
||
5167 |
|parser sel oldMethod oldSource outcome t1 t2 isLoaded| |
|
5168 |
||
5169 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
|
5170 |
do:[ |
|
5171 |
parser := Parser parseMethod:newSource in:thisClass. |
|
5172 |
]. |
|
5173 |
(parser isNil or:[parser == #Error]) ifTrue:[ |
|
5174 |
outcome := 'Change is unparsable (parse error).'. |
|
5175 |
aThreeArgBlock value:outcome value:true "beep" value:nil. |
|
5176 |
^ nil. |
|
5177 |
]. |
|
5178 |
||
5179 |
sel := parser selector. |
|
5180 |
oldMethod := thisClass compiledMethodAt:sel. |
|
5181 |
oldMethod isNil ifTrue:[ |
|
5182 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
|
5183 |
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'. |
|
5184 |
] ifTrue:[ |
|
5185 |
outcome := 'Method does not exist.'. |
|
5186 |
]. |
|
5187 |
aThreeArgBlock value:outcome value:true "beep" value:nil. |
|
5188 |
^ nil. |
|
5189 |
]. |
|
5190 |
||
5191 |
oldSource := oldMethod source. |
|
5192 |
oldSource isNil ifTrue:[ |
|
5193 |
outcome := 'No source for compare.'. |
|
5194 |
aThreeArgBlock value:outcome value:true "beep" value:nil. |
|
5195 |
^ nil. |
|
5196 |
]. |
|
5197 |
(oldSource = newSource) ifTrue:[ |
|
5198 |
outcome := 'Same source'. |
|
5199 |
aThreeArgBlock value:outcome value:false "beep" value:oldSource. |
|
5200 |
^ true. |
|
5201 |
]. |
|
5202 |
||
5203 |
"/ |
|
5204 |
"/ compare for tabulator <-> space changes |
|
5205 |
"/ before showing diff ... |
|
5206 |
"/ |
|
5207 |
t1 := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
5208 |
t2 := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
5209 |
t1 = t2 ifTrue:[ |
|
5210 |
outcome := 'Same source'. |
|
5211 |
aThreeArgBlock value:outcome value:false "beep" value:oldSource. |
|
5212 |
^ true. |
|
5213 |
]. |
|
5214 |
||
5215 |
"/ |
|
5216 |
"/ check if only historyLine diffs |
|
5217 |
"/ |
|
5218 |
(HistoryManager notNil |
|
5219 |
and:[HistoryManager isActive]) ifTrue:[ |
|
5220 |
(HistoryManager withoutHistoryLines:newSource) |
|
5221 |
= |
|
5222 |
(HistoryManager withoutHistoryLines:oldSource) |
|
5223 |
ifTrue:[ |
|
5224 |
outcome := 'Same source (history only)'. |
|
5225 |
aThreeArgBlock value:outcome value:false "beep" value:oldSource. |
|
5226 |
^ true. |
|
5227 |
] |
|
5228 |
]. |
|
5229 |
||
5230 |
outcome := 'Source changed.'. |
|
5231 |
aThreeArgBlock value:outcome value:false "beep" value:oldSource. |
|
5232 |
^ false. |
|
5233 |
! |
|
5234 |
||
7953 | 5235 |
comparePackageChange:parseTree |
9888 | 5236 |
|receiverExpression method thisClass| |
7953 | 5237 |
|
5238 |
receiverExpression := parseTree receiver. |
|
5239 |
receiverExpression isMessage ifTrue:[ |
|
5240 |
receiverExpression selector == #compiledMethodAt: ifTrue:[ |
|
9888 | 5241 |
[ |
5242 |
thisClass := receiverExpression receiver evaluate. |
|
5243 |
] on:Parser undefinedVariableError do:[:ex| ]. |
|
5244 |
(thisClass isBehavior |
|
7953 | 5245 |
and:[(method := receiverExpression evaluate) isMethod]) ifTrue:[ |
5246 |
method package = parseTree arg1 evaluate ifTrue:[ |
|
5247 |
^ true -> 'Change has no effect\\(same package)'. |
|
5248 |
] ifFalse:[ |
|
8000 | 5249 |
^ false -> ('Package is different (''<1p>'' vs. ''<2p>'')' expandMacrosWith:method package with:parseTree arg1 evaluate). |
7953 | 5250 |
] |
5251 |
] ifFalse:[ |
|
5252 |
^ nil -> 'There is no such method'. |
|
5253 |
] |
|
5254 |
] |
|
5255 |
]. |
|
5256 |
^ nil -> 'Unhandled receiver' |
|
5257 |
! |
|
5258 |
||
5259 |
compareRemoveSelectorChange:parseTree |
|
5260 |
|thisClass selector| |
|
5261 |
||
9888 | 5262 |
[ |
5263 |
thisClass := parseTree receiver evaluate. |
|
5264 |
] on:Parser undefinedVariableError do:[:ex| ]. |
|
5265 |
||
7953 | 5266 |
thisClass isBehavior ifTrue:[ |
5267 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
5268 |
selector := (parseTree arg1 evaluate). |
|
5269 |
(thisClass includesSelector:selector) ifTrue:[ |
|
8000 | 5270 |
^ false -> ('Change removes the #' , selector , ' method from ' , thisClass name). |
7953 | 5271 |
] ifFalse:[ |
8000 | 5272 |
^ true -> ('Change has no effect\\(there is no method for #' , selector , ' in ' , thisClass name , ')'). |
7953 | 5273 |
] |
5274 |
] ifFalse:[ |
|
5275 |
^ nil -> 'Cannot compare this change (compare requires class to be loaded).'. |
|
5276 |
] |
|
5277 |
]. |
|
5278 |
^ nil -> 'Cannot compare this change (class not present)'. |
|
5279 |
! |
|
5280 |
||
1359 | 5281 |
compressForClass:aClassNameOrNil |
6288 | 5282 |
"compress the change-set; |
1359 | 5283 |
this replaces multiple method-changes by the last (i.e. the most recent) change. |
5284 |
If the class argument is nil, compress for all classes. |
|
5285 |
otherwise, only changes for that class are compressed." |
|
5286 |
||
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5287 |
self |
6288 | 5288 |
compressForClass:aClassNameOrNil selector:nil |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5289 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5290 |
"Modified: / 19.11.2001 / 22:04:12 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5291 |
! |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5292 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5293 |
compressForClass:aClassNameOrNil selector:selectorToCompressOrNil |
6288 | 5294 |
"compress the change-set; |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5295 |
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
|
5296 |
If the class argument is nil, compress for all classes. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5297 |
otherwise, only changes for that class are compressed." |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5298 |
|
6288 | 5299 |
|lbl aStream searchIndex anyMore deleteSet index |
7507 | 5300 |
str snapshotProto snapshotPrefix snapshotNameIndex| |
5301 |
||
5302 |
changeFileName notNil ifTrue:[ |
|
5303 |
aStream := changeFileName asFilename readStreamOrNil. |
|
5304 |
aStream isNil ifTrue:[^ self]. |
|
5305 |
]. |
|
1359 | 5306 |
|
4762 | 5307 |
lbl := 'compressing'. |
1359 | 5308 |
aClassNameOrNil isNil ifTrue:[ |
7507 | 5309 |
selectorToCompressOrNil notNil ifTrue:[ |
5310 |
lbl := lbl , ' for ' , selectorToCompressOrNil. |
|
5311 |
] |
|
1359 | 5312 |
] ifFalse:[ |
7507 | 5313 |
selectorToCompressOrNil isNil ifTrue:[ |
5314 |
lbl := lbl , ' for ' , aClassNameOrNil. |
|
5315 |
] ifFalse:[ |
|
5316 |
lbl := lbl , ' for ' , aClassNameOrNil , '>>' , selectorToCompressOrNil. |
|
5317 |
] |
|
1359 | 5318 |
]. |
6288 | 5319 |
lbl := lbl , '...'. |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
5320 |
self newLabel:lbl. |
1359 | 5321 |
|
5322 |
CompressSnapshotInfo == true ifTrue:[ |
|
7507 | 5323 |
" |
5324 |
get a prototype snapshot record (to be independent of |
|
5325 |
the actual format .. |
|
5326 |
" |
|
16877 | 5327 |
str := WriteStream on:''. |
7507 | 5328 |
Class addChangeRecordForSnapshot:'foo' to:str. |
5329 |
snapshotProto := str contents. |
|
5330 |
snapshotPrefix := snapshotProto copyTo:10. |
|
5331 |
snapshotNameIndex := snapshotProto findString:'foo'. |
|
1359 | 5332 |
]. |
5333 |
||
5334 |
self withExecuteCursorDo:[ |
|
7507 | 5335 |
|numChanges classes selectors types excla sawExcla |
5336 |
chunk aParseTree parseTreeChunk |
|
5337 |
thisClass thisSelector codeChunk codeParser |
|
5338 |
compressThis fileName| |
|
5339 |
||
5340 |
numChanges := self numberOfChanges. |
|
5341 |
classes := Array new:numChanges. |
|
5342 |
selectors := Array new:numChanges. |
|
5343 |
types := Array new:numChanges. |
|
5344 |
||
5345 |
"starting at the end, get the change class and change selector; |
|
5346 |
collect all in classes / selectors" |
|
5347 |
||
5348 |
aStream notNil ifTrue:[ |
|
5349 |
excla := aStream class chunkSeparator. |
|
5350 |
numChanges to:1 by:-1 do:[:changeNr | |
|
16372 | 5351 |
aStream position:((changeInfoList at:changeNr) position)-1. |
7507 | 5352 |
sawExcla := aStream peekFor:excla. |
5353 |
chunk := aStream nextChunk. |
|
5354 |
sawExcla ifTrue:[ |
|
5355 |
"optimize a bit if multiple methods for same category arrive" |
|
5356 |
(chunk = parseTreeChunk) ifFalse:[ |
|
8665 | 5357 |
aParseTree := self parseExpression:chunk. |
7507 | 5358 |
parseTreeChunk := chunk |
5359 |
]. |
|
5360 |
(aParseTree notNil |
|
5361 |
and:[(aParseTree ~~ #Error) |
|
5362 |
and:[aParseTree isMessage]]) ifTrue:[ |
|
5363 |
(#( |
|
5364 |
#methodsFor: |
|
5365 |
#privateMethodsFor: |
|
5366 |
#publicMethodsFor: |
|
5367 |
#ignoredMethodsFor: |
|
5368 |
#protectedMethodsFor: |
|
5369 |
#methodsFor:stamp: "/ Squeak support |
|
5370 |
#methodsFor "/ Dolphin support |
|
5371 |
#methods "/ STV support |
|
5372 |
) |
|
5373 |
includes:aParseTree selector) ifTrue:[ |
|
5374 |
codeChunk := aStream nextChunk. |
|
9543
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5375 |
[ |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5376 |
thisClass := aParseTree receiver evaluate. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5377 |
codeParser := Parser |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5378 |
parseMethodSpecification:codeChunk |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5379 |
in:thisClass |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5380 |
ignoreErrors:true |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5381 |
ignoreWarnings:true. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5382 |
(codeParser notNil and:[codeParser ~~ #Error]) ifTrue:[ |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5383 |
selectors at:changeNr put:(codeParser selector). |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5384 |
classes at:changeNr put:thisClass. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5385 |
types at:changeNr put:#methodsFor |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5386 |
] |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5387 |
] on:Parser parseErrorSignal do:[:ex| |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5388 |
"ignore chunk" |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5389 |
ex return. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5390 |
]. |
7507 | 5391 |
] |
5392 |
] |
|
5393 |
] ifFalse:[ |
|
8665 | 5394 |
aParseTree := self parseExpression:chunk. |
7507 | 5395 |
parseTreeChunk := chunk. |
5396 |
(aParseTree notNil |
|
5397 |
and:[(aParseTree ~~ #Error) |
|
5398 |
and:[aParseTree isMessage]]) ifTrue:[ |
|
5399 |
(aParseTree selector == #removeSelector:) ifTrue:[ |
|
9543
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5400 |
[ |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5401 |
thisClass := aParseTree receiver evaluate. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5402 |
selectors at:changeNr put:(aParseTree arg1 value). |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5403 |
classes at:changeNr put:thisClass. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5404 |
types at:changeNr put:#removeSelector |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5405 |
] on:Parser parseErrorSignal do:[:ex| |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5406 |
"ignore chunk" |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5407 |
ex return. |
5d4b92f6e483
changed: #compressForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
9527
diff
changeset
|
5408 |
]. |
7507 | 5409 |
] |
5410 |
] ifFalse:[ |
|
5411 |
CompressSnapshotInfo == true ifTrue:[ |
|
5412 |
(chunk startsWith:snapshotPrefix) ifTrue:[ |
|
13314 | 5413 |
str := chunk readStream position:snapshotNameIndex-1. |
7507 | 5414 |
fileName := str upTo:(Character space). |
5415 |
" |
|
5416 |
kludge to allow use of match-check below |
|
5417 |
" |
|
5418 |
selectors at:changeNr put:snapshotPrefix. |
|
5419 |
classes at:changeNr put:fileName. |
|
5420 |
] |
|
5421 |
] |
|
5422 |
] |
|
5423 |
]. |
|
5424 |
]. |
|
5425 |
aStream close. |
|
5426 |
] ifFalse:[ |
|
5427 |
numChanges to:1 by:-1 do:[:changeNr | |
|
5428 |
|change| |
|
5429 |
||
5430 |
classes at:changeNr put:(self classOfChange:changeNr ifAbsent:[:className| nil]). |
|
5431 |
selectors at:changeNr put:(self selectorOfMethodChange:changeNr). |
|
5432 |
]. |
|
5433 |
]. |
|
5434 |
||
5435 |
"for all changes, look for another class/selector occurrence later |
|
5436 |
in the list and, if there is one, add change number to the delete set" |
|
5437 |
||
5438 |
deleteSet := OrderedCollection new. |
|
5439 |
1 to:self numberOfChanges-1 do:[:changeNr | |
|
5440 |
thisClass := classes at:changeNr. |
|
5441 |
||
5442 |
compressThis := false. |
|
5443 |
aClassNameOrNil isNil ifTrue:[ |
|
5444 |
compressThis := true |
|
5445 |
] ifFalse:[ |
|
5446 |
"/ skipping unloaded/unknown classes |
|
5447 |
thisClass isBehavior ifTrue:[ |
|
5448 |
compressThis := aClassNameOrNil = thisClass theNonMetaclass name. |
|
5449 |
] |
|
5450 |
]. |
|
5451 |
compressThis ifTrue:[ |
|
5452 |
thisSelector := selectors at:changeNr. |
|
5453 |
compressThis := (selectorToCompressOrNil isNil or:[thisSelector == selectorToCompressOrNil]). |
|
5454 |
compressThis ifTrue:[ |
|
5455 |
searchIndex := changeNr. |
|
5456 |
anyMore := true. |
|
5457 |
[anyMore] whileTrue:[ |
|
5458 |
searchIndex := classes indexOf:thisClass startingAt:(searchIndex + 1). |
|
5459 |
(searchIndex ~~ 0) ifTrue:[ |
|
5460 |
((selectors at:searchIndex) == thisSelector) ifTrue:[ |
|
5461 |
thisClass notNil ifTrue:[ |
|
5462 |
deleteSet add:changeNr. |
|
5463 |
anyMore := false |
|
5464 |
] |
|
5465 |
] |
|
5466 |
] ifFalse:[ |
|
5467 |
anyMore := false |
|
5468 |
] |
|
5469 |
]. |
|
5470 |
]. |
|
5471 |
]. |
|
5472 |
]. |
|
5473 |
||
5474 |
"finally delete what has been found" |
|
5475 |
||
5476 |
(deleteSet size > 0) ifTrue:[ |
|
5477 |
changeListView setSelection:nil. |
|
5478 |
index := deleteSet size. |
|
5479 |
[index > 0] whileTrue:[ |
|
5480 |
self silentDeleteChange:(deleteSet at:index). |
|
5481 |
index := index - 1 |
|
5482 |
]. |
|
5483 |
self setChangeList. |
|
5484 |
" |
|
5485 |
scroll back a bit, if we are left way behind the list |
|
5486 |
" |
|
5487 |
changeListView firstLineShown > self numberOfChanges ifTrue:[ |
|
5488 |
changeListView makeLineVisible:self numberOfChanges |
|
5489 |
]. |
|
5490 |
self clearCodeView |
|
5491 |
] |
|
1359 | 5492 |
]. |
5493 |
self newLabel:''. |
|
5494 |
||
7507 | 5495 |
"Created: / 19-11-2001 / 22:03:42 / cg" |
16372 | 5496 |
"Modified: / 01-05-2016 / 19:23:54 / cg" |
1359 | 5497 |
! |
5498 |
||
255 | 5499 |
deleteChange:changeNr |
5500 |
"delete a change" |
|
5501 |
||
5502 |
self deleteChangesFrom:changeNr to:changeNr |
|
5503 |
! |
|
5504 |
||
5505 |
deleteChangesFrom:start to:stop |
|
5506 |
"delete a range of changes" |
|
5507 |
||
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
5508 |
changeListView setSelection:nil. |
255 | 5509 |
stop to:start by:-1 do:[:changeNr | |
6288 | 5510 |
self silentDeleteInternalChange:changeNr. |
255 | 5511 |
]. |
6255 | 5512 |
changeListView removeFromIndex:start toIndex:stop. |
744
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
5513 |
|
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5514 |
"/ changeListView contentsChanged. |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5515 |
"/ changeListView redrawFromLine:start. |
255 | 5516 |
|
744
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
5517 |
"/ self setChangeList |
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
5518 |
|
1648 | 5519 |
"Modified: / 18.5.1998 / 14:22:27 / cg" |
255 | 5520 |
! |
5521 |
||
202 | 5522 |
makeChangeAPatch:changeNr |
5523 |
"append change to patchfile" |
|
5524 |
||
5525 |
self appendChange:changeNr toFile:'patches' |
|
5526 |
! |
|
5527 |
||
5528 |
makeChangePermanent:changeNr |
|
5529 |
"rewrite the source file where change changeNr lies" |
|
5530 |
||
5531 |
self notify:'this is not yet implemented' |
|
5532 |
! |
|
5533 |
||
73 | 5534 |
silentDeleteChange:changeNr |
5535 |
"delete a change do not update changeListView" |
|
57 | 5536 |
|
73 | 5537 |
anyChanges := true. |
16372 | 5538 |
changeInfoList removeIndex:changeNr. |
5539 |
"/ changeChunks removeIndex:changeNr. |
|
5540 |
"/ changePositions size >= changeNr ifTrue:[ changePositions removeIndex:changeNr ]. |
|
5541 |
"/ changeClassNames size >= changeNr ifTrue:[ changeClassNames removeIndex:changeNr ]. |
|
5542 |
"/ changeSelectors size >= changeNr ifTrue:[ changeSelectors removeIndex:changeNr ]. |
|
5543 |
"/ changeHeaderLines size >= changeNr ifTrue:[ changeHeaderLines removeIndex:changeNr ]. |
|
5544 |
"/ changeTimeStamps size >= changeNr ifTrue:[ changeTimeStamps removeIndex:changeNr ]. |
|
5545 |
"/ changeIsFollowupMethodChange size >= changeNr ifTrue:[ changeIsFollowupMethodChange removeIndex:changeNr ]. |
|
5546 |
||
5547 |
"Modified: / 01-05-2016 / 19:20:40 / cg" |
|
45 | 5548 |
! |
5549 |
||
202 | 5550 |
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
|
5551 |
"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
|
5552 |
Return the number of deleted changes." |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5553 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5554 |
|thisClassName index numDeleted| |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5555 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5556 |
numDeleted := 0. |
202 | 5557 |
index := stop. |
5558 |
[index >= start] whileTrue:[ |
|
6288 | 5559 |
thisClassName := self classNameOfChange:index. |
5560 |
thisClassName = aClassName ifTrue:[ |
|
5561 |
self silentDeleteChange:index. |
|
5562 |
numDeleted := numDeleted + 1. |
|
5563 |
]. |
|
5564 |
index := index - 1 |
|
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5565 |
]. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
5566 |
^ numDeleted |
51 | 5567 |
|
45 | 5568 |
! |
5569 |
||
3607 | 5570 |
silentDeleteChangesFor:aClassName selector:selector from:start to:stop |
5571 |
"delete changes for given class/selector in a range. |
|
5572 |
Return the number of deleted changes." |
|
5573 |
||
5574 |
|thisClassName index numDeleted| |
|
5575 |
||
5576 |
numDeleted := 0. |
|
5577 |
index := stop. |
|
5578 |
[index >= start] whileTrue:[ |
|
6288 | 5579 |
thisClassName := self classNameOfChange:index. |
5580 |
thisClassName = aClassName ifTrue:[ |
|
5581 |
(self selectorOfMethodChange:index) == selector ifTrue:[ |
|
5582 |
self silentDeleteChange:index. |
|
5583 |
numDeleted := numDeleted + 1. |
|
5584 |
] |
|
5585 |
]. |
|
5586 |
index := index - 1 |
|
3607 | 5587 |
]. |
5588 |
^ numDeleted |
|
5589 |
! |
|
5590 |
||
2511 | 5591 |
silentDeleteChangesForClassAndPrivateClasses:aClassName from:start to:stop |
5592 |
"delete changes for a given class and its private classes in a range. |
|
5593 |
Return the number of deleted changes." |
|
5594 |
||
5595 |
|thisClassName index numDeleted| |
|
5596 |
||
5597 |
numDeleted := 0. |
|
5598 |
index := stop. |
|
5599 |
[index >= start] whileTrue:[ |
|
6288 | 5600 |
thisClassName := self ownerClassNameOfChange:index. |
5601 |
thisClassName = aClassName ifTrue:[ |
|
5602 |
self silentDeleteChange:index. |
|
5603 |
numDeleted := numDeleted + 1. |
|
5604 |
]. |
|
5605 |
index := index - 1 |
|
2511 | 5606 |
]. |
5607 |
^ numDeleted |
|
5608 |
||
5609 |
! |
|
5610 |
||
12428 | 5611 |
silentDeleteChangesForNamespace:aNamespace from:start to:stop |
5612 |
"delete changes for a given namespace in a range. |
|
5613 |
Return the number of deleted changes." |
|
5614 |
||
5615 |
|thisNamespace index numDeleted| |
|
5616 |
||
5617 |
numDeleted := 0. |
|
5618 |
index := stop. |
|
5619 |
[index >= start] whileTrue:[ |
|
5620 |
thisNamespace := self namespaceOfChange:index. |
|
5621 |
thisNamespace = aNamespace ifTrue:[ |
|
5622 |
self silentDeleteChange:index. |
|
5623 |
numDeleted := numDeleted + 1. |
|
5624 |
]. |
|
5625 |
index := index - 1 |
|
5626 |
]. |
|
5627 |
^ numDeleted |
|
5628 |
! |
|
5629 |
||
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5630 |
silentDeleteInternalChange:changeNr |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5631 |
"delete a change do not update changeListView" |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5632 |
|
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
5633 |
anyChanges := true. |
16372 | 5634 |
changeInfoList removeIndex:changeNr. |
5635 |
"/ changeChunks removeIndex:changeNr. |
|
5636 |
"/ changePositions size >= changeNr ifTrue:[changePositions removeIndex:changeNr]. |
|
5637 |
"/ changeClassNames size >= changeNr ifTrue:[changeClassNames removeIndex:changeNr]. |
|
5638 |
"/ changeSelectors size >= changeNr ifTrue:[ changeSelectors removeIndex:changeNr ]. |
|
5639 |
"/ changeTimeStamps size >= changeNr ifTrue:[changeTimeStamps removeIndex:changeNr]. |
|
5640 |
"/ changeIsFollowupMethodChange size >= changeNr ifTrue:[changeIsFollowupMethodChange removeIndex:changeNr]. |
|
5641 |
||
5642 |
"Created: / 07-03-1997 / 16:28:32 / cg" |
|
5643 |
"Modified: / 26-02-1998 / 18:20:48 / stefan" |
|
5644 |
"Modified: / 01-05-2016 / 19:20:59 / cg" |
|
4487 | 5645 |
! |
5646 |
||
5647 |
updateDiffView |
|
5648 |
self withSelectedChangesDo:[:changeNr | |
|
6288 | 5649 |
self updateDiffViewFor:changeNr. |
5650 |
^ self. |
|
4487 | 5651 |
]. |
5652 |
||
5653 |
diffView text1:'' text2:'' |
|
5654 |
! |
|
5655 |
||
5656 |
updateDiffViewFor:changeNr |
|
5657 |
|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
|
5658 |
parser sel showDiff selector oldMethod i| |
4487 | 5659 |
|
5660 |
aStream := self streamForChange:changeNr. |
|
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5661 |
aStream isNil ifTrue:[ |
6317 | 5662 |
^ self |
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5663 |
]. |
4487 | 5664 |
|
5665 |
showDiff := false. |
|
5666 |
||
5667 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
|
6317 | 5668 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
5669 |
chunk := aStream nextChunk. |
|
4487 | 5670 |
] ifTrue:[ |
16372 | 5671 |
chunk := self changeChunkAt:changeNr. |
6317 | 5672 |
sawExcla := true. |
4487 | 5673 |
]. |
5674 |
||
4857 | 5675 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
5676 |
do:[ |
|
8665 | 5677 |
parseTree := self parseExpression:chunk. |
6317 | 5678 |
(parseTree notNil and:[parseTree ~~ #Error and:[ parseTree isMessage ]]) ifTrue:[ |
5679 |
selector := parseTree selector. |
|
5680 |
] |
|
4857 | 5681 |
]. |
5682 |
||
5683 |
selector isNil ifTrue:[ |
|
6317 | 5684 |
newSource := chunk. |
5685 |
oldSource := 'Not comparable.'. |
|
4857 | 5686 |
] ifFalse:[ |
6317 | 5687 |
sawExcla ifFalse:[ |
5688 |
"/ not a method-change |
|
5689 |
newSource := chunk. |
|
11275
abeda3e68385
added: #currentSourceForParseTree:
Claus Gittinger <cg@exept.de>
parents:
11244
diff
changeset
|
5690 |
oldSource := self currentSourceForParseTree:parseTree. |
6317 | 5691 |
] ifTrue:[ |
5692 |
"/ a method-change |
|
5693 |
||
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5694 |
(self class methodDefinitionSelectors includes:selector) ifTrue:[ |
6317 | 5695 |
newSource := aStream nextChunk. |
11362
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5696 |
thisClass := self classFromEvaluatingTree:parseTree receiver. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5697 |
"/ Error |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5698 |
"/ handle:[ ] |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5699 |
"/ do:[ |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5700 |
"/ thisClass := parseTree receiver evaluate. |
52ac4a5da69e
added: #classFromEvaluatingTree:
Claus Gittinger <cg@exept.de>
parents:
11347
diff
changeset
|
5701 |
"/ ]. |
6378 | 5702 |
thisClass isBehavior ifFalse:[ |
5703 |
thisClass := self classOfChange:changeNr. |
|
5704 |
]. |
|
6317 | 5705 |
thisClass isBehavior ifTrue:[ |
5706 |
(thisClass isLoaded |
|
5707 |
or:[ autoloadAsRequired value |
|
5708 |
and:[self checkClassIsLoaded:thisClass]]) ifFalse:[ |
|
5709 |
oldSource := 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
5710 |
] ifTrue:[ |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5711 |
selector numArgs == 0 ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5712 |
cat := '* as yet uncategorized *'. |
6532 | 5713 |
cat := selector. |
6317 | 5714 |
] ifFalse:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5715 |
cat := parseTree arg1 evaluate. |
6317 | 5716 |
]. |
5717 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
|
5718 |
do:[ |
|
7709 | 5719 |
parser := Parser new. |
6639 | 5720 |
Error catch:[ |
7709 | 5721 |
parser |
5722 |
parseMethod:newSource in:thisClass |
|
5723 |
ignoreErrors:true ignoreWarnings:true. |
|
6317 | 5724 |
] |
5725 |
]. |
|
7709 | 5726 |
sel := parser selector. |
5727 |
(sel notNil) ifTrue:[ |
|
6317 | 5728 |
oldMethod := thisClass compiledMethodAt:sel. |
5729 |
oldMethod notNil ifTrue:[ |
|
5730 |
(oldMethod category = cat) ifFalse:[ |
|
6447 | 5731 |
"/ Transcript showCR:'category changed.'. |
6317 | 5732 |
]. |
5733 |
oldSource := oldMethod source. |
|
5734 |
(oldSource = newSource) ifFalse:[ |
|
5735 |
oldSource isNil ifTrue:[ |
|
5736 |
oldSource := 'No source for compare.'. |
|
5737 |
] ifFalse:[ |
|
5738 |
"/ |
|
5739 |
"/ compare for tabulator <-> space changes |
|
5740 |
"/ before showing diff ... |
|
5741 |
"/ |
|
5742 |
oldSource := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
5743 |
newSource := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
5744 |
oldSource = newSource ifFalse:[ |
|
5745 |
"/ |
|
5746 |
"/ check if only historyLine diffs |
|
5747 |
"/ |
|
5748 |
(HistoryManager notNil |
|
5749 |
and:[HistoryManager isActive]) ifTrue:[ |
|
5750 |
oldSource := oldSource asStringCollection asString. |
|
5751 |
newSource := newSource asStringCollection asString. |
|
5752 |
(HistoryManager withoutHistoryLines:oldSource) |
|
5753 |
= |
|
5754 |
(HistoryManager withoutHistoryLines:newSource) |
|
5755 |
ifTrue:[ |
|
5756 |
oldSource := (HistoryManager withoutHistoryLines:oldSource). |
|
5757 |
newSource := (HistoryManager withoutHistoryLines:newSource). |
|
5758 |
] |
|
5759 |
]. |
|
5760 |
] |
|
5761 |
] |
|
5762 |
] |
|
5763 |
] ifFalse:[ |
|
5764 |
oldSource := 'Method does not exist.'. |
|
5765 |
] |
|
5766 |
] ifFalse:[ |
|
5767 |
oldSource := 'Change is unparsable (parse error).'. |
|
5768 |
]. |
|
5769 |
]. |
|
5770 |
] ifFalse:[ |
|
5771 |
oldSource := 'Class does not exist.'. |
|
5772 |
] |
|
5773 |
] ifFalse:[ |
|
5774 |
newSource := chunk. "/ aStream contents. |
|
5775 |
oldSource := 'Not comparable.'. |
|
5776 |
] |
|
5777 |
] |
|
4487 | 5778 |
]. |
5779 |
aStream close. |
|
5780 |
||
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5781 |
oldSource := oldSource ? ''. |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5782 |
newSource := newSource ? ''. |
8675
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5783 |
|
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5784 |
oldSource := oldSource asStringCollection asString. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5785 |
newSource := newSource asStringCollection asString. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5786 |
|
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5787 |
"/ unify cr, crlf and lf into lf |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5788 |
(oldSource includes:Character return) ifTrue: [ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5789 |
i := oldSource indexOf:Character return. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5790 |
(oldSource at:i+1) == Character nl ifTrue:[ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5791 |
"/ crnl endings |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5792 |
oldSource := oldSource copyReplaceString:(String crlf) withString:(String lf). |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5793 |
] ifFalse:[ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5794 |
"/ cr endings |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5795 |
oldSource := oldSource copyReplaceAll:Character return with:Character nl. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5796 |
]. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5797 |
]. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5798 |
|
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5799 |
"/ unify cr, crlf and lf into lf |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5800 |
(newSource includes:Character return) ifTrue: [ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5801 |
i := newSource indexOf:Character return. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5802 |
(newSource at:i+1) == Character nl ifTrue:[ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5803 |
"/ crnl endings |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5804 |
newSource := newSource copyReplaceString:(String crlf) withString:(String lf). |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5805 |
] ifFalse:[ |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5806 |
"/ cr endings |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5807 |
newSource := newSource copyReplaceAll:Character return with:Character nl. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5808 |
]. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5809 |
]. |
cb829711c85c
care for cr / crlf in string
Claus Gittinger <cg@exept.de>
parents:
8665
diff
changeset
|
5810 |
|
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5811 |
(oldSource = newSource |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5812 |
or:[ oldSource asStringCollection withTabsExpanded = newSource asStringCollection withTabsExpanded]) ifTrue:[ |
6317 | 5813 |
self makeDiffViewInvisible |
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5814 |
] ifFalse:[ |
6317 | 5815 |
self makeDiffViewVisible. |
5816 |
diffView text1:oldSource text2:newSource. |
|
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
5817 |
]. |
4487 | 5818 |
|
7709 | 5819 |
"Created: / 24-11-1995 / 14:30:46 / cg" |
16372 | 5820 |
"Modified: / 01-05-2016 / 18:26:01 / cg" |
202 | 5821 |
! ! |
0 | 5822 |
|
202 | 5823 |
!ChangesBrowser methodsFor:'termination'! |
51 | 5824 |
|
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5825 |
askIfChangesAreToBeWrittenBack |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5826 |
|action again| |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5827 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5828 |
anyChanges ifFalse:[^ self]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5829 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5830 |
again := true. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5831 |
[again] whileTrue:[ |
6357 | 5832 |
action := OptionBox |
5833 |
request:(resources stringWithCRs:'The modified changelist has not been written back to the change file.\\Write change file before closing ?') |
|
5834 |
label:'ChangesBrowser' |
|
5835 |
image:(WarningBox iconBitmap) |
|
5836 |
buttonLabels:(resources array:#('Cancel' 'Don''t Write' 'Write')) |
|
5837 |
values:#(#abort #ignore #save) |
|
5838 |
default:#save |
|
5839 |
onCancel:#abort. |
|
5840 |
||
5841 |
again := false. |
|
5842 |
action == #abort ifTrue:[AbortSignal raise. ^ self]. |
|
5843 |
action == #save ifTrue:[ |
|
5844 |
again := self writeBackChanges not |
|
5845 |
]. |
|
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5846 |
]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5847 |
! |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5848 |
|
1787 | 5849 |
closeRequest |
5850 |
"window manager wants us to go away" |
|
5851 |
||
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
5852 |
self askIfChangesAreToBeWrittenBack. |
1787 | 5853 |
super closeRequest |
5854 |
! |
|
5855 |
||
202 | 5856 |
saveAndTerminate |
5857 |
"update the changes file and quit. |
|
17026 | 5858 |
Don't depend on this being sent, not all window managers |
202 | 5859 |
send it; instead, they simply destroy the view." |
28 | 5860 |
|
202 | 5861 |
anyChanges ifTrue:[ |
17026 | 5862 |
self writeBackChanges. |
0 | 5863 |
]. |
1787 | 5864 |
super saveAndTerminate |
5865 |
||
5866 |
"Modified: / 3.8.1998 / 19:54:00 / cg" |
|
0 | 5867 |
! ! |
5868 |
||
73 | 5869 |
!ChangesBrowser methodsFor:'user interaction'! |
51 | 5870 |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5871 |
askForSearch:msg initialAnswer:initial thenSearchUsing:searchBlock2 onCancel:cancelBlock |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5872 |
|searchString directionHolder searchBlock| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5873 |
|
6288 | 5874 |
searchString := self |
15674 | 5875 |
askForSearchString:msg |
5876 |
initialAnswer:initial |
|
5877 |
directionInto:(directionHolder := ValueHolder new). |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5878 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5879 |
searchString isNil ifTrue:[ |
15674 | 5880 |
^ cancelBlock value |
5881 |
]. |
|
17382 | 5882 |
lastSearchString := searchString. |
5883 |
||
15674 | 5884 |
directionHolder value == #first ifTrue:[ |
5885 |
self findFirstForClass:searchString. |
|
5886 |
^ self. |
|
5887 |
]. |
|
5888 |
directionHolder value == #last ifTrue:[ |
|
5889 |
self findLastForClass:searchString. |
|
5890 |
^ self. |
|
5891 |
]. |
|
5892 |
||
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5893 |
searchBlock := [:changeNr | searchBlock2 value:searchString value:changeNr]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5894 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5895 |
directionHolder value == #backward ifTrue:[ |
15674 | 5896 |
changeNrShown isNil ifTrue:[ |
5897 |
changeNrShown := self numberOfChanges. |
|
5898 |
]. |
|
5899 |
self findPreviousForWhich:searchBlock |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5900 |
] ifFalse:[ |
15674 | 5901 |
changeNrShown isNil ifTrue:[ |
5902 |
changeNrShown := 0. |
|
5903 |
]. |
|
5904 |
self findNextForWhich:searchBlock |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5905 |
]. |
17382 | 5906 |
|
5907 |
"Modified: / 10-02-2017 / 20:40:59 / cg" |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5908 |
! |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5909 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5910 |
askForSearchString:msg initialAnswer:initial directionInto:aValueHolder |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5911 |
"common code to open a search box" |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5912 |
|
17394 | 5913 |
|searchString direction choices current| |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5914 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5915 |
direction := #forward. |
17394 | 5916 |
choices := OrderedCollection new. |
5917 |
||
5918 |
changeNrShown notNil ifTrue:[ |
|
5919 |
current := self classNameOfChange:changeNrShown. |
|
5920 |
initial ~= current ifTrue:[ |
|
5921 |
(choices includes:current) ifFalse:[ |
|
5922 |
choices addFirst:current |
|
5923 |
]. |
|
5924 |
]. |
|
5925 |
]. |
|
5926 |
lastSearchString notNil ifTrue:[ |
|
5927 |
initial ~= lastSearchString ifTrue:[ |
|
5928 |
(choices includes:lastSearchString) ifFalse:[ |
|
5929 |
choices addFirst:lastSearchString |
|
5930 |
]. |
|
5931 |
]. |
|
5932 |
]. |
|
5933 |
||
15449 | 5934 |
"/ take a normal request box, but add an additional 'previous' button |
5935 |
Dialog modifyingBoxWith:[:box | |
|
15674 | 5936 |
|nextButton prevButton firstButton lastButton| |
15449 | 5937 |
|
13343 | 5938 |
nextButton := box okButton. |
15674 | 5939 |
|
5940 |
firstButton := Button label:(resources string:'First'). |
|
5941 |
firstButton action:[direction := #first. box okPressed.]. |
|
5942 |
box addButton:firstButton after:nextButton. |
|
5943 |
||
5944 |
lastButton := Button label:(resources string:'Last'). |
|
5945 |
lastButton action:[direction := #last. box okPressed.]. |
|
5946 |
box addButton:lastButton after:nextButton. |
|
5947 |
||
13343 | 5948 |
prevButton := Button label:(resources string:'Previous'). |
5949 |
prevButton action:[direction := #backward. box okPressed.]. |
|
5950 |
box addButton:prevButton after:nextButton. |
|
15674 | 5951 |
|
13343 | 5952 |
nextButton label:(resources string:'Next'). |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5953 |
] do:[ |
13343 | 5954 |
searchString := Dialog |
5955 |
request:msg |
|
17394 | 5956 |
list:choices |
13343 | 5957 |
initialAnswer:initial |
17394 | 5958 |
]. |
5959 |
||
5960 |
searchString isEmptyOrNil ifTrue:[ |
|
13343 | 5961 |
^ nil |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5962 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5963 |
aValueHolder value:direction. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5964 |
^ searchString |
15449 | 5965 |
|
5966 |
" |
|
5967 |
self new askForSearchString:'foo' initialAnswer:'bla' directionInto:(false asValue) |
|
5968 |
" |
|
17394 | 5969 |
|
5970 |
"Modified: / 12-02-2017 / 11:18:11 / cg" |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5971 |
! |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5972 |
|
221 | 5973 |
autoUpdate:aBoolean |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5974 |
"enabled/disable automatic update from the change-file (for monitoring)" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5975 |
|
6216 | 5976 |
autoUpdate value:aBoolean |
221 | 5977 |
|
5978 |
"Created: 3.12.1995 / 14:14:24 / cg" |
|
5979 |
"Modified: 3.12.1995 / 14:20:45 / cg" |
|
5980 |
! |
|
5981 |
||
6216 | 5982 |
autoloadAsRequired:aBoolean |
5983 |
"enabled/disable automatic load of unloaded classes" |
|
5984 |
||
5985 |
autoloadAsRequired value:aBoolean |
|
5986 |
! |
|
5987 |
||
3211 | 5988 |
changeSelection:lineNrCollection |
0 | 5989 |
"show a change in the codeView" |
5990 |
||
11048 | 5991 |
|chunk lineNr lineNumbers| |
3211 | 5992 |
|
5993 |
lineNrCollection isInteger ifTrue:[ |
|
11048 | 5994 |
lineNr := lineNrCollection. |
5995 |
lineNumbers := Array with:lineNr. |
|
3211 | 5996 |
] ifFalse:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5997 |
changeListView multipleSelectOk ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5998 |
lineNrCollection size == 1 ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
5999 |
lineNr := lineNrCollection first. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6000 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6001 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6002 |
lineNr := lineNrCollection |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6003 |
]. |
11048 | 6004 |
lineNumbers := lineNrCollection. |
6005 |
]. |
|
6006 |
||
6007 |
self changeListSelectionHolder value:lineNumbers. |
|
16467 | 6008 |
|
2293 | 6009 |
lineNr isNil ifTrue:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6010 |
codeView contents:nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6011 |
codeView initializeDoITAction. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6012 |
changeNrShown := nil. |
16467 | 6013 |
infoHolder value:nil. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6014 |
^ self |
2293 | 6015 |
]. |
6016 |
||
16467 | 6017 |
changeNrShown := lineNr. |
6018 |
self sensor |
|
6019 |
enqueueMessage:#updateSourceCodeAfterChangedSelection for:self arguments:nil; |
|
6020 |
enqueueMessage:#updateInfoAfterChangedSelection for:self arguments:nil. |
|
6021 |
^ self. |
|
6022 |
||
3211 | 6023 |
"/ display the changes code |
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
6024 |
chunk := self sourceOfChange:lineNr. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
6025 |
chunk isNil ifTrue:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6026 |
codeView initializeDoITAction. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6027 |
^ self |
2044 | 6028 |
]. |
8391 | 6029 |
|
0 | 6030 |
codeView contents:chunk. |
13 | 6031 |
codeView acceptAction:[:theCode | self doApply "noChangesAllowed"]. |
2043
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
6032 |
codeView doItAction:[:theCode | |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6033 |
|clsName cls| |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6034 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6035 |
clsName := self classNameOfChange:lineNr. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6036 |
clsName notNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6037 |
clsName := clsName asSymbolIfInterned. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6038 |
clsName notNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6039 |
cls := Smalltalk at:clsName ifAbsent:nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6040 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6041 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6042 |
Compiler |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6043 |
evaluate:theCode |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6044 |
in:nil |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6045 |
receiver:cls |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6046 |
notifying:self |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6047 |
logged:true |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6048 |
ifFail:nil |
2043
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
6049 |
]. |
15 | 6050 |
changeNrShown := lineNr. |
0 | 6051 |
|
4487 | 6052 |
self showingDiffs value ifTrue:[ |
8391 | 6053 |
self withWaitCursorDo:[ |
6054 |
AbortOperationRequest catch:[ |
|
6055 |
self updateDiffViewFor:changeNrShown. |
|
6056 |
] |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6057 |
] |
4487 | 6058 |
]. |
6059 |
||
11048 | 6060 |
"Modified: / 03-01-2012 / 15:30:23 / cg" |
51 | 6061 |
! |
6062 |
||
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6063 |
classOfChange:changeNr |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
6064 |
^ self |
6386 | 6065 |
classOfChange:changeNr |
6066 |
ifAbsent:[:className | |
|
6067 |
|msg| |
|
6068 |
||
6069 |
className isNil ifTrue:[ |
|
6070 |
msg := 'Could not extract classname from change'. |
|
6071 |
] ifFalse:[ |
|
6072 |
msg := 'Class not found: ''' , className , ''''. |
|
6073 |
]. |
|
8320
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6074 |
Transcript showCR:msg. |
6386 | 6075 |
"/ self warn:msg. |
6076 |
nil |
|
6077 |
] |
|
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
6078 |
! |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
6079 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
6080 |
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
|
6081 |
"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
|
6082 |
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
|
6083 |
|
8272
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6084 |
|className cls isMeta nameSpaceForApply path ownerName owner| |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6085 |
|
5014 | 6086 |
className := self realClassNameOfChange:changeNr. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6087 |
className isNil ifTrue:[ |
6378 | 6088 |
^ exceptionBlock value:nil |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6089 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6090 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6091 |
isMeta := false. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6092 |
(className endsWith:' class') ifTrue:[ |
12704
6f20f7d39e75
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12656
diff
changeset
|
6093 |
className := className copyButLast:6. |
6378 | 6094 |
isMeta := true. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6095 |
]. |
3472 | 6096 |
|
8272
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6097 |
autoloadAsRequired value ifTrue:[ |
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6098 |
path := className asCollectionOfSubstringsSeparatedByAll:'::'. |
8320
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6099 |
path size >= 2 ifTrue:[ |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6100 |
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
|
6101 |
"/ 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
|
6102 |
"/ Transcript showCR:'loading owner'. |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6103 |
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
|
6104 |
owner := Smalltalk classNamed:ownerName. |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6105 |
owner notNil ifTrue:[ |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6106 |
owner autoload. |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6107 |
]. |
c0d503e3dc91
also load private classes of an autoloaded as required
Claus Gittinger <cg@exept.de>
parents:
8272
diff
changeset
|
6108 |
]. |
8272
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6109 |
]. |
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6110 |
]. |
cd6b675fc5fd
autoload class owner if required
Claus Gittinger <cg@exept.de>
parents:
8173
diff
changeset
|
6111 |
|
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6112 |
nameSpaceForApply := self nameSpaceForApply. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6113 |
autoloadAsRequired value ifTrue:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6114 |
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
|
6115 |
] ifFalse:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6116 |
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
|
6117 |
]. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6118 |
(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
|
6119 |
"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
|
6120 |
autoloadAsRequired value ifTrue:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6121 |
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
|
6122 |
] ifFalse:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6123 |
cls := Smalltalk loadedClassNamed:className |
6378 | 6124 |
]. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6125 |
]. |
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6126 |
|
6378 | 6127 |
cls isNil ifTrue:[ |
6128 |
^ exceptionBlock value:className |
|
6129 |
]. |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6130 |
isMeta ifTrue:[ |
6378 | 6131 |
cls := cls class |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6132 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6133 |
^ cls |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6134 |
! |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
6135 |
|
1471 | 6136 |
doubleClickOnChange:lineNr |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
6137 |
"action performed when a change-list entry is doubleClicked" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
6138 |
|
1471 | 6139 |
self doBrowse |
6140 |
||
6141 |
"Created: / 6.2.1998 / 13:08:49 / cg" |
|
6142 |
! |
|
6143 |
||
202 | 6144 |
noChangesAllowed |
6145 |
"show a warning that changes cannot be changed" |
|
93 | 6146 |
|
3211 | 6147 |
self warn:'Changes are not allowed to be changed.' |
0 | 6148 |
! |
6149 |
||
202 | 6150 |
saveClass:aClassName from:startNr |
6151 |
"user wants changes from current to end to be appended to a file" |
|
51 | 6152 |
|
202 | 6153 |
|changeNr fileName| |
51 | 6154 |
|
202 | 6155 |
changeNr := changeListView selection. |
6156 |
changeNr notNil ifTrue:[ |
|
9604 | 6157 |
fileName := Dialog |
6158 |
requestFileNameForSave:(resources string:'Append changes for class to:') |
|
6159 |
default:(lastSaveFileName ? '') |
|
6160 |
ok:(resources string:'Append') |
|
6161 |
abort:(resources string:'Abort') |
|
6162 |
pattern:'*.chg'. |
|
6163 |
||
6164 |
fileName notNil ifTrue:[ |
|
6165 |
lastSaveFileName := fileName. |
|
11685 | 6166 |
self withWriteCursorDo:[ |
9604 | 6167 |
startNr to:(self numberOfChanges) do:[:changeNr | |
6168 |
|thisClassName| |
|
6169 |
||
6170 |
thisClassName := self classNameOfChange:changeNr. |
|
6171 |
thisClassName = aClassName ifTrue:[ |
|
6172 |
self setSingleSelection:changeNr. |
|
6173 |
(self appendChange:changeNr toFile:fileName) ifFalse:[ |
|
6174 |
^ self |
|
6175 |
] |
|
6176 |
] |
|
6177 |
] |
|
6178 |
] |
|
6179 |
]. |
|
202 | 6180 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
6181 |
|
11685 | 6182 |
"Modified: / 27-07-2012 / 09:46:04 / cg" |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
6183 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
6184 |
|
11477 | 6185 |
selectionChanged |
12946 | 6186 |
self halt:'should not be here' |
11048 | 6187 |
|
6188 |
"Created: / 03-01-2012 / 15:26:36 / cg" |
|
16467 | 6189 |
! |
6190 |
||
6191 |
updateInfoAfterChangedSelection |
|
6192 |
"update the info label" |
|
6193 |
||
17172 | 6194 |
|selection lineNr selectorOrNil className nonMetaClassName metaClassName |
16476 | 6195 |
nClassChanges nMethodChanges uniqueSelectors |
17172 | 6196 |
lastLineNr firstLineNr |
6197 |
countForClassBeforeCurrent countForClassAfterLast countForClassAndSelectorAfterLast |
|
17381 | 6198 |
moreInfo msg| |
16467 | 6199 |
|
6200 |
selection := lineNr := changeListView selection. |
|
6201 |
selection isNumber ifFalse:[ |
|
6202 |
lineNr := nil. |
|
6203 |
selection notEmptyOrNil ifTrue:[ |
|
6204 |
lineNr := selection first |
|
6205 |
]. |
|
6206 |
]. |
|
6207 |
||
6208 |
lineNr isNil ifTrue:[ |
|
6209 |
infoHolder value:nil. |
|
6210 |
^ self |
|
6211 |
]. |
|
6212 |
||
6213 |
"/ |
|
6214 |
"/ now, this info is computed so fast, |
|
6215 |
"/ we can do it each time the selection changes |
|
6216 |
"/ (can we?) |
|
6217 |
className := self realClassNameOfChange:lineNr. |
|
16478 | 6218 |
className isNil ifTrue:[ |
6219 |
infoHolder value:nil. |
|
6220 |
^ self |
|
6221 |
]. |
|
17172 | 6222 |
selectorOrNil := self selectorOfMethodChange:lineNr. |
16478 | 6223 |
|
16476 | 6224 |
nonMetaClassName := (className endsWith:' class') |
6225 |
ifTrue:[ className copyButLast:' class' size ] |
|
6226 |
ifFalse:[ className ]. |
|
6227 |
metaClassName := nonMetaClassName,' class'. |
|
6228 |
||
16467 | 6229 |
nClassChanges := nMethodChanges := 0. |
6230 |
uniqueSelectors := Set new. |
|
16476 | 6231 |
lastLineNr := firstLineNr := nil. |
17172 | 6232 |
countForClassAfterLast := 0. |
6233 |
countForClassBeforeCurrent := 0. |
|
6234 |
countForClassAndSelectorAfterLast := 0. |
|
16467 | 6235 |
|
6236 |
"/ count them all |
|
6237 |
1 to:changeInfoList size do:[:i | |
|
16476 | 6238 |
|sel nameOfChange| |
17420 | 6239 |
|
6240 |
changeInfoList at:i. |
|
16476 | 6241 |
nameOfChange := self realClassNameOfChange:i. |
6242 |
((nameOfChange = nonMetaClassName) or:[nameOfChange = metaClassName]) ifTrue:[ |
|
17172 | 6243 |
sel := self selectorOfMethodChange:i. |
6244 |
||
16467 | 6245 |
lastLineNr := i. |
16476 | 6246 |
firstLineNr := firstLineNr ? i. |
17172 | 6247 |
i > lineNr ifTrue:[ |
6248 |
countForClassAfterLast := countForClassAfterLast + 1. |
|
6249 |
(nameOfChange = className |
|
6250 |
and:[ selectorOrNil notNil |
|
6251 |
and:[sel == selectorOrNil]]) ifTrue:[ |
|
6252 |
countForClassAndSelectorAfterLast := countForClassAndSelectorAfterLast + 1. |
|
16476 | 6253 |
]. |
17172 | 6254 |
] ifFalse:[ |
6255 |
i < lineNr ifTrue:[ |
|
6256 |
countForClassBeforeCurrent := countForClassBeforeCurrent + 1 |
|
6257 |
] |
|
6258 |
]. |
|
16467 | 6259 |
nClassChanges := nClassChanges + 1. |
17172 | 6260 |
sel notNil ifTrue:[ |
16467 | 6261 |
uniqueSelectors add:sel. |
6262 |
nMethodChanges := nMethodChanges + 1. |
|
6263 |
]. |
|
6264 |
]. |
|
6265 |
]. |
|
6266 |
lastLineNr == lineNr ifTrue:[ |
|
16476 | 6267 |
firstLineNr == lineNr ifTrue:[ |
6268 |
moreInfo := resources string:'. This is the only one for this class '. |
|
6269 |
] ifFalse:[ |
|
6270 |
moreInfo := resources string:'. This is the last for this class '. |
|
6271 |
] |
|
16467 | 6272 |
] ifFalse:[ |
16476 | 6273 |
firstLineNr == lineNr ifTrue:[ |
6274 |
moreInfo := resources string:'. This is the first for this class'. |
|
6275 |
]. |
|
17172 | 6276 |
countForClassAfterLast > 0 ifTrue:[ |
6277 |
moreInfo := (moreInfo ? ''),(resources string:'. %1 more for this class' with:countForClassAfterLast). |
|
6278 |
countForClassAndSelectorAfterLast > 0 ifTrue:[ |
|
17419 | 6279 |
moreInfo := moreInfo,(resources string:', %1 for selector' with:countForClassAndSelectorAfterLast). |
17172 | 6280 |
]. |
16467 | 6281 |
]. |
6282 |
]. |
|
17381 | 6283 |
uniqueSelectors size == 1 ifTrue:[ |
6284 |
nMethodChanges == 1 ifTrue:[ |
|
6285 |
msg := '%1 changes. %2 for %3 (1 for #''%5'')%6' |
|
6286 |
] ifFalse:[ |
|
6287 |
msg := '%1 changes. %2 for %3 (%4 methods / for #''%5'')%6' |
|
6288 |
]. |
|
6289 |
infoHolder value:(resources |
|
6290 |
string:msg |
|
6291 |
with:(changeInfoList size) |
|
6292 |
with:nClassChanges |
|
6293 |
with:className |
|
6294 |
with:nMethodChanges |
|
6295 |
with:uniqueSelectors first |
|
6296 |
with:moreInfo). |
|
6297 |
] ifFalse:[ |
|
6298 |
infoHolder value:(resources |
|
6299 |
string:'%1 changes. %2 for %3 (%4 methods / %5 selectors)%6' |
|
6300 |
with:(changeInfoList size) |
|
6301 |
with:nClassChanges |
|
6302 |
with:className |
|
6303 |
with:nMethodChanges |
|
6304 |
with:uniqueSelectors size |
|
6305 |
with:moreInfo). |
|
6306 |
]. |
|
6307 |
||
17420 | 6308 |
"Modified: / 19-02-2017 / 13:37:19 / cg" |
16467 | 6309 |
! |
6310 |
||
6311 |
updateSourceCodeAfterChangedSelection |
|
6312 |
"show a change in the codeView" |
|
6313 |
||
6314 |
|selection lineNr chunk| |
|
6315 |
||
6316 |
selection := lineNr := changeListView selection. |
|
6317 |
selection isNumber ifFalse:[ |
|
6318 |
lineNr := nil. |
|
6319 |
selection notEmptyOrNil ifTrue:[ |
|
6320 |
lineNr := selection first |
|
6321 |
]. |
|
6322 |
]. |
|
6323 |
||
6324 |
lineNr isNil ifTrue:[ |
|
6325 |
^ self |
|
6326 |
]. |
|
6327 |
||
6328 |
"/ display the changes code |
|
6329 |
chunk := self sourceOfChange:lineNr. |
|
6330 |
chunk isNil ifTrue:[ |
|
6331 |
codeView initializeDoITAction. |
|
6332 |
^ self |
|
6333 |
]. |
|
6334 |
||
6335 |
codeView contents:chunk. |
|
6336 |
codeView acceptAction:[:theCode | self doApply "noChangesAllowed"]. |
|
6337 |
codeView doItAction:[:theCode | |
|
6338 |
|clsName cls| |
|
6339 |
||
6340 |
clsName := self classNameOfChange:lineNr. |
|
6341 |
clsName notNil ifTrue:[ |
|
6342 |
clsName := clsName asSymbolIfInterned. |
|
6343 |
clsName notNil ifTrue:[ |
|
6344 |
cls := Smalltalk at:clsName ifAbsent:nil. |
|
6345 |
] |
|
6346 |
]. |
|
6347 |
Compiler |
|
6348 |
evaluate:theCode |
|
6349 |
in:nil |
|
6350 |
receiver:cls |
|
6351 |
notifying:self |
|
6352 |
logged:true |
|
6353 |
ifFail:nil |
|
6354 |
]. |
|
6355 |
||
6356 |
||
6357 |
changeNrShown := lineNr. |
|
6358 |
||
6359 |
self showingDiffs value ifTrue:[ |
|
6360 |
self withWaitCursorDo:[ |
|
6361 |
AbortOperationRequest catch:[ |
|
6362 |
self updateDiffViewFor:changeNrShown. |
|
6363 |
] |
|
6364 |
] |
|
6365 |
]. |
|
202 | 6366 |
! ! |
0 | 6367 |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6368 |
!ChangesBrowser::ChangeFileReader methodsFor:'accessing'! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6369 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6370 |
autoCompare:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6371 |
autoCompare := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6372 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6373 |
|
7620
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6374 |
autoloadAsRequired |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6375 |
^ autoloadAsRequired |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6376 |
! |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6377 |
|
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6378 |
autoloadAsRequired:something |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6379 |
autoloadAsRequired := something. |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6380 |
! |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6381 |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6382 |
browser:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6383 |
browser := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6384 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6385 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6386 |
changeChunks |
16372 | 6387 |
self halt. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6388 |
^ changeChunks |
16372 | 6389 |
|
6390 |
"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
|
6391 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6392 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6393 |
changeClassNames |
16372 | 6394 |
self halt. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6395 |
^ changeClassNames |
16372 | 6396 |
|
6397 |
"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
|
6398 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6399 |
|
6516
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6400 |
changeFileName |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6401 |
^ changeFileName |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6402 |
! |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6403 |
|
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6404 |
changeFileName:something |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6405 |
changeFileName := something. |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6406 |
! |
48d51ac63886
fix bug from prev version: could not read changes file
Stefan Vogel <sv@exept.de>
parents:
6512
diff
changeset
|
6407 |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6408 |
changeHeaderLines |
16372 | 6409 |
self halt. |
6410 |
^ changeHeaderLines |
|
6411 |
||
6412 |
"Modified: / 01-05-2016 / 19:10:41 / cg" |
|
6413 |
! |
|
6414 |
||
6415 |
changeInfo |
|
6416 |
^ changeInfo |
|
6417 |
||
6418 |
"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
|
6419 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6420 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6421 |
changeIsFollowupMethodChange |
16372 | 6422 |
self halt. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6423 |
^ changeIsFollowupMethodChange |
16372 | 6424 |
|
6425 |
"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
|
6426 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6427 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6428 |
changePositions |
16372 | 6429 |
self halt. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6430 |
^ changePositions |
16372 | 6431 |
|
6432 |
"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
|
6433 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6434 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6435 |
changeTimeStamps |
16372 | 6436 |
self halt. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6437 |
^ changeTimeStamps |
16372 | 6438 |
|
6439 |
"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
|
6440 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6441 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6442 |
enforcedNameSpace:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6443 |
enforcedNameSpace := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6444 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6445 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6446 |
inStream:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6447 |
inStream := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6448 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6449 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6450 |
noColoring:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6451 |
noColoring := something. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6452 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6453 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6454 |
tabSpec:something |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6455 |
tabSpec := something. |
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 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6458 |
thisIsAClassSource |
7360 | 6459 |
^ thisIsAClassSource ? false |
6460 |
||
6461 |
"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
|
6462 |
! ! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6463 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6464 |
!ChangesBrowser::ChangeFileReader methodsFor:'private'! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6465 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6466 |
contractClass:className selector:selector to:maxLen |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6467 |
"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
|
6468 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6469 |
|s l| |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6470 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6471 |
s := className , ' ', selector. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6472 |
s size > maxLen ifTrue:[ |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6473 |
l := maxLen - 1 - selector size max:20. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6474 |
s := (className contractTo:l) , ' ' , selector. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6475 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6476 |
s size > maxLen ifTrue:[ |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6477 |
l := maxLen - 1 - className size max:20. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6478 |
s := className , ' ', (selector contractTo:l). |
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 |
s size > maxLen ifTrue:[ |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6481 |
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
|
6482 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6483 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6484 |
]. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6485 |
^ s |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6486 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6487 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6488 |
extractClassAndClassNameFromParseTree:rec |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6489 |
|isUnaryMessage className changeClass| |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6490 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6491 |
isUnaryMessage := rec isUnaryMessage. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6492 |
|
9019 | 6493 |
Error |
6494 |
handle:[:ex | ^ '?' -> nil] |
|
6843 | 6495 |
do:[ |
9019 | 6496 |
isUnaryMessage ifTrue:[ |
6497 |
className := rec receiver name. |
|
6498 |
] ifFalse:[ |
|
6499 |
className := rec name. |
|
6500 |
]. |
|
6843 | 6501 |
]. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6502 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6503 |
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
|
6504 |
autoloadAsRequired value ifTrue:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6505 |
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
|
6506 |
] ifFalse:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6507 |
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
|
6508 |
]. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6509 |
]. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6510 |
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
|
6511 |
autoloadAsRequired value ifTrue:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6512 |
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
|
6513 |
] ifFalse:[ |
6812a1ebc510
Autoload owning classes of private classes in change set only if
Stefan Vogel <sv@exept.de>
parents:
7619
diff
changeset
|
6514 |
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
|
6515 |
]. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6516 |
]. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6517 |
isUnaryMessage ifTrue:[ |
6843 | 6518 |
changeClass notNil ifTrue:[ |
6519 |
changeClass := changeClass class. |
|
6520 |
]. |
|
6521 |
className := className , ' class'. |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6522 |
]. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6523 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6524 |
^ className -> changeClass |
6843 | 6525 |
|
6526 |
"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
|
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 |
nameSpaceForApply |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6530 |
^ browser nameSpaceForApply |
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 |
!ChangesBrowser::ChangeFileReader methodsFor:'reading'! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6534 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6535 |
addHeaderLineForChangeType:changeType changeString:changeString changeDelta:changeDelta timeStampInfo:timeStampInfo |
16372 | 6536 |
changeHeaderLines add:(self headerLineForChangeType:changeType changeString:changeString changeDelta:changeDelta timeStampInfo:timeStampInfo) |
6537 |
||
6538 |
"Modified: / 01-05-2016 / 19:07:49 / cg" |
|
6539 |
! |
|
6540 |
||
6541 |
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
|
6542 |
|entry| |
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 |
entry := MultiColListEntry new. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6545 |
entry tabulatorSpecification:tabSpec. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6546 |
entry colAt:1 put:changeDelta. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6547 |
entry colAt:2 put:changeString. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6548 |
entry colAt:3 put:changeType. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6549 |
timeStampInfo notNil ifTrue:[ |
12599
827681c8f7d4
timestamp printing extracted
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
6550 |
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
|
6551 |
]. |
16372 | 6552 |
^ entry |
6553 |
||
6554 |
"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
|
6555 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6556 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6557 |
processChunk |
16372 | 6558 |
|info| |
6559 |
||
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6560 |
(chunkText startsWith:'''---- timestamp ') ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6561 |
timeStampInfo := (chunkText copyFrom:16 to:(chunkText size - 6)) withoutSpaces. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6562 |
^ self. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6563 |
]. |
11234 | 6564 |
(chunkText asLowercase startsWith:'''---- encoding: ') ifTrue:[ |
6565 |
^ self. |
|
6566 |
]. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6567 |
|
16372 | 6568 |
changeInfo add:(info := |
6569 |
ChangesBrowser::ChangeInfo new |
|
6570 |
position:chunkPosition chunk:chunkText className:nil selector:nil headerLine:nil |
|
6571 |
timestamp:timeStampInfo isFollowupChange:false). |
|
6572 |
"/ changeChunks add:chunkText. |
|
6573 |
"/ changeClassNames add:nil. |
|
6574 |
"/ changePositions add:chunkPosition. |
|
6575 |
"/ changeTimeStamps add:timeStampInfo. |
|
6576 |
"/ changeIsFollowupMethodChange add:false. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6577 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6578 |
headerLine := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6579 |
changeDelta := ' '. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6580 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6581 |
sawExcla ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6582 |
self processNonMethodChunk |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6583 |
] ifTrue:[ |
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6584 |
self processMethodChunkIfNone: |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6585 |
[ |
16372 | 6586 |
changeInfo removeLast. |
6587 |
"/ changeChunks removeLast. |
|
6588 |
"/ changeClassNames removeLast. |
|
6589 |
"/ changePositions removeLast. |
|
6590 |
"/ changeTimeStamps removeLast. |
|
6591 |
"/ changeIsFollowupMethodChange removeLast. |
|
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6592 |
] |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6593 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6594 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6595 |
changeString notNil ifTrue:[ |
16372 | 6596 |
"/ self addHeaderLineForChangeType:changeType changeString:changeString changeDelta:changeDelta timeStampInfo:timeStampInfo. |
6597 |
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
|
6598 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6599 |
headerLine notNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6600 |
changeHeaderLines add:headerLine |
16372 | 6601 |
info headerLine:headerLine. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6602 |
] |
16372 | 6603 |
]. |
6604 |
||
6605 |
"Modified: / 01-05-2016 / 19:13:59 / cg" |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6606 |
! |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6607 |
|
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6608 |
processMethodChunkIfNone:emptyBlock |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6609 |
"sawExcla" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6610 |
|
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6611 |
|askedForEditingClassSource changeClass category anyMethod |
15012 | 6612 |
sel p rec clsName done first text methodPos |
16372 | 6613 |
singleJunkOnly methodChunks classCategoryChunks methodCategoryChunks singleInfo methodSelector nameAndClass |
6614 |
info| |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6615 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6616 |
singleJunkOnly := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6617 |
methodChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6618 |
classCategoryChunks := methodCategoryChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6619 |
singleInfo := false. |
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6620 |
anyMethod := false. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6621 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6622 |
" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6623 |
method definitions actually consist of |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6624 |
two (or more) chunks; skip next chunk(s) |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6625 |
up to an empty one. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6626 |
The system only writes one chunk, |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6627 |
and we cannot handle more in this ChangesBrowser .... |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6628 |
" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6629 |
clsName := nil. |
8665 | 6630 |
|
17094 | 6631 |
(chunkText includesString:'§') ifTrue:[self halt]. |
6632 |
||
8665 | 6633 |
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
|
6634 |
(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
|
6635 |
rec := p receiver. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6636 |
sel := p selector. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6637 |
(ChangesBrowser methodDefinitionSelectors includes:sel) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6638 |
methodChunks := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6639 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6640 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6641 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6642 |
sel == #categoriesForClass ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6643 |
methodChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6644 |
classCategoryChunks := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6645 |
changeType := '(class category change)'. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6646 |
] ifFalse:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6647 |
sel == #categoriesFor: ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6648 |
methodChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6649 |
methodCategoryChunks := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6650 |
changeType := '(category change)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6651 |
methodSelector := (p args at:1) evaluate. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6652 |
] ifFalse:[ |
6532 | 6653 |
(sel numArgs == 0) ifTrue:[ |
6654 |
category := '* As yet uncategorized *'. |
|
6655 |
category := sel. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6656 |
] ifFalse:[ |
6532 | 6657 |
category := (p args at:1) evaluate. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6658 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6659 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6660 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6661 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6662 |
sel == #'methodsFor:stamp:' ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6663 |
"/ Squeak timeStamp |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6664 |
timeStampInfo := (p args at:2) evaluate. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6665 |
singleInfo := true |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6666 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6667 |
sel == #'commentStamp:prior:' ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6668 |
singleJunkOnly := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6669 |
methodChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6670 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6671 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6672 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6673 |
sel == #reorganize ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6674 |
singleJunkOnly := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6675 |
methodChunks := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6676 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6677 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6678 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6679 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6680 |
done := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6681 |
first := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6682 |
[done] whileFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6683 |
changeDelta := ' '. |
13314 | 6684 |
methodPos := inStream position + 1. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6685 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6686 |
text := inStream nextChunk. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6687 |
done := text isEmptyOrNil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6688 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6689 |
done ifFalse:[ |
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6690 |
anyMethod := true. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6691 |
first ifFalse:[ |
16372 | 6692 |
info := ChangesBrowser::ChangeInfo new |
6693 |
position:methodPos chunk:chunkText className:clsName |
|
6694 |
selector:nil headerLine:nil timestamp:timeStampInfo isFollowupChange:true. |
|
6695 |
changeInfo add:info. |
|
6696 |
||
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6697 |
askedForEditingClassSource ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6698 |
thisIsAClassSource := (changeFileName asFilename hasSuffix:'st'). |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6699 |
askedForEditingClassSource := true. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6700 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6701 |
] ifTrue:[ |
16372 | 6702 |
changeInfo last className:clsName |
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 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6705 |
first := false. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6706 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6707 |
(classCategoryChunks or:[methodCategoryChunks]) ifTrue:[ |
6639 | 6708 |
text := text firstLine. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6709 |
classCategoryChunks ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6710 |
changeClass isNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6711 |
changeDelta := '?'. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6712 |
] ifFalse:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6713 |
changeClass category = text ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6714 |
changeDelta := '='. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6715 |
] |
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 |
changeString := clsName , ' category: ' , text storeString. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6718 |
]ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6719 |
changeString := '(' , clsName , ' compiledMethodAt:' , methodSelector storeString , ') category: ' , text storeString. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6720 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6721 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6722 |
" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6723 |
try to find the selector |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6724 |
" |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6725 |
methodSelector := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6726 |
clsName notNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6727 |
methodChunks ifTrue:[ |
17094 | 6728 |
p := Parser for:(ReadStream on:text) in:nil. |
6729 |
p ignoreErrors:true. |
|
6730 |
p ignoreWarnings:true. |
|
6731 |
p parserFlags allowDollarInIdentifier:true. |
|
6732 |
p parserFlags allowParagraphInIdentifier:true. |
|
6733 |
p parseMethodSpec. |
|
6734 |
methodSelector := p selector. |
|
6735 |
"/ p := Parser |
|
6736 |
"/ parseMethodSpecification:text |
|
6737 |
"/ in:nil |
|
6738 |
"/ ignoreErrors:true |
|
6739 |
"/ ignoreWarnings:true. |
|
6740 |
"/ (p notNil and:[p ~~ #Error]) ifTrue:[ |
|
6741 |
"/ methodSelector := p selector. |
|
6742 |
"/ ] |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6743 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6744 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6745 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6746 |
methodSelector isNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6747 |
changeString := (chunkText contractTo:maxLen). |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6748 |
changeType := '(change)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6749 |
headerLine := chunkText , ' (change)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6750 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6751 |
changeString := self contractClass:clsName selector:methodSelector to:maxLen. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6752 |
changeType := '{ ' , category , ' }'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6753 |
headerLine := clsName , ' ' , methodSelector , ' ' , '(change category: ''' , category , ''')'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6754 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6755 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6756 |
autoCompare value ifTrue:[ |
17047 | 6757 |
changeDelta := ChangeDeltaInformation |
6758 |
changeDeltaFor:text changeClass:changeClass selector:methodSelector. |
|
6530
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 |
]. |
17047 | 6761 |
changeInfo last |
6762 |
headerLine:(self headerLineForChangeType:changeType |
|
6763 |
changeString:changeString |
|
6764 |
changeDelta:changeDelta |
|
6765 |
timeStampInfo:timeStampInfo). |
|
6530
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 |
changeString := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6768 |
headerLine := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6769 |
singleJunkOnly ifTrue:[done := true] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6770 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6771 |
singleInfo ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6772 |
timeStampInfo := nil |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6773 |
]. |
6658
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6774 |
anyMethod ifFalse:[ |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6775 |
emptyBlock value |
faf73551558b
handle empty methodsFor chunks
Claus Gittinger <cg@exept.de>
parents:
6639
diff
changeset
|
6776 |
]. |
16372 | 6777 |
|
17094 | 6778 |
"Modified: / 21-11-2016 / 23:32:29 / cg" |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6779 |
! |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6780 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6781 |
processNonMethodChunk |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6782 |
|s changeClass sel cls p rec clsName ownerTree ownerName |
15087 | 6783 |
m nameAndClass args instVarsArg classVarsArg categoryArg| |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6784 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6785 |
(chunkText startsWith:'''---- snap') ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6786 |
self processSnapshotChunk. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6787 |
^ self |
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 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6790 |
headerLine := chunkText , ' (doIt)'. |
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, assume doIt - then lets have a more detailed look ... |
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 |
((chunkText startsWith:'''---- file') |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6796 |
or:[(chunkText startsWith:'''---- check')]) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6797 |
changeType := ''. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6798 |
timeStampInfo := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6799 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6800 |
changeType := '(doIt)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6801 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6802 |
changeString := (chunkText contractTo:maxLen) withoutSeparators. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6803 |
|
8665 | 6804 |
p := browser parseExpression:fullChunkText inNameSpace:Smalltalk. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6805 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6806 |
p isMessage ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6807 |
sel := p selector. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6808 |
rec := p receiver. |
15087 | 6809 |
args := p args. |
6530
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 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6812 |
sel := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6813 |
(Scanner new scanTokens:fullChunkText) size == 0 ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6814 |
"/ a comment only |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6815 |
changeType := '(comment)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6816 |
NoColoring ~~ true ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6817 |
changeType := changeType allItalic. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6818 |
"/ changeString := changeString allItalic. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6819 |
changeType emphasisAllAdd:(#color -> UserPreferences current commentColor). |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6820 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6821 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6822 |
changeType := '(???)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6823 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6824 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6825 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6826 |
(sel == #comment:) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6827 |
changeType := '(comment)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6828 |
clsName := rec name. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6829 |
changeClass := (self nameSpaceForApply) classNamed:clsName. |
16372 | 6830 |
(changeInfo last) className:clsName. |
6831 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6832 |
NoColoring ~~ true ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6833 |
changeType := changeType allItalic. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6834 |
changeType emphasisAllAdd:(#color -> UserPreferences current commentColor). |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6835 |
"/ changeString := clsName allItalic. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6836 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6837 |
autoCompare value ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6838 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6839 |
changeDelta := '?' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6840 |
] ifFalse:[ |
15087 | 6841 |
(changeClass comment = (args at:1) evaluate) ifTrue:[ |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6842 |
changeDelta := '='. |
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 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6845 |
]. |
15087 | 6846 |
"/ sel := nil. |
6847 |
^ self. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6848 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6849 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6850 |
(sel == #removeSelector:) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6851 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6852 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6853 |
|
15087 | 6854 |
sel := (args at:1) evaluate. |
16372 | 6855 |
(changeInfo last) className:clsName. |
6856 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6857 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6858 |
autoCompare value ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6859 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6860 |
changeDelta := '?' |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6861 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6862 |
(changeClass includesSelector:sel asSymbol) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6863 |
changeDelta := '-'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6864 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6865 |
changeDelta := '='. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6866 |
] |
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 |
changeType := '(remove)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6870 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
15087 | 6871 |
"/ sel := nil. |
6872 |
^ self. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6873 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6874 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6875 |
(p notNil |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6876 |
and:[p ~~ #Error |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6877 |
and:[p isMessage |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6878 |
and:[rec isMessage |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6879 |
and:[rec selector == #compiledMethodAt:]]]]) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6880 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec receiver. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6881 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
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 |
(sel == #category:) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6884 |
sel := (rec args at:1) evaluate. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6885 |
changeType := '(category change)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6886 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
16372 | 6887 |
(changeInfo last) className:clsName. |
6888 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
15012 | 6889 |
autoCompare value ifTrue:[ |
6890 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
|
6891 |
changeDelta := '?' |
|
6892 |
] ifFalse:[ |
|
6893 |
m := changeClass compiledMethodAt:sel asSymbol. |
|
6894 |
m notNil ifTrue:[ |
|
6895 |
m category = (p args at:1) evaluate ifTrue:[ |
|
6896 |
changeDelta := '='. |
|
6897 |
] |
|
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 |
] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6900 |
]. |
15087 | 6901 |
^ self. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6902 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6903 |
(sel == #privacy:) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6904 |
sel := (rec args at:1) evaluate. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6905 |
changeType := '(privacy change)'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6906 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
16372 | 6907 |
(changeInfo last) className:clsName. |
6908 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
15012 | 6909 |
autoCompare value ifTrue:[ |
6910 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
|
6911 |
changeDelta := '?' |
|
6912 |
] ifFalse:[ |
|
6913 |
changeDelta := ' ' |
|
6914 |
] |
|
6915 |
]. |
|
15087 | 6916 |
^ self. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6917 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6918 |
sel := nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6919 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6920 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6921 |
(Class definitionSelectors includes:sel) ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6922 |
changeType := '(class definition)'. |
15087 | 6923 |
clsName := (args at:1) evaluate. |
16372 | 6924 |
(changeInfo last) className:clsName. |
6925 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6926 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6927 |
"/ is it a private-class ? |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6928 |
('*privateIn:' match:sel) ifTrue:[ |
15087 | 6929 |
ownerTree := args last. |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6930 |
ownerName := ownerTree name asString. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6931 |
clsName := ownerName , '::' , clsName |
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 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6934 |
changeString := clsName. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6935 |
NoColoring ~~ true ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6936 |
changeType := changeType allBold. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6937 |
changeString := changeString allBold. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6938 |
]. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6939 |
|
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6940 |
autoCompare value ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6941 |
cls := (self nameSpaceForApply) at:clsName asSymbol ifAbsent:nil. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6942 |
cls isNil ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6943 |
changeDelta := '+'. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6944 |
] ifFalse:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6945 |
(cls definitionSelector = sel |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6946 |
or:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6947 |
"/ could be an ST/V, VAge or Dolphin definition |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6948 |
cls definitionSelector = (sel , 'category:') |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6949 |
]) |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6950 |
ifTrue:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6951 |
((cls superclass isNil |
16390 | 6952 |
and:[p receiver isLiteral |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6953 |
and:[p receiver evaluate isNil]]) |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6954 |
or:[ |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6955 |
cls superclass notNil |
16390 | 6956 |
and:[p receiver isLiteral not |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6957 |
and:[cls superclass name = p receiver name]] |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6958 |
]) ifTrue:[ |
15087 | 6959 |
(sel == #'variableByteSubclass:classVariableNames:poolDictionaries:category:') |
6960 |
ifTrue:[ |
|
6961 |
"/ VSE definition message |
|
6962 |
instVarsArg := ''. |
|
6963 |
classVarsArg := (args at:2) evaluate. |
|
6964 |
categoryArg := (args at:4) evaluate. |
|
6965 |
] ifFalse:[ |
|
6966 |
instVarsArg := (args at:2) evaluate. |
|
6967 |
classVarsArg := (args at:3) evaluate. |
|
6968 |
categoryArg := (args at:5) evaluate. |
|
6969 |
]. |
|
6970 |
cls instanceVariableString asCollectionOfWords = instVarsArg asCollectionOfWords ifTrue:[ |
|
6971 |
cls classVariableString asCollectionOfWords = classVarsArg asCollectionOfWords ifTrue:[ |
|
6972 |
cls definitionSelector = (sel , 'category:') |
|
6973 |
ifTrue:[ |
|
6974 |
"/ ST/V, VAge or Dolphin definition |
|
6975 |
changeDelta := '='. |
|
6976 |
] ifFalse:[ |
|
6977 |
cls category = categoryArg ifTrue:[ |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6978 |
changeDelta := '='. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6979 |
] ifFalse:[ |
15087 | 6980 |
changeType := '(class category change)'. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6981 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6982 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6983 |
] |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6984 |
] |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6985 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6986 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
6987 |
] |
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
6988 |
]. |
15087 | 6989 |
"/ sel := nil. |
6990 |
^ self. |
|
6991 |
]. |
|
6992 |
||
6993 |
(#( |
|
6994 |
#'primitiveDefinitions:' |
|
6995 |
#'primitiveFunctions:' |
|
6996 |
#'primitiveVariables:' |
|
6997 |
) includes:sel) ifTrue:[ |
|
6998 |
changeType := '(class definition)'. |
|
6999 |
clsName := rec name. |
|
7000 |
^ self. |
|
7001 |
]. |
|
7002 |
||
7003 |
((sel == #instanceVariableNames:) |
|
7004 |
and:[rec isMessage |
|
7005 |
and:[rec selector == #class]]) ifTrue:[ |
|
7006 |
clsName := rec receiver name. |
|
7007 |
changeClass := (self nameSpaceForApply) classNamed:clsName. |
|
7008 |
changeType := '(class definition)'. |
|
16372 | 7009 |
(changeInfo last) className:clsName. |
7010 |
"/ changeClassNames at:changeClassNames size put:clsName. |
|
15087 | 7011 |
|
7012 |
autoCompare value ifTrue:[ |
|
7013 |
changeClass isNil ifTrue:[ |
|
7014 |
changeDelta := '?'. |
|
7015 |
] ifFalse:[ |
|
7016 |
s := (p args at:1) evaluate. |
|
7017 |
s = changeClass class instanceVariableString ifTrue:[ |
|
7018 |
changeDelta := '='. |
|
7019 |
] |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7020 |
] |
15087 | 7021 |
]. |
7022 |
^ self. |
|
6530
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7023 |
]. |
9548 | 7024 |
|
16372 | 7025 |
"Modified: / 01-05-2016 / 19:19:54 / cg" |
6530
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 |
processSnapshotChunk |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7029 |
changeType := ''. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7030 |
headerLine := chunkText. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7031 |
changeString := (chunkText contractTo:maxLen) withoutSeparators. |
6bb6d5670055
refactorings to make reader cleaner;
Claus Gittinger <cg@exept.de>
parents:
6516
diff
changeset
|
7032 |
timeStampInfo := nil. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7033 |
! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7034 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7035 |
readChangesFile |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7036 |
"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
|
7037 |
and a list of chunk-positions (changePositions). |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7038 |
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
|
7039 |
the cols are: |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7040 |
1 delta (only if comparing) |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7041 |
'+' -> new method (w.r.t. current state) |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7042 |
'-' -> removed method (w.r.t. current state) |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7043 |
'?' -> class does not exist currently |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7044 |
'=' -> 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
|
7045 |
'~' -> 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
|
7046 |
2 class/selector |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7047 |
3 type of change |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7048 |
doit |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7049 |
method |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7050 |
category change |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7051 |
4 timestamp |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7052 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7053 |
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
|
7054 |
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
|
7055 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7056 |
|excla| |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7057 |
|
16372 | 7058 |
changeInfo := OrderedCollection new. |
7059 |
||
7060 |
"/ changeChunks := OrderedCollection new. |
|
7061 |
"/ changeClassNames := OrderedCollection new. |
|
7062 |
"/ changeHeaderLines := OrderedCollection new. |
|
7063 |
"/ changePositions := OrderedCollection new. |
|
7064 |
"/ changeTimeStamps := OrderedCollection new. |
|
7065 |
"/ changeIsFollowupMethodChange := OrderedCollection new. |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7066 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7067 |
excla := inStream class chunkSeparator. |
9515 | 7068 |
maxLen := 100. |
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 |
[inStream atEnd] whileFalse:[ |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7071 |
" |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7072 |
get a chunk (separated by excla) |
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 |
inStream skipSeparators. |
13314 | 7075 |
chunkPosition := inStream position + 1. |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7076 |
|
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7077 |
sawExcla := inStream peekFor:excla. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7078 |
chunkText := fullChunkText := inStream nextChunk. |
7619
95943c1bc289
Ignore empty chunks when reading from changes file
Stefan Vogel <sv@exept.de>
parents:
7618
diff
changeset
|
7079 |
chunkText notEmptyOrNil ifTrue:[ |
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7080 |
self processChunk. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7081 |
] |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7082 |
]. |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7083 |
|
9515 | 7084 |
"Modified: / 27-08-1995 / 23:06:55 / claus" |
16372 | 7085 |
"Modified: / 01-05-2016 / 18:33:36 / cg" |
7086 |
! ! |
|
7087 |
||
7088 |
!ChangesBrowser::ChangeInfo methodsFor:'accessing'! |
|
7089 |
||
7090 |
chunk |
|
7091 |
^ chunk |
|
7092 |
! |
|
7093 |
||
7094 |
className |
|
7095 |
^ className |
|
7096 |
! |
|
7097 |
||
7098 |
className:something |
|
7099 |
className := something. |
|
7100 |
! |
|
7101 |
||
7102 |
headerLine |
|
7103 |
^ headerLine |
|
7104 |
! |
|
7105 |
||
7106 |
headerLine:something |
|
7107 |
headerLine := something. |
|
7108 |
! |
|
7109 |
||
7110 |
isFollowupChange |
|
7111 |
^ isFollowupChange |
|
7112 |
! |
|
7113 |
||
7114 |
position |
|
7115 |
^ position |
|
7116 |
! |
|
7117 |
||
7118 |
position:positionArg chunk:chunkArg className:classNameArg selector:selectorArg headerLine:headerLineArg |
|
7119 |
timestamp:timestampArg isFollowupChange:isFollowupChangeArg |
|
7120 |
||
7121 |
position := positionArg. |
|
7122 |
chunk := chunkArg. |
|
7123 |
className := classNameArg. |
|
7124 |
selector := selectorArg. |
|
7125 |
headerLine := headerLineArg. |
|
7126 |
timestamp := timestampArg. |
|
7127 |
isFollowupChange := isFollowupChangeArg. |
|
7128 |
||
7129 |
"Created: / 01-05-2016 / 19:01:03 / cg" |
|
7130 |
! |
|
7131 |
||
7132 |
selector |
|
7133 |
^ selector |
|
7134 |
! |
|
7135 |
||
7136 |
selector:something |
|
7137 |
selector := something. |
|
7138 |
! |
|
7139 |
||
7140 |
timestamp |
|
7141 |
^ timestamp |
|
6512
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7142 |
! ! |
ee424e762e33
started to refacvtorreadChanges into separate helper class.
Claus Gittinger <cg@exept.de>
parents:
6482
diff
changeset
|
7143 |
|
761 | 7144 |
!ChangesBrowser class methodsFor:'documentation'! |
202 | 7145 |
|
7146 |
version |
|
15683 | 7147 |
^ '$Header$' |
8978 | 7148 |
! |
7149 |
||
7150 |
version_CVS |
|
15683 | 7151 |
^ '$Header$' |
276
017219e571e4
more stuff for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
275
diff
changeset
|
7152 |
! ! |
12428 | 7153 |