author | Claus Gittinger <cg@exept.de> |
Tue, 16 Mar 2004 12:42:00 +0100 | |
changeset 5735 | f550dbf1abd0 |
parent 5733 | 68674189e1ae |
child 5806 | eaaab48a7e8b |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1990 by Claus Gittinger |
4488 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
13 |
"{ Package: 'stx:libtool' }" |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
14 |
|
0 | 15 |
StandardSystemView subclass:#ChangesBrowser |
4489 | 16 |
instanceVariableNames:'changeListView codeView diffView changeFileName changeChunks |
17 |
changePositions changeClassNames changeSelectors |
|
18 |
changeHeaderLines changeIsFollowupMethodChange anyChanges |
|
19 |
changeNrShown changeNrProcessed skipSignal autoCompare |
|
20 |
changeFileSize changeFileTimestamp checkBlock changeTimeStamps |
|
21 |
tabSpec autoUpdate editingClassSource lastSearchType |
|
22 |
lastSearchString applyInOriginalNameSpace lastSaveFileName |
|
23 |
readOnly enforcedPackage enforcedNameSpace updateChangeSet |
|
24 |
showingDiffs diffViewBox' |
|
25 |
classVariableNames:'CompressSnapshotInfo NoColoring ShowWarningDialogs DefaultIcon |
|
26 |
DefaultAutoCompare DefaultShowingDiffs' |
|
27 |
poolDictionaries:'' |
|
28 |
category:'Interface-Browsers' |
|
0 | 29 |
! |
30 |
||
761 | 31 |
!ChangesBrowser class methodsFor:'documentation'! |
29 | 32 |
|
33 |
copyright |
|
34 |
" |
|
35 |
COPYRIGHT (c) 1990 by Claus Gittinger |
|
4488 | 36 |
All Rights Reserved |
0 | 37 |
|
29 | 38 |
This software is furnished under a license and may be used |
39 |
only in accordance with the terms of that license and with the |
|
40 |
inclusion of the above copyright notice. This software may not |
|
41 |
be provided or otherwise made available to, or used by, any |
|
42 |
other person. No title to or ownership of the software is |
|
43 |
hereby transferred. |
|
44 |
" |
|
45 |
! |
|
46 |
||
47 |
documentation |
|
48 |
" |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
49 |
this implements a browser for the changes-file (actually, it can display |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
50 |
any sourceFiles contents). |
29 | 51 |
See the extra document 'doc/misc/cbrowser.doc' for how to use this browser. |
52 |
||
53 |
written jan 90 by claus |
|
51 | 54 |
|
5703 | 55 |
This is a very old leftover class (The Merovingian has not yet detected this one ;-) |
56 |
It will be completely replaced by the ChangeSetBrowser class in the near future. |
|
57 |
||
58 |
||
508 | 59 |
[Class variables:] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
60 |
CompressSnapshotInfo if true (the default), snapshot entries |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
61 |
are also compressed in the compress function. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
62 |
Some users prefer them to be not compressed. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
63 |
Set it to false for this. |
58 | 64 |
|
51 | 65 |
Notice: |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
66 |
this needs a total rewrite, to build up a changeSet from the file |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
67 |
(which did not exist when the ChangesBrowser was originally written) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
68 |
and manipulate that changeSet. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
69 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
70 |
This way, we get a browser for any upcoming incore changeSets for |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
71 |
free. Also, this will put the chunk analyzation code into Change and |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
72 |
subclasses (where it belongs) and give a better encapsulation and |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
73 |
overall structure. Do not take this as an example for good style ;-) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
74 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
75 |
The Change hierarchy is currently been completed, and the changes browser |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
76 |
will be adapted soon. |
508 | 77 |
|
78 |
[author:] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
79 |
Claus Gittinger |
508 | 80 |
|
81 |
[start with:] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
82 |
ChangesBrowser open |
1359 | 83 |
|
84 |
[see also:] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
85 |
( Using the ChangesBrowser :html: tools/cbrowser/TOP.html ) |
1359 | 86 |
|
29 | 87 |
" |
88 |
! ! |
|
0 | 89 |
|
761 | 90 |
!ChangesBrowser class methodsFor:'instance creation'! |
45 | 91 |
|
92 |
new |
|
93 |
"create a new changes browser" |
|
94 |
||
1470 | 95 |
^ super |
96 |
label:(self defaultLabel) |
|
97 |
icon:(self defaultIcon) |
|
98 |
||
99 |
"Modified: / 6.2.1998 / 13:25:18 / cg" |
|
45 | 100 |
! |
101 |
||
102 |
openOn:aFileName |
|
5696 | 103 |
"create a changes browser on a change file" |
104 |
||
105 |
|browser| |
|
45 | 106 |
|
3674 | 107 |
(self isXMLFile:aFileName) ifTrue:[ |
5696 | 108 |
browser := ChangeSetBrowser new |
109 |
] ifFalse:[ |
|
110 |
browser := self new |
|
3674 | 111 |
]. |
5696 | 112 |
|
113 |
browser label:(self defaultLabel , ': ', aFileName). |
|
114 |
browser changeFileName:aFileName. |
|
115 |
browser open. |
|
116 |
^ browser |
|
45 | 117 |
! ! |
118 |
||
761 | 119 |
!ChangesBrowser class methodsFor:'behavior'! |
0 | 120 |
|
121 |
autoSelectNext |
|
122 |
"returning true here, makes a Delete operation automatically |
|
123 |
select the next change" |
|
124 |
||
125 |
^ true |
|
126 |
! ! |
|
127 |
||
761 | 128 |
!ChangesBrowser class methodsFor:'defaults'! |
0 | 129 |
|
489 | 130 |
defaultIcon |
1153 | 131 |
"return the browsers default window icon" |
132 |
||
133 |
<resource: #style (#ICON #ICON_FILE)> |
|
134 |
||
135 |
|nm i| |
|
136 |
||
137 |
(i := DefaultIcon) isNil ifTrue:[ |
|
2341 | 138 |
i := self classResources at:'ICON' default:nil. |
139 |
i isNil ifTrue:[ |
|
140 |
nm := ClassResources at:'ICON_FILE' default:'CBrowser.xbm'. |
|
2477 | 141 |
i := Smalltalk imageFromFileNamed:nm inPackage:#'stx:libtool'. |
2341 | 142 |
i isNil ifTrue:[ |
2451
2a01088e75d3
try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents:
2450
diff
changeset
|
143 |
i := StandardSystemView defaultIcon |
2341 | 144 |
] |
145 |
]. |
|
146 |
i notNil ifTrue:[ |
|
147 |
DefaultIcon := i := i onDevice:Display |
|
148 |
] |
|
1084 | 149 |
]. |
150 |
^ i |
|
151 |
||
1153 | 152 |
"Modified: 19.3.1997 / 20:48:34 / ca" |
153 |
"Modified: 18.4.1997 / 15:16:24 / cg" |
|
489 | 154 |
! |
155 |
||
73 | 156 |
defaultLabel |
5527 | 157 |
^ self classResources string:'Changes Browser' |
2417 | 158 |
! |
159 |
||
160 |
isVisualStartable |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
161 |
"return true, if this application can be started via #open. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
162 |
(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
|
163 |
|
2417 | 164 |
^ true |
165 |
||
166 |
"Created: / 27.9.1999 / 12:28:27 / cg" |
|
28 | 167 |
! ! |
168 |
||
3202 | 169 |
!ChangesBrowser class methodsFor:'menu specs'! |
170 |
||
171 |
menuSpec |
|
172 |
"This resource specification was automatically generated |
|
173 |
by the MenuEditor of ST/X." |
|
174 |
||
175 |
"Do not manually edit this!! If it is corrupted, |
|
176 |
the MenuEditor may not be able to read the specification." |
|
177 |
||
178 |
" |
|
179 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpec |
|
180 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpec)) startUp |
|
181 |
" |
|
182 |
||
183 |
<resource: #menu> |
|
184 |
||
185 |
^ |
|
186 |
#(#Menu |
|
187 |
#( |
|
188 |
#(#MenuItem |
|
189 |
#label: 'File' |
|
190 |
#translateLabel: true |
|
191 |
#submenu: |
|
192 |
#(#Menu |
|
193 |
#( |
|
194 |
#(#MenuItem |
|
195 |
#label: 'Compress' |
|
4896 | 196 |
#itemValue: #doCompress |
3202 | 197 |
#translateLabel: true |
198 |
#isVisible: #notEditingClassSource |
|
199 |
) |
|
200 |
#(#MenuItem |
|
4896 | 201 |
#enabled: #hasSingleSelection |
202 |
#label: 'Compress for Class' |
|
203 |
#itemValue: #doCompressClass |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
204 |
#translateLabel: true |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
205 |
#isVisible: #notEditingClassSource |
4896 | 206 |
) |
207 |
#(#MenuItem |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
208 |
#enabled: #hasSingleSelection |
4896 | 209 |
#label: 'Compress for Class && Selector' |
210 |
#itemValue: #doCompressSelector |
|
211 |
#translateLabel: true |
|
212 |
#isVisible: #notEditingClassSource |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
213 |
) |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
214 |
#(#MenuItem |
3202 | 215 |
#label: 'Compare and Compress' |
4896 | 216 |
#itemValue: #doCompareAndCompress |
3202 | 217 |
#translateLabel: true |
218 |
#isVisible: #notEditingClassSource |
|
219 |
) |
|
220 |
#(#MenuItem |
|
221 |
#label: '-' |
|
222 |
#isVisible: #notEditingClassSource |
|
223 |
) |
|
224 |
#(#MenuItem |
|
4896 | 225 |
#enabled: #hasSingleSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
226 |
#label: 'Fileout && Delete all Changes for Class' |
4896 | 227 |
#itemValue: #doFileoutAndDeleteClassAll |
3202 | 228 |
#translateLabel: true |
229 |
#isVisible: #notEditingClassSource |
|
230 |
) |
|
231 |
#(#MenuItem |
|
4896 | 232 |
#enabled: #hasSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
233 |
#label: 'CheckIn && Delete all Changes for Class' |
4896 | 234 |
#itemValue: #doCheckinAndDeleteClassAll |
3202 | 235 |
#translateLabel: true |
236 |
#isVisible: #notEditingClassSource |
|
237 |
) |
|
238 |
#(#MenuItem |
|
239 |
#label: '-' |
|
240 |
#isVisible: #notEditingClassSource |
|
241 |
) |
|
242 |
#(#MenuItem |
|
4896 | 243 |
#enabled: #hasSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
244 |
#label: 'Save In...' |
4896 | 245 |
#itemValue: #doSave |
3202 | 246 |
#translateLabel: true |
247 |
) |
|
248 |
#(#MenuItem |
|
4896 | 249 |
#enabled: #hasSingleSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
250 |
#label: 'Save to End In...' |
4896 | 251 |
#itemValue: #doSaveRest |
3202 | 252 |
#translateLabel: true |
253 |
) |
|
254 |
#(#MenuItem |
|
4896 | 255 |
#enabled: #hasSingleSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
256 |
#label: 'Save for Class to End In...' |
4896 | 257 |
#itemValue: #doSaveClassRest |
3202 | 258 |
#translateLabel: true |
259 |
) |
|
260 |
#(#MenuItem |
|
4896 | 261 |
#enabled: #hasSingleSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
262 |
#label: 'Save all for Class In...' |
4896 | 263 |
#itemValue: #doSaveClassAll |
3202 | 264 |
#translateLabel: true |
265 |
) |
|
266 |
#(#MenuItem |
|
267 |
#label: '-' |
|
268 |
) |
|
269 |
#(#MenuItem |
|
270 |
#label: 'Writeback ClassFile' |
|
4896 | 271 |
#itemValue: #doWriteBack |
3202 | 272 |
#translateLabel: true |
273 |
#isVisible: #editingClassSource |
|
274 |
) |
|
275 |
#(#MenuItem |
|
276 |
#label: 'Writeback ChangeFile' |
|
4896 | 277 |
#itemValue: #doWriteBack |
3202 | 278 |
#translateLabel: true |
279 |
#isVisible: #notEditingClassSource |
|
280 |
) |
|
281 |
#(#MenuItem |
|
282 |
#label: '-' |
|
283 |
) |
|
284 |
#(#MenuItem |
|
285 |
#label: 'Update' |
|
4896 | 286 |
#itemValue: #doUpdate |
3202 | 287 |
#translateLabel: true |
288 |
) |
|
289 |
#(#MenuItem |
|
290 |
#label: '-' |
|
291 |
) |
|
292 |
#(#MenuItem |
|
293 |
#label: 'Exit' |
|
4896 | 294 |
#itemValue: #menuExit |
3202 | 295 |
#translateLabel: true |
296 |
) |
|
297 |
) |
|
298 |
nil |
|
299 |
nil |
|
300 |
) |
|
301 |
) |
|
302 |
#(#MenuItem |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
303 |
#label: 'Change' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
304 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
305 |
#submenu: |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
306 |
#(#Menu |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
307 |
#( |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
308 |
#(#MenuItem |
4896 | 309 |
#enabled: #hasSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
310 |
#label: 'Apply' |
4896 | 311 |
#itemValue: #doApply |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
312 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
313 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
314 |
#(#MenuItem |
4896 | 315 |
#enabled: #hasSingleSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
316 |
#label: 'Apply to End' |
4896 | 317 |
#itemValue: #doApplyRest |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
318 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
319 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
320 |
#(#MenuItem |
4896 | 321 |
#enabled: #hasSingleSelection |
3668 | 322 |
#label: 'Apply from Begin' |
4896 | 323 |
#itemValue: #doApplyFromBeginning |
3668 | 324 |
#translateLabel: true |
325 |
) |
|
326 |
#(#MenuItem |
|
4896 | 327 |
#enabled: #hasSingleSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
328 |
#label: 'Apply for Class to End' |
4896 | 329 |
#itemValue: #doApplyClassRest |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
330 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
331 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
332 |
#(#MenuItem |
4896 | 333 |
#enabled: #hasSingleSelection |
3668 | 334 |
#label: 'Apply for Class from Begin' |
4896 | 335 |
#itemValue: #doApplyClassFromBeginning |
3668 | 336 |
#translateLabel: true |
337 |
) |
|
338 |
#(#MenuItem |
|
4896 | 339 |
#enabled: #hasNoSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
340 |
#label: 'Apply All' |
4896 | 341 |
#itemValue: #doApplyAll |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
342 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
343 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
344 |
#(#MenuItem |
4896 | 345 |
#enabled: #hasSingleSelection |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
346 |
#label: 'Apply to Conflict or End' |
4896 | 347 |
#itemValue: #doApplyToConflictOrEnd |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
348 |
#translateLabel: true |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
349 |
) |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
350 |
#(#MenuItem |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
351 |
#label: '-' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
352 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
353 |
#(#MenuItem |
4896 | 354 |
#enabled: #hasSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
355 |
#label: 'Delete' |
4896 | 356 |
#itemValue: #doDelete |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
357 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
358 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
359 |
#(#MenuItem |
4896 | 360 |
#enabled: #hasSingleSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
361 |
#label: 'Delete to End' |
4896 | 362 |
#itemValue: #doDeleteRest |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
363 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
364 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
365 |
#(#MenuItem |
4896 | 366 |
#enabled: #hasSingleSelection |
367 |
#label: 'Delete from Begin' |
|
368 |
#itemValue: #doDeleteFromBeginning |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
369 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
370 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
371 |
#(#MenuItem |
4896 | 372 |
#enabled: #hasSingleSelection |
373 |
#label: 'Delete for Class to End' |
|
374 |
#itemValue: #doDeleteClassRest |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
375 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
376 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
377 |
#(#MenuItem |
4896 | 378 |
#enabled: #hasSingleSelection |
379 |
#label: 'Delete for Class from Begin' |
|
380 |
#itemValue: #doDeleteClassFromBeginning |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
381 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
382 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
383 |
#(#MenuItem |
4896 | 384 |
#enabled: #hasSelection |
385 |
#label: 'Delete all for Class' |
|
386 |
#itemValue: #doDeleteClassAll |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
387 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
388 |
#isVisible: #hasNoMultiSelection |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
389 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
390 |
#(#MenuItem |
4896 | 391 |
#enabled: #hasSelection |
392 |
#label: 'Delete all for Class && its Private Classes' |
|
393 |
#itemValue: #doDeleteClassAndPrivateClassesAll |
|
394 |
#translateLabel: true |
|
395 |
#isVisible: #hasNoMultiSelection |
|
396 |
) |
|
397 |
#(#MenuItem |
|
398 |
#enabled: #hasSelection |
|
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
399 |
#label: 'Delete all for Classes' |
4896 | 400 |
#itemValue: #doDeleteClassAll |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
401 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
402 |
#isVisible: #hasMultiSelection |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
403 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
404 |
#(#MenuItem |
4896 | 405 |
#enabled: #hasSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
406 |
#label: 'Delete all for Classes && their Private Classes' |
4896 | 407 |
#itemValue: #doDeleteClassAndPrivateClassesAll |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
408 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
409 |
#isVisible: #hasMultiSelection |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
410 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
411 |
#(#MenuItem |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
412 |
#label: '-' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
413 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
414 |
#(#MenuItem |
4896 | 415 |
#enabled: #hasSelection |
4897 | 416 |
#label: 'Delete all Versions of Selected Method' |
4896 | 417 |
#itemValue: #doDeleteClassSelectorAll |
3607 | 418 |
#translateLabel: true |
419 |
#isVisible: #hasNoMultiSelection |
|
420 |
) |
|
421 |
#(#MenuItem |
|
4896 | 422 |
#enabled: #hasSelection |
4897 | 423 |
#label: 'Delete all Versions of all Selected Methods' |
4896 | 424 |
#itemValue: #doDeleteClassSelectorAll |
3607 | 425 |
#translateLabel: true |
426 |
#isVisible: #hasMultiSelection |
|
427 |
) |
|
428 |
#(#MenuItem |
|
429 |
#label: '-' |
|
430 |
) |
|
431 |
#(#MenuItem |
|
4896 | 432 |
#enabled: #hasSingleSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
433 |
#label: 'Compare with Current' |
4896 | 434 |
#itemValue: #doCompare |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
435 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
436 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
437 |
#(#MenuItem |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
438 |
#label: '-' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
439 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
440 |
#(#MenuItem |
4896 | 441 |
#enabled: #hasSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
442 |
#label: 'Make Change a Patch' |
4896 | 443 |
#itemValue: #doMakePatch |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
444 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
445 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
446 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
447 |
nil |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
448 |
nil |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
449 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
450 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
451 |
#(#MenuItem |
3202 | 452 |
#label: 'Search' |
453 |
#translateLabel: true |
|
454 |
#submenu: |
|
455 |
#(#Menu |
|
456 |
#( |
|
457 |
#(#MenuItem |
|
458 |
#label: 'Class...' |
|
4896 | 459 |
#itemValue: #findClass |
3202 | 460 |
#translateLabel: true |
461 |
) |
|
462 |
#(#MenuItem |
|
4896 | 463 |
#enabled: #hasSelection |
3202 | 464 |
#label: 'Previous for Class' |
4896 | 465 |
#itemValue: #findPreviousForClass |
3202 | 466 |
#translateLabel: true |
467 |
) |
|
468 |
#(#MenuItem |
|
4896 | 469 |
#enabled: #hasSelection |
3202 | 470 |
#label: 'Next for Class' |
4896 | 471 |
#itemValue: #findNextForClass |
3202 | 472 |
#translateLabel: true |
473 |
) |
|
474 |
#(#MenuItem |
|
475 |
#label: '-' |
|
476 |
) |
|
477 |
#(#MenuItem |
|
478 |
#label: 'Selector...' |
|
4896 | 479 |
#itemValue: #findSelector |
3202 | 480 |
#translateLabel: true |
481 |
) |
|
482 |
#(#MenuItem |
|
4896 | 483 |
#enabled: #hasSelection |
3202 | 484 |
#label: 'Previous for Selector' |
4896 | 485 |
#itemValue: #findPreviousForSelector |
3202 | 486 |
#translateLabel: true |
487 |
) |
|
488 |
#(#MenuItem |
|
4896 | 489 |
#enabled: #hasSelection |
3202 | 490 |
#label: 'Next for Selector' |
4896 | 491 |
#itemValue: #findNextForSelector |
3202 | 492 |
#translateLabel: true |
493 |
) |
|
494 |
#(#MenuItem |
|
495 |
#label: '-' |
|
496 |
) |
|
497 |
#(#MenuItem |
|
498 |
#label: 'String...' |
|
4896 | 499 |
#itemValue: #findString |
3202 | 500 |
#translateLabel: true |
501 |
) |
|
502 |
#(#MenuItem |
|
4896 | 503 |
#enabled: #hasSelection |
3202 | 504 |
#label: 'Previous with String' |
4896 | 505 |
#itemValue: #findPreviousForString |
3202 | 506 |
#translateLabel: true |
507 |
) |
|
508 |
#(#MenuItem |
|
4896 | 509 |
#enabled: #hasSelection |
3202 | 510 |
#label: 'Next with String' |
4896 | 511 |
#itemValue: #findNextForString |
3202 | 512 |
#translateLabel: true |
513 |
) |
|
514 |
#(#MenuItem |
|
515 |
#label: '-' |
|
516 |
) |
|
517 |
#(#MenuItem |
|
4896 | 518 |
#enabled: #hasSelection |
3534 | 519 |
#label: 'Previous Difference' |
4896 | 520 |
#itemValue: #findPreviousDifference |
3534 | 521 |
#translateLabel: true |
522 |
) |
|
523 |
#(#MenuItem |
|
4896 | 524 |
#enabled: #hasSelection |
3534 | 525 |
#label: 'Next Difference' |
4896 | 526 |
#itemValue: #findNextDifference |
3534 | 527 |
#translateLabel: true |
528 |
) |
|
529 |
#(#MenuItem |
|
530 |
#label: '-' |
|
531 |
) |
|
532 |
#(#MenuItem |
|
4896 | 533 |
#enabled: #hasSelection |
3202 | 534 |
#label: 'Previous Snapshot' |
4896 | 535 |
#itemValue: #findPreviousSnapshot |
3202 | 536 |
#translateLabel: true |
537 |
) |
|
538 |
#(#MenuItem |
|
4896 | 539 |
#enabled: #hasSelection |
3202 | 540 |
#label: 'Next Snapshot' |
4896 | 541 |
#itemValue: #findNextSnapshot |
3202 | 542 |
#translateLabel: true |
543 |
) |
|
544 |
) |
|
545 |
nil |
|
546 |
nil |
|
547 |
) |
|
548 |
) |
|
549 |
#(#MenuItem |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
550 |
#label: 'Browse' |
3202 | 551 |
#translateLabel: true |
552 |
#submenu: |
|
553 |
#(#Menu |
|
554 |
#( |
|
555 |
#(#MenuItem |
|
4896 | 556 |
#enabled: #hasSingleSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
557 |
#label: 'Class' |
4896 | 558 |
#itemValue: #doBrowse |
3202 | 559 |
#translateLabel: true |
560 |
) |
|
561 |
#(#MenuItem |
|
562 |
#label: '-' |
|
563 |
) |
|
564 |
#(#MenuItem |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
565 |
#label: 'Senders...' |
4896 | 566 |
#itemValue: #doBrowseSenders |
3202 | 567 |
#translateLabel: true |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
568 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
569 |
#(#MenuItem |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
570 |
#label: 'Implementors...' |
4896 | 571 |
#itemValue: #doBrowseImplementors |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
572 |
#translateLabel: true |
3202 | 573 |
) |
574 |
) |
|
575 |
nil |
|
576 |
nil |
|
577 |
) |
|
578 |
) |
|
579 |
#(#MenuItem |
|
580 |
#label: 'Settings' |
|
581 |
#translateLabel: true |
|
582 |
#submenu: |
|
583 |
#(#Menu |
|
584 |
#( |
|
585 |
#(#MenuItem |
|
586 |
#label: 'Auto Compare' |
|
587 |
#translateLabel: true |
|
588 |
#indication: #autoCompare |
|
589 |
) |
|
590 |
#(#MenuItem |
|
4487 | 591 |
#label: 'Show Diffs' |
592 |
#translateLabel: true |
|
593 |
#indication: #showingDiffs |
|
594 |
) |
|
595 |
#(#MenuItem |
|
3202 | 596 |
#label: 'Auto Update' |
597 |
#translateLabel: true |
|
598 |
#indication: #autoUpdate |
|
599 |
) |
|
600 |
#(#MenuItem |
|
601 |
#label: '-' |
|
602 |
) |
|
603 |
#(#MenuItem |
|
4897 | 604 |
#label: 'Add to ChangeSet when Applying' |
3319 | 605 |
#translateLabel: true |
606 |
#indication: #updateChangeSet |
|
607 |
) |
|
608 |
#(#MenuItem |
|
3202 | 609 |
#label: 'Apply in Original NameSpace' |
610 |
#translateLabel: true |
|
611 |
#indication: #applyInOriginalNameSpace |
|
612 |
) |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
613 |
#(#MenuItem |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
614 |
#label: '-' |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
615 |
) |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
616 |
#(#MenuItem |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
617 |
#label: 'Apply into Package...' |
4896 | 618 |
#itemValue: #setEnforcedPackage |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
619 |
#translateLabel: true |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
620 |
) |
3472 | 621 |
#(#MenuItem |
4896 | 622 |
#enabled: #applyNotInOriginalNameSpace |
3472 | 623 |
#label: 'Apply into NameSpace...' |
4896 | 624 |
#itemValue: #setEnforcedNameSpace |
3472 | 625 |
#translateLabel: true |
626 |
) |
|
3202 | 627 |
) |
628 |
nil |
|
629 |
nil |
|
630 |
) |
|
631 |
) |
|
632 |
#(#MenuItem |
|
633 |
#label: 'Help' |
|
634 |
#translateLabel: true |
|
635 |
#startGroup: #right |
|
636 |
#submenu: |
|
637 |
#(#Menu |
|
638 |
#( |
|
639 |
#(#MenuItem |
|
640 |
#label: 'ChangesBrowser Documentation' |
|
4896 | 641 |
#itemValue: #openHTMLDocument: |
3202 | 642 |
#translateLabel: true |
643 |
#argument: 'tools/cbrowser/TOP.html' |
|
644 |
) |
|
3205 | 645 |
#(#MenuItem |
646 |
#label: '-' |
|
647 |
) |
|
648 |
#(#MenuItem |
|
649 |
#label: 'About ChangesBrowser...' |
|
4896 | 650 |
#itemValue: #openAboutThisApplication |
3205 | 651 |
#translateLabel: true |
652 |
) |
|
3202 | 653 |
) |
654 |
nil |
|
655 |
nil |
|
656 |
) |
|
657 |
) |
|
658 |
) |
|
659 |
nil |
|
660 |
nil |
|
661 |
) |
|
662 |
! ! |
|
663 |
||
3674 | 664 |
!ChangesBrowser class methodsFor:'private-changeFile access'! |
665 |
||
666 |
readXMLChangesFrom:aStream inBackground:inBackground |
|
667 |
"read an XML source file (format as in campSmalltalk DTD)" |
|
668 |
||
669 |
|changeSet| |
|
670 |
||
671 |
(XML isNil or:[XML::SourceNodeBuilder isNil or:[XML::XMLParser isNil]]) ifTrue:[ |
|
4832 | 672 |
Smalltalk loadPackage:'stx:goodies/xml/vw'. |
3674 | 673 |
(XML isNil or:[XML::SourceNodeBuilder isNil or:[XML::XMLParser isNil]]) ifTrue:[ |
4832 | 674 |
self error:'Could not load XML package(s) from ''stx:goodies/xml/vw'''. |
3674 | 675 |
] |
676 |
]. |
|
677 |
||
678 |
changeSet := ChangeSet new. |
|
679 |
XML::SourceScannerNodeBuilder new |
|
680 |
scanFile:aStream |
|
681 |
do:[:eachChange | |
|
682 |
changeSet addChange:eachChange. |
|
683 |
]. |
|
684 |
^ changeSet |
|
685 |
||
686 |
"/ builder := XML::SourceScannerNodeBuilder new. |
|
687 |
"/ parser := XML::XMLParser on:aStream. |
|
688 |
"/ parser builder:builder. |
|
689 |
"/ parser validate:false. |
|
690 |
"/ parser scanDocument. |
|
691 |
! |
|
692 |
||
693 |
readXMLChangesFromFile:changeFileName inBackground:inBackground |
|
694 |
|s set| |
|
695 |
||
696 |
s := changeFileName asFilename readStream. |
|
697 |
set := self readXMLChangesFrom:s inBackground:inBackground. |
|
698 |
s close. |
|
699 |
^ set. |
|
700 |
! ! |
|
701 |
||
702 |
!ChangesBrowser class methodsFor:'utilities'! |
|
703 |
||
704 |
isXMLFile:aFilename |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
705 |
|stream first| |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
706 |
|
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
707 |
stream := aFilename asFilename readStreamOrNil. |
3674 | 708 |
stream isNil ifTrue:[^ false]. |
709 |
||
710 |
stream skipSeparators. |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
711 |
first := stream peek. |
3674 | 712 |
stream close. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
713 |
^ first == $< |
3674 | 714 |
! ! |
715 |
||
3202 | 716 |
!ChangesBrowser methodsFor:'aspects'! |
717 |
||
718 |
applyInOriginalNameSpace |
|
719 |
^ applyInOriginalNameSpace |
|
720 |
! |
|
721 |
||
3472 | 722 |
applyNotInOriginalNameSpace |
4484 | 723 |
^ BlockValue forLogicalNot:self applyInOriginalNameSpace |
3472 | 724 |
! |
725 |
||
3202 | 726 |
autoCompare |
727 |
^ autoCompare |
|
728 |
! |
|
729 |
||
730 |
autoUpdate |
|
731 |
"enabled/disable automatic update from the change-file (for monitoring)" |
|
732 |
||
733 |
^ autoUpdate |
|
734 |
||
735 |
"Created: 3.12.1995 / 14:14:24 / cg" |
|
736 |
"Modified: 3.12.1995 / 14:20:45 / cg" |
|
737 |
! |
|
738 |
||
739 |
editingClassSource |
|
3203 | 740 |
^ editingClassSource ? false |
3202 | 741 |
! |
742 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
743 |
hasMultiSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
744 |
^ self hasSelection and:[self hasSingleSelection not] |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
745 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
746 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
747 |
hasNoMultiSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
748 |
^ self hasMultiSelection not |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
749 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
750 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
751 |
hasNoSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
752 |
^ self hasSelection not |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
753 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
754 |
|
3202 | 755 |
hasSelection |
756 |
^ changeListView hasSelection |
|
757 |
! |
|
758 |
||
3211 | 759 |
hasSingleSelection |
760 |
changeListView multipleSelectOk ifTrue:[ |
|
761 |
^ changeListView selection size == 1 |
|
762 |
]. |
|
763 |
^ changeListView hasSelection |
|
764 |
! |
|
765 |
||
3202 | 766 |
notEditingClassSource |
767 |
^ self editingClassSource not |
|
3211 | 768 |
! |
769 |
||
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
770 |
notEditingClassSourceAndNotReadOnly |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
771 |
^ (self editingClassSource or:[readOnly == true]) not |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
772 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
773 |
|
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
774 |
notReadOnly |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
775 |
^ (readOnly ~~ true) |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
776 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
777 |
|
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
778 |
readOnly:aBoolean |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
779 |
readOnly := aBoolean |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
780 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
781 |
|
4487 | 782 |
showingDiffs |
783 |
showingDiffs isNil ifTrue:[ |
|
4943 | 784 |
showingDiffs := self showingDiffsDefault asValue. |
4487 | 785 |
showingDiffs |
786 |
onChangeEvaluate:[ |
|
787 |
showingDiffs value ifTrue:[ |
|
788 |
self updateDiffView. |
|
789 |
self makeDiffViewVisible |
|
790 |
] ifFalse:[ |
|
791 |
self makeDiffViewInvisible |
|
792 |
]. |
|
793 |
DefaultShowingDiffs := showingDiffs value. |
|
794 |
] |
|
795 |
]. |
|
796 |
^ showingDiffs |
|
797 |
! |
|
798 |
||
4943 | 799 |
showingDiffsDefault |
800 |
^ (DefaultShowingDiffs ? true) |
|
801 |
! |
|
802 |
||
3211 | 803 |
theSingleSelection |
804 |
|sel| |
|
805 |
||
806 |
sel := changeListView selection. |
|
807 |
changeListView multipleSelectOk ifTrue:[ |
|
808 |
sel size == 1 ifTrue:[ |
|
809 |
^ sel first |
|
810 |
]. |
|
811 |
^ nil |
|
812 |
]. |
|
813 |
^ sel. |
|
3319 | 814 |
! |
815 |
||
816 |
updateChangeSet |
|
817 |
^ updateChangeSet |
|
3202 | 818 |
! ! |
819 |
||
202 | 820 |
!ChangesBrowser methodsFor:'compiler interface'! |
821 |
||
822 |
wantChangeLog |
|
823 |
"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
|
824 |
be written when compiling. Return false here." |
202 | 825 |
|
826 |
^ false |
|
827 |
! ! |
|
828 |
||
4869 | 829 |
!ChangesBrowser methodsFor:'compiler interface-error handling'! |
202 | 830 |
|
831 |
correctableError:aString position:relPos to:relEndPos from:aCompiler |
|
832 |
"compiler notifys us of an error - this should really not happen since |
|
833 |
changes ought to be correct (did someone edit the changes file ??). |
|
834 |
Show the bad change in the codeView and let codeView hilight the error; |
|
835 |
no corrections allowed here therefore return false" |
|
836 |
||
2293 | 837 |
ShowWarningDialogs == true ifTrue:[ |
838 |
self error:aString position:relPos to:relEndPos from:aCompiler. |
|
839 |
] ifFalse:[ |
|
840 |
Transcript showCR:aString. |
|
841 |
]. |
|
202 | 842 |
^ false |
843 |
! |
|
844 |
||
2555 | 845 |
correctableSelectorWarning:aString position:relPos to:relEndPos from:aCompiler |
846 |
"compiler notifys us of a warning" |
|
847 |
||
848 |
^ false |
|
849 |
||
850 |
"Modified: / 19.1.2000 / 16:25:31 / cg" |
|
851 |
"Created: / 19.1.2000 / 16:27:23 / cg" |
|
852 |
! |
|
853 |
||
202 | 854 |
error:aString position:relPos to:relEndPos from:aCompiler |
855 |
"compiler notifys us of an error - this should really not happen since |
|
856 |
changes ought to be correct (did someone edit the changes file ??). |
|
857 |
Show the bad change in the codeView and let codeView hilight the error" |
|
858 |
||
859 |
|action| |
|
860 |
||
861 |
(changeNrProcessed ~~ changeNrShown) ifTrue:[ |
|
2293 | 862 |
self changeSelection:changeNrProcessed |
202 | 863 |
]. |
864 |
(skipSignal notNil) ifTrue:[ |
|
865 |
||
2293 | 866 |
codeView highlightingErrorPosition:relPos to:relEndPos do:[ |
867 |
|box| |
|
868 |
||
869 |
" |
|
870 |
start dialog - make certain cleanup is done |
|
871 |
" |
|
872 |
action := OptionBox |
|
873 |
request:aString |
|
874 |
label:'Error' |
|
875 |
form:(WarningBox iconBitmap) |
|
3771 | 876 |
buttonLabels:#('Cancel' 'Skip' " 'Shut up' " 'Continue') |
2420 | 877 |
values:#(#abort #skip " #shutUp " #continue) |
3071
652c6b4f6981
optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents:
3069
diff
changeset
|
878 |
default:#continue |
652c6b4f6981
optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents:
3069
diff
changeset
|
879 |
onCancel:#abort. |
2293 | 880 |
]. |
881 |
||
882 |
"/ action == #shutUp ifTrue:[ |
|
883 |
"/ aCompiler ignoreWarnings. |
|
884 |
"/ ^ false |
|
885 |
"/ ]. |
|
886 |
||
3071
652c6b4f6981
optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents:
3069
diff
changeset
|
887 |
(action == #abort) ifTrue:[ |
3436
c4fe19deba58
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3406
diff
changeset
|
888 |
AbortOperationRequest raise. |
2293 | 889 |
^ false |
890 |
]. |
|
891 |
action == #skip ifTrue:[ |
|
892 |
skipSignal raise. |
|
893 |
^ false |
|
894 |
]. |
|
895 |
^ false |
|
202 | 896 |
]. |
897 |
^ codeView error:aString position:relPos to:relEndPos from:aCompiler |
|
373 | 898 |
|
3436
c4fe19deba58
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3406
diff
changeset
|
899 |
"Modified: / 16.11.2001 / 17:38:10 / cg" |
202 | 900 |
! |
901 |
||
3064 | 902 |
unusedVariableWarning:aString position:relPos to:relEndPos from:aCompiler |
903 |
"compiler notifies us of a (or some) unused variables; |
|
904 |
hilight the error (relPos to relEndPos) and show a Box asking for continue/correct/abort; |
|
905 |
this method should return true to the compiler if user wants the error |
|
906 |
to be corrected; false otherwise" |
|
907 |
||
908 |
^ false |
|
909 |
! |
|
910 |
||
202 | 911 |
warning:aString position:relPos to:relEndPos from:aCompiler |
912 |
"compiler notifys us of a warning - ignore it" |
|
913 |
||
914 |
^ self |
|
915 |
! ! |
|
916 |
||
2604 | 917 |
!ChangesBrowser methodsFor:'event handling'! |
202 | 918 |
|
919 |
handlesKeyPress:key inView:view |
|
920 |
"this method is reached via delegation: are we prepared to handle |
|
921 |
a keyPress in some other view ?" |
|
922 |
||
1127 | 923 |
<resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)> |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
924 |
|
202 | 925 |
view == changeListView ifTrue:[ |
4488 | 926 |
(key == #Delete |
927 |
or:[key == #BackSpace |
|
928 |
or:[key == #Accept |
|
929 |
or:[key == #Find |
|
930 |
or:[key == #FindPrev |
|
931 |
or:[key == #FindNext]]]]]) ifTrue:[^ true]. |
|
202 | 932 |
]. |
933 |
^ false |
|
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
934 |
|
1127 | 935 |
"Modified: 8.4.1997 / 11:01:42 / cg" |
0 | 936 |
! |
937 |
||
202 | 938 |
keyPress:key x:x y:y view:view |
939 |
"this method is reached via delegation from the changeListView" |
|
940 |
||
1127 | 941 |
<resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)> |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
942 |
|
3249 | 943 |
(key == #Delete) ifTrue:[ |
4283 | 944 |
self sensor shiftDown ifTrue:[ |
945 |
self doDeleteAndSelectPrevious. |
|
946 |
] ifFalse:[ |
|
947 |
self doDelete. |
|
948 |
]. |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
949 |
^ self |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
950 |
]. |
3249 | 951 |
(key == #BackSpace) ifTrue:[ |
952 |
self doDeleteAndSelectPrevious. |
|
953 |
^ self |
|
954 |
]. |
|
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
955 |
(key == #Accept) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
956 |
self doApply. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
957 |
^ self |
202 | 958 |
]. |
1127 | 959 |
(key == #Find) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
960 |
self findClass. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
961 |
^ self |
1127 | 962 |
]. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
963 |
(key == #FindPrev) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
964 |
self findPrevious. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
965 |
^ self |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
966 |
]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
967 |
(key == #FindNext) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
968 |
self findNext. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
969 |
^ self |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
970 |
]. |
202 | 971 |
changeListView keyPress:key x:x y:y |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
972 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
973 |
"Modified: / 18.6.1998 / 22:15:36 / cg" |
202 | 974 |
! ! |
975 |
||
3327 | 976 |
!ChangesBrowser methodsFor:'help'! |
202 | 977 |
|
394 | 978 |
showActivity:someMessage |
502 | 979 |
"some activityNotification to be forwarded to the user; |
980 |
show it in the windows title area here." |
|
981 |
||
394 | 982 |
self label:someMessage |
983 |
||
984 |
"Created: 24.2.1996 / 19:35:42 / cg" |
|
502 | 985 |
"Modified: 23.4.1996 / 21:39:36 / cg" |
202 | 986 |
! ! |
987 |
||
4868 | 988 |
!ChangesBrowser methodsFor:'initialization & release'! |
202 | 989 |
|
3202 | 990 |
autoCompareChanged |
991 |
"sent from the compare-toggle" |
|
992 |
||
3534 | 993 |
|doCompare| |
994 |
||
995 |
doCompare := autoCompare value. |
|
996 |
DefaultAutoCompare := doCompare. |
|
997 |
self setupTabSpec. |
|
998 |
doCompare ifTrue:[ |
|
3202 | 999 |
self doUpdate |
1000 |
] ifFalse:[ |
|
1001 |
changeListView invalidate. "/ clear; redraw. |
|
1002 |
] |
|
1003 |
! |
|
1004 |
||
202 | 1005 |
changeListMenu |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1006 |
"return the menu for the change (upper) list" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1007 |
|
586 | 1008 |
<resource: #keyboard ( #Accept #Delete ) > |
1359 | 1009 |
<resource: #programMenu > |
586 | 1010 |
|
3211 | 1011 |
|items m replNext replPrev sel| |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1012 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1013 |
self sensor ctrlDown ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1014 |
"/ notice - findNext/prev shortKeys will search for the same thing again. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1015 |
items := #( |
3202 | 1016 |
('Search Class...' findClass #Find ) |
1017 |
('Previous for this Class' findPreviousForClass #FindPrevClass ) |
|
1018 |
('Next for this Class' findNextForClass #FindNextClass ) |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1019 |
('-' ) |
3202 | 1020 |
('Search Selector...' findSelector ) |
1021 |
('Previous with this Selector' findPreviousForSelector #FindPrevSelector ) |
|
1022 |
('Next with this Selector' findNextForSelector #FindNextSelector ) |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1023 |
('-' ) |
3202 | 1024 |
('Search String...' findString ) |
1025 |
('Previous with this String' findPreviousForString #FindPrevString ) |
|
1026 |
('Next with this String' findNextForString #FindNextString ) |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1027 |
('-' ) |
3202 | 1028 |
('Previous Snapshot' findPreviousSnapshot #FindPrevSnapshot ) |
1029 |
('Next Snapshot' findNextSnapshot #FindNextSnapshot ) |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1030 |
). |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1031 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1032 |
lastSearchType == #selector ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1033 |
replNext := #FindNextSelector. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1034 |
replPrev := #FindPrevSelector. |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1035 |
] ifFalse:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1036 |
lastSearchType == #snapshot ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1037 |
replNext := #FindNextSnapshot. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1038 |
replPrev := #FindPrevSnapshot. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1039 |
] ifFalse:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1040 |
lastSearchType == #string ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1041 |
replNext := #FindNextString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1042 |
replPrev := #FindPrevString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1043 |
] ifFalse:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1044 |
replNext := #FindNextClass. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1045 |
replPrev := #FindPrevClass. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1046 |
] |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1047 |
] |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1048 |
]. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1049 |
items := items deepCopy. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1050 |
items do:[:each | |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1051 |
each replaceAll:replNext with:#FindNext. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1052 |
each replaceAll:replPrev with:#FindPrev. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1053 |
each replaceAny:#(FindNextClass FindPrevClass |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1054 |
FindNextSelector FindPrevSelector |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1055 |
FindNextSnapshot FindPrevSnapshot |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1056 |
FindNextString FindPrevString) |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1057 |
with:nil. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1058 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1059 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1060 |
^ PopUpMenu itemList:items resources:resources. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1061 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1062 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1063 |
items := #( |
3202 | 1064 |
('Apply' doApply Accept) |
1065 |
('Apply to End' doApplyRest ) |
|
3668 | 1066 |
('Apply from Begin' doApplyFromBeginning ) |
3202 | 1067 |
('Apply for Class to End' doApplyClassRest ) |
3668 | 1068 |
('Apply for Class from Begin' doApplyClassFromBeginning ) |
3202 | 1069 |
('Apply All' doApplyAll ) |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1070 |
('-' ) |
3202 | 1071 |
('Delete' doDelete Delete) |
1072 |
('Delete to End' doDeleteRest ) |
|
1073 |
('Delete for Class to End' doDeleteClassRest ) |
|
3234 | 1074 |
('Delete for Class from Begin' doDeleteClassFromBeginning ) |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1075 |
). |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1076 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1077 |
(self hasSelection and:[self hasSingleSelection not]) ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1078 |
items := items , |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1079 |
#( |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1080 |
('Delete All for Classes' doDeleteClassAll ) |
3698
5ca78c14d740
menu items/button labels uppercase-first
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
1081 |
('Delete All for Classes & their Private Classes' doDeleteClassAndPrivateClassesAll ) |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1082 |
). |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1083 |
] ifFalse:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1084 |
items := items , |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1085 |
#( |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1086 |
('Delete All for Class' doDeleteClassAll ) |
3698
5ca78c14d740
menu items/button labels uppercase-first
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
1087 |
('Delete All for Class & its Private Classes' doDeleteClassAndPrivateClassesAll ) |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1088 |
). |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1089 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1090 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1091 |
items := items , |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1092 |
#( |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1093 |
('-' ) |
3202 | 1094 |
('Compress' doCompress ) |
1095 |
('Compress for Class' doCompressClass ) |
|
1096 |
('Compare and Compress' doCompareAndCompress ) |
|
2835 | 1097 |
('-' ) |
3202 | 1098 |
('Compare with current Version' doCompare ) |
1099 |
('Browse Class' doBrowse ) |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1100 |
('-' ) |
3202 | 1101 |
('Make Change a Patch' doMakePatch ) |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1102 |
). |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1103 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1104 |
editingClassSource ifFalse:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1105 |
items := items , #( |
3202 | 1106 |
('Fileout & Delete All for Class' doFileoutAndDeleteClassAll ) |
1107 |
('CheckIn & Delete All for Class' doCheckinAndDeleteClassAll ) |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1108 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1109 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1110 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1111 |
items := items , #( |
2474 | 1112 |
('-' ) |
3202 | 1113 |
('Save in...' doSave ) |
3698
5ca78c14d740
menu items/button labels uppercase-first
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
1114 |
('Save to End In...' doSaveRest ) |
5ca78c14d740
menu items/button labels uppercase-first
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
1115 |
('Save for Class to End In...' doSaveClassRest ) |
5ca78c14d740
menu items/button labels uppercase-first
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
1116 |
('Save All for Class In...' doSaveClassAll ) |
2474 | 1117 |
('-' ) |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1118 |
). |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1119 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1120 |
editingClassSource ifTrue:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1121 |
items := items , #( |
3202 | 1122 |
('Writeback ClassFile' doWriteBack ) |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1123 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1124 |
] ifFalse:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1125 |
items := items , #( |
3202 | 1126 |
('Writeback ChangeFile' doWriteBack ) |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1127 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1128 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1129 |
|
1833
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
1130 |
items := items , #( |
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
1131 |
('-' ) |
3202 | 1132 |
('Update' doUpdate ) |
1833
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
1133 |
). |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1134 |
|
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1135 |
m := PopUpMenu itemList:items resources:resources. |
202 | 1136 |
|
255 | 1137 |
"/ |
1138 |
"/ disable those that require a selected entry |
|
1139 |
"/ |
|
3202 | 1140 |
self hasSelection ifFalse:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1141 |
m disableAll:#(doApply doApplyClassRest doApplyRest doDelete doDeleteRest doDeleteClassRest |
2511 | 1142 |
doDeleteClassFromBeginning doDeleteClassAll doDeleteClassAndPrivateClassesAll |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1143 |
doCompare doCompressClass doMakePatch doSaveChangeInFile doMakePermanent |
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1144 |
doSave doSaveRest doSaveClassAll doSaveClassRest doBrowse |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1145 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll) |
1368 | 1146 |
] ifTrue:[ |
3211 | 1147 |
sel := self theSingleSelection. |
1148 |
sel isNil ifTrue:[ |
|
1149 |
"/ multiple selections |
|
1150 |
m disableAll:#(doApplyClassRest doApplyRest doDeleteClassRest doDeleteRest |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1151 |
doDeleteClassFromBeginning |
3211 | 1152 |
doCompressClass doCompare |
1153 |
doSaveClassAll doSaveClassRest doSaveRest doBrowse |
|
3442 | 1154 |
doFileoutAndDeleteClassAll) |
3211 | 1155 |
] ifFalse:[ |
1156 |
(self classNameOfChange:sel) isNil ifTrue:[ |
|
1157 |
m disableAll:#(doApplyClassRest doDeleteClassRest |
|
1158 |
doDeleteClassFromBeginning doDeleteClassAll doDeleteClassAndPrivateClassesAll |
|
1159 |
doCompressClass doCompare doMakePatch |
|
1160 |
doSaveClassAll doSaveClassRest doBrowse |
|
1161 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll) |
|
1162 |
] |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1163 |
] |
255 | 1164 |
]. |
1165 |
||
1166 |
"/ |
|
1167 |
"/ disable those that do not make sense with autoUpdate |
|
1168 |
"/ ('cause this would be overwritten by next update operation) |
|
1169 |
"/ |
|
3202 | 1170 |
autoUpdate value ifTrue:[ |
2511 | 1171 |
m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll |
1172 |
doDeleteClassAndPrivateClassesAll doCompress |
|
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1173 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1174 |
doWriteBack) |
202 | 1175 |
]. |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1176 |
readOnly == true ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1177 |
m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1178 |
doDeleteClassAndPrivateClassesAll doCompress |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1179 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1180 |
doWriteBack doSaveBack doUpdate |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1181 |
doApplyAll doApplyRest) |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1182 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1183 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1184 |
self hasSelection ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1185 |
m disable:#doApplyAll |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1186 |
]. |
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1187 |
|
202 | 1188 |
^ m |
1189 |
||
1359 | 1190 |
"Modified: / 6.9.1995 / 17:14:22 / claus" |
3442 | 1191 |
"Modified: / 17.11.2001 / 14:16:14 / cg" |
202 | 1192 |
! |
1193 |
||
2114 | 1194 |
destroy |
1195 |
"destroy the receiver; make certain, that boxes are destroyed too" |
|
1196 |
||
1197 |
Processor removeTimedBlock:checkBlock. |
|
1198 |
ObjectMemory removeDependent:self. |
|
1199 |
super destroy |
|
1200 |
! |
|
1201 |
||
202 | 1202 |
focusSequence |
1203 |
^ Array with:changeListView with:codeView |
|
1204 |
! |
|
1205 |
||
1206 |
initialize |
|
3202 | 1207 |
|panel v upperFrame buttonPanel menuPanel mH |
4487 | 1208 |
checkBox oldStyle codeViewBox lbl| |
3202 | 1209 |
|
3211 | 1210 |
"/ oldStyle := true. |
3202 | 1211 |
oldStyle := false. |
202 | 1212 |
|
1213 |
super initialize. |
|
1214 |
||
5702 | 1215 |
changeFileName := ObjectMemory nameForChanges. |
3534 | 1216 |
autoCompare := (DefaultAutoCompare ? false) asValue. |
3202 | 1217 |
autoCompare onChangeSend:#autoCompareChanged to:self. |
1218 |
autoUpdate := false asValue. |
|
2343 | 1219 |
applyInOriginalNameSpace := true asValue. |
4488 | 1220 |
applyInOriginalNameSpace |
1221 |
onChangeEvaluate:[ |
|
1222 |
autoCompare value ifTrue:[ |
|
1223 |
self doUpdate |
|
1224 |
]. |
|
1225 |
]. |
|
4897 | 1226 |
updateChangeSet := true "false" asValue. |
221 | 1227 |
|
1099
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1228 |
" |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1229 |
checkBlock is executed by the Processor. |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1230 |
We use #pushEvent: to perform the update |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1231 |
in our windowgroups process. |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1232 |
" |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1233 |
checkBlock := [self pushEvent:#checkIfFileHasChanged]. |
202 | 1234 |
|
3202 | 1235 |
oldStyle ifFalse:[ |
1236 |
menuPanel := MenuPanel in:self. |
|
3242 | 1237 |
"/ menuPanel level:1. |
3202 | 1238 |
menuPanel verticalLayout:false. |
1239 |
menuPanel receiver:self. |
|
1240 |
menuPanel menu:(self pullDownMenu). |
|
1241 |
||
1242 |
mH := menuPanel preferredExtent y. |
|
1243 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
|
3297 | 1244 |
mH := mH + 1. |
3202 | 1245 |
] ifTrue:[ |
1246 |
mH := 0.0 |
|
1247 |
]. |
|
1248 |
||
1249 |
panel := VariableVerticalPanel origin:(0.0 @ mH) |
|
1471 | 1250 |
corner:(1.0 @ 1.0) |
1251 |
borderWidth:0 |
|
1252 |
in:self. |
|
202 | 1253 |
|
3202 | 1254 |
upperFrame := panel. |
1255 |
oldStyle ifTrue:[ |
|
1256 |
upperFrame := VariableHorizontalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 0.3) in:panel. |
|
1257 |
]. |
|
202 | 1258 |
|
1259 |
v := HVScrollableView for:SelectionInListView miniScrollerH:true in:upperFrame. |
|
3202 | 1260 |
oldStyle ifTrue:[ |
1261 |
v origin:(0.0 @ 0.0) corner:(0.75 @ 1.0). |
|
1262 |
] ifFalse:[ |
|
1263 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.3). |
|
1264 |
]. |
|
3090 | 1265 |
|
202 | 1266 |
changeListView := v scrolledView. |
1267 |
changeListView delegate:self. |
|
1268 |
changeListView menuHolder:self; menuPerformer:self; menuMessage:#changeListMenu. |
|
1471 | 1269 |
changeListView doubleClickAction:[:line | self doubleClickOnChange:line]. |
3211 | 1270 |
oldStyle ifFalse:[ |
1271 |
changeListView multipleSelectOk:true. |
|
1272 |
]. |
|
202 | 1273 |
|
3202 | 1274 |
oldStyle ifTrue:[ |
1275 |
buttonPanel := VerticalPanelView in:upperFrame. |
|
1276 |
buttonPanel origin:(0.75 @ 0.0) corner:(1.0 @ 1.0). |
|
1277 |
buttonPanel verticalLayout:#topSpace; horizontalLayout:#leftSpace. |
|
1278 |
||
1279 |
checkBox := CheckBox new model:autoCompare. |
|
1280 |
checkBox label:(resources string:'Auto Compare'). |
|
1281 |
checkBox action:[:val | autoCompare value:val]. |
|
1282 |
buttonPanel addSubView:checkBox. |
|
1283 |
||
1284 |
checkBox := CheckBox new model:autoUpdate. |
|
1285 |
checkBox label:(resources string:'Auto Update'). |
|
1286 |
checkBox action:[:val | autoUpdate value:val]. |
|
1287 |
buttonPanel addSubView:checkBox. |
|
1288 |
||
1289 |
checkBox := CheckBox new. |
|
1290 |
checkBox label:(resources string:'Apply in original NameSpace' withCRs). |
|
1291 |
checkBox model:applyInOriginalNameSpace. |
|
1292 |
buttonPanel addSubView:checkBox. |
|
1293 |
]. |
|
2301 | 1294 |
|
3090 | 1295 |
"/ protectExistingMethods := CheckBox new. |
1296 |
"/ protectExistingMethods label:(resources string:'Protect existing code' withCRs). |
|
1297 |
"/ protectExistingMethods model:protectExistingMethods. |
|
1298 |
"/ buttonPanel addSubView:protectExistingMethods. |
|
1299 |
||
4487 | 1300 |
codeViewBox := View in:panel. |
1301 |
codeViewBox origin:(0.0 @ 0.3) corner:(1.0 @ 1.0). |
|
1302 |
||
1303 |
v := HVScrollableView for:CodeView miniScrollerH:true miniScrollerV:false in:codeViewBox. |
|
1304 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
202 | 1305 |
codeView := v scrolledView. |
1996 | 1306 |
codeView readOnly:true. |
202 | 1307 |
|
4487 | 1308 |
diffViewBox := View in:codeViewBox. |
1309 |
diffViewBox origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
1310 |
||
1311 |
lbl := Label label:'Current' in:diffViewBox. |
|
1312 |
lbl layout:(LayoutFrame |
|
1313 |
leftFraction:0.0 offset:0 |
|
1314 |
rightFraction:0.5 offset:0 |
|
1315 |
topFraction:0.0 offset:0 |
|
1316 |
bottomFraction:0.0 offset:20). |
|
1317 |
lbl := Label label:'Change' in:diffViewBox. |
|
1318 |
lbl layout:(LayoutFrame |
|
1319 |
leftFraction:0.5 offset:0 |
|
1320 |
rightFraction:1.0 offset:0 |
|
1321 |
topFraction:0.0 offset:0 |
|
1322 |
bottomFraction:0.0 offset:20). |
|
1323 |
||
1324 |
"/ diffView := DiffTextView in:diffViewBox. |
|
1325 |
"/ diffView layout:(LayoutFrame |
|
1326 |
"/ leftFraction:0.0 offset:0 |
|
1327 |
"/ rightFraction:1.0 offset:0 |
|
1328 |
"/ topFraction:0.0 offset:20 |
|
1329 |
"/ bottomFraction:1.0 offset:0). |
|
1330 |
||
1331 |
v := HVScrollableView for:DiffTextView miniScrollerH:true miniScrollerV:false in:diffViewBox. |
|
1332 |
v layout:(LayoutFrame |
|
1333 |
leftFraction:0.0 offset:0 |
|
1334 |
rightFraction:1.0 offset:0 |
|
1335 |
topFraction:0.0 offset:20 |
|
1336 |
bottomFraction:1.0 offset:0). |
|
1337 |
diffView := v scrolledView. |
|
1338 |
||
1339 |
self showingDiffs value ifFalse:[ |
|
1340 |
self makeDiffViewInvisible |
|
1341 |
]. |
|
1342 |
||
202 | 1343 |
anyChanges := false. |
1344 |
ObjectMemory addDependent:self. "to get shutdown-update" |
|
1345 |
||
1346 |
tabSpec := TabulatorSpecification new. |
|
1347 |
tabSpec unit:#inch. |
|
1348 |
tabSpec positions:#(-1 0 5 8.5 ). |
|
1349 |
" +/- cls>>sel type info" |
|
1350 |
tabSpec align: #(#left #left #left #left). |
|
1351 |
||
1471 | 1352 |
"Modified: / 27.3.1997 / 11:07:07 / stefan" |
3297 | 1353 |
"Modified: / 11.10.2001 / 21:20:48 / cg" |
202 | 1354 |
! |
1355 |
||
1246
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1356 |
postRealize |
3534 | 1357 |
self setupTabSpec. |
202 | 1358 |
self readChangesFileInBackground:true. |
1359 |
self setChangeList. |
|
1360 |
changeListView action:[:lineNr | self changeSelection:lineNr]. |
|
1361 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
|
1246
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1362 |
|
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1363 |
"Created: 24.7.1997 / 18:06:12 / cg" |
202 | 1364 |
! |
1365 |
||
3202 | 1366 |
pullDownMenu |
1367 |
"return the top (pullDown) menu" |
|
1368 |
||
1369 |
<resource: #programMenu> |
|
1370 |
||
3330 | 1371 |
^ self menuFromSpec:self class menuSpec. |
1372 |
||
1373 |
"/ |m| |
|
1374 |
"/ |
|
1375 |
"/ m := self class menuSpec. |
|
1376 |
"/ m := m decodeAsLiteralArray. |
|
1377 |
"/ m receiver:self. |
|
1378 |
"/ m findGuiResourcesIn:self. |
|
1379 |
"/ ^ m. |
|
3202 | 1380 |
! |
1381 |
||
3534 | 1382 |
setupTabSpec |
1383 |
autoCompare value ifTrue:[ |
|
1384 |
tabSpec positions:#(0 0.15 5 8.5 ). |
|
1385 |
] ifFalse:[ |
|
1386 |
"/ |
|
1387 |
"/ set tabs to hide compare-column |
|
1388 |
"/ |
|
1389 |
tabSpec positions:#(-1 0 5 8.5 ). |
|
1390 |
] |
|
1391 |
! |
|
1392 |
||
627 | 1393 |
update:what with:aParameter from:changedObject |
202 | 1394 |
|box| |
1395 |
||
1396 |
(what == #aboutToExit) ifTrue:[ |
|
2353
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1397 |
" |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1398 |
smalltalk is about to shut down - |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1399 |
- if change list was modified, ask user and save if requested. |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1400 |
" |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1401 |
anyChanges ifTrue:[ |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1402 |
self raiseDeiconified. |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1403 |
|
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1404 |
box := YesNoBox new. |
2888 | 1405 |
box title:('The modified changelist has not been written back to the change file.\\Write change file before exiting ?') withCRs. |
2353
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1406 |
box okText:(resources at:'write') noText:(resources at:'don''t write'). |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1407 |
box yesAction:[self writeBackChanges] |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1408 |
noAction:[]. |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1409 |
box showAtPointer. |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1410 |
box destroy |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1411 |
]. |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1412 |
^ self |
202 | 1413 |
]. |
1414 |
super update:what |
|
627 | 1415 |
|
2353
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1416 |
"Created: / 15.6.1996 / 15:26:30 / cg" |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1417 |
"Modified: / 7.1.1997 / 23:03:47 / cg" |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1418 |
"Modified: / 24.8.1999 / 09:45:06 / stefan" |
202 | 1419 |
! ! |
1420 |
||
3202 | 1421 |
!ChangesBrowser methodsFor:'menu actions'! |
1422 |
||
1423 |
menuExit |
|
3204 | 1424 |
self closeRequest |
3202 | 1425 |
! |
1426 |
||
1427 |
openAboutThisApplication |
|
1428 |
"opens an about box for this application." |
|
1429 |
||
3503 | 1430 |
DialogBox aboutClass:self class. |
1431 |
"/ |rev myClass clsRev msg| |
|
1432 |
"/ |
|
1433 |
"/ rev := ''. |
|
1434 |
"/ myClass := self class. |
|
1435 |
"/ |
|
1436 |
"/ (clsRev := myClass revision) notNil ifTrue: [rev := ' (rev: ', clsRev printString, ')']. |
|
1437 |
"/ |
|
1438 |
"/ msg := '\' withCRs , myClass name asBoldText, rev. |
|
1439 |
"/ |
|
1440 |
"/ Dialog |
|
1441 |
"/ about:(resources string:msg) |
|
1442 |
"/ label:(resources string:'About ChangesBrowser') |
|
1443 |
"/ icon:self class defaultIcon |
|
1444 |
"/ |
|
1445 |
"/ "Modified: / 17.11.2001 / 23:07:33 / cg" |
|
3202 | 1446 |
! |
1447 |
||
1448 |
openHTMLDocument:relativeDocPath |
|
1449 |
HTMLDocumentView openFullOnDocumentationFile:relativeDocPath |
|
1450 |
! |
|
1451 |
||
1452 |
showAboutSTX |
|
1453 |
ToolApplicationModel openAboutSTX |
|
1454 |
! ! |
|
1455 |
||
202 | 1456 |
!ChangesBrowser methodsFor:'private'! |
1457 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1458 |
autoSelect:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1459 |
"select a change" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1460 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1461 |
self class autoSelectNext ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1462 |
(changeNr <= self numberOfChanges) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1463 |
changeListView setSelection:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1464 |
self changeSelection:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1465 |
^ self |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1466 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1467 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1468 |
self clearCodeView. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1469 |
changeListView setSelection:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1470 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1471 |
"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
|
1472 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1473 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1474 |
autoSelectLast |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1475 |
"select the last change" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1476 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1477 |
self autoSelect:(self numberOfChanges) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1478 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1479 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1480 |
autoSelectOrEnd:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1481 |
"select the next change or the last" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1482 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1483 |
|last| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1484 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1485 |
last := self numberOfChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1486 |
changeNr < last ifTrue:[ |
3406
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1487 |
self autoSelect:changeNr |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1488 |
] ifFalse:[ |
3406
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1489 |
last == 0 ifTrue:[ |
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1490 |
last := nil |
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1491 |
]. |
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1492 |
changeListView setSelection:last . |
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1493 |
self changeSelection:last. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1494 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1495 |
|
3406
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1496 |
"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
|
1497 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1498 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1499 |
checkClassIsLoaded:aClass |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1500 |
"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
|
1501 |
|
4706 | 1502 |
|cls| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1503 |
|
3359
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
1504 |
cls := aClass theNonMetaclass. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1505 |
cls isLoaded ifFalse:[ |
2474 | 1506 |
(self confirm:(resources |
1507 |
string:'%1 is an autoloaded class.\I can only compare the methods source if its loaded first.\\Shall the class be loaded now ?' |
|
2867 | 1508 |
with:cls name allBold) withCRs) |
2474 | 1509 |
ifFalse:[ |
1510 |
AbortSignal raise |
|
1511 |
]. |
|
1512 |
cls autoload |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1513 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1514 |
^ cls isLoaded |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1515 |
|
3359
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
1516 |
"Created: / 12.12.1995 / 14:04:39 / cg" |
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
1517 |
"Modified: / 5.11.2001 / 16:34:29 / cg" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1518 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1519 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1520 |
clearCodeView |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1521 |
"clear the (lower) code view." |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1522 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1523 |
self unselect "changeListView deselect". |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1524 |
codeView contents:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1525 |
changeNrShown := nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1526 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1527 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1528 |
contractClass:className selector:selector to:maxLen |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1529 |
"contract a class>>selector string (for display in the changeList)." |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1530 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1531 |
|s l| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1532 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1533 |
s := className , ' ', selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1534 |
s size > maxLen ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1535 |
l := maxLen - 1 - selector size max:20. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1536 |
s := (className contractTo:l) , ' ' , selector. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1537 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1538 |
s size > maxLen ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1539 |
l := maxLen - 1 - className size max:20. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1540 |
s := className , ' ', (selector contractTo:l). |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1541 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1542 |
s size > maxLen ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1543 |
s := (className contractTo:(maxLen // 2 - 1)) , ' ' , (selector contractTo:maxLen // 2) |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1544 |
] |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1545 |
] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1546 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1547 |
^ s |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1548 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1549 |
|
3472 | 1550 |
extractClassAndClassNameFromParseTree:rec |
1551 |
|isUnaryMessage className changeClass| |
|
1552 |
||
1553 |
isUnaryMessage := rec isUnaryMessage. |
|
1554 |
||
1555 |
isUnaryMessage ifTrue:[ |
|
1556 |
className := rec receiver name. |
|
1557 |
] ifFalse:[ |
|
1558 |
className := rec name. |
|
1559 |
]. |
|
1560 |
||
1561 |
enforcedNameSpace notNil ifTrue:[ |
|
1562 |
changeClass := enforcedNameSpace classNamed:className. |
|
1563 |
]. |
|
1564 |
changeClass isNil ifTrue:[ |
|
1565 |
changeClass := Smalltalk classNamed:className. |
|
1566 |
]. |
|
1567 |
isUnaryMessage ifTrue:[ |
|
1568 |
changeClass notNil ifTrue:[ |
|
1569 |
changeClass := changeClass class. |
|
1570 |
]. |
|
1571 |
className := className , ' class'. |
|
1572 |
]. |
|
1573 |
||
1574 |
^ className -> changeClass |
|
1575 |
! |
|
1576 |
||
3203 | 1577 |
isChangeSetBrowser |
1578 |
^ false |
|
1579 |
! |
|
1580 |
||
4487 | 1581 |
makeDiffViewInvisible |
1582 |
diffViewBox lower |
|
1583 |
! |
|
1584 |
||
1585 |
makeDiffViewVisible |
|
1586 |
diffViewBox raise |
|
1587 |
! |
|
1588 |
||
3472 | 1589 |
nameSpaceForApply |
1590 |
applyInOriginalNameSpace value ifFalse:[ |
|
1591 |
^ enforcedNameSpace ? Class nameSpaceQuerySignal query. |
|
1592 |
]. |
|
1593 |
^ Smalltalk. |
|
1594 |
! |
|
1595 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1596 |
newLabel:how |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1597 |
|l| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1598 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1599 |
(changeFileName ~= 'changes') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1600 |
l := self class defaultLabel , ': ', changeFileName |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1601 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1602 |
l := self class defaultLabel |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1603 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1604 |
l := l , ' ' , how. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1605 |
self label:l |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1606 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1607 |
"Created: / 8.9.1995 / 19:32:04 / claus" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1608 |
"Modified: / 8.9.1995 / 19:39:29 / claus" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1609 |
"Modified: / 6.2.1998 / 13:27:01 / cg" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1610 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1611 |
|
4857 | 1612 |
oldSourceForParseTree:parseTree |
1613 |
|selector thisClass method superClass thisClassSym ownerClass receiver classGlobalNode| |
|
1614 |
||
1615 |
(parseTree isNil |
|
1616 |
or:[parseTree == #Error |
|
1617 |
or:[ parseTree isMessage not ]]) ifTrue:[ |
|
1618 |
^ nil |
|
1619 |
]. |
|
1620 |
||
1621 |
selector := parseTree selector. |
|
1622 |
receiver := parseTree receiver. |
|
1623 |
||
1624 |
selector == #'removeSelector:' ifTrue:[ |
|
1625 |
thisClass := receiver evaluate. |
|
1626 |
thisClass isBehavior ifTrue:[ |
|
1627 |
thisClass isLoaded ifTrue:[ |
|
1628 |
selector := (parseTree arg1 evaluate). |
|
1629 |
(thisClass includesSelector:selector) ifTrue:[ |
|
1630 |
^ (thisClass compiledMethodAt:selector) source. |
|
1631 |
] |
|
1632 |
] ifFalse:[ |
|
1633 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
1634 |
] |
|
1635 |
] ifFalse:[ |
|
1636 |
^ 'Cannot compare this change (class not present)'. |
|
1637 |
]. |
|
1638 |
]. |
|
1639 |
selector == #'comment:' ifTrue:[ |
|
1640 |
thisClass := receiver evaluate. |
|
1641 |
thisClass isBehavior ifTrue:[ |
|
1642 |
thisClass isLoaded ifTrue:[ |
|
1643 |
^ thisClass name , ' comment: ' , thisClass comment storeString. |
|
1644 |
] ifFalse:[ |
|
1645 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
1646 |
] |
|
1647 |
] ifFalse:[ |
|
1648 |
^ 'Cannot compare this change (class not present)'. |
|
1649 |
]. |
|
1650 |
]. |
|
1651 |
||
1652 |
selector == #'category:' ifTrue:[ |
|
1653 |
receiver isMessage ifTrue:[ |
|
1654 |
receiver selector == #compiledMethodAt: ifTrue:[ |
|
1655 |
classGlobalNode := receiver receiver. |
|
1656 |
(classGlobalNode isMessage and:[classGlobalNode selector == #class]) ifTrue:[ |
|
1657 |
classGlobalNode := classGlobalNode receiver |
|
1658 |
]. |
|
1659 |
classGlobalNode isUndeclared ifTrue:[ |
|
1660 |
^ 'Class does not exist.'. |
|
1661 |
]. |
|
5255 | 1662 |
Error handle:[method := nil] do:[method := receiver evaluate]. |
1663 |
method isMethod ifTrue:[ |
|
4857 | 1664 |
method category = parseTree arg1 evaluate ifFalse:[ |
1665 |
^ '(' , method class name , ' compiledMethodAt: ' , method selector storeString , ') category: ' , method category storeString. |
|
1666 |
] |
|
1667 |
] ifFalse:[ |
|
1668 |
^ 'There is no such method'. |
|
1669 |
] |
|
1670 |
] |
|
1671 |
] |
|
1672 |
]. |
|
1673 |
||
1674 |
selector == #'instanceVariableNames:' ifTrue:[ |
|
1675 |
receiver isMessage ifTrue:[ |
|
1676 |
receiver selector == #class ifTrue:[ |
|
1677 |
thisClass := receiver evaluate. |
|
1678 |
thisClass isBehavior ifTrue:[ |
|
1679 |
thisClass isLoaded ifTrue:[ |
|
1680 |
"/ varsHere := thisClass instanceVariableString asCollectionOfWords. |
|
1681 |
"/ varsInChange := (parseTree arguments at:1) evaluate asCollectionOfWords. |
|
1682 |
^ thisClass definition. |
|
1683 |
] ifFalse:[ |
|
1684 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
1685 |
]. |
|
1686 |
] ifFalse:[ |
|
1687 |
^ 'Cannot compare this change (class not present)'. |
|
1688 |
] |
|
1689 |
]. |
|
1690 |
] |
|
1691 |
]. |
|
1692 |
||
1693 |
(Class definitionSelectors includes:selector) |
|
1694 |
"/ selector == #'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' |
|
1695 |
ifTrue:[ |
|
1696 |
superClass := receiver evaluate. |
|
1697 |
superClass isBehavior ifFalse:[ |
|
1698 |
^ 'Cannot compare this change\\(no such superclass).' withCRs. |
|
1699 |
] ifTrue:[ |
|
1700 |
superClass isLoaded ifFalse:[ |
|
1701 |
^ 'Cannot compare this change\\(superclass not loaded).' withCRs. |
|
1702 |
] ifTrue:[ |
|
1703 |
thisClassSym := (parseTree arguments at:1) evaluate. |
|
1704 |
||
1705 |
(selector endsWith:':privateIn:') ifTrue:[ |
|
1706 |
ownerClass := (parseTree arguments at:5). |
|
1707 |
ownerClass isUndeclared ifFalse:[ |
|
1708 |
ownerClass := ownerClass evaluate. |
|
1709 |
] ifTrue:[ |
|
1710 |
ownerClass := nil. |
|
1711 |
]. |
|
1712 |
ownerClass isNil ifTrue:[ |
|
1713 |
^ 'Cannot compare this change\\(owning class is not loaded).' withCRs. |
|
1714 |
]. |
|
1715 |
thisClass := ownerClass privateClassesAt:thisClassSym. |
|
1716 |
] ifFalse:[ |
|
1717 |
thisClass := (self nameSpaceForApply) at:thisClassSym ifAbsent:nil. |
|
1718 |
]. |
|
1719 |
thisClass notNil ifTrue:[ |
|
1720 |
thisClass isLoaded ifFalse:[ |
|
1721 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
1722 |
] ifTrue:[ |
|
1723 |
^ thisClass definition. |
|
1724 |
] |
|
1725 |
] |
|
1726 |
] |
|
1727 |
] |
|
1728 |
]. |
|
1729 |
||
1730 |
^ nil. |
|
1731 |
! |
|
1732 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1733 |
queryCloseText |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1734 |
"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
|
1735 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1736 |
^ 'Quit without updating changeFile ?' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1737 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1738 |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1739 |
selectedClassNames |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1740 |
|classes| |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1741 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1742 |
classes := Set new. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1743 |
self withSelectedChangesDo:[:changeNr | |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1744 |
| classNameToCompress | |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1745 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1746 |
classNameToCompress := self classNameOfChange:changeNr. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1747 |
classNameToCompress notNil ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1748 |
classes add:classNameToCompress. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1749 |
] |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1750 |
]. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1751 |
^ classes |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1752 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1753 |
"Created: / 19.11.2001 / 21:54:59 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1754 |
! |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1755 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1756 |
setChangeList |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1757 |
"extract type-information from changes and stuff into top selection |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1758 |
view" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1759 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1760 |
changeListView setList:changeHeaderLines expandTabs:false redraw:false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1761 |
changeListView invalidate. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1762 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1763 |
"/ changeListView deselect. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1764 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1765 |
"Modified: / 18.5.1998 / 14:29:10 / cg" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1766 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1767 |
|
3211 | 1768 |
setSingleSelection:changeNr |
1769 |
changeListView multipleSelectOk ifFalse:[ |
|
1770 |
changeListView setSelection:changeNr. |
|
1771 |
] ifTrue:[ |
|
1772 |
changeListView setSelection:(Array with:changeNr). |
|
1773 |
]. |
|
1774 |
! |
|
1775 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1776 |
showNotFound |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1777 |
|savedCursor| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1778 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1779 |
savedCursor := cursor. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1780 |
[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1781 |
self cursor:(Cursor cross). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1782 |
self beep. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1783 |
Delay waitForMilliseconds:300. |
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3586
diff
changeset
|
1784 |
] ensure:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1785 |
self cursor:savedCursor |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1786 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1787 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1788 |
"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
|
1789 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1790 |
|
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1791 |
sourceOfChange:changeNr |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1792 |
|aStream sawExcla chunk| |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1793 |
|
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1794 |
aStream := self streamForChange:changeNr. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1795 |
aStream isNil ifTrue:[ |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1796 |
^ nil |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1797 |
]. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1798 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1799 |
chunk := aStream nextChunk. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1800 |
sawExcla ifTrue:[ |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1801 |
chunk := aStream nextChunk |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1802 |
]. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1803 |
aStream close. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1804 |
^ chunk |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1805 |
! |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1806 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1807 |
unselect |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1808 |
"common unselect" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1809 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1810 |
changeListView setSelection:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1811 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1812 |
"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
|
1813 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1814 |
|
3211 | 1815 |
withSelectedChangesDo:aBlock |
1816 |
"just a helper, check for a selected change and evaluate aBlock |
|
1817 |
with busy cursor" |
|
1818 |
||
1819 |
self withSelectedChangesInOrder:nil do:aBlock |
|
1820 |
! |
|
1821 |
||
1822 |
withSelectedChangesInOrder:order do:aBlock |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1823 |
"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
|
1824 |
with busy cursor" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1825 |
|
3211 | 1826 |
|changeNrSelection| |
1827 |
||
1828 |
changeNrSelection := changeListView selection. |
|
1829 |
changeListView multipleSelectOk ifFalse:[ |
|
1830 |
changeNrSelection notNil ifTrue:[ |
|
1831 |
self withExecuteCursorDo:[ |
|
1832 |
aBlock value:changeNrSelection |
|
1833 |
] |
|
1834 |
] |
|
1835 |
] ifTrue:[ |
|
1836 |
changeNrSelection size > 0 ifTrue:[ |
|
1837 |
self withExecuteCursorDo:[ |
|
1838 |
|changeNumbers| |
|
1839 |
||
1840 |
changeNumbers := changeNrSelection copy sort. |
|
1841 |
order == #reverse ifTrue:[ |
|
1842 |
changeNumbers reverse |
|
1843 |
]. |
|
1844 |
changeNumbers do:aBlock |
|
1845 |
] |
|
1846 |
] |
|
1847 |
]. |
|
1848 |
! |
|
1849 |
||
1850 |
withSelectedChangesReverseDo:aBlock |
|
1851 |
"just a helper, check for a selected change and evaluate aBlock |
|
1852 |
with busy cursor" |
|
1853 |
||
1854 |
self withSelectedChangesInOrder:#reverse do:aBlock |
|
3668 | 1855 |
! |
1856 |
||
1857 |
withSingleSelectedChangeDo:aBlock |
|
1858 |
"just a helper, check for a single selection, and evaluate aBlock |
|
1859 |
with busy cursor" |
|
1860 |
||
1861 |
self theSingleSelection isNil ifTrue:[ |
|
1862 |
^ self information:'Only possible if a single change is selected.'. |
|
1863 |
]. |
|
1864 |
||
1865 |
self withSelectedChangesInOrder:nil do:aBlock |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1866 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1867 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1868 |
!ChangesBrowser methodsFor:'private-change access'! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1869 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1870 |
changeIsFollowupMethodChange:changeNr |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1871 |
"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
|
1872 |
in a bunch of methodsFor-changes)" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1873 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1874 |
^ changeIsFollowupMethodChange at:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1875 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1876 |
"Created: / 6.2.1998 / 13:03:39 / cg" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1877 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1878 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1879 |
changeIsSnapShotInfo:changeNr |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1880 |
"return true, if a change is a snapShot info chunk" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1881 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1882 |
|words chunk| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1883 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1884 |
(self classNameOfChange:changeNr) isNil ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1885 |
" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1886 |
get the chunk |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1887 |
" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1888 |
chunk := changeChunks at:changeNr. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1889 |
"mhmh - empty ??" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1890 |
chunk notNil ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1891 |
(chunk startsWith:'''---') ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1892 |
words := chunk asCollectionOfWords. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1893 |
words size > 2 ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1894 |
(words at:2) = 'snapshot' ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1895 |
^ true |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1896 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1897 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1898 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1899 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1900 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1901 |
^ false |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1902 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1903 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1904 |
classNameOfChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1905 |
"return the classname of a change |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1906 |
(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
|
1907 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1908 |
|name| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1909 |
|
3364 | 1910 |
name := self realClassNameOfChange:changeNr. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1911 |
name isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1912 |
(name endsWith:' class') ifTrue:[ |
3364 | 1913 |
name := name copyWithoutLast:6 |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1914 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1915 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1916 |
|
3364 | 1917 |
"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
|
1918 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1919 |
|
3202 | 1920 |
extractSelectorOfMethodChange:changeNr |
1921 |
"return a method-changes selector, or nil if its not a methodChange" |
|
1922 |
||
1923 |
|source parser sel chunk aParseTree | |
|
1924 |
||
1925 |
source := self sourceOfMethodChange:changeNr. |
|
1926 |
source isNil ifTrue:[ |
|
1927 |
(self classNameOfChange:changeNr) notNil ifTrue:[ |
|
1928 |
chunk := changeChunks at:changeNr. |
|
1929 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
|
1930 |
||
1931 |
aParseTree := Parser parseExpression:chunk. |
|
1932 |
(aParseTree isNil |
|
1933 |
or:[aParseTree == #Error |
|
1934 |
or:[aParseTree isMessage not]]) ifTrue:[ |
|
1935 |
^ nil "seems strange ... (could be a comment)" |
|
1936 |
]. |
|
1937 |
sel := aParseTree selector. |
|
1938 |
(#( |
|
1939 |
#'removeSelector:' |
|
1940 |
) includes:sel) ifTrue:[ |
|
1941 |
sel := aParseTree arguments at:1. |
|
1942 |
sel isConstant ifTrue:[ |
|
1943 |
sel := sel evaluate. |
|
1944 |
sel isSymbol ifTrue:[ |
|
1945 |
^ sel |
|
1946 |
] |
|
1947 |
] |
|
1948 |
] |
|
1949 |
]. |
|
1950 |
^ nil |
|
1951 |
]. |
|
1952 |
||
1953 |
||
1954 |
parser := Parser |
|
1955 |
parseMethodArgAndVarSpecification:source |
|
1956 |
in:nil |
|
1957 |
ignoreErrors:true |
|
1958 |
ignoreWarnings:true |
|
1959 |
parseBody:false. |
|
1960 |
||
1961 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
1962 |
sel := parser selector. |
|
1963 |
]. |
|
1964 |
^ sel |
|
1965 |
||
1966 |
"Created: 24.11.1995 / 14:30:46 / cg" |
|
1967 |
"Modified: 5.9.1996 / 17:12:50 / cg" |
|
1968 |
! |
|
1969 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1970 |
fullClassNameOfChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1971 |
"return the full classname of a change |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1972 |
(for classChanges (i.e. xxx class), a string ending in ' class' is returned. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1973 |
- since parsing ascii methods is slow, keep result cached in |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1974 |
changeClassNames for the next query" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1975 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1976 |
|chunk aParseTree recTree sel name arg1Tree isMeta prevMethodDefNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1977 |
words changeStream fullParseTree ownerTree ownerName oldDollarSetting| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1978 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1979 |
changeNr isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1980 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1981 |
first look, if not already known |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1982 |
" |
5145 | 1983 |
name := changeClassNames at:changeNr. |
1984 |
name notNil ifTrue:[^ name]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1985 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1986 |
prevMethodDefNr := changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1987 |
[changeIsFollowupMethodChange at:prevMethodDefNr] whileTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1988 |
prevMethodDefNr := prevMethodDefNr - 1. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1989 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1990 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1991 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1992 |
get the chunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1993 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1994 |
chunk := changeChunks at:prevMethodDefNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1995 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1996 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1997 |
(chunk startsWith:'''---') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1998 |
words := chunk asCollectionOfWords. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1999 |
words size > 2 ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2000 |
(words at:2) = 'checkin' ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2001 |
name := words at:3. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2002 |
changeClassNames at:changeNr put:name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2003 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2004 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2005 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2006 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2007 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2008 |
"/ fix it - otherwise, it cannot be parsed |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2009 |
(chunk endsWith:'primitiveDefinitions:') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2010 |
chunk := chunk , '''''' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2011 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2012 |
(chunk endsWith:'primitiveFunctions:') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2013 |
chunk := chunk , '''''' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2014 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2015 |
(chunk endsWith:'primitiveVariables:') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2016 |
chunk := chunk , '''''' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2017 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2018 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2019 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2020 |
use parser to construct a parseTree |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2021 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2022 |
oldDollarSetting := Parser allowDollarInIdentifier. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2023 |
[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2024 |
Parser allowDollarInIdentifier:true. |
5014 | 2025 |
"/ Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
2026 |
"/ do:[ |
|
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
2027 |
aParseTree := Parser parseExpression:chunk. |
5014 | 2028 |
"/ ]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2029 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2030 |
aParseTree == #Error ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2031 |
(chunk includesString:'comment') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2032 |
"/ could be a comment ... |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2033 |
aParseTree := Parser parseExpression:chunk , ''''. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2034 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2035 |
]. |
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3586
diff
changeset
|
2036 |
] ensure:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2037 |
Parser allowDollarInIdentifier:oldDollarSetting |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2038 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2039 |
(aParseTree isNil or:[aParseTree == #Error]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2040 |
^ nil "seems strange ... (could be a comment)" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2041 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2042 |
aParseTree isMessage ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2043 |
^ nil "very strange ... (whats that ?)" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2044 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2045 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2046 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2047 |
ask parser for selector |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2048 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2049 |
sel := aParseTree selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2050 |
recTree := aParseTree receiver. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2051 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2052 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2053 |
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
|
2054 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2055 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2056 |
(#(#'methodsFor:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2057 |
#'privateMethodsFor:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2058 |
#'protectedMethodsFor:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2059 |
#'ignoredMethodsFor:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2060 |
#'publicMethodsFor:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2061 |
#'removeSelector:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2062 |
#'comment:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2063 |
#'primitiveDefinitions:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2064 |
#'primitiveFunctions:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2065 |
#'primitiveVariables:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2066 |
#'renameCategory:to:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2067 |
#'instanceVariableNames:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2068 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2069 |
#'methodsFor:stamp:' "/ Squeak support |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2070 |
#'commentStamp:prior:' "/ Squeak support |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2071 |
#'addClassVarName:' "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
2072 |
#methodsFor "/ Dolphin support |
3472 | 2073 |
#categoriesForClass "/ Dolphin support |
2074 |
#categoriesFor: "/ Dolphin support |
|
2606 | 2075 |
#methods "/ STV support |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2076 |
) includes:sel) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2077 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2078 |
yes, the className is the receiver |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2079 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2080 |
(recTree notNil and:[recTree ~~ #Error]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2081 |
isMeta := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2082 |
recTree isUnaryMessage ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2083 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2084 |
"id class methodsFor:..." |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2085 |
recTree := recTree receiver. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2086 |
isMeta := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2087 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2088 |
recTree isPrimary ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2089 |
name := recTree name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2090 |
isMeta ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2091 |
name := name , ' class'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2092 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2093 |
changeClassNames at:changeNr put:name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2094 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2095 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2096 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2097 |
"more strange things" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2098 |
^ nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2099 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2100 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2101 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2102 |
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
|
2103 |
" |
2322 | 2104 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2105 |
(('subclass:*' match:sel) |
2322 | 2106 |
or:[('variable*ubclass:*' match:sel)]) ifTrue:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2107 |
"/ must parse the full changes text, to get |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2108 |
"/ privacy information. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2109 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2110 |
changeStream := self streamForChange:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2111 |
changeStream notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2112 |
chunk := changeStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2113 |
changeStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2114 |
fullParseTree := Parser parseExpression:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2115 |
(fullParseTree isNil or:[fullParseTree == #Error]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2116 |
fullParseTree := nil |
2396 | 2117 |
] ifFalse:[ |
2118 |
fullParseTree isMessage ifFalse:[ |
|
2119 |
fullParseTree := nil |
|
2120 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2121 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2122 |
"/ actually, the nil case cannot happen |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2123 |
fullParseTree notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2124 |
aParseTree := fullParseTree. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2125 |
sel := aParseTree selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2126 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2127 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2128 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2129 |
arg1Tree := aParseTree arg1. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2130 |
(arg1Tree notNil and:[arg1Tree isConstant]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2131 |
name := arg1Tree value asString. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2132 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2133 |
"/ is it a private-class ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2134 |
('*privateIn:' match:sel) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2135 |
ownerTree := aParseTree args last. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2136 |
ownerName := ownerTree name asString. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2137 |
name := ownerName , '::' , name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2138 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2139 |
changeClassNames at:changeNr put:name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2140 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2141 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2142 |
"very strange" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2143 |
^ nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2144 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2145 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2146 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2147 |
is it a class remove ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2148 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2149 |
(sel == #removeClass:) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2150 |
(recTree notNil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2151 |
and:[recTree ~~ #Error |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2152 |
and:[recTree isPrimary |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2153 |
and:[recTree name = 'Smalltalk']]]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2154 |
arg1Tree := aParseTree arg1. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2155 |
(arg1Tree notNil and:[arg1Tree isPrimary]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2156 |
name := arg1Tree name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2157 |
changeClassNames at:changeNr put:name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2158 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2159 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2160 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2161 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2162 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2163 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2164 |
is it a method category change ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2165 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2166 |
((sel == #category:) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2167 |
or:[sel == #privacy:]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2168 |
(recTree notNil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2169 |
and:[recTree ~~ #Error |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2170 |
and:[recTree isMessage |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2171 |
and:[recTree selector == #compiledMethodAt:]]]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2172 |
isMeta := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2173 |
recTree := recTree receiver. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2174 |
recTree isUnaryMessage ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2175 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2176 |
"id class " |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2177 |
recTree := recTree receiver |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2178 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2179 |
recTree isPrimary ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2180 |
isMeta ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2181 |
name := name , ' class'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2182 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2183 |
name := recTree name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2184 |
changeClassNames at:changeNr put:name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2185 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2186 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2187 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2188 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2189 |
^ nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2190 |
|
2606 | 2191 |
"Modified: / 13.2.2000 / 15:05:28 / cg" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2192 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2193 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2194 |
numberOfChanges |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2195 |
^ changePositions size |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2196 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2197 |
"Created: 3.12.1995 / 18:15:39 / cg" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2198 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2199 |
|
2511 | 2200 |
ownerClassNameOfChange:changeNr |
2201 |
"return the owner classname of a change |
|
2202 |
For a normal class, this is the className; |
|
2203 |
for a private class, this is the name of the owning class" |
|
2204 |
||
4706 | 2205 |
|name "ns idx" cls| |
2511 | 2206 |
|
2207 |
name := self classNameOfChange:changeNr. |
|
2208 |
name isNil ifTrue:[^ nil]. |
|
2209 |
cls := Smalltalk at:name asSymbol. |
|
2210 |
(cls notNil and:[cls isBehavior]) ifTrue:[ |
|
2211 |
cls owningClass notNil ifTrue:[ |
|
2212 |
^ cls owningClass name |
|
2213 |
]. |
|
2214 |
^ cls name |
|
2215 |
]. |
|
2216 |
||
2217 |
"/ (name includes:$:) ifTrue:[ |
|
2218 |
"/ idx := name indexOf:$:. |
|
2219 |
"/ ns := name copyTo:idx-1. |
|
2220 |
"/ ns := Smalltalk at:ns asSymbol. |
|
2221 |
"/ ns notNil ifTrue:[ |
|
2222 |
"/ |
|
2223 |
"/ ]. |
|
2224 |
"/ |
|
2225 |
"/ name := name copyFrom:idx+2. |
|
2226 |
"/ (Smalltalk at:ns asSymbol) notNil ifTrue:[ |
|
2227 |
"/ cls |
|
2228 |
"/ ]. |
|
2229 |
"/ ^ name copyWithoutLast:6 |
|
2230 |
"/ ]. |
|
2231 |
^ name |
|
2232 |
||
2233 |
"Modified: 6.12.1995 / 17:06:31 / cg" |
|
2234 |
! |
|
2235 |
||
3364 | 2236 |
realClassNameOfChange:changeNr |
2237 |
"return the classname of a change" |
|
2238 |
||
2239 |
|name| |
|
2240 |
||
2241 |
name := changeClassNames at:changeNr. |
|
2242 |
name isNil ifTrue:[ |
|
2243 |
name := self fullClassNameOfChange:changeNr. |
|
2244 |
]. |
|
2245 |
^ name |
|
2246 |
||
2247 |
"Modified: / 6.12.1995 / 17:06:31 / cg" |
|
2248 |
"Created: / 5.11.2001 / 18:09:46 / cg" |
|
2249 |
! |
|
2250 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2251 |
selectorOfMethodChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2252 |
"return a method-changes selector, or nil if its not a methodChange" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2253 |
|
3202 | 2254 |
|sel | |
2255 |
||
2256 |
changeSelectors size >= changeNr ifTrue:[ |
|
2257 |
sel := changeSelectors at:changeNr. |
|
2258 |
sel notNil ifTrue:[ ^ sel ]. |
|
2259 |
]. |
|
2260 |
||
2261 |
sel := self extractSelectorOfMethodChange:changeNr. |
|
2262 |
sel notNil ifTrue:[ |
|
2263 |
changeSelectors isNil ifTrue:[ |
|
2264 |
changeSelectors := OrderedCollection new |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2265 |
]. |
3202 | 2266 |
changeSelectors grow:changeNr. |
2267 |
changeSelectors at:changeNr put:sel. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2268 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2269 |
^ sel |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2270 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2271 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2272 |
sourceOfMethodChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2273 |
"return a method-changes source code, or nil if its not a methodChange." |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2274 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2275 |
|aStream chunk sawExcla parseTree sourceChunk sel| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2276 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2277 |
aStream := self streamForChange:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2278 |
aStream isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2279 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2280 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2281 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2282 |
chunk := aStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2283 |
] ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2284 |
chunk := (changeChunks at:changeNr). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2285 |
sawExcla := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2286 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2287 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2288 |
sawExcla ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2289 |
parseTree := Parser parseExpression:chunk. |
2797 | 2290 |
(parseTree notNil |
2291 |
and:[parseTree ~~ #Error |
|
2292 |
and:[parseTree isMessage]]) ifTrue:[ |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2293 |
sel := parseTree selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2294 |
(#( |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2295 |
#methodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2296 |
#privateMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2297 |
#publicMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2298 |
#ignoredMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2299 |
#protectedMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2300 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2301 |
#methodsFor:stamp: "/ Squeak support |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2302 |
#commentStamp:prior: "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
2303 |
#methodsFor "/ Dolphin support |
2606 | 2304 |
#methods "/ STV support |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2305 |
) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2306 |
includes:sel) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2307 |
sourceChunk := aStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2308 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2309 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2310 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2311 |
aStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2312 |
^ sourceChunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2313 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2314 |
"Created: / 5.9.1996 / 17:11:32 / cg" |
2606 | 2315 |
"Modified: / 13.2.2000 / 15:05:45 / cg" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2316 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2317 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2318 |
streamForChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2319 |
"answer a stream for change" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2320 |
|
5702 | 2321 |
|aStream encoding decoder| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2322 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2323 |
(changeNr between:1 and:changePositions size) ifFalse:[^ nil]. |
5702 | 2324 |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2325 |
aStream := changeFileName asFilename readStreamOrNil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2326 |
aStream isNil ifTrue:[^ nil]. |
5702 | 2327 |
|
2328 |
encoding := SourceCodeManagerUtilities guessEncodingOfStream:aStream. |
|
2329 |
encoding notNil ifTrue:[ |
|
2330 |
decoder := CharacterEncoder encoderFor:encoding. |
|
2331 |
aStream := EncodedStream stream:aStream encoder:decoder. |
|
2332 |
]. |
|
2333 |
||
4599
9a95e5ae08ad
code rewritten to be independent of stream zero-base
Claus Gittinger <cg@exept.de>
parents:
4497
diff
changeset
|
2334 |
aStream position1Based:(changePositions at:changeNr). |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2335 |
^ aStream |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2336 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2337 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2338 |
!ChangesBrowser methodsFor:'private-changeFile access'! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2339 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2340 |
changeFileName:aFileName |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2341 |
"set the name of the changeFile" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2342 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2343 |
changeFileName := aFileName |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2344 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2345 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2346 |
checkIfFileHasChanged |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2347 |
"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
|
2348 |
install a timeout for rechecking after some time." |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2349 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2350 |
|f info | |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2351 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2352 |
Processor removeTimedBlock:checkBlock. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2353 |
f := changeFileName asFilename. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2354 |
(info := f info) isNil ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2355 |
self newLabel:'(unaccessable)' |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2356 |
] ifFalse:[ |
3962
3906b10c42fd
modified -> modificationTime
Claus Gittinger <cg@exept.de>
parents:
3930
diff
changeset
|
2357 |
(info modificationTime) > changeFileTimestamp ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2358 |
self newLabel:'(outdated)'. |
3202 | 2359 |
autoUpdate value ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2360 |
self doUpdate |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2361 |
] |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2362 |
] ifFalse:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2363 |
self newLabel:'' |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2364 |
] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2365 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2366 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2367 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2368 |
"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
|
2369 |
"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
|
2370 |
"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
|
2371 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2372 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2373 |
readChangesFile |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2374 |
"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
|
2375 |
and a list of chunk-positions (changePositions)" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2376 |
|
5178 | 2377 |
self readChangesFileInBackground:false. |
2378 |
self newLabel:''. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2379 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2380 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2381 |
readChangesFileInBackground:inBackground |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2382 |
"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
|
2383 |
and a list of chunk-positions (changePositions). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2384 |
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
|
2385 |
the cols are: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2386 |
1 delta (only if comparing) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2387 |
'+' -> new method (w.r.t. current state) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2388 |
'-' -> removed method (w.r.t. current state) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2389 |
'?' -> class does not exist currently |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2390 |
'=' -> change is same as current methods source |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2391 |
2 class/selector |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2392 |
3 type of change |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2393 |
doit |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2394 |
method |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2395 |
category change |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2396 |
4 timestamp |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2397 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2398 |
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
|
2399 |
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
|
2400 |
|
5715 | 2401 |
|inStream maxLen i f chunkText fullChunkText askedForEditingClassSource |
2683 | 2402 |
excla timeStampInfo entry changeDelta changeString changeType |
3067
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2403 |
s changeClass sawExcla category |
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2404 |
chunkPos sel headerLine cls p rec clsName |
2683 | 2405 |
myProcess myPriority myPrioRange |
3472 | 2406 |
done first text methodPos |
2407 |
singleJunkOnly methodChunks classCategoryChunks methodCategoryChunks singleInfo |
|
2683 | 2408 |
ownerTree ownerName |
5696 | 2409 |
m currentText t1 t2 methodSelector nameAndClass encoding decoder| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2410 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2411 |
editingClassSource := false. |
2641 | 2412 |
askedForEditingClassSource := false. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2413 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2414 |
maxLen := 60. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2415 |
|
3674 | 2416 |
self newLabel:'updating ...'. |
2417 |
||
2418 |
(self class isXMLFile:changeFileName) ifTrue:[ |
|
2419 |
^ self class readXMLChangesFromFile:changeFileName inBackground:inBackground |
|
2420 |
]. |
|
2421 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2422 |
f := changeFileName asFilename. |
5715 | 2423 |
inStream := f readStreamOrNil. |
2424 |
inStream isNil ifTrue:[^ nil]. |
|
2425 |
||
2426 |
encoding := SourceCodeManagerUtilities guessEncodingOfStream:inStream. |
|
5696 | 2427 |
encoding notNil ifTrue:[ |
2428 |
decoder := CharacterEncoder encoderFor:encoding. |
|
5715 | 2429 |
inStream := EncodedStream stream:inStream encoder:decoder. |
2430 |
ChangeSet skipEncodingChunkOn:inStream. |
|
5696 | 2431 |
]. |
2432 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2433 |
i := f info. |
3965
e499c0dae8fc
use #fileSize instead of #size
Claus Gittinger <cg@exept.de>
parents:
3962
diff
changeset
|
2434 |
changeFileSize := i fileSize. |
3962
3906b10c42fd
modified -> modificationTime
Claus Gittinger <cg@exept.de>
parents:
3930
diff
changeset
|
2435 |
changeFileTimestamp := i modificationTime. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2436 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2437 |
self withReadCursorDo:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2438 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2439 |
this is a time consuming operation (especially, if reading an |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2440 |
NFS-mounted directory; therefore lower my priority ... |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2441 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2442 |
inBackground ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2443 |
myProcess := Processor activeProcess. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2444 |
myPriority := myProcess priority. |
2295
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2445 |
myPrioRange := myProcess priorityRange. |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2446 |
myProcess priorityRange:(Processor userBackgroundPriority to:Processor activePriority). |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2447 |
"/ myProcess priority:(Processor userBackgroundPriority). |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2448 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2449 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2450 |
[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2451 |
changeChunks := OrderedCollection new. |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2452 |
changeClassNames := OrderedCollection new. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2453 |
changeHeaderLines := OrderedCollection new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2454 |
changePositions := OrderedCollection new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2455 |
changeTimeStamps := OrderedCollection new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2456 |
changeIsFollowupMethodChange := OrderedCollection new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2457 |
|
5715 | 2458 |
excla := inStream class chunkSeparator. |
2459 |
||
2460 |
[inStream atEnd] whileFalse:[ |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2461 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2462 |
get a chunk (separated by excla) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2463 |
" |
5715 | 2464 |
inStream skipSeparators. |
2465 |
chunkPos := inStream position1Based. |
|
2466 |
||
2467 |
||
2468 |
sawExcla := inStream peekFor:excla. |
|
2469 |
chunkText := fullChunkText := inStream nextChunk. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2470 |
chunkText notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2471 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2472 |
(chunkText startsWith:'''---- timestamp ') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2473 |
timeStampInfo := (chunkText copyFrom:16 to:(chunkText size - 6)) withoutSpaces. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2474 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2475 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2476 |
only first line is saved in changeChunks ... |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2477 |
" |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2478 |
"/ index := chunkText indexOf:(Character cr). |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2479 |
"/ (index ~~ 0) ifTrue:[ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2480 |
"/ chunkText := chunkText copyTo:(index - 1). |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2481 |
"/ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2482 |
"/ "take care for comment changes - must still be a |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2483 |
"/ valid expression for classNameOfChange: to work" |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2484 |
"/ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2485 |
"/ (chunkText endsWith:'comment:''') ifTrue:[ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2486 |
"/ chunkText := chunkText , '...''' |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2487 |
"/ ]. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2488 |
"/ (chunkText endsWith:'primitiveDefinitions:''') ifTrue:[ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2489 |
"/ sel := 'primitiveDefinitions:'. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2490 |
"/ chunkText := chunkText copyWithoutLast:1 |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2491 |
"/ ]. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2492 |
"/ (chunkText endsWith:'primitiveVariables:''') ifTrue:[ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2493 |
"/ sel := 'primitiveVariables:'. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2494 |
"/ chunkText := chunkText copyWithoutLast:1 |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2495 |
"/ ]. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2496 |
"/ (chunkText endsWith:'primitiveFunctions:''') ifTrue:[ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2497 |
"/ sel := 'primitiveFunctions:'. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2498 |
"/ chunkText := chunkText copyWithoutLast:1 |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2499 |
"/ ]. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2500 |
"/ ]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2501 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2502 |
changeChunks add:chunkText. |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2503 |
changeClassNames add:nil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2504 |
changePositions add:chunkPos. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2505 |
changeTimeStamps add:timeStampInfo. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2506 |
changeIsFollowupMethodChange add:false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2507 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2508 |
headerLine := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2509 |
changeDelta := ' '. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2510 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2511 |
sawExcla ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2512 |
(chunkText startsWith:'''---- snap') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2513 |
changeType := ''. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2514 |
headerLine := chunkText. |
3598
fd6bf70c705f
remove trailing cr in changeLine of snap/fileIn
Claus Gittinger <cg@exept.de>
parents:
3597
diff
changeset
|
2515 |
changeString := (chunkText contractTo:maxLen) withoutSeparators. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2516 |
timeStampInfo := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2517 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2518 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2519 |
headerLine := chunkText , ' (doIt)'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2520 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2521 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2522 |
first, assume doIt - then lets have a more detailed look ... |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2523 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2524 |
((chunkText startsWith:'''---- file') |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2525 |
or:[(chunkText startsWith:'''---- check')]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2526 |
changeType := ''. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2527 |
timeStampInfo := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2528 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2529 |
changeType := '(doIt)'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2530 |
]. |
3598
fd6bf70c705f
remove trailing cr in changeLine of snap/fileIn
Claus Gittinger <cg@exept.de>
parents:
3597
diff
changeset
|
2531 |
changeString := (chunkText contractTo:maxLen) withoutSeparators. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2532 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2533 |
p := Parser parseExpression:fullChunkText inNameSpace:Smalltalk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2534 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2535 |
p isMessage ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2536 |
sel := p selector. |
2292 | 2537 |
rec := p receiver. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2538 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2539 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2540 |
sel := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2541 |
(Scanner new scanTokens:fullChunkText) size == 0 ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2542 |
"/ a comment only |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2543 |
changeType := '(comment)'. |
2292 | 2544 |
NoColoring ~~ true ifTrue:[ |
3067
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2545 |
changeType := changeType allItalic. |
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2546 |
"/ changeString := changeString allItalic. |
2292 | 2547 |
changeType emphasisAllAdd:(#color -> UserPreferences current commentColor). |
2548 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2549 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2550 |
changeType := '(???)'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2551 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2552 |
]. |
3472 | 2553 |
|
2291 | 2554 |
(sel == #comment:) ifTrue:[ |
2555 |
changeType := '(comment)'. |
|
2292 | 2556 |
clsName := rec name. |
3472 | 2557 |
changeClass := (self nameSpaceForApply) classNamed:clsName. |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2558 |
changeClassNames at:changeClassNames size put:clsName. |
2292 | 2559 |
NoColoring ~~ true ifTrue:[ |
3067
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2560 |
changeType := changeType allItalic. |
2292 | 2561 |
changeType emphasisAllAdd:(#color -> UserPreferences current commentColor). |
3067
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2562 |
"/ changeString := clsName allItalic. |
2570 | 2563 |
]. |
3202 | 2564 |
autoCompare value ifTrue:[ |
2570 | 2565 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
2566 |
changeDelta := '?' |
|
2567 |
] ifFalse:[ |
|
2568 |
(changeClass comment = (p args at:1) evaluate) ifTrue:[ |
|
2569 |
changeDelta := '='. |
|
2570 |
] |
|
2571 |
] |
|
2573 | 2572 |
]. |
2573 |
sel := nil. |
|
2291 | 2574 |
]. |
2575 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2576 |
(sel == #removeSelector:) ifTrue:[ |
3472 | 2577 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec. |
2578 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
|
2579 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2580 |
sel := (p args at:1) evaluate. |
3472 | 2581 |
changeClassNames at:changeClassNames size put:clsName. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2582 |
|
3202 | 2583 |
autoCompare value ifTrue:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2584 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2585 |
changeDelta := '?' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2586 |
] ifFalse:[ |
3586
b7d499c7ab7a
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
3554
diff
changeset
|
2587 |
(changeClass includesSelector:sel asSymbol) ifTrue:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2588 |
changeDelta := '-'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2589 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2590 |
changeDelta := '='. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2591 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2592 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2593 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2594 |
changeType := '(remove)'. |
3472 | 2595 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
2573 | 2596 |
sel := nil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2597 |
]. |
3472 | 2598 |
|
4426 | 2599 |
(p notNil |
2600 |
and:[p ~~ #Error |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2601 |
and:[p isMessage |
2292 | 2602 |
and:[rec isMessage |
4426 | 2603 |
and:[rec selector == #compiledMethodAt:]]]]) ifTrue:[ |
3472 | 2604 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec receiver. |
2605 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
|
2606 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2607 |
(sel == #category:) ifTrue:[ |
2292 | 2608 |
sel := (rec args at:1) evaluate. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2609 |
changeType := '(category change)'. |
3472 | 2610 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
2611 |
changeClassNames at:changeClassNames size put:clsName. |
|
3069
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2612 |
changeClass notNil ifTrue:[ |
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2613 |
m := changeClass compiledMethodAt:sel asSymbol. |
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2614 |
m notNil ifTrue:[ |
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2615 |
m category = (p args at:1) evaluate ifTrue:[ |
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2616 |
changeDelta := '='. |
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2617 |
] |
3065 | 2618 |
] |
2619 |
]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2620 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2621 |
(sel == #privacy:) ifTrue:[ |
2292 | 2622 |
sel := (rec args at:1) evaluate. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2623 |
changeType := '(privacy change)'. |
3472 | 2624 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
2625 |
changeClassNames at:changeClassNames size put:clsName. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2626 |
]. |
2573 | 2627 |
sel := nil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2628 |
]. |
3472 | 2629 |
|
2290 | 2630 |
(Class definitionSelectors includes:sel) ifTrue:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2631 |
changeType := '(class definition)'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2632 |
clsName := (p args at:1) evaluate. |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2633 |
changeClassNames at:changeClassNames size put:clsName. |
2683 | 2634 |
|
2635 |
"/ is it a private-class ? |
|
2636 |
('*privateIn:' match:sel) ifTrue:[ |
|
2637 |
ownerTree := p args last. |
|
2638 |
ownerName := ownerTree name asString. |
|
2639 |
clsName := ownerName , '::' , clsName |
|
2640 |
]. |
|
2641 |
||
2290 | 2642 |
changeString := clsName. |
2292 | 2643 |
NoColoring ~~ true ifTrue:[ |
2867 | 2644 |
changeType := changeType allBold. |
2645 |
changeString := changeString allBold. |
|
2573 | 2646 |
]. |
2647 |
||
3202 | 2648 |
autoCompare value ifTrue:[ |
3472 | 2649 |
cls := (self nameSpaceForApply) at:clsName asSymbol ifAbsent:nil. |
2573 | 2650 |
cls isNil ifTrue:[ |
2651 |
changeDelta := '+'. |
|
2652 |
] ifFalse:[ |
|
3472 | 2653 |
(cls definitionSelector = sel |
2654 |
or:[ |
|
2655 |
"/ could be an ST/V, VAge or Dolphin definition |
|
2656 |
cls definitionSelector = (sel , 'category:') |
|
2657 |
]) |
|
2658 |
ifTrue:[ |
|
2816 | 2659 |
((cls superclass isNil |
2660 |
and:[p receiver isConstant |
|
2661 |
and:[p receiver evaluate isNil]]) |
|
2662 |
or:[ |
|
2663 |
cls superclass notNil |
|
2664 |
and:[p receiver isConstant not |
|
2665 |
and:[cls superclass name = p receiver name]] |
|
2666 |
]) ifTrue:[ |
|
2667 |
cls instanceVariableString asCollectionOfWords = (p args at:2) evaluate asCollectionOfWords ifTrue:[ |
|
2668 |
cls classVariableString asCollectionOfWords = (p args at:3) evaluate asCollectionOfWords ifTrue:[ |
|
2669 |
(p args at:4) evaluate isEmpty ifTrue:[ |
|
3472 | 2670 |
cls definitionSelector = (sel , 'category:') |
2671 |
ifTrue:[ |
|
2672 |
"/ ST/V, VAge or Dolphin definition |
|
2816 | 2673 |
changeDelta := '='. |
2674 |
] ifFalse:[ |
|
3472 | 2675 |
cls category = (p args at:5) evaluate ifTrue:[ |
2676 |
changeDelta := '='. |
|
2677 |
] ifFalse:[ |
|
2678 |
changeType := '(class category change)'. |
|
2679 |
] |
|
2816 | 2680 |
] |
2681 |
] |
|
2682 |
] |
|
2683 |
] |
|
2684 |
] |
|
3472 | 2685 |
] |
2573 | 2686 |
] |
2687 |
]. |
|
2688 |
sel := nil. |
|
2265 | 2689 |
] ifFalse:[ |
2690 |
(#( |
|
2691 |
#'primitiveDefinitions:' |
|
2692 |
#'primitiveFunctions:' |
|
2693 |
#'primitiveVariables:' |
|
2694 |
) includes:sel) ifTrue:[ |
|
2695 |
changeType := '(class definition)'. |
|
2292 | 2696 |
clsName := rec evaluate. |
2816 | 2697 |
] ifFalse:[ |
2698 |
((sel == #instanceVariableNames:) |
|
2699 |
and:[rec isMessage |
|
2700 |
and:[rec selector == #class]]) ifTrue:[ |
|
2701 |
clsName := rec receiver name. |
|
3472 | 2702 |
changeClass := (self nameSpaceForApply) classNamed:clsName. |
2816 | 2703 |
changeType := '(class definition)'. |
2704 |
changeClassNames at:changeClassNames size put:clsName. |
|
2705 |
||
3202 | 2706 |
autoCompare value ifTrue:[ |
2816 | 2707 |
changeClass isNil ifTrue:[ |
2708 |
changeDelta := '?'. |
|
2709 |
] ifFalse:[ |
|
2710 |
s := (p args at:1) evaluate. |
|
2711 |
s = changeClass class instanceVariableString ifTrue:[ |
|
2712 |
changeDelta := '='. |
|
2713 |
] |
|
2714 |
] |
|
2715 |
]. |
|
2716 |
] |
|
2265 | 2717 |
] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2718 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2719 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2720 |
] ifTrue:[ "sawExcla" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2721 |
singleJunkOnly := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2722 |
methodChunks := false. |
3472 | 2723 |
classCategoryChunks := methodCategoryChunks := false. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2724 |
singleInfo := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2725 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2726 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2727 |
method definitions actually consist of |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2728 |
two (or more) chunks; skip next chunk(s) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2729 |
up to an empty one. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2730 |
The system only writes one chunk, |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2731 |
and we cannot handle more in this ChangesBrowser .... |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2732 |
" |
3472 | 2733 |
clsName := nil. |
2734 |
p := Parser parseExpression:chunkText inNameSpace:(self nameSpaceForApply). |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2735 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2736 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
3472 | 2737 |
rec := p receiver. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2738 |
sel := p selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2739 |
(#( |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2740 |
#methodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2741 |
#privateMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2742 |
#publicMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2743 |
#ignoredMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2744 |
#protectedMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2745 |
#methodsFor:stamp: "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
2746 |
#'commentStamp:prior:' "/ Squeak support |
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
2747 |
#methodsFor "/ Dolphin support |
3472 | 2748 |
#categoriesForClass "/ Dolphin support |
2749 |
#categoriesFor: "/ Dolphin support |
|
2606 | 2750 |
#methods "/ STV support |
3487 | 2751 |
#publicMethods "/ STV support |
3676 | 2752 |
#methodsForUndefined: |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2753 |
) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2754 |
includes:sel) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2755 |
methodChunks := true. |
3472 | 2756 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec. |
2757 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
|
2758 |
||
2759 |
sel == #categoriesForClass ifTrue:[ |
|
2760 |
methodChunks := false. |
|
2761 |
classCategoryChunks := true. |
|
2762 |
changeType := '(class category change)'. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2763 |
] ifFalse:[ |
3472 | 2764 |
sel == #categoriesFor: ifTrue:[ |
2765 |
methodChunks := false. |
|
2766 |
methodCategoryChunks := true. |
|
2767 |
changeType := '(category change)'. |
|
2768 |
methodSelector := (p args at:1) evaluate. |
|
2769 |
] ifFalse:[ |
|
2770 |
(sel == #'methodsFor') ifTrue:[ |
|
2771 |
category := 'Dolphin methods'. |
|
2772 |
] ifFalse:[ |
|
3487 | 2773 |
((sel == #methods) or:[sel == #publicMethods]) ifTrue:[ |
3472 | 2774 |
category := 'STV methods'. |
2775 |
] ifFalse:[ |
|
2776 |
category := (p args at:1) evaluate. |
|
2777 |
] |
|
2778 |
]. |
|
2779 |
]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2780 |
]. |
3472 | 2781 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2782 |
sel == #'methodsFor:stamp:' ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2783 |
"/ Squeak timeStamp |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2784 |
timeStampInfo := (p args at:2) evaluate. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2785 |
singleInfo := true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2786 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2787 |
sel == #'commentStamp:prior:' ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2788 |
singleJunkOnly := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2789 |
methodChunks := false. |
2301 | 2790 |
] |
2791 |
] |
|
2792 |
] ifFalse:[ |
|
2793 |
sel == #reorganize ifTrue:[ |
|
2794 |
singleJunkOnly := true. |
|
2795 |
methodChunks := false. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2796 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2797 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2798 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2799 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2800 |
done := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2801 |
first := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2802 |
[done] whileFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2803 |
changeDelta := ' '. |
5715 | 2804 |
methodPos := inStream position1Based. |
2805 |
||
2806 |
text := inStream nextChunk. |
|
3472 | 2807 |
done := text isNil or:[text isEmpty]. |
2808 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2809 |
done ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2810 |
first ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2811 |
changeChunks add:chunkText. |
3472 | 2812 |
changeClassNames add:clsName. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2813 |
changePositions add:methodPos. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2814 |
changeTimeStamps add:timeStampInfo. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2815 |
changeIsFollowupMethodChange add:true. |
2641 | 2816 |
askedForEditingClassSource ifFalse:[ |
2863 | 2817 |
(changeFileName asFilename hasSuffix:'st') ifFalse:[ |
5702 | 2818 |
editingClassSource := false. |
2819 |
" |
|
2820 |
editingClassSource := (self confirm:'Multiple method chunks without individual ''methodsFor:'' encountered. |
|
2635
4ac62d4f2346
care for malformed changes file and ask
Claus Gittinger <cg@exept.de>
parents:
2606
diff
changeset
|
2821 |
Is this a class-file being browsed ?') |
5702 | 2822 |
" |
2641 | 2823 |
] ifTrue:[ |
2824 |
editingClassSource := true. |
|
2825 |
]. |
|
2826 |
askedForEditingClassSource := true. |
|
2635
4ac62d4f2346
care for malformed changes file and ask
Claus Gittinger <cg@exept.de>
parents:
2606
diff
changeset
|
2827 |
] |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2828 |
] ifTrue:[ |
3472 | 2829 |
changeClassNames at:changeClassNames size put:clsName. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2830 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2831 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2832 |
first := false. |
3472 | 2833 |
|
2834 |
(classCategoryChunks or:[methodCategoryChunks]) ifTrue:[ |
|
2835 |
text := text asCollectionOfLines first asString. |
|
2836 |
classCategoryChunks ifTrue:[ |
|
2837 |
changeClass isNil ifTrue:[ |
|
2838 |
changeDelta := '?'. |
|
2839 |
] ifFalse:[ |
|
2840 |
changeClass category = text ifTrue:[ |
|
2841 |
changeDelta := '='. |
|
2842 |
] |
|
2843 |
]. |
|
2844 |
changeString := clsName , ' category: ' , text storeString. |
|
2845 |
]ifFalse:[ |
|
2846 |
changeString := '(' , clsName , ' compiledMethodAt:' , methodSelector storeString , ') category: ' , text storeString. |
|
2847 |
]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2848 |
] ifFalse:[ |
3472 | 2849 |
" |
2850 |
try to find the selector |
|
2851 |
" |
|
2852 |
methodSelector := nil. |
|
2853 |
clsName notNil ifTrue:[ |
|
2854 |
methodChunks ifTrue:[ |
|
2855 |
p := Parser |
|
2856 |
parseMethodSpecification:text |
|
2857 |
in:nil |
|
2858 |
ignoreErrors:true |
|
2859 |
ignoreWarnings:true. |
|
2860 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
|
2861 |
methodSelector := p selector. |
|
2862 |
] |
|
2863 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2864 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2865 |
|
3472 | 2866 |
methodSelector isNil ifTrue:[ |
2867 |
changeString := (chunkText contractTo:maxLen). |
|
2868 |
changeType := '(change)'. |
|
2869 |
headerLine := chunkText , ' (change)'. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2870 |
] ifFalse:[ |
3472 | 2871 |
changeString := self contractClass:clsName selector:methodSelector to:maxLen. |
2872 |
changeType := '{ ' , category , ' }'. |
|
2873 |
headerLine := clsName , ' ' , methodSelector , ' ' , '(change category: ''' , category , ''')'. |
|
2874 |
]. |
|
2875 |
||
2876 |
autoCompare value ifTrue:[ |
|
2877 |
changeClass isNil ifFalse:[ |
|
2878 |
cls := changeClass theNonMetaclass |
|
2879 |
]. |
|
2880 |
||
2881 |
(changeClass isNil or:[methodSelector isNil or:[cls isLoaded not]]) ifTrue:[ |
|
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
2882 |
changeClass isNil ifTrue:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
2883 |
changeDelta := '+' |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
2884 |
] ifFalse:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
2885 |
changeDelta := '?' |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
2886 |
] |
3472 | 2887 |
] ifFalse:[ |
3586
b7d499c7ab7a
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
3554
diff
changeset
|
2888 |
(changeClass includesSelector:methodSelector asSymbol) ifFalse:[ |
3472 | 2889 |
changeDelta := '+'. |
2890 |
] ifTrue:[ |
|
2891 |
m := changeClass compiledMethodAt:methodSelector asSymbol. |
|
2892 |
currentText := m source. |
|
2893 |
currentText notNil ifTrue:[ |
|
2894 |
text asString string withoutTrailingSeparators = currentText asString string withoutTrailingSeparators ifTrue:[ |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2895 |
changeDelta := '=' |
3472 | 2896 |
] ifFalse:[ |
2897 |
t1 := currentText asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
2898 |
t2 := text asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
2899 |
t1 = t2 ifTrue:[ |
|
2900 |
changeDelta := '=' |
|
2901 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2902 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2903 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2904 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2905 |
] |
3472 | 2906 |
]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2907 |
]. |
3472 | 2908 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2909 |
entry := MultiColListEntry new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2910 |
entry tabulatorSpecification:tabSpec. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2911 |
entry colAt:1 put:changeDelta. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2912 |
entry colAt:2 put:changeString. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2913 |
entry colAt:3 put:changeType. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2914 |
timeStampInfo notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2915 |
entry colAt:4 put:timeStampInfo. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2916 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2917 |
changeHeaderLines add:entry |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2918 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2919 |
changeString := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2920 |
headerLine := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2921 |
singleJunkOnly ifTrue:[done := true] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2922 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2923 |
singleInfo ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2924 |
timeStampInfo := nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2925 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2926 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2927 |
changeString notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2928 |
entry := MultiColListEntry new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2929 |
entry tabulatorSpecification:tabSpec. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2930 |
entry colAt:1 put:changeDelta. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2931 |
entry colAt:2 put:changeString. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2932 |
entry colAt:3 put:changeType. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2933 |
timeStampInfo notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2934 |
entry colAt:4 put:timeStampInfo. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2935 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2936 |
changeHeaderLines add:entry |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2937 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2938 |
headerLine notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2939 |
changeHeaderLines add:headerLine |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2940 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2941 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2942 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2943 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2944 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2945 |
anyChanges := false |
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3586
diff
changeset
|
2946 |
] ensure:[ |
5715 | 2947 |
inStream close. |
2295
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2948 |
inBackground ifTrue:[ |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2949 |
myProcess priority:myPriority. |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2950 |
myProcess priorityRange:myPrioRange. |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2951 |
]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2952 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2953 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2954 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2955 |
self checkIfFileHasChanged |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2956 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2957 |
"Modified: / 27.8.1995 / 23:06:55 / claus" |
3378
a13d1dfdf7e5
use symbols as key when accesing smalltalk
Claus Gittinger <cg@exept.de>
parents:
3364
diff
changeset
|
2958 |
"Modified: / 9.11.2001 / 02:24:46 / cg" |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2959 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2960 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2961 |
writeBackChanges |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2962 |
"write back the changes file. To avoid problems when the disk is full |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2963 |
or a crash occurs while writing (well, or someone kills us), |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2964 |
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
|
2965 |
rename the old change-file to a .bak file and finally rename the |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2966 |
tempfile back to the change-file. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2967 |
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
|
2968 |
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
|
2969 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2970 |
|inStream outStream tempfile stamp f| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2971 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2972 |
editingClassSource ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2973 |
(self confirm:'You are editing a classes sourceFile (not a changeFile) !!\\Are you certain, you want to overwrite it ?' withCRs) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2974 |
ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2975 |
^ false |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2976 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2977 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2978 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2979 |
tempfile := Filename newTemporaryIn:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2980 |
tempfile exists ifTrue:[tempfile remove]. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2981 |
[ |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2982 |
outStream := tempfile writeStream. |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2983 |
inStream := changeFileName asFilename readStreamOrNil. |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2984 |
] on:FileStream openErrorSignal do:[:ex| |
5715 | 2985 |
self warn:'Cannot create temp file in current directory.'. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2986 |
^ false |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2987 |
]. |
5715 | 2988 |
outStream nextPutLine:'"{ Encoding: utf8 }" !!'. |
5733 | 2989 |
outStream := EncodedStream stream:outStream encoder:(CharacterEncoder encoderForUTF8). |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2990 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2991 |
self withCursor:(Cursor write) do:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2992 |
|excla sawExcla done first chunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2993 |
nChanges "{Class:SmallInteger}" | |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2994 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2995 |
Stream writeErrorSignal handle:[:ex | |
5715 | 2996 |
self warn:('Could not update the changes file.\\' , ex description) withCRs. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2997 |
tempfile exists ifTrue:[tempfile remove]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2998 |
^ false |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2999 |
] do:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3000 |
excla := inStream class chunkSeparator. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3001 |
nChanges := self numberOfChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3002 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3003 |
1 to:nChanges do:[:index | |
4599
9a95e5ae08ad
code rewritten to be independent of stream zero-base
Claus Gittinger <cg@exept.de>
parents:
4497
diff
changeset
|
3004 |
inStream position1Based:(changePositions at:index). |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3005 |
sawExcla := inStream peekFor:excla. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3006 |
chunk := inStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3007 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3008 |
(chunk notNil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3009 |
and:[(chunk startsWith:'''---- snap') not]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3010 |
(stamp := changeTimeStamps at:index) notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3011 |
outStream nextPutAll:'''---- timestamp ' , stamp , ' ----'''. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3012 |
outStream nextPut:excla; cr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3013 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3014 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3015 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3016 |
sawExcla ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3017 |
outStream nextPut:excla. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3018 |
outStream nextChunkPut:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3019 |
outStream cr; cr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3020 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3021 |
a method-definition chunk - output followups |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3022 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3023 |
done := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3024 |
first := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3025 |
[done] whileFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3026 |
chunk := inStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3027 |
chunk isNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3028 |
outStream cr; cr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3029 |
done := true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3030 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3031 |
chunk isEmpty ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3032 |
outStream space; nextChunkPut:chunk; cr; cr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3033 |
done := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3034 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3035 |
first ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3036 |
outStream cr; cr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3037 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3038 |
outStream nextChunkPut:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3039 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3040 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3041 |
first := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3042 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3043 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3044 |
outStream nextChunkPut:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3045 |
outStream cr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3046 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3047 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3048 |
outStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3049 |
inStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3050 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3051 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3052 |
f := changeFileName asFilename. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3053 |
f renameTo:(f withSuffix:'bak'). |
2466
66842be773bd
care for cross-device rename
Claus Gittinger <cg@exept.de>
parents:
2451
diff
changeset
|
3054 |
tempfile renameOrCopyTo:changeFileName. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3055 |
anyChanges := false |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3056 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3057 |
^ true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3058 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3059 |
"Modified: / 2.12.1996 / 22:29:15 / stefan" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3060 |
"Modified: / 21.4.1998 / 17:50:11 / cg" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3061 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3062 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3063 |
!ChangesBrowser methodsFor:'private-user interaction ops'! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3064 |
|
5735 | 3065 |
appendChange:changeNr toFile:aFileNameOrFileNameString |
202 | 3066 |
"append change to a file. return true if ok." |
3067 |
||
5735 | 3068 |
|fileName changeInStream outStream chunk chunk2 sawExcla separator encoding| |
3069 |
||
3070 |
changeInStream := self streamForChange:changeNr. |
|
3071 |
changeInStream isNil ifTrue:[ |
|
3991 | 3072 |
self warn:'Cannot read change'. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3073 |
^ false |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3074 |
]. |
5735 | 3075 |
changeInStream skipSeparators. |
3076 |
||
3077 |
separator := changeInStream class chunkSeparator. |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3078 |
|
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3079 |
(self changeIsFollowupMethodChange:changeNr) ifTrue:[ |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3080 |
sawExcla := true. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3081 |
chunk := changeChunks at:changeNr. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3082 |
] ifFalse:[ |
5735 | 3083 |
sawExcla := changeInStream peekFor:separator. |
3084 |
chunk := changeInStream nextChunk. |
|
3991 | 3085 |
]. |
3086 |
chunk withoutSeparators isEmpty ifTrue:[ |
|
5735 | 3087 |
self error:'Empty chunk - should not happen'. |
3088 |
]. |
|
3089 |
||
3090 |
self halt. |
|
3091 |
fileName := aFileNameOrFileNameString asFilename. |
|
3092 |
fileName exists ifTrue:[ |
|
3093 |
encoding := SourceCodeManagerUtilities guessEncodingOfFile:fileName. |
|
3094 |
] ifFalse:[ |
|
3095 |
encoding := #utf8. |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3096 |
]. |
202 | 3097 |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
3098 |
[ |
5735 | 3099 |
outStream := fileName readWriteStream. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
3100 |
] on:FileStream openErrorSignal do:[:ex| |
5735 | 3101 |
self warn:'Cannot update file: ''%1''' with:fileName. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
3102 |
^ false |
73 | 3103 |
]. |
202 | 3104 |
|
5735 | 3105 |
encoding notNil ifTrue:[ |
3106 |
outStream := EncodedStream stream:outStream encoder:(CharacterEncoder encoderFor:encoding). |
|
3107 |
outStream nextPutLine:'"{ Encoding: utf8 }" !!'. |
|
3108 |
]. |
|
3109 |
||
202 | 3110 |
outStream setToEnd. |
3111 |
||
3112 |
sawExcla ifTrue:[ |
|
1472 | 3113 |
outStream nextPut:separator |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3114 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3115 |
outStream nextChunkPut:chunk; cr. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3116 |
sawExcla ifTrue:[ |
5735 | 3117 |
chunk2 := changeInStream nextChunk. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3118 |
chunk2 withoutSeparators isEmpty ifTrue:[ |
5735 | 3119 |
self error:'Empty chunk - should not happen'. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3120 |
]. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3121 |
outStream nextChunkPut:chunk2; space |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3122 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3123 |
sawExcla ifTrue:[ |
1472 | 3124 |
outStream nextPut:separator |
202 | 3125 |
]. |
3126 |
outStream cr. |
|
5735 | 3127 |
|
3128 |
changeInStream close. |
|
202 | 3129 |
outStream close. |
3130 |
^ true |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3131 |
|
1472 | 3132 |
"Modified: / 6.2.1998 / 13:03:54 / cg" |
73 | 3133 |
! |
3134 |
||
51 | 3135 |
applyChange:changeNr |
3136 |
"fileIn a change" |
|
3137 |
||
3091 | 3138 |
|aStream applyAction nameSpace className changeClass ownerName ownerClass |
3339
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3139 |
sig reader doItChunk methodsForChunk pkg |
4877 | 3140 |
alternativeClass shortName orgClassName nsClass aborted| |
45 | 3141 |
|
51 | 3142 |
aStream := self streamForChange:changeNr. |
3143 |
aStream isNil ifTrue:[^ self]. |
|
3144 |
||
2965 | 3145 |
className := self classNameOfChange:changeNr. |
3146 |
className notNil ifTrue:[ |
|
3472 | 3147 |
className := className asSymbol. |
3148 |
changeClass := Smalltalk at:className ifAbsent:[]. |
|
2965 | 3149 |
changeClass notNil ifTrue:[ |
3150 |
changeClass isLoaded ifFalse:[ |
|
3151 |
changeClass autoload |
|
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3152 |
] |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3153 |
] |
51 | 3154 |
]. |
45 | 3155 |
|
51 | 3156 |
changeNrProcessed := changeNr. |
4877 | 3157 |
aborted := false. |
45 | 3158 |
|
5735 | 3159 |
applyAction := |
3160 |
[ |
|
3161 |
(skipSignal notNil) ifTrue:[ |
|
3162 |
sig := skipSignal |
|
3163 |
] ifFalse:[ |
|
3164 |
sig := AbortOperationRequest |
|
3165 |
]. |
|
3166 |
sig handle:[:ex | |
|
3167 |
aborted := true. |
|
3168 |
ex return. |
|
3169 |
] do:[ |
|
3170 |
nameSpace := self nameSpaceForApply. |
|
3171 |
||
3172 |
pkg := enforcedPackage ? Class packageQuerySignal query. |
|
3173 |
Class packageQuerySignal answer:pkg |
|
3174 |
do:[ |
|
3175 |
Class nameSpaceQuerySignal answer:nameSpace |
|
3176 |
do:[ |
|
3177 |
"/ a followup methodsFor: chunk ... |
|
3178 |
(self changeIsFollowupMethodChange:changeNr) ifTrue:[ |
|
3179 |
methodsForChunk := (changeChunks at:changeNr). |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3180 |
] ifFalse:[ |
5735 | 3181 |
doItChunk := aStream nextChunk. "/ an empty chunk sometimes ... |
3182 |
doItChunk notEmpty ifTrue:[ |
|
3183 |
Compiler evaluate:doItChunk notifying:self. |
|
3184 |
] ifFalse:[ |
|
3185 |
methodsForChunk := aStream nextChunk. "/ the real one |
|
3186 |
] |
|
3187 |
]. |
|
3188 |
methodsForChunk notNil ifTrue:[ |
|
3189 |
changeClass isNil ifTrue:[ |
|
3190 |
orgClassName := className. |
|
3191 |
||
3192 |
(className includes:$:) ifTrue:[ |
|
3193 |
ownerName := className copyTo:(className lastIndexOf:$:) - 1. |
|
3194 |
(ownerName endsWith:$:) ifTrue:[ |
|
3195 |
ownerName := ownerName copyWithoutLast:1. |
|
3196 |
]. |
|
3197 |
||
3198 |
ownerClass := Smalltalk at:(ownerName asSymbol) ifAbsent:[]. |
|
3199 |
ownerClass notNil ifTrue:[ |
|
3200 |
ownerClass isLoaded ifFalse:[ |
|
3201 |
ownerClass autoload |
|
3202 |
] |
|
3203 |
]. |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3204 |
]. |
5735 | 3205 |
(nameSpace notNil and:[nameSpace ~~ Smalltalk]) ifTrue:[ |
3206 |
changeClass := nameSpace at:className ifAbsent:[]. |
|
3207 |
]. |
|
3208 |
changeClass isNil ifTrue:[ |
|
3209 |
changeClass := Smalltalk at:className ifAbsent:[]. |
|
3210 |
]. |
|
3211 |
[changeClass isNil] whileTrue:[ |
|
3212 |
(NameSpace allNamespaces |
|
3213 |
detect:[:ns | (nsClass := (ns at:className)) notNil] ifNone:nil) |
|
3214 |
notNil ifTrue:[ |
|
3215 |
shortName := nsClass name. |
|
3216 |
] ifFalse:[ |
|
3217 |
shortName := className copyFrom:(className lastIndexOf:$:) + 1. |
|
3218 |
shortName = className ifTrue:[ |
|
3219 |
shortName := '' |
|
3220 |
]. |
|
3221 |
]. |
|
3222 |
className := Dialog |
|
3223 |
request:'No class ''' , className , ''' for change. Add to which class ?' |
|
3224 |
initialAnswer:shortName. |
|
3225 |
||
3226 |
className size == 0 ifTrue:[ |
|
3227 |
^ self |
|
3228 |
]. |
|
3229 |
alternativeClass := Smalltalk classNamed:className. |
|
3230 |
alternativeClass notNil ifTrue:[ |
|
3231 |
changeClass := alternativeClass |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3232 |
] |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3233 |
]. |
5735 | 3234 |
methodsForChunk := methodsForChunk copyFrom:(methodsForChunk indexOfSeparator). |
3235 |
methodsForChunk := changeClass name , methodsForChunk. |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3236 |
]. |
5735 | 3237 |
|
3238 |
reader := Compiler evaluate:methodsForChunk notifying:self. |
|
3239 |
reader fileInFrom:aStream notifying:self passChunk:false single:true. |
|
3240 |
] |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3241 |
] |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3242 |
] |
5735 | 3243 |
]. |
3244 |
changeNrProcessed := nil. |
|
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3245 |
]. |
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3246 |
|
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3247 |
"/ |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3248 |
"/ if I am showing the changes file, dont update it |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3249 |
"/ |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3250 |
changeFileName = ObjectMemory nameForChanges ifTrue:[ |
3319 | 3251 |
Class withoutUpdatingChangesDo:[ |
4928 | 3252 |
Class updateChangeListQuerySignal answer:updateChangeSet value do:applyAction |
3319 | 3253 |
] |
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3254 |
] ifFalse:[ |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3255 |
applyAction value |
45 | 3256 |
]. |
4877 | 3257 |
aStream close. |
3258 |
||
3259 |
^ aborted not |
|
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3260 |
|
3436
c4fe19deba58
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3406
diff
changeset
|
3261 |
"Modified: / 16.11.2001 / 17:38:06 / cg" |
45 | 3262 |
! |
3263 |
||
255 | 3264 |
compareChange:changeNr |
2835 | 3265 |
"compare a change with the current (in-image) version; show the result of the compare (as dialog)" |
3266 |
||
3267 |
^ self compareChange:changeNr showResult:true |
|
3268 |
! |
|
3269 |
||
3270 |
compareChange:changeNr showResult:doShowResult |
|
3271 |
"compare a change with current version. |
|
3272 |
Return the result of the compare (same -> true, different -> false, uncomparable -> nil). |
|
3273 |
If doShowResult is true, the outcome is shown in a dialog/diffViewer." |
|
255 | 3274 |
|
3275 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
724
diff
changeset
|
3276 |
parser sel oldMethod outcome showDiff d t1 t2 selector isLoaded |
2835 | 3277 |
method beep superClass thisClassSym varsHere varsInChange addedVars removedVars |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3278 |
isSame ownerClass superClassHere superClassInChange| |
255 | 3279 |
|
3280 |
aStream := self streamForChange:changeNr. |
|
2835 | 3281 |
aStream isNil ifTrue:[^ nil]. |
255 | 3282 |
|
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
3283 |
showDiff := false. |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
3284 |
|
1472 | 3285 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
3286 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
|
3287 |
chunk := aStream nextChunk. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3288 |
] ifTrue:[ |
1472 | 3289 |
chunk := (changeChunks at:changeNr). |
3290 |
sawExcla := true. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3291 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3292 |
|
2835 | 3293 |
isSame := nil. |
3294 |
||
761 | 3295 |
beep := false. |
255 | 3296 |
sawExcla ifFalse:[ |
1472 | 3297 |
outcome := 'cannot compare this change\\(i.e. this is not a method change).'. |
3298 |
||
3472 | 3299 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3300 |
do:[ |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3301 |
parseTree := Parser parseExpression:chunk. |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3302 |
]. |
2835 | 3303 |
(parseTree notNil and:[parseTree ~~ #Error and:[ parseTree isMessage ]]) ifTrue:[ |
2571 | 3304 |
selector := parseTree selector. |
3305 |
||
3306 |
selector == #'removeSelector:' ifTrue:[ |
|
1472 | 3307 |
thisClass := (parseTree receiver evaluate). |
3308 |
thisClass isBehavior ifTrue:[ |
|
3309 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
3310 |
selector := (parseTree arg1 evaluate). |
|
3311 |
(thisClass includesSelector:selector) ifTrue:[ |
|
3455 | 3312 |
outcome := 'Change removes the #' , selector , ' method from ' , thisClass name. |
2835 | 3313 |
isSame := false. |
1472 | 3314 |
] ifFalse:[ |
3455 | 3315 |
outcome := 'Change has no effect\\(there is no method for #' , selector , ' in ' , thisClass name , ')'. |
2835 | 3316 |
isSame := true. |
1472 | 3317 |
] |
3318 |
] ifFalse:[ |
|
3319 |
beep := true. |
|
3455 | 3320 |
outcome := 'Cannot compare this change (compare requires class to be loaded).'. |
2835 | 3321 |
isSame := nil. |
1472 | 3322 |
] |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3323 |
] ifFalse:[ |
3455 | 3324 |
outcome := 'Cannot compare this change (class not present)'. |
2835 | 3325 |
isSame := nil. |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3326 |
]. |
1472 | 3327 |
]. |
2571 | 3328 |
selector == #'category:' ifTrue:[ |
1472 | 3329 |
parseTree receiver isMessage ifTrue:[ |
3330 |
parseTree receiver selector == #compiledMethodAt: ifTrue:[ |
|
3331 |
(method := parseTree receiver evaluate) isMethod ifTrue:[ |
|
3332 |
method category = parseTree arg1 evaluate ifTrue:[ |
|
3455 | 3333 |
outcome := 'Change has no effect\\(same category)'. |
2835 | 3334 |
isSame := true. |
1472 | 3335 |
] ifFalse:[ |
3455 | 3336 |
outcome := 'Category is different (''' , method category , ''' vs. ''' , parseTree arg1 evaluate , ''')'. |
2835 | 3337 |
isSame := false. |
1472 | 3338 |
] |
3339 |
] ifFalse:[ |
|
3340 |
beep := true. |
|
3455 | 3341 |
outcome := 'There is no such method'. |
2835 | 3342 |
isSame := nil. |
1472 | 3343 |
] |
3344 |
] |
|
3345 |
] |
|
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3346 |
]. |
2571 | 3347 |
selector == #'comment:' ifTrue:[ |
2570 | 3348 |
thisClass := (parseTree receiver evaluate). |
3349 |
thisClass isBehavior ifTrue:[ |
|
3350 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
3351 |
(thisClass comment = parseTree arg1 evaluate) ifTrue:[ |
|
3455 | 3352 |
outcome := 'Change has no effect\\(same comment)'. |
2835 | 3353 |
isSame := true. |
2570 | 3354 |
] ifFalse:[ |
3455 | 3355 |
outcome := 'Comment is different'. |
2835 | 3356 |
isSame := false. |
2570 | 3357 |
] |
3358 |
] ifFalse:[ |
|
3359 |
beep := true. |
|
3455 | 3360 |
outcome := 'Cannot compare this change (compare requires class to be loaded).'. |
2835 | 3361 |
isSame := nil. |
2570 | 3362 |
] |
3363 |
] ifFalse:[ |
|
3455 | 3364 |
outcome := 'Cannot compare this change (class not present)'. |
2835 | 3365 |
isSame := nil. |
2570 | 3366 |
]. |
3367 |
]. |
|
2835 | 3368 |
|
3369 |
selector == #'instanceVariableNames:' ifTrue:[ |
|
3370 |
parseTree receiver isMessage ifTrue:[ |
|
3371 |
parseTree receiver selector == #class ifTrue:[ |
|
3372 |
thisClass := (parseTree receiver evaluate). |
|
3373 |
varsHere := thisClass instanceVariableString asCollectionOfWords. |
|
3374 |
varsInChange := (parseTree arguments at:1) evaluate asCollectionOfWords. |
|
3375 |
varsHere = varsInChange ifTrue:[ |
|
3455 | 3376 |
outcome := 'Change has no effect\\(same definition)'. |
2835 | 3377 |
isSame := true. |
3378 |
] ifFalse:[ |
|
3455 | 3379 |
outcome := 'Class-instanceVariable definition is different'. |
2835 | 3380 |
isSame := false. |
3381 |
]. |
|
3382 |
]. |
|
3383 |
] |
|
3384 |
]. |
|
3385 |
||
3534 | 3386 |
(Class definitionSelectors includes:selector) |
3387 |
"/ selector == #'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' |
|
3388 |
ifTrue:[ |
|
2571 | 3389 |
superClass := (parseTree receiver evaluate). |
3543 | 3390 |
superClass isBehavior ifFalse:[ |
3391 |
outcome := 'Cannot compare this change\\(superclass not loaded).'. |
|
3392 |
isSame := nil. |
|
3393 |
] ifTrue:[ |
|
2571 | 3394 |
(self checkClassIsLoaded:superClass) ifTrue:[ |
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3395 |
thisClassSym := (parseTree arguments at:1) evaluate. |
3534 | 3396 |
|
3397 |
(selector endsWith:':privateIn:') ifTrue:[ |
|
3398 |
ownerClass := (parseTree arguments at:5) evaluate. |
|
3399 |
thisClass := ownerClass privateClassesAt:thisClassSym. |
|
3400 |
] ifFalse:[ |
|
3401 |
thisClass := (self nameSpaceForApply) at:thisClassSym ifAbsent:nil. |
|
3402 |
]. |
|
3543 | 3403 |
thisClass isNil ifTrue:[ |
3930 | 3404 |
outcome := 'Change defines the class: ' , thisClassSym allBold. |
3543 | 3405 |
isSame := false. |
3406 |
] ifFalse:[ |
|
2816 | 3407 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
3455 | 3408 |
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'. |
2835 | 3409 |
isSame := nil. |
2816 | 3410 |
] ifTrue:[ |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3411 |
superClassHere := thisClass superclass name. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3412 |
superClassInChange := parseTree receiver name. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3413 |
superClassHere ~~ superClassInChange ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3414 |
outcome := 'Superclass is different.'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3415 |
isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3416 |
] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3417 |
varsHere := thisClass instanceVariableString asCollectionOfWords. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3418 |
varsInChange := (parseTree arguments at:2) evaluate asCollectionOfWords. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3419 |
varsHere = varsInChange ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3420 |
thisClass classVariableString asCollectionOfWords = (parseTree arguments at:3) evaluate asCollectionOfWords ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3421 |
((thisClass sharedPools size == 0) and:[(parseTree arguments at:4) evaluate = '']) ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3422 |
((selector endsWith:':category:') |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3423 |
and:[thisClass category ~= (parseTree arguments at:5) evaluate]) ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3424 |
outcome := 'Category is different'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3425 |
isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3426 |
] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3427 |
outcome := 'Change has no effect\\(same definition)'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3428 |
isSame := true. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3429 |
] |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3430 |
"/ thisClass category = (parseTree arguments at:5) evaluate ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3431 |
"/ outcome := 'Change has no effect\\(same definition)'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3432 |
"/ isSame := true. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3433 |
"/ ] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3434 |
"/ outcome := 'Category is different'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3435 |
"/ isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3436 |
"/ ] |
3534 | 3437 |
] ifFalse:[ |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3438 |
outcome := 'SharedPool definition is different'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3439 |
isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3440 |
]. |
2571 | 3441 |
] ifFalse:[ |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3442 |
outcome := 'ClassVariable definition is different'. |
2835 | 3443 |
isSame := false. |
3512 | 3444 |
] |
2834 | 3445 |
] ifFalse:[ |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3446 |
outcome := 'InstanceVariable definition is different'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3447 |
isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3448 |
addedVars := varsInChange select:[:eachVar | (varsHere includes:eachVar) not]. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3449 |
removedVars := varsHere select:[:eachVar | (varsInChange includes:eachVar) not]. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3450 |
addedVars isEmpty ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3451 |
removedVars isEmpty ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3452 |
outcome := 'Change reorders instanceVariable(s)'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3453 |
] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3454 |
removedVars := removedVars collect:[:eachVar | '''' , eachVar , '''']. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3455 |
outcome := 'Change removes instanceVariable(s): ' , (removedVars asStringWith:Character space) allBold. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3456 |
] |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3457 |
] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3458 |
removedVars isEmpty ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3459 |
addedVars := addedVars collect:[:eachVar | '''' , eachVar , '''']. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3460 |
outcome := 'Change adds instanceVariable(s): ' , (addedVars asStringWith:Character space) allBold. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3461 |
]. |
2834 | 3462 |
]. |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3463 |
] |
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3464 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3465 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3466 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3467 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3468 |
] |
1472 | 3469 |
] |
3470 |
] |
|
255 | 3471 |
] ifTrue:[ |
3472 | 3472 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3473 |
do:[ |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3474 |
parseTree := Parser parseExpression:chunk. |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3475 |
]. |
1472 | 3476 |
(parseTree notNil |
3477 |
and:[parseTree ~~ #Error |
|
3478 |
and:[parseTree isMessage]]) ifTrue:[ |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3479 |
"/ Squeak support (#methodsFor:***) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3480 |
(#( |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3481 |
#methodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3482 |
#privateMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3483 |
#publicMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3484 |
#ignoredMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3485 |
#protectedMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3486 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3487 |
#methodsFor:stamp: "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3488 |
#methodsFor "/ Dolphin support |
2606 | 3489 |
#methods "/ STV support |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3490 |
) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3491 |
includes:parseTree selector) ifTrue:[ |
1472 | 3492 |
thisClass := (parseTree receiver evaluate). |
4956 | 3493 |
(thisClass notNil and:[thisClass isKindOf:UndefinedVariable]) ifTrue:[ |
3494 |
|thisName path| |
|
3495 |
||
3496 |
thisName := thisClass name. |
|
3497 |
path := thisName asCollectionOfSubstringsSeparatedByAll:'::'. |
|
3498 |
1 to:path size do:[:length | |
|
3499 |
|ownerName owner| |
|
3500 |
||
3501 |
ownerName := (path copyTo:length) asStringCollection asStringWith:'::'. |
|
3502 |
owner := Smalltalk classNamed:ownerName. |
|
3503 |
(owner notNil and:[owner isBehavior and:[owner isLoaded not]]) ifTrue:[ |
|
3504 |
self checkClassIsLoaded:owner. |
|
3505 |
]. |
|
3506 |
]. |
|
3507 |
thisClass := (parseTree receiver evaluate). |
|
3508 |
]. |
|
3509 |
||
1472 | 3510 |
thisClass isBehavior ifTrue:[ |
3511 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
|
3455 | 3512 |
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'. |
2835 | 3513 |
isSame := nil. |
1472 | 3514 |
]. |
3515 |
||
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3516 |
parseTree selector == #methodsFor ifTrue:[ |
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3517 |
cat := 'Dolphin methods'. |
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3518 |
] ifFalse:[ |
2606 | 3519 |
parseTree selector == #methods ifTrue:[ |
3520 |
cat := 'STV methods'. |
|
3521 |
] ifFalse:[ |
|
3522 |
cat := parseTree arg1 evaluate. |
|
3523 |
]. |
|
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3524 |
]. |
1472 | 3525 |
newSource := aStream nextChunk. |
3526 |
||
3472 | 3527 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3528 |
do:[ |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3529 |
parser := Parser parseMethod:newSource in:thisClass. |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3530 |
]. |
1472 | 3531 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
3532 |
sel := parser selector. |
|
3533 |
oldMethod := thisClass compiledMethodAt:sel. |
|
3534 |
oldMethod notNil ifTrue:[ |
|
3535 |
(oldMethod category = cat) ifFalse:[ |
|
3536 |
Transcript showCR:'category changed.'. |
|
3537 |
]. |
|
3538 |
oldSource := oldMethod source. |
|
3539 |
(oldSource = newSource) ifTrue:[ |
|
3455 | 3540 |
outcome := 'Same source'. |
2835 | 3541 |
isSame := true. |
1472 | 3542 |
] ifFalse:[ |
3543 |
oldSource isNil ifTrue:[ |
|
3544 |
beep := true. |
|
3455 | 3545 |
outcome := 'No source for compare.'. |
2835 | 3546 |
isSame := true. |
1472 | 3547 |
] ifFalse:[ |
3548 |
"/ |
|
3549 |
"/ compare for tabulator <-> space changes |
|
3550 |
"/ before showing diff ... |
|
3551 |
"/ |
|
3552 |
t1 := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
3553 |
t2 := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
3554 |
t1 = t2 ifTrue:[ |
|
3455 | 3555 |
outcome := 'Same source'. |
2835 | 3556 |
isSame := true. |
1472 | 3557 |
] ifFalse:[ |
3455 | 3558 |
outcome := 'Source changed.'. |
1472 | 3559 |
showDiff := true. |
2835 | 3560 |
isSame := false. |
1472 | 3561 |
|
3562 |
"/ |
|
3563 |
"/ check if only historyLine diffs |
|
3564 |
"/ |
|
3565 |
(HistoryManager notNil |
|
3566 |
and:[HistoryManager isActive]) ifTrue:[ |
|
3567 |
(HistoryManager withoutHistoryLines:newSource) |
|
3568 |
= |
|
3569 |
(HistoryManager withoutHistoryLines:oldSource) |
|
3570 |
ifTrue:[ |
|
3455 | 3571 |
outcome := 'Same source (history only)'. |
2835 | 3572 |
isSame := true. |
1472 | 3573 |
showDiff := false. |
3574 |
] |
|
3575 |
]. |
|
3576 |
] |
|
3577 |
] |
|
3578 |
] |
|
3579 |
] ifFalse:[ |
|
3580 |
isLoaded ifTrue:[ |
|
3581 |
beep := true. |
|
3455 | 3582 |
outcome := 'Method does not exist.'. |
2835 | 3583 |
isSame := nil. |
1472 | 3584 |
] |
3585 |
] |
|
3586 |
] ifFalse:[ |
|
3455 | 3587 |
outcome := 'Change is unparsable (parse error).'. |
2835 | 3588 |
isSame := nil. |
1472 | 3589 |
]. |
2835 | 3590 |
doShowResult ifTrue:[ |
3591 |
(showDiff and:[oldSource notNil and:[newSource notNil]]) ifTrue:[ |
|
3592 |
d := DiffTextView |
|
3593 |
openOn:oldSource label:(resources string:'current version (in image)') |
|
3594 |
and:newSource label:(resources string:'change version'). |
|
3595 |
d label:'method differences'. |
|
3596 |
] |
|
1472 | 3597 |
] |
3598 |
] ifFalse:[ |
|
3599 |
beep := true. |
|
3455 | 3600 |
outcome := 'Class does not exist.'. |
2835 | 3601 |
isSame := nil. |
1472 | 3602 |
] |
3603 |
] ifFalse:[ |
|
3604 |
beep := true. |
|
3455 | 3605 |
outcome := 'Not comparable.'. |
2835 | 3606 |
isSame := nil. |
1472 | 3607 |
] |
3608 |
] ifFalse:[ |
|
3609 |
beep := true. |
|
3455 | 3610 |
outcome := 'Not comparable.'. |
2835 | 3611 |
isSame := nil. |
1472 | 3612 |
] |
255 | 3613 |
]. |
3614 |
aStream close. |
|
2835 | 3615 |
|
3616 |
doShowResult ifTrue:[ |
|
3617 |
showDiff ifFalse:[ |
|
3618 |
outcome := (resources string:outcome) withCRs. |
|
3619 |
beep ifTrue:[ |
|
3620 |
self warn:outcome. |
|
3621 |
] ifFalse:[ |
|
3622 |
self information:outcome. |
|
3623 |
] |
|
553 | 3624 |
"/ Transcript showCR:outcome. |
2835 | 3625 |
]. |
255 | 3626 |
]. |
2835 | 3627 |
^ isSame. |
255 | 3628 |
|
1472 | 3629 |
"Created: / 24.11.1995 / 14:30:46 / cg" |
2606 | 3630 |
"Modified: / 13.2.2000 / 15:04:39 / cg" |
255 | 3631 |
! |
3632 |
||
1359 | 3633 |
compressForClass:aClassNameOrNil |
3634 |
"compress the change-set; |
|
3635 |
this replaces multiple method-changes by the last (i.e. the most recent) change. |
|
3636 |
If the class argument is nil, compress for all classes. |
|
3637 |
otherwise, only changes for that class are compressed." |
|
3638 |
||
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3639 |
self |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3640 |
compressForClass:aClassNameOrNil selector:nil |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3641 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3642 |
"Modified: / 19.11.2001 / 22:04:12 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3643 |
! |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3644 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3645 |
compressForClass:aClassNameOrNil selector:selectorToCompressOrNil |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3646 |
"compress the change-set; |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3647 |
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
|
3648 |
If the class argument is nil, compress for all classes. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3649 |
otherwise, only changes for that class are compressed." |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3650 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3651 |
|lbl aStream searchIndex anyMore deleteSet index |
1359 | 3652 |
str snapshotProto snapshotPrefix snapshotNameIndex fileName| |
3653 |
||
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
3654 |
aStream := changeFileName asFilename readStreamOrNil. |
1359 | 3655 |
aStream isNil ifTrue:[^ self]. |
3656 |
||
4762 | 3657 |
lbl := 'compressing'. |
1359 | 3658 |
aClassNameOrNil isNil ifTrue:[ |
4762 | 3659 |
selectorToCompressOrNil notNil ifTrue:[ |
3660 |
lbl := lbl , ' for ' , selectorToCompressOrNil. |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3661 |
] |
1359 | 3662 |
] ifFalse:[ |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3663 |
selectorToCompressOrNil isNil ifTrue:[ |
4762 | 3664 |
lbl := lbl , ' for ' , aClassNameOrNil. |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3665 |
] ifFalse:[ |
4762 | 3666 |
lbl := lbl , ' for ' , aClassNameOrNil , '>>' , selectorToCompressOrNil. |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3667 |
] |
1359 | 3668 |
]. |
4762 | 3669 |
lbl := lbl , '...'. |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3670 |
self newLabel:lbl. |
1359 | 3671 |
|
3672 |
CompressSnapshotInfo == true ifTrue:[ |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3673 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3674 |
get a prototype snapshot record (to be independent of |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3675 |
the actual format .. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3676 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3677 |
str := WriteStream on:String new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3678 |
Class addChangeRecordForSnapshot:'foo' to:str. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3679 |
snapshotProto := str contents. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3680 |
snapshotPrefix := snapshotProto copyTo:10. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3681 |
snapshotNameIndex := snapshotProto findString:'foo'. |
1359 | 3682 |
]. |
3683 |
||
3684 |
self withExecuteCursorDo:[ |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3685 |
|numChanges classes selectors types excla sawExcla |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3686 |
changeNr chunk aParseTree parseTreeChunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3687 |
thisClass thisSelector codeChunk codeParser |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3688 |
compressThis| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3689 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3690 |
numChanges := self numberOfChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3691 |
classes := Array new:numChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3692 |
selectors := Array new:numChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3693 |
types := Array new:numChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3694 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3695 |
"starting at the end, get the change class and change selector; |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3696 |
collect all in classes / selectors" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3697 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3698 |
changeNr := numChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3699 |
excla := aStream class chunkSeparator. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3700 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3701 |
[changeNr >= 1] whileTrue:[ |
4599
9a95e5ae08ad
code rewritten to be independent of stream zero-base
Claus Gittinger <cg@exept.de>
parents:
4497
diff
changeset
|
3702 |
aStream position1Based:(changePositions at:changeNr). |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3703 |
sawExcla := aStream peekFor:excla. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3704 |
chunk := aStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3705 |
sawExcla ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3706 |
"optimize a bit if multiple methods for same category arrive" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3707 |
(chunk = parseTreeChunk) ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3708 |
aParseTree := Parser parseExpression:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3709 |
parseTreeChunk := chunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3710 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3711 |
(aParseTree notNil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3712 |
and:[(aParseTree ~~ #Error) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3713 |
and:[aParseTree isMessage]]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3714 |
(#( |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3715 |
#methodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3716 |
#privateMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3717 |
#publicMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3718 |
#ignoredMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3719 |
#protectedMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3720 |
#methodsFor:stamp: "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3721 |
#methodsFor "/ Dolphin support |
2606 | 3722 |
#methods "/ STV support |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3723 |
) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3724 |
includes:aParseTree selector) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3725 |
thisClass := (aParseTree receiver evaluate). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3726 |
codeChunk := aStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3727 |
codeParser := Parser |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3728 |
parseMethodSpecification:codeChunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3729 |
in:thisClass |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3730 |
ignoreErrors:true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3731 |
ignoreWarnings:true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3732 |
(codeParser notNil and:[codeParser ~~ #Error]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3733 |
selectors at:changeNr put:(codeParser selector). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3734 |
classes at:changeNr put:thisClass. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3735 |
types at:changeNr put:#methodsFor |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3736 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3737 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3738 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3739 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3740 |
aParseTree := Parser parseExpression:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3741 |
parseTreeChunk := chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3742 |
(aParseTree notNil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3743 |
and:[(aParseTree ~~ #Error) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3744 |
and:[aParseTree isMessage]]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3745 |
(aParseTree selector == #removeSelector:) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3746 |
selectors at:changeNr put:(aParseTree arg1 value ). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3747 |
classes at:changeNr put:(aParseTree receiver evaluate). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3748 |
types at:changeNr put:#removeSelector |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3749 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3750 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3751 |
CompressSnapshotInfo == true ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3752 |
(chunk startsWith:snapshotPrefix) ifTrue:[ |
4599
9a95e5ae08ad
code rewritten to be independent of stream zero-base
Claus Gittinger <cg@exept.de>
parents:
4497
diff
changeset
|
3753 |
str := chunk readStream position1Based:snapshotNameIndex. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3754 |
fileName := str upTo:(Character space). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3755 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3756 |
kludge to allow use of match-check below |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3757 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3758 |
selectors at:changeNr put:snapshotPrefix. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3759 |
classes at:changeNr put:fileName. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3760 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3761 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3762 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3763 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3764 |
changeNr := changeNr - 1 |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3765 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3766 |
aStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3767 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3768 |
"for all changes, look for another class/selector occurence later |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3769 |
in the list and, if there is one, add change number to the delete set" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3770 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3771 |
deleteSet := OrderedCollection new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3772 |
changeNr := 1. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3773 |
[changeNr < self numberOfChanges] whileTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3774 |
thisClass := classes at:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3775 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3776 |
compressThis := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3777 |
aClassNameOrNil isNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3778 |
compressThis := true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3779 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3780 |
"/ skipping unloaded/unknown classes |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3781 |
thisClass isBehavior ifTrue:[ |
3359
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
3782 |
compressThis := aClassNameOrNil = thisClass theNonMetaclass name. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3783 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3784 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3785 |
compressThis ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3786 |
thisSelector := selectors at:changeNr. |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3787 |
compressThis := (selectorToCompressOrNil isNil or:[thisSelector == selectorToCompressOrNil]). |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3788 |
compressThis ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3789 |
searchIndex := changeNr. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3790 |
anyMore := true. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3791 |
[anyMore] whileTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3792 |
searchIndex := classes indexOf:thisClass startingAt:(searchIndex + 1). |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3793 |
(searchIndex ~~ 0) ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3794 |
((selectors at:searchIndex) == thisSelector) ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3795 |
thisClass notNil ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3796 |
deleteSet add:changeNr. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3797 |
anyMore := false |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3798 |
] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3799 |
] |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3800 |
] ifFalse:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3801 |
anyMore := false |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3802 |
] |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3803 |
]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3804 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3805 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3806 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3807 |
changeNr := changeNr + 1 |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3808 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3809 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3810 |
"finally delete what has been found" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3811 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3812 |
(deleteSet size > 0) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3813 |
changeListView setSelection:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3814 |
index := deleteSet size. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3815 |
[index > 0] whileTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3816 |
self silentDeleteChange:(deleteSet at:index). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3817 |
index := index - 1 |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3818 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3819 |
self setChangeList. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3820 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3821 |
scroll back a bit, if we are left way behind the list |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3822 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3823 |
changeListView firstLineShown > self numberOfChanges ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3824 |
changeListView makeLineVisible:self numberOfChanges |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3825 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3826 |
self clearCodeView |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3827 |
] |
1359 | 3828 |
]. |
3829 |
self newLabel:''. |
|
3830 |
||
3359
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
3831 |
"Modified: / 5.11.2001 / 16:34:53 / cg" |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3832 |
"Created: / 19.11.2001 / 22:03:42 / cg" |
1359 | 3833 |
! |
3834 |
||
255 | 3835 |
deleteChange:changeNr |
3836 |
"delete a change" |
|
3837 |
||
3838 |
self deleteChangesFrom:changeNr to:changeNr |
|
3839 |
! |
|
3840 |
||
3841 |
deleteChangesFrom:start to:stop |
|
3842 |
"delete a range of changes" |
|
3843 |
||
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
3844 |
changeListView setSelection:nil. |
255 | 3845 |
stop to:start by:-1 do:[:changeNr | |
1648 | 3846 |
self silentDeleteInternalChange:changeNr. |
3847 |
changeListView removeIndex:changeNr. |
|
255 | 3848 |
]. |
744
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3849 |
|
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3850 |
"/ changeListView contentsChanged. |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3851 |
"/ changeListView redrawFromLine:start. |
255 | 3852 |
|
744
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3853 |
"/ self setChangeList |
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3854 |
|
1648 | 3855 |
"Modified: / 18.5.1998 / 14:22:27 / cg" |
255 | 3856 |
! |
3857 |
||
202 | 3858 |
makeChangeAPatch:changeNr |
3859 |
"append change to patchfile" |
|
3860 |
||
3861 |
self appendChange:changeNr toFile:'patches' |
|
3862 |
! |
|
3863 |
||
3864 |
makeChangePermanent:changeNr |
|
3865 |
"rewrite the source file where change changeNr lies" |
|
3866 |
||
3867 |
self notify:'this is not yet implemented' |
|
3868 |
! |
|
3869 |
||
73 | 3870 |
silentDeleteChange:changeNr |
3871 |
"delete a change do not update changeListView" |
|
57 | 3872 |
|
73 | 3873 |
anyChanges := true. |
3874 |
changeChunks removeIndex:changeNr. |
|
3203 | 3875 |
changePositions size >= changeNr ifTrue:[ changePositions removeIndex:changeNr ]. |
3876 |
changeClassNames size >= changeNr ifTrue:[ changeClassNames removeIndex:changeNr ]. |
|
3877 |
changeSelectors size >= changeNr ifTrue:[ changeSelectors removeIndex:changeNr ]. |
|
3878 |
changeHeaderLines size >= changeNr ifTrue:[ changeHeaderLines removeIndex:changeNr ]. |
|
3879 |
changeTimeStamps size >= changeNr ifTrue:[ changeTimeStamps removeIndex:changeNr ]. |
|
3880 |
changeIsFollowupMethodChange size >= changeNr ifTrue:[ changeIsFollowupMethodChange removeIndex:changeNr ]. |
|
182
0c2f9214d531
handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3881 |
|
0c2f9214d531
handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3882 |
"Modified: 18.11.1995 / 17:08:44 / cg" |
45 | 3883 |
! |
3884 |
||
202 | 3885 |
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
|
3886 |
"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
|
3887 |
Return the number of deleted changes." |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3888 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3889 |
|thisClassName index numDeleted| |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3890 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3891 |
numDeleted := 0. |
202 | 3892 |
index := stop. |
3893 |
[index >= start] whileTrue:[ |
|
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3894 |
thisClassName := self classNameOfChange:index. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3895 |
thisClassName = aClassName ifTrue:[ |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3896 |
self silentDeleteChange:index. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3897 |
numDeleted := numDeleted + 1. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3898 |
]. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3899 |
index := index - 1 |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3900 |
]. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3901 |
^ numDeleted |
51 | 3902 |
|
45 | 3903 |
! |
3904 |
||
3607 | 3905 |
silentDeleteChangesFor:aClassName selector:selector from:start to:stop |
3906 |
"delete changes for given class/selector in a range. |
|
3907 |
Return the number of deleted changes." |
|
3908 |
||
3909 |
|thisClassName index numDeleted| |
|
3910 |
||
3911 |
numDeleted := 0. |
|
3912 |
index := stop. |
|
3913 |
[index >= start] whileTrue:[ |
|
3914 |
thisClassName := self classNameOfChange:index. |
|
3915 |
thisClassName = aClassName ifTrue:[ |
|
3916 |
(self selectorOfMethodChange:index) == selector ifTrue:[ |
|
3917 |
self silentDeleteChange:index. |
|
3918 |
numDeleted := numDeleted + 1. |
|
3919 |
] |
|
3920 |
]. |
|
3921 |
index := index - 1 |
|
3922 |
]. |
|
3923 |
^ numDeleted |
|
3924 |
! |
|
3925 |
||
2511 | 3926 |
silentDeleteChangesForClassAndPrivateClasses:aClassName from:start to:stop |
3927 |
"delete changes for a given class and its private classes in a range. |
|
3928 |
Return the number of deleted changes." |
|
3929 |
||
3930 |
|thisClassName index numDeleted| |
|
3931 |
||
3932 |
numDeleted := 0. |
|
3933 |
index := stop. |
|
3934 |
[index >= start] whileTrue:[ |
|
3935 |
thisClassName := self ownerClassNameOfChange:index. |
|
3936 |
thisClassName = aClassName ifTrue:[ |
|
3937 |
self silentDeleteChange:index. |
|
3938 |
numDeleted := numDeleted + 1. |
|
3939 |
]. |
|
3940 |
index := index - 1 |
|
3941 |
]. |
|
3942 |
^ numDeleted |
|
3943 |
||
3944 |
! |
|
3945 |
||
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3946 |
silentDeleteInternalChange:changeNr |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3947 |
"delete a change do not update changeListView" |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3948 |
|
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3949 |
anyChanges := true. |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3950 |
changeChunks removeIndex:changeNr. |
1473 | 3951 |
changePositions size >= changeNr ifTrue:[changePositions removeIndex:changeNr]. |
3952 |
changeClassNames size >= changeNr ifTrue:[changeClassNames removeIndex:changeNr]. |
|
3203 | 3953 |
changeSelectors size >= changeNr ifTrue:[ changeSelectors removeIndex:changeNr ]. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3954 |
changeTimeStamps size >= changeNr ifTrue:[changeTimeStamps removeIndex:changeNr]. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3955 |
changeIsFollowupMethodChange size >= changeNr ifTrue:[changeIsFollowupMethodChange removeIndex:changeNr]. |
1473 | 3956 |
|
3957 |
"Created: / 7.3.1997 / 16:28:32 / cg" |
|
3958 |
"Modified: / 7.2.1998 / 19:59:11 / cg" |
|
1496
978b3c3565c9
#silentDeleteInternalChange: copy-paste error
Stefan Vogel <sv@exept.de>
parents:
1473
diff
changeset
|
3959 |
"Modified: / 26.2.1998 / 18:20:48 / stefan" |
4487 | 3960 |
! |
3961 |
||
3962 |
updateDiffView |
|
3963 |
self withSelectedChangesDo:[:changeNr | |
|
3964 |
self updateDiffViewFor:changeNr. |
|
3965 |
^ self. |
|
3966 |
]. |
|
3967 |
||
3968 |
diffView text1:'' text2:'' |
|
3969 |
! |
|
3970 |
||
3971 |
updateDiffViewFor:changeNr |
|
3972 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource |
|
4857 | 3973 |
parser sel showDiff selector oldMethod| |
4487 | 3974 |
|
3975 |
aStream := self streamForChange:changeNr. |
|
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
3976 |
aStream isNil ifTrue:[ |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
3977 |
^ self |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
3978 |
]. |
4487 | 3979 |
|
3980 |
showDiff := false. |
|
3981 |
||
3982 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
|
3983 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
|
3984 |
chunk := aStream nextChunk. |
|
3985 |
] ifTrue:[ |
|
3986 |
chunk := (changeChunks at:changeNr). |
|
3987 |
sawExcla := true. |
|
3988 |
]. |
|
3989 |
||
4857 | 3990 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
3991 |
do:[ |
|
3992 |
parseTree := Parser parseExpression:chunk. |
|
4487 | 3993 |
(parseTree notNil and:[parseTree ~~ #Error and:[ parseTree isMessage ]]) ifTrue:[ |
3994 |
selector := parseTree selector. |
|
3995 |
] |
|
4857 | 3996 |
]. |
3997 |
||
3998 |
selector isNil ifTrue:[ |
|
4993 | 3999 |
newSource := chunk. |
4857 | 4000 |
oldSource := 'Not comparable.'. |
4001 |
] ifFalse:[ |
|
4002 |
sawExcla ifFalse:[ |
|
4003 |
"/ not a method-change |
|
4004 |
newSource := chunk. |
|
4005 |
oldSource := self oldSourceForParseTree:parseTree. |
|
4006 |
] ifTrue:[ |
|
4007 |
"/ a method-change |
|
4008 |
||
4487 | 4009 |
(#( |
4010 |
#methodsFor: |
|
4011 |
#privateMethodsFor: |
|
4012 |
#publicMethodsFor: |
|
4013 |
#ignoredMethodsFor: |
|
4014 |
#protectedMethodsFor: |
|
4015 |
||
4016 |
#methodsFor:stamp: "/ Squeak support |
|
4017 |
#methodsFor "/ Dolphin support |
|
4018 |
#methods "/ STV support |
|
4019 |
) |
|
4857 | 4020 |
includes:selector) ifTrue:[ |
4489 | 4021 |
newSource := aStream nextChunk. |
4022 |
||
4487 | 4023 |
thisClass := (parseTree receiver evaluate). |
4024 |
thisClass isBehavior ifTrue:[ |
|
4489 | 4025 |
thisClass isLoaded ifFalse:[ |
4026 |
oldSource := 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
4487 | 4027 |
] ifTrue:[ |
4857 | 4028 |
selector == #methodsFor ifTrue:[ |
4487 | 4029 |
cat := 'Dolphin methods'. |
4030 |
] ifFalse:[ |
|
4857 | 4031 |
selector == #methods ifTrue:[ |
4487 | 4032 |
cat := 'STV methods'. |
4033 |
] ifFalse:[ |
|
4034 |
cat := parseTree arg1 evaluate. |
|
4035 |
]. |
|
4036 |
]. |
|
4037 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
|
4038 |
do:[ |
|
5144 | 4039 |
Error handle:[:ex | |
4040 |
] do:[ |
|
4041 |
parser := Parser parseMethod:newSource in:thisClass. |
|
4042 |
] |
|
4487 | 4043 |
]. |
4044 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
4045 |
sel := parser selector. |
|
4046 |
oldMethod := thisClass compiledMethodAt:sel. |
|
4047 |
oldMethod notNil ifTrue:[ |
|
4048 |
(oldMethod category = cat) ifFalse:[ |
|
4049 |
Transcript showCR:'category changed.'. |
|
4050 |
]. |
|
4051 |
oldSource := oldMethod source. |
|
4052 |
(oldSource = newSource) ifFalse:[ |
|
4053 |
oldSource isNil ifTrue:[ |
|
4489 | 4054 |
oldSource := 'No source for compare.'. |
4487 | 4055 |
] ifFalse:[ |
4056 |
"/ |
|
4057 |
"/ compare for tabulator <-> space changes |
|
4058 |
"/ before showing diff ... |
|
4059 |
"/ |
|
4060 |
oldSource := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
4061 |
newSource := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
4062 |
oldSource = newSource ifFalse:[ |
|
4063 |
"/ |
|
4064 |
"/ check if only historyLine diffs |
|
4065 |
"/ |
|
4066 |
(HistoryManager notNil |
|
4067 |
and:[HistoryManager isActive]) ifTrue:[ |
|
4699
393443e15c9b
compare fix if historyManager is enabled.
Claus Gittinger <cg@exept.de>
parents:
4632
diff
changeset
|
4068 |
oldSource := oldSource asStringCollection asString. |
393443e15c9b
compare fix if historyManager is enabled.
Claus Gittinger <cg@exept.de>
parents:
4632
diff
changeset
|
4069 |
newSource := newSource asStringCollection asString. |
4489 | 4070 |
(HistoryManager withoutHistoryLines:oldSource) |
4487 | 4071 |
= |
4489 | 4072 |
(HistoryManager withoutHistoryLines:newSource) |
4487 | 4073 |
ifTrue:[ |
4074 |
oldSource := (HistoryManager withoutHistoryLines:oldSource). |
|
4075 |
newSource := (HistoryManager withoutHistoryLines:newSource). |
|
4076 |
] |
|
4077 |
]. |
|
4078 |
] |
|
4079 |
] |
|
4080 |
] |
|
4081 |
] ifFalse:[ |
|
4489 | 4082 |
oldSource := 'Method does not exist.'. |
4487 | 4083 |
] |
4084 |
] ifFalse:[ |
|
4489 | 4085 |
oldSource := 'Change is unparsable (parse error).'. |
4487 | 4086 |
]. |
4087 |
]. |
|
4088 |
] ifFalse:[ |
|
4489 | 4089 |
oldSource := 'Class does not exist.'. |
4487 | 4090 |
] |
4091 |
] ifFalse:[ |
|
4990 | 4092 |
newSource := aStream contents. |
4489 | 4093 |
oldSource := 'Not comparable.'. |
4487 | 4094 |
] |
4095 |
] |
|
4096 |
]. |
|
4097 |
aStream close. |
|
4098 |
||
5237
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
4099 |
oldSource := oldSource ? ''. |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
4100 |
newSource := newSource ? ''. |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
4101 |
(oldSource = newSource |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
4102 |
or:[ oldSource asStringCollection withTabsExpanded = newSource asStringCollection withTabsExpanded]) ifTrue:[ |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
4103 |
self makeDiffViewInvisible |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
4104 |
] ifFalse:[ |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
4105 |
self makeDiffViewVisible. |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
4106 |
diffView text1:oldSource text2:newSource. |
74f82f793e1b
make diffView invisible, if there are no diffs
Claus Gittinger <cg@exept.de>
parents:
5178
diff
changeset
|
4107 |
]. |
4487 | 4108 |
|
4109 |
"Created: / 24.11.1995 / 14:30:46 / cg" |
|
4699
393443e15c9b
compare fix if historyManager is enabled.
Claus Gittinger <cg@exept.de>
parents:
4632
diff
changeset
|
4110 |
"Modified: / 21.3.2003 / 14:26:58 / cg" |
202 | 4111 |
! ! |
0 | 4112 |
|
202 | 4113 |
!ChangesBrowser methodsFor:'termination'! |
51 | 4114 |
|
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4115 |
askIfChangesAreToBeWrittenBack |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4116 |
|action again| |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4117 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4118 |
anyChanges ifFalse:[^ self]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4119 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4120 |
again := true. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4121 |
[again] whileTrue:[ |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4122 |
action := OptionBox |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4123 |
request:(resources at:'The modified changelist has not been written back to the change file.\\Write change file before closing ?') withCRs |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4124 |
label:'ChangesBrowser' |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4125 |
form:(WarningBox iconBitmap) |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4126 |
buttonLabels:(resources array:#('Cancel' 'Don''t Write' 'Write')) |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4127 |
values:#(#abort #ignore #save) |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4128 |
default:#save |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4129 |
onCancel:#abort. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4130 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4131 |
again := false. |
3717
5083b0d53c5f
fixed cancel in ask-if-changes-are-to-be-written-back when closing
Claus Gittinger <cg@exept.de>
parents:
3698
diff
changeset
|
4132 |
action == #abort ifTrue:[AbortSignal raise. ^ self]. |
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4133 |
action == #save ifTrue:[ |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4134 |
again := self writeBackChanges not |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4135 |
]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4136 |
]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4137 |
! |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4138 |
|
1787 | 4139 |
closeRequest |
4140 |
"window manager wants us to go away" |
|
4141 |
||
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4142 |
self askIfChangesAreToBeWrittenBack. |
1787 | 4143 |
super closeRequest |
4144 |
! |
|
4145 |
||
202 | 4146 |
saveAndTerminate |
4147 |
"update the changes file and quit. |
|
4148 |
Dont depend on this being sent, not all window managers |
|
4149 |
send it; instead, they simply destroy the view." |
|
28 | 4150 |
|
202 | 4151 |
anyChanges ifTrue:[ |
1787 | 4152 |
self writeBackChanges. |
0 | 4153 |
]. |
1787 | 4154 |
super saveAndTerminate |
4155 |
||
4156 |
"Modified: / 3.8.1998 / 19:54:00 / cg" |
|
0 | 4157 |
! ! |
4158 |
||
73 | 4159 |
!ChangesBrowser methodsFor:'user interaction'! |
51 | 4160 |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4161 |
askForSearch:msg initialAnswer:initial thenSearchUsing:searchBlock2 onCancel:cancelBlock |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4162 |
|searchString directionHolder searchBlock| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4163 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4164 |
searchString := self |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4165 |
askForSearchString:msg |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4166 |
initialAnswer:initial |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4167 |
directionInto:(directionHolder := ValueHolder new). |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4168 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4169 |
searchString isNil ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4170 |
^ cancelBlock value |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4171 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4172 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4173 |
searchBlock := [:changeNr | searchBlock2 value:searchString value:changeNr]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4174 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4175 |
directionHolder value == #backward ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4176 |
changeNrShown isNil ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4177 |
changeNrShown := self numberOfChanges. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4178 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4179 |
self findPreviousForWhich:searchBlock |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4180 |
] ifFalse:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4181 |
changeNrShown isNil ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4182 |
changeNrShown := 0. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4183 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4184 |
self findNextForWhich:searchBlock |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4185 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4186 |
! |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4187 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4188 |
askForSearchString:msg initialAnswer:initial directionInto:aValueHolder |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4189 |
"common code to open a search box" |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4190 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4191 |
|searchString direction| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4192 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4193 |
direction := #forward. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4194 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4195 |
Dialog aboutToOpenBoxNotificationSignal handle:[:ex | |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4196 |
|box nextButton prevButton| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4197 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4198 |
box := ex parameter. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4199 |
nextButton := box okButton. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4200 |
prevButton := Button label:(resources string:'Previous'). |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4201 |
prevButton action:[direction := #backward. box okPressed.]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4202 |
box addButton:prevButton after:nextButton. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4203 |
nextButton label:(resources string:'Next'). |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4204 |
ex proceed. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4205 |
] do:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4206 |
searchString := Dialog |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4207 |
request:msg |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4208 |
initialAnswer:initial |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4209 |
onCancel:nil. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4210 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4211 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4212 |
searchString isNil ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4213 |
^ nil |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4214 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4215 |
aValueHolder value:direction. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4216 |
^ searchString |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4217 |
! |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4218 |
|
221 | 4219 |
autoUpdate:aBoolean |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4220 |
"enabled/disable automatic update from the change-file (for monitoring)" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4221 |
|
221 | 4222 |
autoUpdate := aBoolean |
4223 |
||
4224 |
"Created: 3.12.1995 / 14:14:24 / cg" |
|
4225 |
"Modified: 3.12.1995 / 14:20:45 / cg" |
|
4226 |
! |
|
4227 |
||
3211 | 4228 |
changeSelection:lineNrCollection |
0 | 4229 |
"show a change in the codeView" |
4230 |
||
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
4231 |
|chunk lineNr| |
3211 | 4232 |
|
4233 |
lineNrCollection isInteger ifTrue:[ |
|
4234 |
lineNr := lineNrCollection |
|
4235 |
] ifFalse:[ |
|
4236 |
changeListView multipleSelectOk ifTrue:[ |
|
4237 |
lineNrCollection size == 1 ifTrue:[ |
|
4238 |
lineNr := lineNrCollection first. |
|
4239 |
] |
|
4240 |
] ifFalse:[ |
|
4241 |
lineNr := lineNrCollection |
|
4242 |
]. |
|
4243 |
]. |
|
0 | 4244 |
|
2293 | 4245 |
lineNr isNil ifTrue:[ |
4246 |
codeView contents:nil. |
|
4247 |
codeView initializeDoITAction. |
|
3211 | 4248 |
changeNrShown := nil. |
2293 | 4249 |
^ self |
4250 |
]. |
|
4251 |
||
3211 | 4252 |
"/ display the changes code |
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
4253 |
chunk := self sourceOfChange:lineNr. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
4254 |
chunk isNil ifTrue:[ |
2093 | 4255 |
codeView initializeDoITAction. |
2044 | 4256 |
^ self |
4257 |
]. |
|
0 | 4258 |
codeView contents:chunk. |
13 | 4259 |
codeView acceptAction:[:theCode | self doApply "noChangesAllowed"]. |
2043
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4260 |
codeView doItAction:[:theCode | |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4261 |
|clsName cls| |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4262 |
|
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4263 |
clsName := self classNameOfChange:lineNr. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4264 |
clsName notNil ifTrue:[ |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4265 |
clsName := clsName asSymbolIfInterned. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4266 |
clsName notNil ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4267 |
cls := Smalltalk at:clsName ifAbsent:nil. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4268 |
] |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4269 |
]. |
2043
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4270 |
Compiler |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4271 |
evaluate:theCode |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4272 |
in:nil |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4273 |
receiver:cls |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4274 |
notifying:self |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4275 |
logged:true |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4276 |
ifFail:nil |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4277 |
]. |
15 | 4278 |
changeNrShown := lineNr. |
0 | 4279 |
|
4487 | 4280 |
self showingDiffs value ifTrue:[ |
4917
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4281 |
AbortOperationRequest catch:[ |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4282 |
self updateDiffViewFor:changeNrShown. |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4283 |
] |
4487 | 4284 |
]. |
4285 |
||
2044 | 4286 |
"Modified: / 28.2.1999 / 15:26:46 / cg" |
51 | 4287 |
! |
4288 |
||
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4289 |
classOfChange:changeNr |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4290 |
^ self |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4291 |
classOfChange:changeNr |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4292 |
ifAbsent:[:className | |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4293 |
|msg| |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4294 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4295 |
className isNil ifTrue:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4296 |
msg := 'Could not extract classname from change'. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4297 |
] ifFalse:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4298 |
msg := 'Class not found: ''' , className , ''''. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4299 |
]. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4300 |
self warn:msg. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4301 |
nil |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4302 |
] |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4303 |
! |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4304 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4305 |
classOfChange:changeNr ifAbsent:exceptionBlock |
4271 | 4306 |
|className cls isMeta ownerClassName ownerClass| |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4307 |
|
5014 | 4308 |
className := self realClassNameOfChange:changeNr. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4309 |
className isNil ifTrue:[ |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4310 |
^ exceptionBlock value:nil |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4311 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4312 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4313 |
isMeta := false. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4314 |
(className endsWith:' class') ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4315 |
className := className copyWithoutLast:6. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4316 |
isMeta := true. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4317 |
]. |
3472 | 4318 |
|
4319 |
(cls := (self nameSpaceForApply) classNamed:className) isNil ifTrue:[ |
|
4320 |
cls := Smalltalk classNamed:className |
|
4321 |
]. |
|
4322 |
||
4323 |
cls isNil ifTrue:[ |
|
4271 | 4324 |
(className includes:$:) ifTrue:[ |
4325 |
ownerClassName := className copyTo:(className lastIndexOf:$:)-1. |
|
4326 |
(ownerClassName endsWith:$:) ifTrue:[ ownerClassName := ownerClassName copyWithoutLast:1 ]. |
|
4327 |
ownerClass := Smalltalk classNamed:ownerClassName. |
|
4328 |
ownerClass isBehavior ifTrue:[ |
|
4329 |
ownerClass isLoaded ifFalse:[ |
|
4330 |
"/ self halt. |
|
4331 |
]. |
|
4332 |
]. |
|
4333 |
]. |
|
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4334 |
^ exceptionBlock value:className |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4335 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4336 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4337 |
isMeta ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4338 |
cls := cls class |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4339 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4340 |
^ cls |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4341 |
! |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4342 |
|
202 | 4343 |
doApply |
4344 |
"user wants a change to be applied" |
|
45 | 4345 |
|
3211 | 4346 |
self withSelectedChangesDo:[:changeNr | |
4347 |
skipSignal := nil. |
|
4877 | 4348 |
(self applyChange:changeNr) ifFalse:[ |
4349 |
^ self "/ cancel |
|
4350 |
]. |
|
3211 | 4351 |
self autoSelect:(changeNr + 1) |
202 | 4352 |
] |
45 | 4353 |
! |
4354 |
||
202 | 4355 |
doApplyAll |
4356 |
"user wants all changes to be applied" |
|
37 | 4357 |
|
294 | 4358 |
self withExecuteCursorDo:[ |
4488 | 4359 |
|lastNr "{ Class: SmallInteger }" | |
4360 |
||
4361 |
self clearCodeView. |
|
4362 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
4363 |
lastNr := self numberOfChanges. |
|
4364 |
1 to:lastNr do:[:changeNr | |
|
4365 |
changeListView setSelection:changeNr. |
|
4366 |
self applyChange:changeNr |
|
4367 |
]. |
|
4368 |
self autoSelectLast |
|
202 | 4369 |
] |
294 | 4370 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
4371 |
"Modified: 21.1.1997 / 22:26:30 / cg" |
37 | 4372 |
! |
4373 |
||
3668 | 4374 |
doApplyClassFromBeginning |
4375 |
"user wants all changes for this class from 1 to changeNr to be applied" |
|
4376 |
||
4377 |
self withSingleSelectedChangeDo:[:changeNr | |
|
4378 |
|thisClassName classNameToApply lastChange |
|
4379 |
lastNr "{ Class: SmallInteger }" | |
|
4380 |
||
4381 |
classNameToApply := self classNameOfChange:changeNr. |
|
4382 |
classNameToApply notNil ifTrue:[ |
|
4383 |
self clearCodeView. |
|
4384 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
4385 |
||
4386 |
lastNr := self numberOfChanges. |
|
4387 |
1 to:changeNr do:[:changeNr | |
|
4388 |
thisClassName := self classNameOfChange:changeNr. |
|
4389 |
thisClassName = classNameToApply ifTrue:[ |
|
4390 |
changeListView setSelection:changeNr. |
|
4391 |
self applyChange:changeNr. |
|
4392 |
lastChange := changeNr |
|
4393 |
]. |
|
4394 |
]. |
|
4395 |
self autoSelect:changeNr+1. |
|
4396 |
] |
|
4397 |
] |
|
4398 |
||
4399 |
"Modified: 21.1.1997 / 22:26:04 / cg" |
|
4400 |
! |
|
4401 |
||
202 | 4402 |
doApplyClassRest |
4403 |
"user wants all changes for this class from changeNr to be applied" |
|
4404 |
||
3668 | 4405 |
self withSingleSelectedChangeDo:[:changeNr | |
3211 | 4406 |
|thisClassName classNameToApply lastChange |
4407 |
lastNr "{ Class: SmallInteger }" | |
|
4408 |
||
4409 |
classNameToApply := self classNameOfChange:changeNr. |
|
4410 |
classNameToApply notNil ifTrue:[ |
|
4411 |
self clearCodeView. |
|
4412 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
4413 |
||
4414 |
lastNr := self numberOfChanges. |
|
4415 |
changeNr to:lastNr do:[:changeNr | |
|
4416 |
thisClassName := self classNameOfChange:changeNr. |
|
4417 |
thisClassName = classNameToApply ifTrue:[ |
|
4418 |
changeListView setSelection:changeNr. |
|
4419 |
self applyChange:changeNr. |
|
4420 |
lastChange := changeNr |
|
4421 |
]. |
|
4422 |
]. |
|
4423 |
self autoSelect:lastChange. |
|
4424 |
] |
|
202 | 4425 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
4426 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
4427 |
"Modified: 21.1.1997 / 22:26:04 / cg" |
37 | 4428 |
! |
4429 |
||
3668 | 4430 |
doApplyFromBeginning |
4431 |
"user wants all changes from 1 to changeNr to be applied" |
|
4432 |
||
4433 |
self withSingleSelectedChangeDo:[:changeNr | |
|
4434 |
|lastNr "{ Class: SmallInteger }" | |
|
4435 |
||
4436 |
self clearCodeView. |
|
4437 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
4438 |
||
4439 |
1 to:changeNr do:[:changeNr | |
|
4440 |
changeListView setSelection:changeNr. |
|
4441 |
self applyChange:changeNr |
|
4442 |
]. |
|
4443 |
self autoSelect:changeNr+1. |
|
4444 |
] |
|
4445 |
! |
|
4446 |
||
202 | 4447 |
doApplyRest |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4448 |
"apply all changes from changeNr to the end" |
28 | 4449 |
|
3668 | 4450 |
self withSingleSelectedChangeDo:[:changeNr | |
3211 | 4451 |
|lastNr "{ Class: SmallInteger }" | |
4452 |
||
4453 |
self clearCodeView. |
|
4454 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
4455 |
||
4456 |
lastNr := self numberOfChanges. |
|
4457 |
changeNr to:lastNr do:[:changeNr | |
|
4458 |
changeListView setSelection:changeNr. |
|
4459 |
self applyChange:changeNr |
|
4460 |
]. |
|
4461 |
self autoSelect:self numberOfChanges. |
|
37 | 4462 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
4463 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
4464 |
"Modified: 21.1.1997 / 22:25:29 / cg" |
37 | 4465 |
! |
4466 |
||
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4467 |
doApplyToConflictOrEnd |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4468 |
"apply all changes from changeNr to either a conflict (i.e. method exists) |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4469 |
or the end." |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4470 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4471 |
self withSingleSelectedChangeDo:[:changeNr | |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4472 |
|lastNr "{ Class: SmallInteger }"| |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4473 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4474 |
self clearCodeView. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4475 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4476 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4477 |
lastNr := self numberOfChanges. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4478 |
changeNr to:lastNr do:[:changeNr | |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4479 |
| cls sel | |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4480 |
changeListView setSelection:changeNr. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4481 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4482 |
((cls := self classOfChange:changeNr ifAbsent:[:className| nil]) notNil |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4483 |
and:[(sel := self selectorOfMethodChange:changeNr) notNil]) |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4484 |
ifTrue:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4485 |
(cls implements:sel) ifTrue:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4486 |
self autoSelect:changeNr. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4487 |
^ self |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4488 |
]. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4489 |
]. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4490 |
self applyChange:changeNr |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4491 |
]. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4492 |
self autoSelect:self numberOfChanges. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4493 |
] |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4494 |
! |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4495 |
|
45 | 4496 |
doBrowse |
4497 |
"user wants a browser on the class of a change" |
|
4498 |
||
3668 | 4499 |
self withSingleSelectedChangeDo:[:changeNr | |
4500 |
|cls| |
|
4501 |
||
4502 |
cls := self classOfChange:changeNr. |
|
4503 |
cls notNil ifTrue:[ |
|
4504 |
UserPreferences systemBrowserClass |
|
4505 |
openInClass:cls |
|
4506 |
selector:(self selectorOfMethodChange:changeNr) |
|
4507 |
] |
|
37 | 4508 |
] |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4509 |
! |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4510 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4511 |
doBrowseImplementors |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4512 |
"open an implementors-browser" |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4513 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4514 |
|changeNr initial selector| |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4515 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4516 |
(changeNr := self theSingleSelection) notNil ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4517 |
initial := self selectorOfMethodChange:changeNr. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4518 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4519 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4520 |
selector := Dialog |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4521 |
request:'Selector to browse implementors of:' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4522 |
initialAnswer:(initial ? ''). |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4523 |
selector size ~~ 0 ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4524 |
UserPreferences systemBrowserClass |
4157 | 4525 |
browseImplementorsMatching:selector. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4526 |
] |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4527 |
! |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4528 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4529 |
doBrowseSenders |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4530 |
"user wants a browser on the class of a change" |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4531 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4532 |
|changeNr initial selector| |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4533 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4534 |
(changeNr := self theSingleSelection) notNil ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4535 |
initial := self selectorOfMethodChange:changeNr. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4536 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4537 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4538 |
selector := Dialog |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4539 |
request:'Selector to browse senders of:' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4540 |
initialAnswer:(initial ? ''). |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4541 |
selector size ~~ 0 ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4542 |
UserPreferences systemBrowserClass |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4543 |
browseAllCallsOn:selector asSymbol. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4544 |
] |
37 | 4545 |
! |
4546 |
||
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4547 |
doCheckinAndDeleteClassAll |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4548 |
"first checkin the selected changes class then delete all changes |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4549 |
for it." |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4550 |
|
4917
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4551 |
|classes answer logTitle logMessage| |
3442 | 4552 |
|
4553 |
"/ self theSingleSelection isNil ifTrue:[ |
|
4554 |
"/ ^ self information:'Only possible if a single change is selected.'. |
|
4555 |
"/ ]. |
|
4556 |
||
4557 |
self withExecuteCursorDo:[ |
|
4558 |
classes := IdentitySet new. |
|
4559 |
||
4560 |
self withSelectedChangesDo:[:changeNr | |
|
4561 |
| className class | |
|
4562 |
||
4563 |
className := self classNameOfChange:changeNr. |
|
4564 |
className notNil ifTrue:[ |
|
4565 |
class := Smalltalk classNamed:className. |
|
4566 |
class isNil ifTrue:[ |
|
3991 | 4567 |
self error:'oops - no class: ', className mayProceed:true. |
3442 | 4568 |
]. |
4569 |
class notNil ifTrue:[ |
|
4570 |
class := class theNonMetaclass. |
|
4571 |
(classes includes:class) ifFalse:[ |
|
4572 |
class isPrivate ifTrue:[ |
|
4573 |
(classes includes:class owningClass) ifFalse:[ |
|
4574 |
answer := self confirmWithCancel:('This is a private class.\\CheckIn the owner ''%1'' and all of its private classes ?' |
|
4575 |
bindWith:class owningClass name allBold) withCRs. |
|
4576 |
answer isNil ifTrue:[^ self]. |
|
4577 |
answer ifTrue:[ |
|
4578 |
classes add:class owningClass |
|
4579 |
] |
|
4580 |
] |
|
4581 |
] ifFalse:[ |
|
4582 |
classes add:class |
|
4583 |
]. |
|
2682 | 4584 |
] |
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4585 |
] |
3442 | 4586 |
] |
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4587 |
]. |
3442 | 4588 |
|
4917
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4589 |
classes size == 1 ifTrue:[ |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4590 |
logTitle := classes first name. |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4591 |
] ifFalse:[ |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4592 |
logTitle := '%1 classes' bindWith:classes size. |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4593 |
]. |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4594 |
logMessage := SourceCodeManagerUtilities |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4595 |
getLogMessageFor:logTitle |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4596 |
initialAnswer:nil. |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4597 |
|
3442 | 4598 |
changeListView setSelection:nil. |
4599 |
classes do:[:eachClass | |
|
4917
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4600 |
(SourceCodeManagerUtilities checkinClass:eachClass withLog:logMessage) |
3442 | 4601 |
ifTrue:[ |
4602 |
self silentDeleteChangesForClassAndPrivateClasses:eachClass name |
|
4603 |
from:1 to:(self numberOfChanges). |
|
4604 |
] |
|
4605 |
]. |
|
4606 |
self setChangeList. |
|
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4607 |
] |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4608 |
|
3442 | 4609 |
"Modified: / 6.9.1995 / 17:11:16 / claus" |
4610 |
"Modified: / 17.11.2001 / 14:21:13 / cg" |
|
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4611 |
! |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4612 |
|
73 | 4613 |
doCompare |
4614 |
"compare change with current system version |
|
4615 |
- give a note in transcript" |
|
4616 |
||
3668 | 4617 |
self withSingleSelectedChangeDo:[:changeNr | |
4618 |
self withExecuteCursorDo:[ |
|
4619 |
self compareChange:changeNr |
|
4620 |
]. |
|
4621 |
self newLabel:'' |
|
3211 | 4622 |
]. |
4623 |
||
394 | 4624 |
"Modified: 24.2.1996 / 19:37:19 / cg" |
73 | 4625 |
! |
4626 |
||
2835 | 4627 |
doCompareAndCompress |
4628 |
"remove all changes, which are equivalent to the current image version" |
|
4629 |
||
4630 |
|toDelete| |
|
4631 |
||
4632 |
toDelete := OrderedCollection new. |
|
4633 |
self withExecuteCursorDo:[ |
|
4634 |
1 to:self numberOfChanges do:[:changeNr | |
|
4635 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
|
4636 |
toDelete add:changeNr |
|
4637 |
] |
|
4638 |
]. |
|
4639 |
]. |
|
4640 |
||
4641 |
toDelete reverseDo:[:changeNr | |
|
4642 |
self silentDeleteChange:changeNr. |
|
4643 |
]. |
|
4644 |
self setChangeList. |
|
4645 |
" |
|
4646 |
scroll back a bit, if we are left way behind the list |
|
4647 |
" |
|
4648 |
changeListView firstLineShown > self numberOfChanges ifTrue:[ |
|
4649 |
changeListView makeLineVisible:self numberOfChanges |
|
4650 |
]. |
|
4651 |
self clearCodeView. |
|
4652 |
||
4653 |
self newLabel:'' |
|
4654 |
! |
|
4655 |
||
45 | 4656 |
doCompress |
4657 |
"compress the change-set; this replaces multiple method-changes by the last |
|
4658 |
(i.e. the most recent) change" |
|
4659 |
||
1359 | 4660 |
self compressForClass:nil |
4661 |
||
4662 |
"Modified: / 29.10.1997 / 01:03:26 / cg" |
|
4663 |
! |
|
4664 |
||
4665 |
doCompressClass |
|
4666 |
"compress changes for the selected class. |
|
4667 |
this replaces multiple method-changes by the last (i.e. the most recent) change." |
|
4668 |
||
3211 | 4669 |
self theSingleSelection isNil ifTrue:[ |
4670 |
^ self information:'Only possible if a single change is selected.'. |
|
4671 |
]. |
|
4672 |
||
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4673 |
self selectedClassNames do:[:classNameToCompress | |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4674 |
self compressForClass:classNameToCompress. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4675 |
] |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4676 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4677 |
"Created: / 29.10.1997 / 01:05:16 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4678 |
"Modified: / 19.11.2001 / 21:55:17 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4679 |
! |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4680 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4681 |
doCompressSelector |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4682 |
"compress changes for the selected class & selector. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4683 |
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
|
4684 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4685 |
|classSelectorPairs| |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4686 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4687 |
self theSingleSelection isNil ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4688 |
^ self information:'Only possible if a single change is selected.'. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4689 |
]. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4690 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4691 |
classSelectorPairs := Set new. |
3211 | 4692 |
self withSelectedChangesDo:[:changeNr | |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4693 |
| classNameToCompress selector | |
3211 | 4694 |
|
4695 |
classNameToCompress := self classNameOfChange:changeNr. |
|
4696 |
classNameToCompress notNil ifTrue:[ |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4697 |
selector := self selectorOfMethodChange:changeNr. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4698 |
selector notNil ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4699 |
classSelectorPairs add:(classNameToCompress -> selector). |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4700 |
] |
3211 | 4701 |
] |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4702 |
]. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4703 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4704 |
classSelectorPairs do:[:pair | |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4705 |
self compressForClass:pair key selector:pair value. |
1359 | 4706 |
] |
4707 |
||
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4708 |
"Created: / 19.11.2001 / 21:50:59 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4709 |
"Modified: / 19.11.2001 / 22:10:08 / cg" |
45 | 4710 |
! |
4711 |
||
202 | 4712 |
doDelete |
3211 | 4713 |
"delete currently selected change(s)" |
4714 |
||
4715 |
self withSelectedChangesReverseDo:[:changeNr | |
|
4716 |
self deleteChange:changeNr. |
|
4283 | 4717 |
self autoSelectOrEnd:changeNr |
73 | 4718 |
] |
4719 |
! |
|
4720 |
||
3249 | 4721 |
doDeleteAndSelectPrevious |
4722 |
"delete currently selected change(s)" |
|
4723 |
||
4724 |
self withSelectedChangesReverseDo:[:changeNr | |
|
4725 |
self deleteChange:changeNr. |
|
4726 |
self autoSelectOrEnd:changeNr-1 |
|
4727 |
] |
|
4728 |
! |
|
4729 |
||
202 | 4730 |
doDeleteClassAll |
4731 |
"delete all changes with same class as currently selected change" |
|
4732 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4733 |
|classNamesToDelete lastChangeNr overAllNumDeletedBefore| |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4734 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4735 |
lastChangeNr := -1. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4736 |
classNamesToDelete := Set new. |
3211 | 4737 |
self withSelectedChangesDo:[:changeNr | |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4738 |
|classNameToDelete| |
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4739 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4740 |
classNameToDelete := self classNameOfChange:changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4741 |
classNameToDelete notNil ifTrue:[ |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4742 |
classNamesToDelete add:classNameToDelete. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4743 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4744 |
lastChangeNr := lastChangeNr max:changeNr. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4745 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4746 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4747 |
overAllNumDeletedBefore := 0. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4748 |
changeListView setSelection:nil. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4749 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4750 |
self withExecuteCursorDo:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4751 |
classNamesToDelete do:[:classNameToDelete | |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4752 |
|numDeletedBefore| |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4753 |
|
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4754 |
self silentDeleteChangesFor:classNameToDelete |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4755 |
from:lastChangeNr |
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4756 |
to:(self numberOfChanges). |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4757 |
numDeletedBefore := self |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4758 |
silentDeleteChangesFor:classNameToDelete |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4759 |
from:1 |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4760 |
to:(lastChangeNr-1). |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4761 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4762 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4763 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4764 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4765 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4766 |
self setChangeList. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4767 |
self autoSelectOrEnd:lastChangeNr |
286
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4768 |
|
1431 | 4769 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
4770 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
|
286
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4771 |
! |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4772 |
|
2511 | 4773 |
doDeleteClassAndPrivateClassesAll |
4774 |
"delete all changes with same class and private classes |
|
4775 |
as currently selected change" |
|
4776 |
||
3211 | 4777 |
self theSingleSelection isNil ifTrue:[ |
4778 |
^ self information:'Only possible if a single change is selected.'. |
|
4779 |
]. |
|
4780 |
||
4781 |
self withSelectedChangesDo:[:changeNr | |
|
2511 | 4782 |
|classNameToDelete numDeletedBefore| |
4783 |
||
4784 |
classNameToDelete := self ownerClassNameOfChange:changeNr. |
|
4785 |
classNameToDelete notNil ifTrue:[ |
|
4786 |
changeListView setSelection:nil. |
|
4787 |
self silentDeleteChangesForClassAndPrivateClasses:classNameToDelete |
|
4788 |
from:changeNr |
|
4789 |
to:(self numberOfChanges). |
|
4790 |
numDeletedBefore := self |
|
4791 |
silentDeleteChangesForClassAndPrivateClasses:classNameToDelete |
|
4792 |
from:1 |
|
4793 |
to:(changeNr-1). |
|
4794 |
self setChangeList. |
|
4795 |
self autoSelectOrEnd:(changeNr - numDeletedBefore) |
|
4796 |
] |
|
4797 |
] |
|
4798 |
||
4799 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
|
4800 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
|
4801 |
! |
|
4802 |
||
286
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4803 |
doDeleteClassFromBeginning |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4804 |
"delete changes with same class as currently selected change from the beginning |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4805 |
up to the selected change. |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4806 |
Useful to get rid of obsolete changes before a fileout or checkin entry." |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4807 |
|
3668 | 4808 |
self withSingleSelectedChangeDo:[:changeNr | |
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4809 |
|classNameToDelete prevSelection numDeleted| |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4810 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4811 |
classNameToDelete := self classNameOfChange:changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4812 |
classNameToDelete notNil ifTrue:[ |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4813 |
prevSelection := changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4814 |
changeListView setSelection:nil. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4815 |
numDeleted := self |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4816 |
silentDeleteChangesFor:classNameToDelete |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4817 |
from:1 |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4818 |
to:changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4819 |
self setChangeList. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4820 |
self autoSelectOrEnd:(changeNr + 1 - numDeleted) |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4821 |
] |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4822 |
]. |
286
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4823 |
|
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4824 |
"Created: 13.12.1995 / 15:41:58 / cg" |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
4825 |
"Modified: 25.5.1996 / 12:26:34 / cg" |
51 | 4826 |
! |
4827 |
||
73 | 4828 |
doDeleteClassRest |
4829 |
"delete rest of changes with same class as currently selected change" |
|
4830 |
||
3668 | 4831 |
self withSingleSelectedChangeDo:[:changeNr | |
1648 | 4832 |
| classNameToDelete | |
4833 |
||
4834 |
classNameToDelete := self classNameOfChange:changeNr. |
|
4835 |
classNameToDelete notNil ifTrue:[ |
|
4836 |
changeListView setSelection:nil. |
|
4837 |
self silentDeleteChangesFor:classNameToDelete |
|
4838 |
from:changeNr |
|
4839 |
to:(self numberOfChanges). |
|
4840 |
self setChangeList. |
|
4841 |
self autoSelectOrEnd:changeNr |
|
4842 |
] |
|
73 | 4843 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
4844 |
|
1648 | 4845 |
"Modified: / 18.5.1998 / 14:25:07 / cg" |
73 | 4846 |
! |
4847 |
||
3607 | 4848 |
doDeleteClassSelectorAll |
4849 |
"delete all changes with same class and selector as currently selected change" |
|
4850 |
||
4851 |
|classNameSelectorPairsToDelete lastChangeNr overAllNumDeletedBefore| |
|
4852 |
||
4853 |
lastChangeNr := -1. |
|
4854 |
classNameSelectorPairsToDelete := Set new. |
|
4855 |
self withSelectedChangesDo:[:changeNr | |
|
4856 |
|className selector| |
|
4857 |
||
4858 |
className := self classNameOfChange:changeNr. |
|
4859 |
selector := self selectorOfMethodChange:changeNr. |
|
4860 |
selector notNil ifTrue:[ |
|
4861 |
(className notNil and:[selector notNil]) ifTrue:[ |
|
4862 |
classNameSelectorPairsToDelete add:(className -> selector). |
|
4863 |
] |
|
4864 |
]. |
|
4865 |
lastChangeNr := lastChangeNr max:changeNr. |
|
4866 |
]. |
|
4867 |
||
4868 |
overAllNumDeletedBefore := 0. |
|
4869 |
changeListView setSelection:nil. |
|
4870 |
||
4871 |
self withExecuteCursorDo:[ |
|
4872 |
classNameSelectorPairsToDelete do:[:pair | |
|
4873 |
|numDeletedBefore className selector| |
|
4874 |
||
4875 |
className := pair key. |
|
4876 |
selector := pair value. |
|
4877 |
self silentDeleteChangesFor:className selector:selector |
|
4878 |
from:lastChangeNr |
|
4879 |
to:(self numberOfChanges). |
|
4880 |
numDeletedBefore := self |
|
4881 |
silentDeleteChangesFor:className selector:selector |
|
4882 |
from:1 |
|
4883 |
to:(lastChangeNr-1). |
|
4884 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
4885 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
4886 |
]. |
|
4887 |
]. |
|
4888 |
||
4889 |
self setChangeList. |
|
4890 |
self autoSelectOrEnd:lastChangeNr |
|
4891 |
||
4892 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
|
4893 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
|
4894 |
! |
|
4895 |
||
4896 | 4896 |
doDeleteFromBeginning |
4897 |
"delete all changes from 1 to the current" |
|
4898 |
||
4899 |
self withSingleSelectedChangeDo:[:changeNr | |
|
4900 |
self deleteChangesFrom:1 to:changeNr. |
|
4901 |
self clearCodeView. |
|
4902 |
self autoSelectOrEnd:changeNr |
|
4903 |
] |
|
4904 |
! |
|
4905 |
||
202 | 4906 |
doDeleteRest |
4907 |
"delete all changes from current to the end" |
|
51 | 4908 |
|
3668 | 4909 |
self withSingleSelectedChangeDo:[:changeNr | |
4910 |
self deleteChangesFrom:changeNr to:(self numberOfChanges). |
|
4911 |
self clearCodeView. |
|
4912 |
self autoSelectOrEnd:changeNr-1 |
|
4913 |
] |
|
132 | 4914 |
! |
4915 |
||
4916 |
doFileoutAndDeleteClassAll |
|
4917 |
"first fileOut the selected changes class then delete all changes |
|
4918 |
for it." |
|
4919 |
||
3668 | 4920 |
self withSingleSelectedChangeDo:[:changeNr | |
2835 | 4921 |
| className class | |
4922 |
||
4923 |
className := self classNameOfChange:changeNr. |
|
4924 |
className notNil ifTrue:[ |
|
4925 |
class := Smalltalk classNamed:className. |
|
4926 |
class notNil ifTrue:[ |
|
4927 |
Class fileOutErrorSignal handle:[:ex | |
|
4928 |
self warn:('fileout failed: ' , ex description). |
|
4929 |
] do:[ |
|
4930 |
class fileOut. |
|
4931 |
self doDeleteClassAll |
|
4932 |
]. |
|
4933 |
]. |
|
4934 |
||
4935 |
]. |
|
132 | 4936 |
] |
4937 |
||
4938 |
"Modified: 6.9.1995 / 17:11:16 / claus" |
|
202 | 4939 |
! |
73 | 4940 |
|
202 | 4941 |
doMakePatch |
4942 |
"user wants a change to be made a patch |
|
4943 |
- copy it over to the patches file" |
|
89 | 4944 |
|
3211 | 4945 |
self withSelectedChangesDo:[:changeNr | |
4946 |
self makeChangeAPatch:changeNr. |
|
4947 |
self autoSelect:(changeNr + 1) |
|
202 | 4948 |
] |
73 | 4949 |
! |
4950 |
||
202 | 4951 |
doMakePermanent |
4952 |
"user wants a change to be made permanent |
|
4953 |
- rewrite the source file where this change has to go" |
|
4954 |
||
4955 |
|yesNoBox| |
|
73 | 4956 |
|
3211 | 4957 |
(self theSingleSelection) isNil ifTrue:[ |
4958 |
^ self information:'Only possible if a single change is selected.'. |
|
4959 |
]. |
|
4960 |
||
202 | 4961 |
yesNoBox := YesNoBox new. |
4962 |
yesNoBox title:(resources at:'Warning: this operation cannot be undone'). |
|
1378 | 4963 |
yesNoBox okText:(resources at:'continue') noText:(resources at:'abort'). |
202 | 4964 |
yesNoBox okAction:[ |changeNr| |
4965 |
||
3211 | 4966 |
changeNr := self theSingleSelection. |
4967 |
changeNr notNil ifTrue:[ |
|
4968 |
self makeChangePermanent:changeNr. |
|
4969 |
self autoSelect:(changeNr + 1) |
|
4970 |
] |
|
4971 |
]. |
|
917 | 4972 |
yesNoBox showAtPointer. |
4973 |
yesNoBox destroy |
|
4974 |
||
4975 |
"Modified: 7.1.1997 / 23:03:33 / cg" |
|
73 | 4976 |
! |
4977 |
||
202 | 4978 |
doSave |
4979 |
"user wants a change to be appended to a file" |
|
73 | 4980 |
|
3211 | 4981 |
|fileName| |
4982 |
||
4983 |
self withSelectedChangesDo:[:changeNr | |
|
1473 | 4984 |
fileName := Dialog |
5735 | 4985 |
requestFileName:'Append change to:' |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4986 |
default:(lastSaveFileName ? '') |
5735 | 4987 |
ok:'Append' |
4988 |
abort:'Abort' |
|
1473 | 4989 |
pattern:'*.chg'. |
4990 |
||
4991 |
fileName notNil ifTrue:[ |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4992 |
lastSaveFileName := fileName. |
1473 | 4993 |
self withCursor:(Cursor write) do:[ |
4994 |
self appendChange:changeNr toFile:fileName. |
|
4995 |
]. |
|
4996 |
self autoSelect:(changeNr + 1) |
|
4997 |
]. |
|
202 | 4998 |
] |
73 | 4999 |
! |
5000 |
||
202 | 5001 |
doSaveClass |
5002 |
"user wants changes for some class from current to end to be appended to a file" |
|
89 | 5003 |
|
3211 | 5004 |
(self theSingleSelection) isNil ifTrue:[ |
5005 |
^ self information:'Only possible if a single change is selected.'. |
|
5006 |
]. |
|
202 | 5007 |
self doSaveClassFrom:1 |
89 | 5008 |
! |
5009 |
||
202 | 5010 |
doSaveClassAll |
5011 |
"user wants changes for some class from current to end to be appended to a file" |
|
73 | 5012 |
|
3211 | 5013 |
(self theSingleSelection) isNil ifTrue:[ |
5014 |
^ self information:'Only possible if a single change is selected.'. |
|
5015 |
]. |
|
202 | 5016 |
self doSaveClassFrom:1 |
5017 |
! |
|
5018 |
||
5019 |
doSaveClassFrom:startNr |
|
5020 |
"user wants changes from current to end to be appended to a file" |
|
5021 |
||
5022 |
|changeNr classNameToSave| |
|
73 | 5023 |
|
3211 | 5024 |
(changeNr := self theSingleSelection) isNil ifTrue:[ |
5025 |
^ self information:'Only possible if a single change is selected.'. |
|
5026 |
]. |
|
5027 |
classNameToSave := self classNameOfChange:changeNr. |
|
5028 |
classNameToSave notNil ifTrue:[ |
|
5029 |
self saveClass:classNameToSave from:startNr |
|
202 | 5030 |
] |
5031 |
! |
|
73 | 5032 |
|
202 | 5033 |
doSaveClassRest |
5034 |
"user wants changes for some class from current to end to be appended to a file" |
|
73 | 5035 |
|
202 | 5036 |
|changeNr| |
132 | 5037 |
|
3211 | 5038 |
(changeNr := self theSingleSelection) isNil ifTrue:[ |
5039 |
^ self information:'Only possible if a single change is selected.'. |
|
5040 |
]. |
|
5041 |
self doSaveClassFrom:changeNr |
|
81 | 5042 |
! |
5043 |
||
202 | 5044 |
doSaveRest |
5045 |
"user wants changes from current to end to be appended to a file" |
|
73 | 5046 |
|
202 | 5047 |
|changeNr fileName| |
51 | 5048 |
|
3211 | 5049 |
(changeNr := self theSingleSelection) isNil ifTrue:[ |
5050 |
^ self information:'Only possible if a single change is selected.'. |
|
5051 |
]. |
|
5052 |
||
5053 |
fileName := Dialog |
|
5735 | 5054 |
requestFileName:'Append changes to:' |
3211 | 5055 |
default:(lastSaveFileName ? '') |
5735 | 5056 |
ok:'Append' |
5057 |
abort:'Abort' |
|
3211 | 5058 |
pattern:'*.chg'. |
5059 |
||
5060 |
fileName notNil ifTrue:[ |
|
5061 |
lastSaveFileName := fileName. |
|
5062 |
self withCursor:(Cursor write) do:[ |
|
5063 |
changeNr to:(self numberOfChanges) do:[:changeNr | |
|
5064 |
changeListView setSelection:changeNr. |
|
5065 |
(self appendChange:changeNr toFile:fileName) ifFalse:[ |
|
5066 |
^ self |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5067 |
] |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5068 |
] |
3211 | 5069 |
] |
202 | 5070 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
5071 |
|
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
5072 |
"Modified: 25.5.1996 / 12:26:41 / cg" |
51 | 5073 |
! |
5074 |
||
202 | 5075 |
doUpdate |
5076 |
"reread the changes-file" |
|
51 | 5077 |
|
202 | 5078 |
self readChangesFileInBackground:true. |
5178 | 5079 |
self newLabel:''. |
202 | 5080 |
realized ifTrue:[ |
4488 | 5081 |
self setChangeList. |
202 | 5082 |
] |
51 | 5083 |
! |
5084 |
||
202 | 5085 |
doWriteBack |
5086 |
"write back the list onto the changes file" |
|
51 | 5087 |
|
5088 |
anyChanges ifTrue:[ |
|
4488 | 5089 |
(self writeBackChanges) ifTrue:[ |
5090 |
realized ifTrue:[ |
|
5091 |
self readChangesFileInBackground:false. |
|
5178 | 5092 |
self newLabel:''. |
4488 | 5093 |
realized ifTrue:[ |
5094 |
self setChangeList |
|
5095 |
] |
|
5096 |
] |
|
5097 |
] |
|
202 | 5098 |
] |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
5099 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
5100 |
"Modified: 5.9.1996 / 17:19:46 / cg" |
202 | 5101 |
! |
126 | 5102 |
|
1471 | 5103 |
doubleClickOnChange:lineNr |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5104 |
"action performed when a change-list entry is doubleClicked" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5105 |
|
1471 | 5106 |
self doBrowse |
5107 |
||
5108 |
"Created: / 6.2.1998 / 13:08:49 / cg" |
|
5109 |
! |
|
5110 |
||
1127 | 5111 |
findClass |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5112 |
"findClass menu action: let user enter a classes name, and select the next change for that class" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5113 |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5114 |
|current| |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5115 |
|
1127 | 5116 |
changeNrShown notNil ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5117 |
current := self classNameOfChange:changeNrShown. |
1127 | 5118 |
]. |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5119 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5120 |
self |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5121 |
askForSearch:'Class to search for:' |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5122 |
initialAnswer:current |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5123 |
thenSearchUsing:[:searchString :changeNr | |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5124 |
|thisClass| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5125 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5126 |
thisClass := self classNameOfChange:changeNr. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5127 |
(thisClass = searchString |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5128 |
or:[searchString includesMatchCharacters and:[searchString match:thisClass]]) |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5129 |
] |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5130 |
onCancel:[^ self]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5131 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5132 |
lastSearchType := #class. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5133 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5134 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5135 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5136 |
findNext |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5137 |
"findNext menu action: select the next change. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5138 |
Searches for what the last search was for; i.e. either same class or same selector" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5139 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5140 |
lastSearchType == #selector ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5141 |
^ self findNextForSelector |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5142 |
]. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5143 |
lastSearchType == #snapshot ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5144 |
^ self findNextSnapshot |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5145 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5146 |
lastSearchType == #string ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5147 |
^ self findNextForString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5148 |
]. |
3534 | 5149 |
lastSearchType == #difference ifTrue:[ |
5150 |
^ self findNextDifference |
|
5151 |
]. |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5152 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5153 |
^ self findNextForClass |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5154 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5155 |
"Created: / 18.6.1998 / 22:15:00 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5156 |
"Modified: / 18.6.1998 / 22:15:25 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5157 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5158 |
|
3534 | 5159 |
findNextDifference |
5160 |
lastSearchType := #difference. |
|
5161 |
changeNrShown isNil ifTrue:[^ self]. |
|
5162 |
||
5163 |
self findNextForWhich:[:changeNr | |
|
5164 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
|
5165 |
"/ same |
|
5166 |
false |
|
5167 |
] ifFalse:[ |
|
5168 |
"/ different |
|
5169 |
true |
|
5170 |
] |
|
5171 |
] |
|
5172 |
! |
|
5173 |
||
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5174 |
findNextForClass |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5175 |
"findNextForClass menu action: select the next change for the selected changes class" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5176 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5177 |
|cls| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5178 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5179 |
lastSearchType := #class. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5180 |
changeNrShown isNil ifTrue:[^ self]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5181 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5182 |
cls := self classNameOfChange:changeNrShown. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5183 |
cls isNil ifTrue:[^ self]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5184 |
|
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5185 |
self findNextForWhich:[:changeNr | |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5186 |
|thisClass| |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5187 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5188 |
thisClass := self classNameOfChange:changeNr. |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5189 |
(thisClass = cls |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5190 |
or:[cls includesMatchCharacters and:[cls match:thisClass]]) |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5191 |
] |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5192 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5193 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5194 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5195 |
findNextForSelector |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5196 |
"findNextForSelector menu action: select the next change for the selected changes selector" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5197 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5198 |
|sel| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5199 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5200 |
lastSearchType := #selector. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5201 |
changeNrShown isNil ifTrue:[^ self]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5202 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5203 |
sel := self selectorOfMethodChange:changeNrShown. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5204 |
sel isNil ifTrue:[^ self]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5205 |
|
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5206 |
self findNextForWhich: [:changeNr | |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5207 |
|thisSelector| |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5208 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5209 |
thisSelector := self selectorOfMethodChange:changeNr. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5210 |
(thisSelector = sel or:[sel includesMatchCharacters and:[sel match:thisSelector]]) |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5211 |
] |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5212 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5213 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5214 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5215 |
findNextForString |
4458 | 5216 |
lastSearchString isNil ifTrue:[ |
5217 |
^ self findString |
|
5218 |
]. |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5219 |
self findNextWithString:lastSearchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5220 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5221 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5222 |
findNextForWhich:aBlock |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5223 |
"helper: select the next change for which aBlock evaluates to true" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5224 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5225 |
self withCursor:Cursor questionMark do:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5226 |
Object userInterruptSignal handle:[:ex | |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5227 |
self beep. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5228 |
^ 0 |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5229 |
] do:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5230 |
|lastNr nr| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5231 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5232 |
lastNr := self numberOfChanges. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5233 |
nr := changeNrShown + 1. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5234 |
[nr <= lastNr] whileTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5235 |
(aBlock value:nr) ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5236 |
changeListView setSelection:nr . |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5237 |
self changeSelection:nr. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5238 |
^ nr |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5239 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5240 |
nr := nr + 1. |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5241 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5242 |
]. |
1127 | 5243 |
]. |
2132 | 5244 |
self showNotFound. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5245 |
self windowGroup sensor flushKeyboard. "/ avoid multiple beeps, in case of type ahead |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5246 |
^ 0 |
1127 | 5247 |
! |
5248 |
||
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5249 |
findNextSnapshot |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5250 |
"findNextSnapshot menu action: select the next change which is for a snapShot-image save action" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5251 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5252 |
lastSearchType := #snapshot. |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5253 |
changeNrShown isNil ifTrue:[^ self]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5254 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5255 |
self findNextForWhich: [:changeNr | self changeIsSnapShotInfo:changeNr ] |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5256 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5257 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5258 |
findNextWithString:searchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5259 |
lastSearchType := #string. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5260 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5261 |
lastSearchString := searchString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5262 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5263 |
changeNrShown isNil ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5264 |
changeNrShown := 0. |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5265 |
]. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5266 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5267 |
self findNextForWhich: |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5268 |
[:changeNr | |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5269 |
|s| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5270 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5271 |
s := self sourceOfMethodChange:changeNr. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5272 |
s notNil and:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5273 |
(searchString includesMatchCharacters not |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5274 |
and:[(s findString:searchString) ~~ 0]) |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5275 |
or:[ searchString includesMatchCharacters |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5276 |
and:[('*' , searchString , '*') match:s ]]] |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5277 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5278 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5279 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5280 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5281 |
codeView setSearchPattern:searchString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5282 |
codeView |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5283 |
searchFwd:searchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5284 |
ignoreCase:false |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5285 |
startingAtLine:1 col:0 |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5286 |
ifAbsent:nil. |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5287 |
|
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5288 |
! |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5289 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5290 |
findPrevious |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5291 |
"findPrevious menu action: select the previous change. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5292 |
Searches for what the last search was for; i.e. either same class or same selector" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5293 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5294 |
lastSearchType == #selector ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5295 |
^ self findPreviousForSelector |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5296 |
]. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5297 |
lastSearchType == #snapshot ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5298 |
^ self findPreviousSnapshot |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5299 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5300 |
lastSearchType == #string ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5301 |
^ self findPreviousForString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5302 |
]. |
3534 | 5303 |
lastSearchType == #difference ifTrue:[ |
5304 |
^ self findPreviousDifference |
|
5305 |
]. |
|
5306 |
||
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5307 |
^ self findPreviousForClass |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5308 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5309 |
"Created: / 18.6.1998 / 22:15:15 / cg" |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5310 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5311 |
|
3534 | 5312 |
findPreviousDifference |
5313 |
lastSearchType := #difference. |
|
5314 |
changeNrShown isNil ifTrue:[^ self]. |
|
5315 |
||
5316 |
self findPreviousForWhich:[:changeNr | |
|
5317 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
|
5318 |
"/ same |
|
5319 |
false |
|
5320 |
] ifFalse:[ |
|
5321 |
"/ different |
|
5322 |
true |
|
5323 |
] |
|
5324 |
] |
|
5325 |
! |
|
5326 |
||
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5327 |
findPreviousForClass |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5328 |
"findPreviousForClass menu action: select the previous change for the selected changes class" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5329 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5330 |
|cls| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5331 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5332 |
lastSearchType := #class. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5333 |
changeNrShown isNil ifTrue:[^ self]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5334 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5335 |
cls := self classNameOfChange:changeNrShown. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5336 |
cls isNil ifTrue:[^ self]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5337 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5338 |
self findPreviousForWhich: |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5339 |
[:changeNr | |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5340 |
|thisClass| |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5341 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5342 |
thisClass := self classNameOfChange:changeNr. |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5343 |
(thisClass = cls |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5344 |
or:[cls includesMatchCharacters and:[cls match:thisClass]]) |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5345 |
] |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5346 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5347 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5348 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5349 |
findPreviousForSelector |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5350 |
"findPreviousForSelector menu action: select the previous change for the selected changes selector" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5351 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5352 |
|sel| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5353 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5354 |
lastSearchType := #selector. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5355 |
changeNrShown isNil ifTrue:[^ self]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5356 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5357 |
sel := self selectorOfMethodChange:changeNrShown. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5358 |
sel isNil ifTrue:[^ self]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5359 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5360 |
self findPreviousForWhich: |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5361 |
[:changeNr | |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5362 |
|thisSelector| |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5363 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5364 |
thisSelector := self selectorOfMethodChange:changeNr. |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5365 |
(thisSelector = sel |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5366 |
or:[sel includesMatchCharacters and:[sel match:thisSelector]]) |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5367 |
] |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5368 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5369 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5370 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5371 |
findPreviousForString |
4458 | 5372 |
lastSearchString isNil ifTrue:[ |
5373 |
^ self findString |
|
5374 |
]. |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5375 |
self findPreviousWithString:lastSearchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5376 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5377 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5378 |
findPreviousForWhich:aBlock |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5379 |
"helper: select the previous change for which aBlock evaluates to true" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5380 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5381 |
self withCursor:Cursor questionMark do:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5382 |
Object userInterruptSignal handle:[:ex | |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5383 |
self beep. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5384 |
^ 0 |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5385 |
] do:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5386 |
|nr| |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5387 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5388 |
nr := changeNrShown - 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5389 |
[nr >= 1] whileTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5390 |
(aBlock value:nr) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5391 |
changeListView setSelection:nr . |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5392 |
self changeSelection:nr. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5393 |
^ nr |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5394 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5395 |
nr := nr - 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5396 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5397 |
] |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5398 |
]. |
2132 | 5399 |
self showNotFound. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5400 |
self windowGroup sensor flushKeyboard. "/ avoid multiple beeps, in case of type ahead |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5401 |
^ 0 |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5402 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5403 |
|
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5404 |
findPreviousSnapshot |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5405 |
"findPreviousSnapshot menu action: select the previous change which is for a snapShot-image save action" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5406 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5407 |
lastSearchType := #snapshot. |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5408 |
changeNrShown isNil ifTrue:[^ self]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5409 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5410 |
self findPreviousForWhich: [:changeNr | self changeIsSnapShotInfo:changeNr ] |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5411 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5412 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5413 |
findPreviousWithString:searchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5414 |
lastSearchType := #string. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5415 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5416 |
lastSearchString := searchString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5417 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5418 |
changeNrShown isNil ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5419 |
changeNrShown := 0. |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5420 |
]. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5421 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5422 |
self findPreviousForWhich: |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5423 |
[:changeNr | |
3211 | 5424 |
|s includesMatchCharacters| |
5425 |
||
5426 |
includesMatchCharacters := searchString includesMatchCharacters. |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5427 |
s := self sourceOfMethodChange:changeNr. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5428 |
s notNil and:[ |
3211 | 5429 |
(includesMatchCharacters not and:[(s findString:searchString) ~~ 0]) |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5430 |
or:[includesMatchCharacters and:[('*' , searchString , '*') match:s ]]] |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5431 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5432 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5433 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5434 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5435 |
codeView setSearchPattern:searchString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5436 |
codeView |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5437 |
searchFwd:searchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5438 |
ignoreCase:false |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5439 |
startingAtLine:1 col:0 |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5440 |
ifAbsent:nil. |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5441 |
|
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5442 |
! |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5443 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5444 |
findSelector |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5445 |
"findSelector menu action: let user enter a selector, and select the next change for that selector" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5446 |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5447 |
|current| |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5448 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5449 |
changeNrShown notNil ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5450 |
current := self selectorOfMethodChange:changeNrShown. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5451 |
]. |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5452 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5453 |
self |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5454 |
askForSearch:'Selector to search for:' |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5455 |
initialAnswer:current |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5456 |
thenSearchUsing:[:searchString :changeNr | |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5457 |
|thisSelector| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5458 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5459 |
thisSelector := self selectorOfMethodChange:changeNr. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5460 |
(thisSelector = searchString |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5461 |
or:[searchString includesMatchCharacters and:[searchString match:thisSelector]]) |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5462 |
] |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5463 |
onCancel:[^ self]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5464 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5465 |
lastSearchType := #selector. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5466 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5467 |
! |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5468 |
|
2576
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5469 |
findString |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5470 |
|searchString directionHolder| |
2576
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5471 |
|
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5472 |
lastSearchType := #string. |
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5473 |
|
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5474 |
searchString := codeView selection. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5475 |
searchString size == 0 ifTrue:[searchString := lastSearchString]. |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5476 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5477 |
searchString := self |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5478 |
askForSearchString:'String to search for:' |
3554 | 5479 |
initialAnswer:(searchString ? '') |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5480 |
directionInto:(directionHolder := ValueHolder new). |
3554 | 5481 |
|
5482 |
searchString size == 0 ifTrue:[ |
|
2576
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5483 |
^ self |
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5484 |
]. |
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5485 |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5486 |
directionHolder value == #backward ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5487 |
self findPreviousWithString:searchString. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5488 |
] ifFalse:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5489 |
self findNextWithString:searchString. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5490 |
] |
2576
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5491 |
! |
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5492 |
|
202 | 5493 |
noChangesAllowed |
5494 |
"show a warning that changes cannot be changed" |
|
93 | 5495 |
|
3211 | 5496 |
self warn:'Changes are not allowed to be changed.' |
0 | 5497 |
! |
5498 |
||
202 | 5499 |
saveClass:aClassName from:startNr |
5500 |
"user wants changes from current to end to be appended to a file" |
|
51 | 5501 |
|
202 | 5502 |
|changeNr fileName| |
51 | 5503 |
|
202 | 5504 |
changeNr := changeListView selection. |
5505 |
changeNr notNil ifTrue:[ |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5506 |
fileName := Dialog |
5735 | 5507 |
requestFileName:'Append changes for class to:' |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5508 |
default:(lastSaveFileName ? '') |
5735 | 5509 |
ok:'Append' |
5510 |
abort:'Abort' |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5511 |
pattern:'*.chg'. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5512 |
|
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5513 |
fileName notNil ifTrue:[ |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5514 |
lastSaveFileName := fileName. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5515 |
self withCursor:(Cursor write) do:[ |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5516 |
startNr to:(self numberOfChanges) do:[:changeNr | |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5517 |
|thisClassName| |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5518 |
|
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5519 |
thisClassName := self classNameOfChange:changeNr. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5520 |
thisClassName = aClassName ifTrue:[ |
3211 | 5521 |
self setSingleSelection:changeNr. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5522 |
(self appendChange:changeNr toFile:fileName) ifFalse:[ |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5523 |
^ self |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5524 |
] |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5525 |
] |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5526 |
] |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5527 |
] |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5528 |
]. |
202 | 5529 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
5530 |
|
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
5531 |
"Modified: 25.5.1996 / 12:26:44 / cg" |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5532 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5533 |
|
3472 | 5534 |
setEnforcedNameSpace |
5535 |
|nsName listOfKnownNameSpaces| |
|
5536 |
||
5537 |
listOfKnownNameSpaces := Set new. |
|
5538 |
NameSpace |
|
5539 |
allNamespaces |
|
5540 |
do:[:eachNameSpace | |
|
5541 |
listOfKnownNameSpaces add:eachNameSpace name |
|
5542 |
]. |
|
5543 |
listOfKnownNameSpaces := listOfKnownNameSpaces asOrderedCollection sort. |
|
5544 |
||
5545 |
nsName := Dialog |
|
5546 |
request:'When applying, new classes are created in nameSpace:' |
|
5547 |
initialAnswer:(enforcedNameSpace ? Class nameSpaceQuerySignal query name) |
|
5548 |
list:listOfKnownNameSpaces. |
|
5549 |
nsName size ~~ 0 ifTrue:[ |
|
4488 | 5550 |
enforcedNameSpace := NameSpace name:nsName. |
5551 |
autoCompare value ifTrue:[ |
|
5552 |
self doUpdate |
|
5553 |
]. |
|
3472 | 5554 |
] |
5555 |
! |
|
5556 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5557 |
setEnforcedPackage |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5558 |
|pkg listOfKnownPackages| |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5559 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5560 |
listOfKnownPackages := Set new. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5561 |
Smalltalk allClassesDo:[:eachClass | |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5562 |
|package| |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5563 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5564 |
package := eachClass package. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5565 |
package size > 0 ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5566 |
listOfKnownPackages add:package |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5567 |
] |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5568 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5569 |
listOfKnownPackages := listOfKnownPackages asOrderedCollection sort. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5570 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5571 |
pkg := Dialog |
3472 | 5572 |
request:'When applying, changes go into package:' |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5573 |
initialAnswer:(enforcedPackage ? Class packageQuerySignal query) |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5574 |
list:listOfKnownPackages. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5575 |
pkg size ~~ 0 ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5576 |
enforcedPackage := pkg |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5577 |
] |
202 | 5578 |
! ! |
0 | 5579 |
|
761 | 5580 |
!ChangesBrowser class methodsFor:'documentation'! |
202 | 5581 |
|
5582 |
version |
|
5735 | 5583 |
^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.318 2004-03-16 11:42:00 cg Exp $' |
276
017219e571e4
more stuff for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
275
diff
changeset
|
5584 |
! ! |