author | Claus Gittinger <cg@exept.de> |
Sun, 31 Aug 2003 12:39:08 +0200 | |
changeset 5145 | 5e2add158e16 |
parent 5144 | c2c1dc18ca40 |
child 5178 | ccf3ab0d6cb1 |
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 |
|
508 | 55 |
[Class variables:] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
56 |
CompressSnapshotInfo if true (the default), snapshot entries |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
57 |
are also compressed in the compress function. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
58 |
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
|
59 |
Set it to false for this. |
58 | 60 |
|
51 | 61 |
Notice: |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
62 |
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
|
63 |
(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
|
64 |
and manipulate that changeSet. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
65 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
66 |
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
|
67 |
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
|
68 |
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
|
69 |
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
|
70 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
71 |
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
|
72 |
will be adapted soon. |
508 | 73 |
|
74 |
[author:] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
75 |
Claus Gittinger |
508 | 76 |
|
77 |
[start with:] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
78 |
ChangesBrowser open |
1359 | 79 |
|
80 |
[see also:] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
81 |
( Using the ChangesBrowser :html: tools/cbrowser/TOP.html ) |
1359 | 82 |
|
29 | 83 |
" |
84 |
! ! |
|
0 | 85 |
|
761 | 86 |
!ChangesBrowser class methodsFor:'instance creation'! |
45 | 87 |
|
88 |
new |
|
89 |
"create a new changes browser" |
|
90 |
||
1470 | 91 |
^ super |
92 |
label:(self defaultLabel) |
|
93 |
icon:(self defaultIcon) |
|
94 |
||
95 |
"Modified: / 6.2.1998 / 13:25:18 / cg" |
|
45 | 96 |
! |
97 |
||
98 |
openOn:aFileName |
|
99 |
"create c changes browser on a change file" |
|
100 |
||
3674 | 101 |
(self isXMLFile:aFileName) ifTrue:[ |
102 |
^ ((ChangeSetBrowser new label:(self defaultLabel , ': ', aFileName)) |
|
103 |
changeFileName:aFileName) open |
|
104 |
]. |
|
1470 | 105 |
^ ((self new label:(self defaultLabel , ': ', aFileName)) |
106 |
changeFileName:aFileName) open |
|
107 |
||
108 |
"Modified: / 6.2.1998 / 13:27:19 / cg" |
|
45 | 109 |
! ! |
110 |
||
761 | 111 |
!ChangesBrowser class methodsFor:'behavior'! |
0 | 112 |
|
113 |
autoSelectNext |
|
114 |
"returning true here, makes a Delete operation automatically |
|
115 |
select the next change" |
|
116 |
||
117 |
^ true |
|
118 |
! ! |
|
119 |
||
761 | 120 |
!ChangesBrowser class methodsFor:'defaults'! |
0 | 121 |
|
489 | 122 |
defaultIcon |
1153 | 123 |
"return the browsers default window icon" |
124 |
||
125 |
<resource: #style (#ICON #ICON_FILE)> |
|
126 |
||
127 |
|nm i| |
|
128 |
||
129 |
(i := DefaultIcon) isNil ifTrue:[ |
|
2341 | 130 |
i := self classResources at:'ICON' default:nil. |
131 |
i isNil ifTrue:[ |
|
132 |
nm := ClassResources at:'ICON_FILE' default:'CBrowser.xbm'. |
|
2477 | 133 |
i := Smalltalk imageFromFileNamed:nm inPackage:#'stx:libtool'. |
2341 | 134 |
i isNil ifTrue:[ |
2451
2a01088e75d3
try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents:
2450
diff
changeset
|
135 |
i := StandardSystemView defaultIcon |
2341 | 136 |
] |
137 |
]. |
|
138 |
i notNil ifTrue:[ |
|
139 |
DefaultIcon := i := i onDevice:Display |
|
140 |
] |
|
1084 | 141 |
]. |
142 |
^ i |
|
143 |
||
1153 | 144 |
"Modified: 19.3.1997 / 20:48:34 / ca" |
145 |
"Modified: 18.4.1997 / 15:16:24 / cg" |
|
489 | 146 |
! |
147 |
||
73 | 148 |
defaultLabel |
149 |
^ 'Changes Browser' |
|
2417 | 150 |
! |
151 |
||
152 |
isVisualStartable |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
153 |
"return true, if this application can be started via #open. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
154 |
(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
|
155 |
|
2417 | 156 |
^ true |
157 |
||
158 |
"Created: / 27.9.1999 / 12:28:27 / cg" |
|
28 | 159 |
! ! |
160 |
||
3202 | 161 |
!ChangesBrowser class methodsFor:'menu specs'! |
162 |
||
163 |
menuSpec |
|
164 |
"This resource specification was automatically generated |
|
165 |
by the MenuEditor of ST/X." |
|
166 |
||
167 |
"Do not manually edit this!! If it is corrupted, |
|
168 |
the MenuEditor may not be able to read the specification." |
|
169 |
||
170 |
" |
|
171 |
MenuEditor new openOnClass:ChangesBrowser andSelector:#menuSpec |
|
172 |
(Menu new fromLiteralArrayEncoding:(ChangesBrowser menuSpec)) startUp |
|
173 |
" |
|
174 |
||
175 |
<resource: #menu> |
|
176 |
||
177 |
^ |
|
178 |
#(#Menu |
|
179 |
#( |
|
180 |
#(#MenuItem |
|
181 |
#label: 'File' |
|
182 |
#translateLabel: true |
|
183 |
#submenu: |
|
184 |
#(#Menu |
|
185 |
#( |
|
186 |
#(#MenuItem |
|
187 |
#label: 'Compress' |
|
4896 | 188 |
#itemValue: #doCompress |
3202 | 189 |
#translateLabel: true |
190 |
#isVisible: #notEditingClassSource |
|
191 |
) |
|
192 |
#(#MenuItem |
|
4896 | 193 |
#enabled: #hasSingleSelection |
194 |
#label: 'Compress for Class' |
|
195 |
#itemValue: #doCompressClass |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
196 |
#translateLabel: true |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
197 |
#isVisible: #notEditingClassSource |
4896 | 198 |
) |
199 |
#(#MenuItem |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
200 |
#enabled: #hasSingleSelection |
4896 | 201 |
#label: 'Compress for Class && Selector' |
202 |
#itemValue: #doCompressSelector |
|
203 |
#translateLabel: true |
|
204 |
#isVisible: #notEditingClassSource |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
205 |
) |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
206 |
#(#MenuItem |
3202 | 207 |
#label: 'Compare and Compress' |
4896 | 208 |
#itemValue: #doCompareAndCompress |
3202 | 209 |
#translateLabel: true |
210 |
#isVisible: #notEditingClassSource |
|
211 |
) |
|
212 |
#(#MenuItem |
|
213 |
#label: '-' |
|
214 |
#isVisible: #notEditingClassSource |
|
215 |
) |
|
216 |
#(#MenuItem |
|
4896 | 217 |
#enabled: #hasSingleSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
218 |
#label: 'Fileout && Delete all Changes for Class' |
4896 | 219 |
#itemValue: #doFileoutAndDeleteClassAll |
3202 | 220 |
#translateLabel: true |
221 |
#isVisible: #notEditingClassSource |
|
222 |
) |
|
223 |
#(#MenuItem |
|
4896 | 224 |
#enabled: #hasSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
225 |
#label: 'CheckIn && Delete all Changes for Class' |
4896 | 226 |
#itemValue: #doCheckinAndDeleteClassAll |
3202 | 227 |
#translateLabel: true |
228 |
#isVisible: #notEditingClassSource |
|
229 |
) |
|
230 |
#(#MenuItem |
|
231 |
#label: '-' |
|
232 |
#isVisible: #notEditingClassSource |
|
233 |
) |
|
234 |
#(#MenuItem |
|
4896 | 235 |
#enabled: #hasSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
236 |
#label: 'Save In...' |
4896 | 237 |
#itemValue: #doSave |
3202 | 238 |
#translateLabel: true |
239 |
) |
|
240 |
#(#MenuItem |
|
4896 | 241 |
#enabled: #hasSingleSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
242 |
#label: 'Save to End In...' |
4896 | 243 |
#itemValue: #doSaveRest |
3202 | 244 |
#translateLabel: true |
245 |
) |
|
246 |
#(#MenuItem |
|
4896 | 247 |
#enabled: #hasSingleSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
248 |
#label: 'Save for Class to End In...' |
4896 | 249 |
#itemValue: #doSaveClassRest |
3202 | 250 |
#translateLabel: true |
251 |
) |
|
252 |
#(#MenuItem |
|
4896 | 253 |
#enabled: #hasSingleSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
254 |
#label: 'Save all for Class In...' |
4896 | 255 |
#itemValue: #doSaveClassAll |
3202 | 256 |
#translateLabel: true |
257 |
) |
|
258 |
#(#MenuItem |
|
259 |
#label: '-' |
|
260 |
) |
|
261 |
#(#MenuItem |
|
262 |
#label: 'Writeback ClassFile' |
|
4896 | 263 |
#itemValue: #doWriteBack |
3202 | 264 |
#translateLabel: true |
265 |
#isVisible: #editingClassSource |
|
266 |
) |
|
267 |
#(#MenuItem |
|
268 |
#label: 'Writeback ChangeFile' |
|
4896 | 269 |
#itemValue: #doWriteBack |
3202 | 270 |
#translateLabel: true |
271 |
#isVisible: #notEditingClassSource |
|
272 |
) |
|
273 |
#(#MenuItem |
|
274 |
#label: '-' |
|
275 |
) |
|
276 |
#(#MenuItem |
|
277 |
#label: 'Update' |
|
4896 | 278 |
#itemValue: #doUpdate |
3202 | 279 |
#translateLabel: true |
280 |
) |
|
281 |
#(#MenuItem |
|
282 |
#label: '-' |
|
283 |
) |
|
284 |
#(#MenuItem |
|
285 |
#label: 'Exit' |
|
4896 | 286 |
#itemValue: #menuExit |
3202 | 287 |
#translateLabel: true |
288 |
) |
|
289 |
) |
|
290 |
nil |
|
291 |
nil |
|
292 |
) |
|
293 |
) |
|
294 |
#(#MenuItem |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
295 |
#label: 'Change' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
296 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
297 |
#submenu: |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
298 |
#(#Menu |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
299 |
#( |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
300 |
#(#MenuItem |
4896 | 301 |
#enabled: #hasSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
302 |
#label: 'Apply' |
4896 | 303 |
#itemValue: #doApply |
3275
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 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
306 |
#(#MenuItem |
4896 | 307 |
#enabled: #hasSingleSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
308 |
#label: 'Apply to End' |
4896 | 309 |
#itemValue: #doApplyRest |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
310 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
311 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
312 |
#(#MenuItem |
4896 | 313 |
#enabled: #hasSingleSelection |
3668 | 314 |
#label: 'Apply from Begin' |
4896 | 315 |
#itemValue: #doApplyFromBeginning |
3668 | 316 |
#translateLabel: true |
317 |
) |
|
318 |
#(#MenuItem |
|
4896 | 319 |
#enabled: #hasSingleSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
320 |
#label: 'Apply for Class to End' |
4896 | 321 |
#itemValue: #doApplyClassRest |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
322 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
323 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
324 |
#(#MenuItem |
4896 | 325 |
#enabled: #hasSingleSelection |
3668 | 326 |
#label: 'Apply for Class from Begin' |
4896 | 327 |
#itemValue: #doApplyClassFromBeginning |
3668 | 328 |
#translateLabel: true |
329 |
) |
|
330 |
#(#MenuItem |
|
4896 | 331 |
#enabled: #hasNoSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
332 |
#label: 'Apply All' |
4896 | 333 |
#itemValue: #doApplyAll |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
334 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
335 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
336 |
#(#MenuItem |
4896 | 337 |
#enabled: #hasSingleSelection |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
338 |
#label: 'Apply to Conflict or End' |
4896 | 339 |
#itemValue: #doApplyToConflictOrEnd |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
340 |
#translateLabel: true |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
341 |
) |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
342 |
#(#MenuItem |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
343 |
#label: '-' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
344 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
345 |
#(#MenuItem |
4896 | 346 |
#enabled: #hasSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
347 |
#label: 'Delete' |
4896 | 348 |
#itemValue: #doDelete |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
349 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
350 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
351 |
#(#MenuItem |
4896 | 352 |
#enabled: #hasSingleSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
353 |
#label: 'Delete to End' |
4896 | 354 |
#itemValue: #doDeleteRest |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
355 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
356 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
357 |
#(#MenuItem |
4896 | 358 |
#enabled: #hasSingleSelection |
359 |
#label: 'Delete from Begin' |
|
360 |
#itemValue: #doDeleteFromBeginning |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
361 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
362 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
363 |
#(#MenuItem |
4896 | 364 |
#enabled: #hasSingleSelection |
365 |
#label: 'Delete for Class to End' |
|
366 |
#itemValue: #doDeleteClassRest |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
367 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
368 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
369 |
#(#MenuItem |
4896 | 370 |
#enabled: #hasSingleSelection |
371 |
#label: 'Delete for Class from Begin' |
|
372 |
#itemValue: #doDeleteClassFromBeginning |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
373 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
374 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
375 |
#(#MenuItem |
4896 | 376 |
#enabled: #hasSelection |
377 |
#label: 'Delete all for Class' |
|
378 |
#itemValue: #doDeleteClassAll |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
379 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
380 |
#isVisible: #hasNoMultiSelection |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
381 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
382 |
#(#MenuItem |
4896 | 383 |
#enabled: #hasSelection |
384 |
#label: 'Delete all for Class && its Private Classes' |
|
385 |
#itemValue: #doDeleteClassAndPrivateClassesAll |
|
386 |
#translateLabel: true |
|
387 |
#isVisible: #hasNoMultiSelection |
|
388 |
) |
|
389 |
#(#MenuItem |
|
390 |
#enabled: #hasSelection |
|
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
391 |
#label: 'Delete all for Classes' |
4896 | 392 |
#itemValue: #doDeleteClassAll |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
393 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
394 |
#isVisible: #hasMultiSelection |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
395 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
396 |
#(#MenuItem |
4896 | 397 |
#enabled: #hasSelection |
3692
712263b8f5ad
menu texts: standard headline case
Claus Gittinger <cg@exept.de>
parents:
3676
diff
changeset
|
398 |
#label: 'Delete all for Classes && their Private Classes' |
4896 | 399 |
#itemValue: #doDeleteClassAndPrivateClassesAll |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
400 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
401 |
#isVisible: #hasMultiSelection |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
402 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
403 |
#(#MenuItem |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
404 |
#label: '-' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
405 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
406 |
#(#MenuItem |
4896 | 407 |
#enabled: #hasSelection |
4897 | 408 |
#label: 'Delete all Versions of Selected Method' |
4896 | 409 |
#itemValue: #doDeleteClassSelectorAll |
3607 | 410 |
#translateLabel: true |
411 |
#isVisible: #hasNoMultiSelection |
|
412 |
) |
|
413 |
#(#MenuItem |
|
4896 | 414 |
#enabled: #hasSelection |
4897 | 415 |
#label: 'Delete all Versions of all Selected Methods' |
4896 | 416 |
#itemValue: #doDeleteClassSelectorAll |
3607 | 417 |
#translateLabel: true |
418 |
#isVisible: #hasMultiSelection |
|
419 |
) |
|
420 |
#(#MenuItem |
|
421 |
#label: '-' |
|
422 |
) |
|
423 |
#(#MenuItem |
|
4896 | 424 |
#enabled: #hasSingleSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
425 |
#label: 'Compare with Current' |
4896 | 426 |
#itemValue: #doCompare |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
427 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
428 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
429 |
#(#MenuItem |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
430 |
#label: '-' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
431 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
432 |
#(#MenuItem |
4896 | 433 |
#enabled: #hasSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
434 |
#label: 'Make Change a Patch' |
4896 | 435 |
#itemValue: #doMakePatch |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
436 |
#translateLabel: true |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
437 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
438 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
439 |
nil |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
440 |
nil |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
441 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
442 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
443 |
#(#MenuItem |
3202 | 444 |
#label: 'Search' |
445 |
#translateLabel: true |
|
446 |
#submenu: |
|
447 |
#(#Menu |
|
448 |
#( |
|
449 |
#(#MenuItem |
|
450 |
#label: 'Class...' |
|
4896 | 451 |
#itemValue: #findClass |
3202 | 452 |
#translateLabel: true |
453 |
) |
|
454 |
#(#MenuItem |
|
4896 | 455 |
#enabled: #hasSelection |
3202 | 456 |
#label: 'Previous for Class' |
4896 | 457 |
#itemValue: #findPreviousForClass |
3202 | 458 |
#translateLabel: true |
459 |
) |
|
460 |
#(#MenuItem |
|
4896 | 461 |
#enabled: #hasSelection |
3202 | 462 |
#label: 'Next for Class' |
4896 | 463 |
#itemValue: #findNextForClass |
3202 | 464 |
#translateLabel: true |
465 |
) |
|
466 |
#(#MenuItem |
|
467 |
#label: '-' |
|
468 |
) |
|
469 |
#(#MenuItem |
|
470 |
#label: 'Selector...' |
|
4896 | 471 |
#itemValue: #findSelector |
3202 | 472 |
#translateLabel: true |
473 |
) |
|
474 |
#(#MenuItem |
|
4896 | 475 |
#enabled: #hasSelection |
3202 | 476 |
#label: 'Previous for Selector' |
4896 | 477 |
#itemValue: #findPreviousForSelector |
3202 | 478 |
#translateLabel: true |
479 |
) |
|
480 |
#(#MenuItem |
|
4896 | 481 |
#enabled: #hasSelection |
3202 | 482 |
#label: 'Next for Selector' |
4896 | 483 |
#itemValue: #findNextForSelector |
3202 | 484 |
#translateLabel: true |
485 |
) |
|
486 |
#(#MenuItem |
|
487 |
#label: '-' |
|
488 |
) |
|
489 |
#(#MenuItem |
|
490 |
#label: 'String...' |
|
4896 | 491 |
#itemValue: #findString |
3202 | 492 |
#translateLabel: true |
493 |
) |
|
494 |
#(#MenuItem |
|
4896 | 495 |
#enabled: #hasSelection |
3202 | 496 |
#label: 'Previous with String' |
4896 | 497 |
#itemValue: #findPreviousForString |
3202 | 498 |
#translateLabel: true |
499 |
) |
|
500 |
#(#MenuItem |
|
4896 | 501 |
#enabled: #hasSelection |
3202 | 502 |
#label: 'Next with String' |
4896 | 503 |
#itemValue: #findNextForString |
3202 | 504 |
#translateLabel: true |
505 |
) |
|
506 |
#(#MenuItem |
|
507 |
#label: '-' |
|
508 |
) |
|
509 |
#(#MenuItem |
|
4896 | 510 |
#enabled: #hasSelection |
3534 | 511 |
#label: 'Previous Difference' |
4896 | 512 |
#itemValue: #findPreviousDifference |
3534 | 513 |
#translateLabel: true |
514 |
) |
|
515 |
#(#MenuItem |
|
4896 | 516 |
#enabled: #hasSelection |
3534 | 517 |
#label: 'Next Difference' |
4896 | 518 |
#itemValue: #findNextDifference |
3534 | 519 |
#translateLabel: true |
520 |
) |
|
521 |
#(#MenuItem |
|
522 |
#label: '-' |
|
523 |
) |
|
524 |
#(#MenuItem |
|
4896 | 525 |
#enabled: #hasSelection |
3202 | 526 |
#label: 'Previous Snapshot' |
4896 | 527 |
#itemValue: #findPreviousSnapshot |
3202 | 528 |
#translateLabel: true |
529 |
) |
|
530 |
#(#MenuItem |
|
4896 | 531 |
#enabled: #hasSelection |
3202 | 532 |
#label: 'Next Snapshot' |
4896 | 533 |
#itemValue: #findNextSnapshot |
3202 | 534 |
#translateLabel: true |
535 |
) |
|
536 |
) |
|
537 |
nil |
|
538 |
nil |
|
539 |
) |
|
540 |
) |
|
541 |
#(#MenuItem |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
542 |
#label: 'Browse' |
3202 | 543 |
#translateLabel: true |
544 |
#submenu: |
|
545 |
#(#Menu |
|
546 |
#( |
|
547 |
#(#MenuItem |
|
4896 | 548 |
#enabled: #hasSingleSelection |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
549 |
#label: 'Class' |
4896 | 550 |
#itemValue: #doBrowse |
3202 | 551 |
#translateLabel: true |
552 |
) |
|
553 |
#(#MenuItem |
|
554 |
#label: '-' |
|
555 |
) |
|
556 |
#(#MenuItem |
|
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
557 |
#label: 'Senders...' |
4896 | 558 |
#itemValue: #doBrowseSenders |
3202 | 559 |
#translateLabel: true |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
560 |
) |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
561 |
#(#MenuItem |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
562 |
#label: 'Implementors...' |
4896 | 563 |
#itemValue: #doBrowseImplementors |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
564 |
#translateLabel: true |
3202 | 565 |
) |
566 |
) |
|
567 |
nil |
|
568 |
nil |
|
569 |
) |
|
570 |
) |
|
571 |
#(#MenuItem |
|
572 |
#label: 'Settings' |
|
573 |
#translateLabel: true |
|
574 |
#submenu: |
|
575 |
#(#Menu |
|
576 |
#( |
|
577 |
#(#MenuItem |
|
578 |
#label: 'Auto Compare' |
|
579 |
#translateLabel: true |
|
580 |
#indication: #autoCompare |
|
581 |
) |
|
582 |
#(#MenuItem |
|
4487 | 583 |
#label: 'Show Diffs' |
584 |
#translateLabel: true |
|
585 |
#indication: #showingDiffs |
|
586 |
) |
|
587 |
#(#MenuItem |
|
3202 | 588 |
#label: 'Auto Update' |
589 |
#translateLabel: true |
|
590 |
#indication: #autoUpdate |
|
591 |
) |
|
592 |
#(#MenuItem |
|
593 |
#label: '-' |
|
594 |
) |
|
595 |
#(#MenuItem |
|
4897 | 596 |
#label: 'Add to ChangeSet when Applying' |
3319 | 597 |
#translateLabel: true |
598 |
#indication: #updateChangeSet |
|
599 |
) |
|
600 |
#(#MenuItem |
|
3202 | 601 |
#label: 'Apply in Original NameSpace' |
602 |
#translateLabel: true |
|
603 |
#indication: #applyInOriginalNameSpace |
|
604 |
) |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
605 |
#(#MenuItem |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
606 |
#label: '-' |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
607 |
) |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
608 |
#(#MenuItem |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
609 |
#label: 'Apply into Package...' |
4896 | 610 |
#itemValue: #setEnforcedPackage |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
611 |
#translateLabel: true |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
612 |
) |
3472 | 613 |
#(#MenuItem |
4896 | 614 |
#enabled: #applyNotInOriginalNameSpace |
3472 | 615 |
#label: 'Apply into NameSpace...' |
4896 | 616 |
#itemValue: #setEnforcedNameSpace |
3472 | 617 |
#translateLabel: true |
618 |
) |
|
3202 | 619 |
) |
620 |
nil |
|
621 |
nil |
|
622 |
) |
|
623 |
) |
|
624 |
#(#MenuItem |
|
625 |
#label: 'Help' |
|
626 |
#translateLabel: true |
|
627 |
#startGroup: #right |
|
628 |
#submenu: |
|
629 |
#(#Menu |
|
630 |
#( |
|
631 |
#(#MenuItem |
|
632 |
#label: 'ChangesBrowser Documentation' |
|
4896 | 633 |
#itemValue: #openHTMLDocument: |
3202 | 634 |
#translateLabel: true |
635 |
#argument: 'tools/cbrowser/TOP.html' |
|
636 |
) |
|
3205 | 637 |
#(#MenuItem |
638 |
#label: '-' |
|
639 |
) |
|
640 |
#(#MenuItem |
|
641 |
#label: 'About ChangesBrowser...' |
|
4896 | 642 |
#itemValue: #openAboutThisApplication |
3205 | 643 |
#translateLabel: true |
644 |
) |
|
3202 | 645 |
) |
646 |
nil |
|
647 |
nil |
|
648 |
) |
|
649 |
) |
|
650 |
) |
|
651 |
nil |
|
652 |
nil |
|
653 |
) |
|
654 |
! ! |
|
655 |
||
3674 | 656 |
!ChangesBrowser class methodsFor:'private-changeFile access'! |
657 |
||
658 |
readXMLChangesFrom:aStream inBackground:inBackground |
|
659 |
"read an XML source file (format as in campSmalltalk DTD)" |
|
660 |
||
661 |
|changeSet| |
|
662 |
||
663 |
(XML isNil or:[XML::SourceNodeBuilder isNil or:[XML::XMLParser isNil]]) ifTrue:[ |
|
4832 | 664 |
Smalltalk loadPackage:'stx:goodies/xml/vw'. |
3674 | 665 |
(XML isNil or:[XML::SourceNodeBuilder isNil or:[XML::XMLParser isNil]]) ifTrue:[ |
4832 | 666 |
self error:'Could not load XML package(s) from ''stx:goodies/xml/vw'''. |
3674 | 667 |
] |
668 |
]. |
|
669 |
||
670 |
changeSet := ChangeSet new. |
|
671 |
XML::SourceScannerNodeBuilder new |
|
672 |
scanFile:aStream |
|
673 |
do:[:eachChange | |
|
674 |
changeSet addChange:eachChange. |
|
675 |
]. |
|
676 |
^ changeSet |
|
677 |
||
678 |
"/ builder := XML::SourceScannerNodeBuilder new. |
|
679 |
"/ parser := XML::XMLParser on:aStream. |
|
680 |
"/ parser builder:builder. |
|
681 |
"/ parser validate:false. |
|
682 |
"/ parser scanDocument. |
|
683 |
! |
|
684 |
||
685 |
readXMLChangesFromFile:changeFileName inBackground:inBackground |
|
686 |
|s set| |
|
687 |
||
688 |
s := changeFileName asFilename readStream. |
|
689 |
set := self readXMLChangesFrom:s inBackground:inBackground. |
|
690 |
s close. |
|
691 |
^ set. |
|
692 |
! ! |
|
693 |
||
694 |
!ChangesBrowser class methodsFor:'utilities'! |
|
695 |
||
696 |
isXMLFile:aFilename |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
697 |
|stream first| |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
698 |
|
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
699 |
stream := aFilename asFilename readStreamOrNil. |
3674 | 700 |
stream isNil ifTrue:[^ false]. |
701 |
||
702 |
stream skipSeparators. |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
703 |
first := stream peek. |
3674 | 704 |
stream close. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
705 |
^ first == $< |
3674 | 706 |
! ! |
707 |
||
3202 | 708 |
!ChangesBrowser methodsFor:'aspects'! |
709 |
||
710 |
applyInOriginalNameSpace |
|
711 |
^ applyInOriginalNameSpace |
|
712 |
! |
|
713 |
||
3472 | 714 |
applyNotInOriginalNameSpace |
4484 | 715 |
^ BlockValue forLogicalNot:self applyInOriginalNameSpace |
3472 | 716 |
! |
717 |
||
3202 | 718 |
autoCompare |
719 |
^ autoCompare |
|
720 |
! |
|
721 |
||
722 |
autoUpdate |
|
723 |
"enabled/disable automatic update from the change-file (for monitoring)" |
|
724 |
||
725 |
^ autoUpdate |
|
726 |
||
727 |
"Created: 3.12.1995 / 14:14:24 / cg" |
|
728 |
"Modified: 3.12.1995 / 14:20:45 / cg" |
|
729 |
! |
|
730 |
||
731 |
editingClassSource |
|
3203 | 732 |
^ editingClassSource ? false |
3202 | 733 |
! |
734 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
735 |
hasMultiSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
736 |
^ self hasSelection and:[self hasSingleSelection not] |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
737 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
738 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
739 |
hasNoMultiSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
740 |
^ self hasMultiSelection not |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
741 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
742 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
743 |
hasNoSelection |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
744 |
^ self hasSelection 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 |
|
3202 | 747 |
hasSelection |
748 |
^ changeListView hasSelection |
|
749 |
! |
|
750 |
||
3211 | 751 |
hasSingleSelection |
752 |
changeListView multipleSelectOk ifTrue:[ |
|
753 |
^ changeListView selection size == 1 |
|
754 |
]. |
|
755 |
^ changeListView hasSelection |
|
756 |
! |
|
757 |
||
3202 | 758 |
notEditingClassSource |
759 |
^ self editingClassSource not |
|
3211 | 760 |
! |
761 |
||
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
762 |
notEditingClassSourceAndNotReadOnly |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
763 |
^ (self editingClassSource or:[readOnly == true]) not |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
764 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
765 |
|
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
766 |
notReadOnly |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
767 |
^ (readOnly ~~ true) |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
768 |
! |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
769 |
|
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
770 |
readOnly:aBoolean |
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
771 |
readOnly := aBoolean |
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 |
|
4487 | 774 |
showingDiffs |
775 |
showingDiffs isNil ifTrue:[ |
|
4943 | 776 |
showingDiffs := self showingDiffsDefault asValue. |
4487 | 777 |
showingDiffs |
778 |
onChangeEvaluate:[ |
|
779 |
showingDiffs value ifTrue:[ |
|
780 |
self updateDiffView. |
|
781 |
self makeDiffViewVisible |
|
782 |
] ifFalse:[ |
|
783 |
self makeDiffViewInvisible |
|
784 |
]. |
|
785 |
DefaultShowingDiffs := showingDiffs value. |
|
786 |
] |
|
787 |
]. |
|
788 |
^ showingDiffs |
|
789 |
! |
|
790 |
||
4943 | 791 |
showingDiffsDefault |
792 |
^ (DefaultShowingDiffs ? true) |
|
793 |
! |
|
794 |
||
3211 | 795 |
theSingleSelection |
796 |
|sel| |
|
797 |
||
798 |
sel := changeListView selection. |
|
799 |
changeListView multipleSelectOk ifTrue:[ |
|
800 |
sel size == 1 ifTrue:[ |
|
801 |
^ sel first |
|
802 |
]. |
|
803 |
^ nil |
|
804 |
]. |
|
805 |
^ sel. |
|
3319 | 806 |
! |
807 |
||
808 |
updateChangeSet |
|
809 |
^ updateChangeSet |
|
3202 | 810 |
! ! |
811 |
||
202 | 812 |
!ChangesBrowser methodsFor:'compiler interface'! |
813 |
||
814 |
wantChangeLog |
|
815 |
"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
|
816 |
be written when compiling. Return false here." |
202 | 817 |
|
818 |
^ false |
|
819 |
! ! |
|
820 |
||
4869 | 821 |
!ChangesBrowser methodsFor:'compiler interface-error handling'! |
202 | 822 |
|
823 |
correctableError:aString position:relPos to:relEndPos from:aCompiler |
|
824 |
"compiler notifys us of an error - this should really not happen since |
|
825 |
changes ought to be correct (did someone edit the changes file ??). |
|
826 |
Show the bad change in the codeView and let codeView hilight the error; |
|
827 |
no corrections allowed here therefore return false" |
|
828 |
||
2293 | 829 |
ShowWarningDialogs == true ifTrue:[ |
830 |
self error:aString position:relPos to:relEndPos from:aCompiler. |
|
831 |
] ifFalse:[ |
|
832 |
Transcript showCR:aString. |
|
833 |
]. |
|
202 | 834 |
^ false |
835 |
! |
|
836 |
||
2555 | 837 |
correctableSelectorWarning:aString position:relPos to:relEndPos from:aCompiler |
838 |
"compiler notifys us of a warning" |
|
839 |
||
840 |
^ false |
|
841 |
||
842 |
"Modified: / 19.1.2000 / 16:25:31 / cg" |
|
843 |
"Created: / 19.1.2000 / 16:27:23 / cg" |
|
844 |
! |
|
845 |
||
202 | 846 |
error:aString position:relPos to:relEndPos from:aCompiler |
847 |
"compiler notifys us of an error - this should really not happen since |
|
848 |
changes ought to be correct (did someone edit the changes file ??). |
|
849 |
Show the bad change in the codeView and let codeView hilight the error" |
|
850 |
||
851 |
|action| |
|
852 |
||
853 |
(changeNrProcessed ~~ changeNrShown) ifTrue:[ |
|
2293 | 854 |
self changeSelection:changeNrProcessed |
202 | 855 |
]. |
856 |
(skipSignal notNil) ifTrue:[ |
|
857 |
||
2293 | 858 |
codeView highlightingErrorPosition:relPos to:relEndPos do:[ |
859 |
|box| |
|
860 |
||
861 |
" |
|
862 |
start dialog - make certain cleanup is done |
|
863 |
" |
|
864 |
action := OptionBox |
|
865 |
request:aString |
|
866 |
label:'Error' |
|
867 |
form:(WarningBox iconBitmap) |
|
3771 | 868 |
buttonLabels:#('Cancel' 'Skip' " 'Shut up' " 'Continue') |
2420 | 869 |
values:#(#abort #skip " #shutUp " #continue) |
3071
652c6b4f6981
optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents:
3069
diff
changeset
|
870 |
default:#continue |
652c6b4f6981
optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents:
3069
diff
changeset
|
871 |
onCancel:#abort. |
2293 | 872 |
]. |
873 |
||
874 |
"/ action == #shutUp ifTrue:[ |
|
875 |
"/ aCompiler ignoreWarnings. |
|
876 |
"/ ^ false |
|
877 |
"/ ]. |
|
878 |
||
3071
652c6b4f6981
optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents:
3069
diff
changeset
|
879 |
(action == #abort) ifTrue:[ |
3436
c4fe19deba58
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3406
diff
changeset
|
880 |
AbortOperationRequest raise. |
2293 | 881 |
^ false |
882 |
]. |
|
883 |
action == #skip ifTrue:[ |
|
884 |
skipSignal raise. |
|
885 |
^ false |
|
886 |
]. |
|
887 |
^ false |
|
202 | 888 |
]. |
889 |
^ codeView error:aString position:relPos to:relEndPos from:aCompiler |
|
373 | 890 |
|
3436
c4fe19deba58
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3406
diff
changeset
|
891 |
"Modified: / 16.11.2001 / 17:38:10 / cg" |
202 | 892 |
! |
893 |
||
3064 | 894 |
unusedVariableWarning:aString position:relPos to:relEndPos from:aCompiler |
895 |
"compiler notifies us of a (or some) unused variables; |
|
896 |
hilight the error (relPos to relEndPos) and show a Box asking for continue/correct/abort; |
|
897 |
this method should return true to the compiler if user wants the error |
|
898 |
to be corrected; false otherwise" |
|
899 |
||
900 |
^ false |
|
901 |
! |
|
902 |
||
202 | 903 |
warning:aString position:relPos to:relEndPos from:aCompiler |
904 |
"compiler notifys us of a warning - ignore it" |
|
905 |
||
906 |
^ self |
|
907 |
! ! |
|
908 |
||
2604 | 909 |
!ChangesBrowser methodsFor:'event handling'! |
202 | 910 |
|
911 |
handlesKeyPress:key inView:view |
|
912 |
"this method is reached via delegation: are we prepared to handle |
|
913 |
a keyPress in some other view ?" |
|
914 |
||
1127 | 915 |
<resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)> |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
916 |
|
202 | 917 |
view == changeListView ifTrue:[ |
4488 | 918 |
(key == #Delete |
919 |
or:[key == #BackSpace |
|
920 |
or:[key == #Accept |
|
921 |
or:[key == #Find |
|
922 |
or:[key == #FindPrev |
|
923 |
or:[key == #FindNext]]]]]) ifTrue:[^ true]. |
|
202 | 924 |
]. |
925 |
^ false |
|
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
926 |
|
1127 | 927 |
"Modified: 8.4.1997 / 11:01:42 / cg" |
0 | 928 |
! |
929 |
||
202 | 930 |
keyPress:key x:x y:y view:view |
931 |
"this method is reached via delegation from the changeListView" |
|
932 |
||
1127 | 933 |
<resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)> |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
934 |
|
3249 | 935 |
(key == #Delete) ifTrue:[ |
4283 | 936 |
self sensor shiftDown ifTrue:[ |
937 |
self doDeleteAndSelectPrevious. |
|
938 |
] ifFalse:[ |
|
939 |
self doDelete. |
|
940 |
]. |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
941 |
^ self |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
942 |
]. |
3249 | 943 |
(key == #BackSpace) ifTrue:[ |
944 |
self doDeleteAndSelectPrevious. |
|
945 |
^ self |
|
946 |
]. |
|
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
947 |
(key == #Accept) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
948 |
self doApply. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
949 |
^ self |
202 | 950 |
]. |
1127 | 951 |
(key == #Find) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
952 |
self findClass. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
953 |
^ self |
1127 | 954 |
]. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
955 |
(key == #FindPrev) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
956 |
self findPrevious. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
957 |
^ self |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
958 |
]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
959 |
(key == #FindNext) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
960 |
self findNext. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
961 |
^ self |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
962 |
]. |
202 | 963 |
changeListView keyPress:key x:x y:y |
417
c80a8acf429c
show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents:
394
diff
changeset
|
964 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
965 |
"Modified: / 18.6.1998 / 22:15:36 / cg" |
202 | 966 |
! ! |
967 |
||
3327 | 968 |
!ChangesBrowser methodsFor:'help'! |
202 | 969 |
|
394 | 970 |
showActivity:someMessage |
502 | 971 |
"some activityNotification to be forwarded to the user; |
972 |
show it in the windows title area here." |
|
973 |
||
394 | 974 |
self label:someMessage |
975 |
||
976 |
"Created: 24.2.1996 / 19:35:42 / cg" |
|
502 | 977 |
"Modified: 23.4.1996 / 21:39:36 / cg" |
202 | 978 |
! ! |
979 |
||
4868 | 980 |
!ChangesBrowser methodsFor:'initialization & release'! |
202 | 981 |
|
3202 | 982 |
autoCompareChanged |
983 |
"sent from the compare-toggle" |
|
984 |
||
3534 | 985 |
|doCompare| |
986 |
||
987 |
doCompare := autoCompare value. |
|
988 |
DefaultAutoCompare := doCompare. |
|
989 |
self setupTabSpec. |
|
990 |
doCompare ifTrue:[ |
|
3202 | 991 |
self doUpdate |
992 |
] ifFalse:[ |
|
993 |
changeListView invalidate. "/ clear; redraw. |
|
994 |
] |
|
995 |
! |
|
996 |
||
202 | 997 |
changeListMenu |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
998 |
"return the menu for the change (upper) list" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
999 |
|
586 | 1000 |
<resource: #keyboard ( #Accept #Delete ) > |
1359 | 1001 |
<resource: #programMenu > |
586 | 1002 |
|
3211 | 1003 |
|items m replNext replPrev sel| |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1004 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1005 |
self sensor ctrlDown ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1006 |
"/ 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
|
1007 |
items := #( |
3202 | 1008 |
('Search Class...' findClass #Find ) |
1009 |
('Previous for this Class' findPreviousForClass #FindPrevClass ) |
|
1010 |
('Next for this Class' findNextForClass #FindNextClass ) |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1011 |
('-' ) |
3202 | 1012 |
('Search Selector...' findSelector ) |
1013 |
('Previous with this Selector' findPreviousForSelector #FindPrevSelector ) |
|
1014 |
('Next with this Selector' findNextForSelector #FindNextSelector ) |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1015 |
('-' ) |
3202 | 1016 |
('Search String...' findString ) |
1017 |
('Previous with this String' findPreviousForString #FindPrevString ) |
|
1018 |
('Next with this String' findNextForString #FindNextString ) |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1019 |
('-' ) |
3202 | 1020 |
('Previous Snapshot' findPreviousSnapshot #FindPrevSnapshot ) |
1021 |
('Next Snapshot' findNextSnapshot #FindNextSnapshot ) |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1022 |
). |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1023 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1024 |
lastSearchType == #selector ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1025 |
replNext := #FindNextSelector. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1026 |
replPrev := #FindPrevSelector. |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1027 |
] ifFalse:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1028 |
lastSearchType == #snapshot ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1029 |
replNext := #FindNextSnapshot. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1030 |
replPrev := #FindPrevSnapshot. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1031 |
] ifFalse:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1032 |
lastSearchType == #string ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1033 |
replNext := #FindNextString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1034 |
replPrev := #FindPrevString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1035 |
] ifFalse:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1036 |
replNext := #FindNextClass. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1037 |
replPrev := #FindPrevClass. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1038 |
] |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1039 |
] |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1040 |
]. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1041 |
items := items deepCopy. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1042 |
items do:[:each | |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1043 |
each replaceAll:replNext with:#FindNext. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1044 |
each replaceAll:replPrev with:#FindPrev. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1045 |
each replaceAny:#(FindNextClass FindPrevClass |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1046 |
FindNextSelector FindPrevSelector |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1047 |
FindNextSnapshot FindPrevSnapshot |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1048 |
FindNextString FindPrevString) |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1049 |
with:nil. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1050 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1051 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1052 |
^ PopUpMenu itemList:items resources:resources. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1053 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
1054 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1055 |
items := #( |
3202 | 1056 |
('Apply' doApply Accept) |
1057 |
('Apply to End' doApplyRest ) |
|
3668 | 1058 |
('Apply from Begin' doApplyFromBeginning ) |
3202 | 1059 |
('Apply for Class to End' doApplyClassRest ) |
3668 | 1060 |
('Apply for Class from Begin' doApplyClassFromBeginning ) |
3202 | 1061 |
('Apply All' doApplyAll ) |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1062 |
('-' ) |
3202 | 1063 |
('Delete' doDelete Delete) |
1064 |
('Delete to End' doDeleteRest ) |
|
1065 |
('Delete for Class to End' doDeleteClassRest ) |
|
3234 | 1066 |
('Delete for Class from Begin' doDeleteClassFromBeginning ) |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1067 |
). |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1068 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1069 |
(self hasSelection and:[self hasSingleSelection not]) ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1070 |
items := items , |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1071 |
#( |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1072 |
('Delete All for Classes' doDeleteClassAll ) |
3698
5ca78c14d740
menu items/button labels uppercase-first
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
1073 |
('Delete All for Classes & their Private Classes' doDeleteClassAndPrivateClassesAll ) |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1074 |
). |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1075 |
] ifFalse:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1076 |
items := items , |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1077 |
#( |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1078 |
('Delete All for Class' doDeleteClassAll ) |
3698
5ca78c14d740
menu items/button labels uppercase-first
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
1079 |
('Delete All for Class & its Private Classes' doDeleteClassAndPrivateClassesAll ) |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1080 |
). |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1081 |
]. |
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 |
items := items , |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1084 |
#( |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1085 |
('-' ) |
3202 | 1086 |
('Compress' doCompress ) |
1087 |
('Compress for Class' doCompressClass ) |
|
1088 |
('Compare and Compress' doCompareAndCompress ) |
|
2835 | 1089 |
('-' ) |
3202 | 1090 |
('Compare with current Version' doCompare ) |
1091 |
('Browse Class' doBrowse ) |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1092 |
('-' ) |
3202 | 1093 |
('Make Change a Patch' doMakePatch ) |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1094 |
). |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1095 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1096 |
editingClassSource ifFalse:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1097 |
items := items , #( |
3202 | 1098 |
('Fileout & Delete All for Class' doFileoutAndDeleteClassAll ) |
1099 |
('CheckIn & Delete All for Class' doCheckinAndDeleteClassAll ) |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1100 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1101 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1102 |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1103 |
items := items , #( |
2474 | 1104 |
('-' ) |
3202 | 1105 |
('Save in...' doSave ) |
3698
5ca78c14d740
menu items/button labels uppercase-first
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
1106 |
('Save to End In...' doSaveRest ) |
5ca78c14d740
menu items/button labels uppercase-first
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
1107 |
('Save for Class to End In...' doSaveClassRest ) |
5ca78c14d740
menu items/button labels uppercase-first
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
1108 |
('Save All for Class In...' doSaveClassAll ) |
2474 | 1109 |
('-' ) |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1110 |
). |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1111 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1112 |
editingClassSource ifTrue:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1113 |
items := items , #( |
3202 | 1114 |
('Writeback ClassFile' doWriteBack ) |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1115 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1116 |
] ifFalse:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1117 |
items := items , #( |
3202 | 1118 |
('Writeback ChangeFile' doWriteBack ) |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1119 |
) |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1120 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
1121 |
|
1833
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
1122 |
items := items , #( |
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
1123 |
('-' ) |
3202 | 1124 |
('Update' doUpdate ) |
1833
c9b1a30b326d
moved update item to the end
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
1125 |
). |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1126 |
|
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1127 |
m := PopUpMenu itemList:items resources:resources. |
202 | 1128 |
|
255 | 1129 |
"/ |
1130 |
"/ disable those that require a selected entry |
|
1131 |
"/ |
|
3202 | 1132 |
self hasSelection ifFalse:[ |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1133 |
m disableAll:#(doApply doApplyClassRest doApplyRest doDelete doDeleteRest doDeleteClassRest |
2511 | 1134 |
doDeleteClassFromBeginning doDeleteClassAll doDeleteClassAndPrivateClassesAll |
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1135 |
doCompare doCompressClass doMakePatch doSaveChangeInFile doMakePermanent |
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1136 |
doSave doSaveRest doSaveClassAll doSaveClassRest doBrowse |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1137 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll) |
1368 | 1138 |
] ifTrue:[ |
3211 | 1139 |
sel := self theSingleSelection. |
1140 |
sel isNil ifTrue:[ |
|
1141 |
"/ multiple selections |
|
1142 |
m disableAll:#(doApplyClassRest doApplyRest doDeleteClassRest doDeleteRest |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1143 |
doDeleteClassFromBeginning |
3211 | 1144 |
doCompressClass doCompare |
1145 |
doSaveClassAll doSaveClassRest doSaveRest doBrowse |
|
3442 | 1146 |
doFileoutAndDeleteClassAll) |
3211 | 1147 |
] ifFalse:[ |
1148 |
(self classNameOfChange:sel) isNil ifTrue:[ |
|
1149 |
m disableAll:#(doApplyClassRest doDeleteClassRest |
|
1150 |
doDeleteClassFromBeginning doDeleteClassAll doDeleteClassAndPrivateClassesAll |
|
1151 |
doCompressClass doCompare doMakePatch |
|
1152 |
doSaveClassAll doSaveClassRest doBrowse |
|
1153 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll) |
|
1154 |
] |
|
1670
c3915af3f7f6
use new menu creation message
Claus Gittinger <cg@exept.de>
parents:
1649
diff
changeset
|
1155 |
] |
255 | 1156 |
]. |
1157 |
||
1158 |
"/ |
|
1159 |
"/ disable those that do not make sense with autoUpdate |
|
1160 |
"/ ('cause this would be overwritten by next update operation) |
|
1161 |
"/ |
|
3202 | 1162 |
autoUpdate value ifTrue:[ |
2511 | 1163 |
m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll |
1164 |
doDeleteClassAndPrivateClassesAll doCompress |
|
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1165 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1166 |
doWriteBack) |
202 | 1167 |
]. |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1168 |
readOnly == true ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1169 |
m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1170 |
doDeleteClassAndPrivateClassesAll doCompress |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1171 |
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1172 |
doWriteBack doSaveBack doUpdate |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1173 |
doApplyAll doApplyRest) |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1174 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1175 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1176 |
self hasSelection ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1177 |
m disable:#doApplyAll |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
1178 |
]. |
3224
b2f3a2a0bc80
readOnly flag added (for method-versions browsing)
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
1179 |
|
202 | 1180 |
^ m |
1181 |
||
1359 | 1182 |
"Modified: / 6.9.1995 / 17:14:22 / claus" |
3442 | 1183 |
"Modified: / 17.11.2001 / 14:16:14 / cg" |
202 | 1184 |
! |
1185 |
||
2114 | 1186 |
destroy |
1187 |
"destroy the receiver; make certain, that boxes are destroyed too" |
|
1188 |
||
1189 |
Processor removeTimedBlock:checkBlock. |
|
1190 |
ObjectMemory removeDependent:self. |
|
1191 |
super destroy |
|
1192 |
! |
|
1193 |
||
202 | 1194 |
focusSequence |
1195 |
^ Array with:changeListView with:codeView |
|
1196 |
! |
|
1197 |
||
1198 |
initialize |
|
3202 | 1199 |
|panel v upperFrame buttonPanel menuPanel mH |
4487 | 1200 |
checkBox oldStyle codeViewBox lbl| |
3202 | 1201 |
|
3211 | 1202 |
"/ oldStyle := true. |
3202 | 1203 |
oldStyle := false. |
202 | 1204 |
|
1205 |
super initialize. |
|
1206 |
||
1207 |
changeFileName := ObjectMemory nameForChanges. "/ 'changes'. |
|
3534 | 1208 |
autoCompare := (DefaultAutoCompare ? false) asValue. |
3202 | 1209 |
autoCompare onChangeSend:#autoCompareChanged to:self. |
1210 |
autoUpdate := false asValue. |
|
2343 | 1211 |
applyInOriginalNameSpace := true asValue. |
4488 | 1212 |
applyInOriginalNameSpace |
1213 |
onChangeEvaluate:[ |
|
1214 |
autoCompare value ifTrue:[ |
|
1215 |
self doUpdate |
|
1216 |
]. |
|
1217 |
]. |
|
4897 | 1218 |
updateChangeSet := true "false" asValue. |
221 | 1219 |
|
1099
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1220 |
" |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1221 |
checkBlock is executed by the Processor. |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1222 |
We use #pushEvent: to perform the update |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1223 |
in our windowgroups process. |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1224 |
" |
b0a4e8ccc5cc
Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
1225 |
checkBlock := [self pushEvent:#checkIfFileHasChanged]. |
202 | 1226 |
|
3202 | 1227 |
oldStyle ifFalse:[ |
1228 |
menuPanel := MenuPanel in:self. |
|
3242 | 1229 |
"/ menuPanel level:1. |
3202 | 1230 |
menuPanel verticalLayout:false. |
1231 |
menuPanel receiver:self. |
|
1232 |
menuPanel menu:(self pullDownMenu). |
|
1233 |
||
1234 |
mH := menuPanel preferredExtent y. |
|
1235 |
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)). |
|
3297 | 1236 |
mH := mH + 1. |
3202 | 1237 |
] ifTrue:[ |
1238 |
mH := 0.0 |
|
1239 |
]. |
|
1240 |
||
1241 |
panel := VariableVerticalPanel origin:(0.0 @ mH) |
|
1471 | 1242 |
corner:(1.0 @ 1.0) |
1243 |
borderWidth:0 |
|
1244 |
in:self. |
|
202 | 1245 |
|
3202 | 1246 |
upperFrame := panel. |
1247 |
oldStyle ifTrue:[ |
|
1248 |
upperFrame := VariableHorizontalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 0.3) in:panel. |
|
1249 |
]. |
|
202 | 1250 |
|
1251 |
v := HVScrollableView for:SelectionInListView miniScrollerH:true in:upperFrame. |
|
3202 | 1252 |
oldStyle ifTrue:[ |
1253 |
v origin:(0.0 @ 0.0) corner:(0.75 @ 1.0). |
|
1254 |
] ifFalse:[ |
|
1255 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 0.3). |
|
1256 |
]. |
|
3090 | 1257 |
|
202 | 1258 |
changeListView := v scrolledView. |
1259 |
changeListView delegate:self. |
|
1260 |
changeListView menuHolder:self; menuPerformer:self; menuMessage:#changeListMenu. |
|
1471 | 1261 |
changeListView doubleClickAction:[:line | self doubleClickOnChange:line]. |
3211 | 1262 |
oldStyle ifFalse:[ |
1263 |
changeListView multipleSelectOk:true. |
|
1264 |
]. |
|
202 | 1265 |
|
3202 | 1266 |
oldStyle ifTrue:[ |
1267 |
buttonPanel := VerticalPanelView in:upperFrame. |
|
1268 |
buttonPanel origin:(0.75 @ 0.0) corner:(1.0 @ 1.0). |
|
1269 |
buttonPanel verticalLayout:#topSpace; horizontalLayout:#leftSpace. |
|
1270 |
||
1271 |
checkBox := CheckBox new model:autoCompare. |
|
1272 |
checkBox label:(resources string:'Auto Compare'). |
|
1273 |
checkBox action:[:val | autoCompare value:val]. |
|
1274 |
buttonPanel addSubView:checkBox. |
|
1275 |
||
1276 |
checkBox := CheckBox new model:autoUpdate. |
|
1277 |
checkBox label:(resources string:'Auto Update'). |
|
1278 |
checkBox action:[:val | autoUpdate value:val]. |
|
1279 |
buttonPanel addSubView:checkBox. |
|
1280 |
||
1281 |
checkBox := CheckBox new. |
|
1282 |
checkBox label:(resources string:'Apply in original NameSpace' withCRs). |
|
1283 |
checkBox model:applyInOriginalNameSpace. |
|
1284 |
buttonPanel addSubView:checkBox. |
|
1285 |
]. |
|
2301 | 1286 |
|
3090 | 1287 |
"/ protectExistingMethods := CheckBox new. |
1288 |
"/ protectExistingMethods label:(resources string:'Protect existing code' withCRs). |
|
1289 |
"/ protectExistingMethods model:protectExistingMethods. |
|
1290 |
"/ buttonPanel addSubView:protectExistingMethods. |
|
1291 |
||
4487 | 1292 |
codeViewBox := View in:panel. |
1293 |
codeViewBox origin:(0.0 @ 0.3) corner:(1.0 @ 1.0). |
|
1294 |
||
1295 |
v := HVScrollableView for:CodeView miniScrollerH:true miniScrollerV:false in:codeViewBox. |
|
1296 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
202 | 1297 |
codeView := v scrolledView. |
1996 | 1298 |
codeView readOnly:true. |
202 | 1299 |
|
4487 | 1300 |
diffViewBox := View in:codeViewBox. |
1301 |
diffViewBox origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
|
1302 |
||
1303 |
lbl := Label label:'Current' in:diffViewBox. |
|
1304 |
lbl layout:(LayoutFrame |
|
1305 |
leftFraction:0.0 offset:0 |
|
1306 |
rightFraction:0.5 offset:0 |
|
1307 |
topFraction:0.0 offset:0 |
|
1308 |
bottomFraction:0.0 offset:20). |
|
1309 |
lbl := Label label:'Change' in:diffViewBox. |
|
1310 |
lbl layout:(LayoutFrame |
|
1311 |
leftFraction:0.5 offset:0 |
|
1312 |
rightFraction:1.0 offset:0 |
|
1313 |
topFraction:0.0 offset:0 |
|
1314 |
bottomFraction:0.0 offset:20). |
|
1315 |
||
1316 |
"/ diffView := DiffTextView in:diffViewBox. |
|
1317 |
"/ diffView layout:(LayoutFrame |
|
1318 |
"/ leftFraction:0.0 offset:0 |
|
1319 |
"/ rightFraction:1.0 offset:0 |
|
1320 |
"/ topFraction:0.0 offset:20 |
|
1321 |
"/ bottomFraction:1.0 offset:0). |
|
1322 |
||
1323 |
v := HVScrollableView for:DiffTextView miniScrollerH:true miniScrollerV:false in:diffViewBox. |
|
1324 |
v layout:(LayoutFrame |
|
1325 |
leftFraction:0.0 offset:0 |
|
1326 |
rightFraction:1.0 offset:0 |
|
1327 |
topFraction:0.0 offset:20 |
|
1328 |
bottomFraction:1.0 offset:0). |
|
1329 |
diffView := v scrolledView. |
|
1330 |
||
1331 |
self showingDiffs value ifFalse:[ |
|
1332 |
self makeDiffViewInvisible |
|
1333 |
]. |
|
1334 |
||
202 | 1335 |
anyChanges := false. |
1336 |
ObjectMemory addDependent:self. "to get shutdown-update" |
|
1337 |
||
1338 |
tabSpec := TabulatorSpecification new. |
|
1339 |
tabSpec unit:#inch. |
|
1340 |
tabSpec positions:#(-1 0 5 8.5 ). |
|
1341 |
" +/- cls>>sel type info" |
|
1342 |
tabSpec align: #(#left #left #left #left). |
|
1343 |
||
1471 | 1344 |
"Modified: / 27.3.1997 / 11:07:07 / stefan" |
3297 | 1345 |
"Modified: / 11.10.2001 / 21:20:48 / cg" |
202 | 1346 |
! |
1347 |
||
1246
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1348 |
postRealize |
3534 | 1349 |
self setupTabSpec. |
202 | 1350 |
self readChangesFileInBackground:true. |
1351 |
self setChangeList. |
|
1352 |
changeListView action:[:lineNr | self changeSelection:lineNr]. |
|
1353 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
|
1246
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1354 |
|
9ed3722bd2f2
setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
1355 |
"Created: 24.7.1997 / 18:06:12 / cg" |
202 | 1356 |
! |
1357 |
||
3202 | 1358 |
pullDownMenu |
1359 |
"return the top (pullDown) menu" |
|
1360 |
||
1361 |
<resource: #programMenu> |
|
1362 |
||
3330 | 1363 |
^ self menuFromSpec:self class menuSpec. |
1364 |
||
1365 |
"/ |m| |
|
1366 |
"/ |
|
1367 |
"/ m := self class menuSpec. |
|
1368 |
"/ m := m decodeAsLiteralArray. |
|
1369 |
"/ m receiver:self. |
|
1370 |
"/ m findGuiResourcesIn:self. |
|
1371 |
"/ ^ m. |
|
3202 | 1372 |
! |
1373 |
||
3534 | 1374 |
setupTabSpec |
1375 |
autoCompare value ifTrue:[ |
|
1376 |
tabSpec positions:#(0 0.15 5 8.5 ). |
|
1377 |
] ifFalse:[ |
|
1378 |
"/ |
|
1379 |
"/ set tabs to hide compare-column |
|
1380 |
"/ |
|
1381 |
tabSpec positions:#(-1 0 5 8.5 ). |
|
1382 |
] |
|
1383 |
! |
|
1384 |
||
627 | 1385 |
update:what with:aParameter from:changedObject |
202 | 1386 |
|box| |
1387 |
||
1388 |
(what == #aboutToExit) ifTrue:[ |
|
2353
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1389 |
" |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1390 |
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
|
1391 |
- 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
|
1392 |
" |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1393 |
anyChanges ifTrue:[ |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1394 |
self raiseDeiconified. |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1395 |
|
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1396 |
box := YesNoBox new. |
2888 | 1397 |
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
|
1398 |
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
|
1399 |
box yesAction:[self writeBackChanges] |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1400 |
noAction:[]. |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1401 |
box showAtPointer. |
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1402 |
box destroy |
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 |
^ self |
202 | 1405 |
]. |
1406 |
super update:what |
|
627 | 1407 |
|
2353
707dd9391c02
Consistent use of 'update' and 'write' in the user interface
Stefan Vogel <sv@exept.de>
parents:
2343
diff
changeset
|
1408 |
"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
|
1409 |
"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
|
1410 |
"Modified: / 24.8.1999 / 09:45:06 / stefan" |
202 | 1411 |
! ! |
1412 |
||
3202 | 1413 |
!ChangesBrowser methodsFor:'menu actions'! |
1414 |
||
1415 |
menuExit |
|
3204 | 1416 |
self closeRequest |
3202 | 1417 |
! |
1418 |
||
1419 |
openAboutThisApplication |
|
1420 |
"opens an about box for this application." |
|
1421 |
||
3503 | 1422 |
DialogBox aboutClass:self class. |
1423 |
"/ |rev myClass clsRev msg| |
|
1424 |
"/ |
|
1425 |
"/ rev := ''. |
|
1426 |
"/ myClass := self class. |
|
1427 |
"/ |
|
1428 |
"/ (clsRev := myClass revision) notNil ifTrue: [rev := ' (rev: ', clsRev printString, ')']. |
|
1429 |
"/ |
|
1430 |
"/ msg := '\' withCRs , myClass name asBoldText, rev. |
|
1431 |
"/ |
|
1432 |
"/ Dialog |
|
1433 |
"/ about:(resources string:msg) |
|
1434 |
"/ label:(resources string:'About ChangesBrowser') |
|
1435 |
"/ icon:self class defaultIcon |
|
1436 |
"/ |
|
1437 |
"/ "Modified: / 17.11.2001 / 23:07:33 / cg" |
|
3202 | 1438 |
! |
1439 |
||
1440 |
openHTMLDocument:relativeDocPath |
|
1441 |
HTMLDocumentView openFullOnDocumentationFile:relativeDocPath |
|
1442 |
! |
|
1443 |
||
1444 |
showAboutSTX |
|
1445 |
ToolApplicationModel openAboutSTX |
|
1446 |
! ! |
|
1447 |
||
202 | 1448 |
!ChangesBrowser methodsFor:'private'! |
1449 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1450 |
autoSelect:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1451 |
"select a change" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1452 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1453 |
self class autoSelectNext ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1454 |
(changeNr <= self numberOfChanges) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1455 |
changeListView setSelection:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1456 |
self changeSelection:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1457 |
^ self |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1458 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1459 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1460 |
self clearCodeView. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1461 |
changeListView setSelection:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1462 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1463 |
"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
|
1464 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1465 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1466 |
autoSelectLast |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1467 |
"select the last change" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1468 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1469 |
self autoSelect:(self numberOfChanges) |
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 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1472 |
autoSelectOrEnd:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1473 |
"select the next change or the last" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1474 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1475 |
|last| |
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 |
last := self numberOfChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1478 |
changeNr < last ifTrue:[ |
3406
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1479 |
self autoSelect:changeNr |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1480 |
] ifFalse:[ |
3406
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1481 |
last == 0 ifTrue:[ |
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1482 |
last := nil |
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1483 |
]. |
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1484 |
changeListView setSelection:last . |
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1485 |
self changeSelection:last. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1486 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1487 |
|
3406
8fe22b36fbc2
fixed autoselectNext if list is empty
Claus Gittinger <cg@exept.de>
parents:
3392
diff
changeset
|
1488 |
"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
|
1489 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1490 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1491 |
checkClassIsLoaded:aClass |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1492 |
"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
|
1493 |
|
4706 | 1494 |
|cls| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1495 |
|
3359
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
1496 |
cls := aClass theNonMetaclass. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1497 |
cls isLoaded ifFalse:[ |
2474 | 1498 |
(self confirm:(resources |
1499 |
string:'%1 is an autoloaded class.\I can only compare the methods source if its loaded first.\\Shall the class be loaded now ?' |
|
2867 | 1500 |
with:cls name allBold) withCRs) |
2474 | 1501 |
ifFalse:[ |
1502 |
AbortSignal raise |
|
1503 |
]. |
|
1504 |
cls autoload |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1505 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1506 |
^ cls isLoaded |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1507 |
|
3359
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
1508 |
"Created: / 12.12.1995 / 14:04:39 / cg" |
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
1509 |
"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
|
1510 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1511 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1512 |
clearCodeView |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1513 |
"clear the (lower) code view." |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1514 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1515 |
self unselect "changeListView deselect". |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1516 |
codeView contents:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1517 |
changeNrShown := nil |
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 |
contractClass:className selector:selector to:maxLen |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1521 |
"contract a class>>selector string (for display in the changeList)." |
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 |
|s l| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1524 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1525 |
s := className , ' ', selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1526 |
s size > maxLen ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1527 |
l := maxLen - 1 - selector size max:20. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1528 |
s := (className contractTo:l) , ' ' , selector. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1529 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1530 |
s size > maxLen ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1531 |
l := maxLen - 1 - className size max:20. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1532 |
s := className , ' ', (selector contractTo:l). |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1533 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1534 |
s size > maxLen ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1535 |
s := (className contractTo:(maxLen // 2 - 1)) , ' ' , (selector contractTo:maxLen // 2) |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1536 |
] |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1537 |
] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1538 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1539 |
^ s |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1540 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1541 |
|
3472 | 1542 |
extractClassAndClassNameFromParseTree:rec |
1543 |
|isUnaryMessage className changeClass| |
|
1544 |
||
1545 |
isUnaryMessage := rec isUnaryMessage. |
|
1546 |
||
1547 |
isUnaryMessage ifTrue:[ |
|
1548 |
className := rec receiver name. |
|
1549 |
] ifFalse:[ |
|
1550 |
className := rec name. |
|
1551 |
]. |
|
1552 |
||
1553 |
enforcedNameSpace notNil ifTrue:[ |
|
1554 |
changeClass := enforcedNameSpace classNamed:className. |
|
1555 |
]. |
|
1556 |
changeClass isNil ifTrue:[ |
|
1557 |
changeClass := Smalltalk classNamed:className. |
|
1558 |
]. |
|
1559 |
isUnaryMessage ifTrue:[ |
|
1560 |
changeClass notNil ifTrue:[ |
|
1561 |
changeClass := changeClass class. |
|
1562 |
]. |
|
1563 |
className := className , ' class'. |
|
1564 |
]. |
|
1565 |
||
1566 |
^ className -> changeClass |
|
1567 |
! |
|
1568 |
||
3203 | 1569 |
isChangeSetBrowser |
1570 |
^ false |
|
1571 |
! |
|
1572 |
||
4487 | 1573 |
makeDiffViewInvisible |
1574 |
diffViewBox lower |
|
1575 |
! |
|
1576 |
||
1577 |
makeDiffViewVisible |
|
1578 |
diffViewBox raise |
|
1579 |
! |
|
1580 |
||
3472 | 1581 |
nameSpaceForApply |
1582 |
applyInOriginalNameSpace value ifFalse:[ |
|
1583 |
^ enforcedNameSpace ? Class nameSpaceQuerySignal query. |
|
1584 |
]. |
|
1585 |
^ Smalltalk. |
|
1586 |
! |
|
1587 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1588 |
newLabel:how |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1589 |
|l| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1590 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1591 |
(changeFileName ~= 'changes') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1592 |
l := self class defaultLabel , ': ', changeFileName |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1593 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1594 |
l := self class defaultLabel |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1595 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1596 |
l := l , ' ' , how. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1597 |
self label: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 |
"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
|
1600 |
"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
|
1601 |
"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
|
1602 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1603 |
|
4857 | 1604 |
oldSourceForParseTree:parseTree |
1605 |
|selector thisClass method superClass thisClassSym ownerClass receiver classGlobalNode| |
|
1606 |
||
1607 |
(parseTree isNil |
|
1608 |
or:[parseTree == #Error |
|
1609 |
or:[ parseTree isMessage not ]]) ifTrue:[ |
|
1610 |
^ nil |
|
1611 |
]. |
|
1612 |
||
1613 |
selector := parseTree selector. |
|
1614 |
receiver := parseTree receiver. |
|
1615 |
||
1616 |
selector == #'removeSelector:' ifTrue:[ |
|
1617 |
thisClass := receiver evaluate. |
|
1618 |
thisClass isBehavior ifTrue:[ |
|
1619 |
thisClass isLoaded ifTrue:[ |
|
1620 |
selector := (parseTree arg1 evaluate). |
|
1621 |
(thisClass includesSelector:selector) ifTrue:[ |
|
1622 |
^ (thisClass compiledMethodAt:selector) source. |
|
1623 |
] |
|
1624 |
] ifFalse:[ |
|
1625 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
1626 |
] |
|
1627 |
] ifFalse:[ |
|
1628 |
^ 'Cannot compare this change (class not present)'. |
|
1629 |
]. |
|
1630 |
]. |
|
1631 |
selector == #'comment:' ifTrue:[ |
|
1632 |
thisClass := receiver evaluate. |
|
1633 |
thisClass isBehavior ifTrue:[ |
|
1634 |
thisClass isLoaded ifTrue:[ |
|
1635 |
^ thisClass name , ' comment: ' , thisClass comment storeString. |
|
1636 |
] ifFalse:[ |
|
1637 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
1638 |
] |
|
1639 |
] ifFalse:[ |
|
1640 |
^ 'Cannot compare this change (class not present)'. |
|
1641 |
]. |
|
1642 |
]. |
|
1643 |
||
1644 |
selector == #'category:' ifTrue:[ |
|
1645 |
receiver isMessage ifTrue:[ |
|
1646 |
receiver selector == #compiledMethodAt: ifTrue:[ |
|
1647 |
classGlobalNode := receiver receiver. |
|
1648 |
(classGlobalNode isMessage and:[classGlobalNode selector == #class]) ifTrue:[ |
|
1649 |
classGlobalNode := classGlobalNode receiver |
|
1650 |
]. |
|
1651 |
classGlobalNode isUndeclared ifTrue:[ |
|
1652 |
^ 'Class does not exist.'. |
|
1653 |
]. |
|
1654 |
(method := receiver evaluate) isMethod ifTrue:[ |
|
1655 |
method category = parseTree arg1 evaluate ifFalse:[ |
|
1656 |
^ '(' , method class name , ' compiledMethodAt: ' , method selector storeString , ') category: ' , method category storeString. |
|
1657 |
] |
|
1658 |
] ifFalse:[ |
|
1659 |
^ 'There is no such method'. |
|
1660 |
] |
|
1661 |
] |
|
1662 |
] |
|
1663 |
]. |
|
1664 |
||
1665 |
selector == #'instanceVariableNames:' ifTrue:[ |
|
1666 |
receiver isMessage ifTrue:[ |
|
1667 |
receiver selector == #class ifTrue:[ |
|
1668 |
thisClass := receiver evaluate. |
|
1669 |
thisClass isBehavior ifTrue:[ |
|
1670 |
thisClass isLoaded ifTrue:[ |
|
1671 |
"/ varsHere := thisClass instanceVariableString asCollectionOfWords. |
|
1672 |
"/ varsInChange := (parseTree arguments at:1) evaluate asCollectionOfWords. |
|
1673 |
^ thisClass definition. |
|
1674 |
] ifFalse:[ |
|
1675 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
1676 |
]. |
|
1677 |
] ifFalse:[ |
|
1678 |
^ 'Cannot compare this change (class not present)'. |
|
1679 |
] |
|
1680 |
]. |
|
1681 |
] |
|
1682 |
]. |
|
1683 |
||
1684 |
(Class definitionSelectors includes:selector) |
|
1685 |
"/ selector == #'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' |
|
1686 |
ifTrue:[ |
|
1687 |
superClass := receiver evaluate. |
|
1688 |
superClass isBehavior ifFalse:[ |
|
1689 |
^ 'Cannot compare this change\\(no such superclass).' withCRs. |
|
1690 |
] ifTrue:[ |
|
1691 |
superClass isLoaded ifFalse:[ |
|
1692 |
^ 'Cannot compare this change\\(superclass not loaded).' withCRs. |
|
1693 |
] ifTrue:[ |
|
1694 |
thisClassSym := (parseTree arguments at:1) evaluate. |
|
1695 |
||
1696 |
(selector endsWith:':privateIn:') ifTrue:[ |
|
1697 |
ownerClass := (parseTree arguments at:5). |
|
1698 |
ownerClass isUndeclared ifFalse:[ |
|
1699 |
ownerClass := ownerClass evaluate. |
|
1700 |
] ifTrue:[ |
|
1701 |
ownerClass := nil. |
|
1702 |
]. |
|
1703 |
ownerClass isNil ifTrue:[ |
|
1704 |
^ 'Cannot compare this change\\(owning class is not loaded).' withCRs. |
|
1705 |
]. |
|
1706 |
thisClass := ownerClass privateClassesAt:thisClassSym. |
|
1707 |
] ifFalse:[ |
|
1708 |
thisClass := (self nameSpaceForApply) at:thisClassSym ifAbsent:nil. |
|
1709 |
]. |
|
1710 |
thisClass notNil ifTrue:[ |
|
1711 |
thisClass isLoaded ifFalse:[ |
|
1712 |
^ 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
1713 |
] ifTrue:[ |
|
1714 |
^ thisClass definition. |
|
1715 |
] |
|
1716 |
] |
|
1717 |
] |
|
1718 |
] |
|
1719 |
]. |
|
1720 |
||
1721 |
^ nil. |
|
1722 |
! |
|
1723 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1724 |
queryCloseText |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1725 |
"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
|
1726 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1727 |
^ 'Quit without updating changeFile ?' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1728 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1729 |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1730 |
selectedClassNames |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1731 |
|classes| |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1732 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1733 |
classes := Set new. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1734 |
self withSelectedChangesDo:[:changeNr | |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1735 |
| classNameToCompress | |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1736 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1737 |
classNameToCompress := self classNameOfChange:changeNr. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1738 |
classNameToCompress notNil ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1739 |
classes add:classNameToCompress. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1740 |
] |
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 |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1743 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
1744 |
"Created: / 19.11.2001 / 21:54:59 / cg" |
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 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1747 |
setChangeList |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1748 |
"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
|
1749 |
view" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1750 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1751 |
changeListView setList:changeHeaderLines expandTabs:false redraw:false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1752 |
changeListView invalidate. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1753 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1754 |
"/ changeListView deselect. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1755 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1756 |
"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
|
1757 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1758 |
|
3211 | 1759 |
setSingleSelection:changeNr |
1760 |
changeListView multipleSelectOk ifFalse:[ |
|
1761 |
changeListView setSelection:changeNr. |
|
1762 |
] ifTrue:[ |
|
1763 |
changeListView setSelection:(Array with:changeNr). |
|
1764 |
]. |
|
1765 |
! |
|
1766 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1767 |
showNotFound |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1768 |
|savedCursor| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1769 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1770 |
savedCursor := cursor. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1771 |
[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1772 |
self cursor:(Cursor cross). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1773 |
self beep. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1774 |
Delay waitForMilliseconds:300. |
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3586
diff
changeset
|
1775 |
] ensure:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1776 |
self cursor:savedCursor |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1777 |
] |
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 |
"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
|
1780 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1781 |
|
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1782 |
sourceOfChange:changeNr |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1783 |
|aStream sawExcla chunk| |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1784 |
|
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1785 |
aStream := self streamForChange:changeNr. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1786 |
aStream isNil ifTrue:[ |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1787 |
^ nil |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1788 |
]. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1789 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1790 |
chunk := aStream nextChunk. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1791 |
sawExcla ifTrue:[ |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1792 |
chunk := aStream nextChunk |
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 close. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1795 |
^ chunk |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1796 |
! |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
1797 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1798 |
unselect |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1799 |
"common unselect" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1800 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1801 |
changeListView setSelection:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1802 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1803 |
"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
|
1804 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1805 |
|
3211 | 1806 |
withSelectedChangesDo:aBlock |
1807 |
"just a helper, check for a selected change and evaluate aBlock |
|
1808 |
with busy cursor" |
|
1809 |
||
1810 |
self withSelectedChangesInOrder:nil do:aBlock |
|
1811 |
! |
|
1812 |
||
1813 |
withSelectedChangesInOrder:order do:aBlock |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1814 |
"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
|
1815 |
with busy cursor" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1816 |
|
3211 | 1817 |
|changeNrSelection| |
1818 |
||
1819 |
changeNrSelection := changeListView selection. |
|
1820 |
changeListView multipleSelectOk ifFalse:[ |
|
1821 |
changeNrSelection notNil ifTrue:[ |
|
1822 |
self withExecuteCursorDo:[ |
|
1823 |
aBlock value:changeNrSelection |
|
1824 |
] |
|
1825 |
] |
|
1826 |
] ifTrue:[ |
|
1827 |
changeNrSelection size > 0 ifTrue:[ |
|
1828 |
self withExecuteCursorDo:[ |
|
1829 |
|changeNumbers| |
|
1830 |
||
1831 |
changeNumbers := changeNrSelection copy sort. |
|
1832 |
order == #reverse ifTrue:[ |
|
1833 |
changeNumbers reverse |
|
1834 |
]. |
|
1835 |
changeNumbers do:aBlock |
|
1836 |
] |
|
1837 |
] |
|
1838 |
]. |
|
1839 |
! |
|
1840 |
||
1841 |
withSelectedChangesReverseDo:aBlock |
|
1842 |
"just a helper, check for a selected change and evaluate aBlock |
|
1843 |
with busy cursor" |
|
1844 |
||
1845 |
self withSelectedChangesInOrder:#reverse do:aBlock |
|
3668 | 1846 |
! |
1847 |
||
1848 |
withSingleSelectedChangeDo:aBlock |
|
1849 |
"just a helper, check for a single selection, and evaluate aBlock |
|
1850 |
with busy cursor" |
|
1851 |
||
1852 |
self theSingleSelection isNil ifTrue:[ |
|
1853 |
^ self information:'Only possible if a single change is selected.'. |
|
1854 |
]. |
|
1855 |
||
1856 |
self withSelectedChangesInOrder:nil do:aBlock |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1857 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1858 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1859 |
!ChangesBrowser methodsFor:'private-change access'! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1860 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1861 |
changeIsFollowupMethodChange:changeNr |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1862 |
"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
|
1863 |
in a bunch of methodsFor-changes)" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1864 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1865 |
^ changeIsFollowupMethodChange at:changeNr |
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 |
"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
|
1868 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1869 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1870 |
changeIsSnapShotInfo:changeNr |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1871 |
"return true, if a change is a snapShot info chunk" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1872 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1873 |
|words chunk| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1874 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1875 |
(self classNameOfChange:changeNr) isNil ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1876 |
" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1877 |
get the chunk |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1878 |
" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1879 |
chunk := changeChunks at:changeNr. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1880 |
"mhmh - empty ??" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1881 |
chunk notNil ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1882 |
(chunk startsWith:'''---') ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1883 |
words := chunk asCollectionOfWords. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1884 |
words size > 2 ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1885 |
(words at:2) = 'snapshot' ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1886 |
^ true |
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 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1889 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1890 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1891 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1892 |
^ false |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1893 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
1894 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1895 |
classNameOfChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1896 |
"return the classname of a change |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1897 |
(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
|
1898 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1899 |
|name| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1900 |
|
3364 | 1901 |
name := self realClassNameOfChange:changeNr. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1902 |
name isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1903 |
(name endsWith:' class') ifTrue:[ |
3364 | 1904 |
name := name copyWithoutLast:6 |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1905 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1906 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1907 |
|
3364 | 1908 |
"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
|
1909 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1910 |
|
3202 | 1911 |
extractSelectorOfMethodChange:changeNr |
1912 |
"return a method-changes selector, or nil if its not a methodChange" |
|
1913 |
||
1914 |
|source parser sel chunk aParseTree | |
|
1915 |
||
1916 |
source := self sourceOfMethodChange:changeNr. |
|
1917 |
source isNil ifTrue:[ |
|
1918 |
(self classNameOfChange:changeNr) notNil ifTrue:[ |
|
1919 |
chunk := changeChunks at:changeNr. |
|
1920 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
|
1921 |
||
1922 |
aParseTree := Parser parseExpression:chunk. |
|
1923 |
(aParseTree isNil |
|
1924 |
or:[aParseTree == #Error |
|
1925 |
or:[aParseTree isMessage not]]) ifTrue:[ |
|
1926 |
^ nil "seems strange ... (could be a comment)" |
|
1927 |
]. |
|
1928 |
sel := aParseTree selector. |
|
1929 |
(#( |
|
1930 |
#'removeSelector:' |
|
1931 |
) includes:sel) ifTrue:[ |
|
1932 |
sel := aParseTree arguments at:1. |
|
1933 |
sel isConstant ifTrue:[ |
|
1934 |
sel := sel evaluate. |
|
1935 |
sel isSymbol ifTrue:[ |
|
1936 |
^ sel |
|
1937 |
] |
|
1938 |
] |
|
1939 |
] |
|
1940 |
]. |
|
1941 |
^ nil |
|
1942 |
]. |
|
1943 |
||
1944 |
||
1945 |
parser := Parser |
|
1946 |
parseMethodArgAndVarSpecification:source |
|
1947 |
in:nil |
|
1948 |
ignoreErrors:true |
|
1949 |
ignoreWarnings:true |
|
1950 |
parseBody:false. |
|
1951 |
||
1952 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
1953 |
sel := parser selector. |
|
1954 |
]. |
|
1955 |
^ sel |
|
1956 |
||
1957 |
"Created: 24.11.1995 / 14:30:46 / cg" |
|
1958 |
"Modified: 5.9.1996 / 17:12:50 / cg" |
|
1959 |
! |
|
1960 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1961 |
fullClassNameOfChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1962 |
"return the full classname of a change |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1963 |
(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
|
1964 |
- 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
|
1965 |
changeClassNames for the next query" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1966 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1967 |
|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
|
1968 |
words changeStream fullParseTree ownerTree ownerName oldDollarSetting| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1969 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1970 |
changeNr isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1971 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1972 |
first look, if not already known |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1973 |
" |
5145 | 1974 |
name := changeClassNames at:changeNr. |
1975 |
name notNil ifTrue:[^ name]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1976 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1977 |
prevMethodDefNr := changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1978 |
[changeIsFollowupMethodChange at:prevMethodDefNr] whileTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1979 |
prevMethodDefNr := prevMethodDefNr - 1. |
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 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1982 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1983 |
get the chunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1984 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1985 |
chunk := changeChunks at:prevMethodDefNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1986 |
chunk isNil ifTrue:[^ nil]. "mhmh - empty" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1987 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1988 |
(chunk startsWith:'''---') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1989 |
words := chunk asCollectionOfWords. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1990 |
words size > 2 ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1991 |
(words at:2) = 'checkin' ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1992 |
name := words at:3. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1993 |
changeClassNames at:changeNr put:name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1994 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1995 |
] |
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 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1998 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
1999 |
"/ fix it - otherwise, it cannot be parsed |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2000 |
(chunk endsWith:'primitiveDefinitions:') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2001 |
chunk := chunk , '''''' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2002 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2003 |
(chunk endsWith:'primitiveFunctions:') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2004 |
chunk := chunk , '''''' |
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 |
(chunk endsWith:'primitiveVariables:') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2007 |
chunk := chunk , '''''' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2008 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2009 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2010 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2011 |
use parser to construct a parseTree |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2012 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2013 |
oldDollarSetting := Parser allowDollarInIdentifier. |
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 |
Parser allowDollarInIdentifier:true. |
5014 | 2016 |
"/ Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
2017 |
"/ do:[ |
|
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
2018 |
aParseTree := Parser parseExpression:chunk. |
5014 | 2019 |
"/ ]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2020 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2021 |
aParseTree == #Error ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2022 |
(chunk includesString:'comment') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2023 |
"/ could be a comment ... |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2024 |
aParseTree := Parser parseExpression:chunk , ''''. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2025 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2026 |
]. |
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3586
diff
changeset
|
2027 |
] ensure:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2028 |
Parser allowDollarInIdentifier:oldDollarSetting |
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 isNil or:[aParseTree == #Error]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2031 |
^ nil "seems strange ... (could be a comment)" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2032 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2033 |
aParseTree isMessage ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2034 |
^ nil "very strange ... (whats that ?)" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2035 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2036 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2037 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2038 |
ask parser for selector |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2039 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2040 |
sel := aParseTree selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2041 |
recTree := aParseTree receiver. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2042 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2043 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2044 |
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
|
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 |
(#(#'methodsFor:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2048 |
#'privateMethodsFor:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2049 |
#'protectedMethodsFor:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2050 |
#'ignoredMethodsFor:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2051 |
#'publicMethodsFor:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2052 |
#'removeSelector:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2053 |
#'comment:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2054 |
#'primitiveDefinitions:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2055 |
#'primitiveFunctions:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2056 |
#'primitiveVariables:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2057 |
#'renameCategory:to:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2058 |
#'instanceVariableNames:' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2059 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2060 |
#'methodsFor:stamp:' "/ Squeak support |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2061 |
#'commentStamp:prior:' "/ Squeak support |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2062 |
#'addClassVarName:' "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
2063 |
#methodsFor "/ Dolphin support |
3472 | 2064 |
#categoriesForClass "/ Dolphin support |
2065 |
#categoriesFor: "/ Dolphin support |
|
2606 | 2066 |
#methods "/ STV support |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2067 |
) includes:sel) ifTrue:[ |
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 |
yes, the className is the receiver |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2070 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2071 |
(recTree notNil and:[recTree ~~ #Error]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2072 |
isMeta := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2073 |
recTree isUnaryMessage ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2074 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2075 |
"id class methodsFor:..." |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2076 |
recTree := recTree receiver. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2077 |
isMeta := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2078 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2079 |
recTree isPrimary ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2080 |
name := recTree name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2081 |
isMeta ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2082 |
name := name , ' class'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2083 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2084 |
changeClassNames at:changeNr put:name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2085 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2086 |
] |
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 |
"more strange things" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2089 |
^ nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2090 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2091 |
|
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 |
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
|
2094 |
" |
2322 | 2095 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2096 |
(('subclass:*' match:sel) |
2322 | 2097 |
or:[('variable*ubclass:*' match:sel)]) ifTrue:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2098 |
"/ 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
|
2099 |
"/ privacy information. |
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 |
changeStream := self streamForChange:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2102 |
changeStream notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2103 |
chunk := changeStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2104 |
changeStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2105 |
fullParseTree := Parser parseExpression:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2106 |
(fullParseTree isNil or:[fullParseTree == #Error]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2107 |
fullParseTree := nil |
2396 | 2108 |
] ifFalse:[ |
2109 |
fullParseTree isMessage ifFalse:[ |
|
2110 |
fullParseTree := nil |
|
2111 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2112 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2113 |
"/ actually, the nil case cannot happen |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2114 |
fullParseTree notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2115 |
aParseTree := fullParseTree. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2116 |
sel := aParseTree selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2117 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2118 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2119 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2120 |
arg1Tree := aParseTree arg1. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2121 |
(arg1Tree notNil and:[arg1Tree isConstant]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2122 |
name := arg1Tree value asString. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2123 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2124 |
"/ is it a private-class ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2125 |
('*privateIn:' match:sel) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2126 |
ownerTree := aParseTree args last. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2127 |
ownerName := ownerTree name asString. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2128 |
name := ownerName , '::' , name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2129 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2130 |
changeClassNames at:changeNr put:name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2131 |
^ name |
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 |
"very strange" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2134 |
^ nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2135 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2136 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2137 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2138 |
is it a class remove ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2139 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2140 |
(sel == #removeClass:) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2141 |
(recTree notNil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2142 |
and:[recTree ~~ #Error |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2143 |
and:[recTree isPrimary |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2144 |
and:[recTree name = 'Smalltalk']]]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2145 |
arg1Tree := aParseTree arg1. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2146 |
(arg1Tree notNil and:[arg1Tree isPrimary]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2147 |
name := arg1Tree name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2148 |
changeClassNames at:changeNr put:name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2149 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2150 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2151 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2152 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2153 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2154 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2155 |
is it a method category change ? |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2156 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2157 |
((sel == #category:) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2158 |
or:[sel == #privacy:]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2159 |
(recTree notNil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2160 |
and:[recTree ~~ #Error |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2161 |
and:[recTree isMessage |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2162 |
and:[recTree selector == #compiledMethodAt:]]]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2163 |
isMeta := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2164 |
recTree := recTree receiver. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2165 |
recTree isUnaryMessage ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2166 |
(recTree selector ~~ #class) ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2167 |
"id class " |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2168 |
recTree := recTree receiver |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2169 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2170 |
recTree isPrimary ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2171 |
isMeta ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2172 |
name := name , ' class'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2173 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2174 |
name := recTree name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2175 |
changeClassNames at:changeNr put:name. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2176 |
^ name |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2177 |
] |
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 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2180 |
^ nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2181 |
|
2606 | 2182 |
"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
|
2183 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2184 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2185 |
numberOfChanges |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2186 |
^ changePositions size |
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 |
"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
|
2189 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2190 |
|
2511 | 2191 |
ownerClassNameOfChange:changeNr |
2192 |
"return the owner classname of a change |
|
2193 |
For a normal class, this is the className; |
|
2194 |
for a private class, this is the name of the owning class" |
|
2195 |
||
4706 | 2196 |
|name "ns idx" cls| |
2511 | 2197 |
|
2198 |
name := self classNameOfChange:changeNr. |
|
2199 |
name isNil ifTrue:[^ nil]. |
|
2200 |
cls := Smalltalk at:name asSymbol. |
|
2201 |
(cls notNil and:[cls isBehavior]) ifTrue:[ |
|
2202 |
cls owningClass notNil ifTrue:[ |
|
2203 |
^ cls owningClass name |
|
2204 |
]. |
|
2205 |
^ cls name |
|
2206 |
]. |
|
2207 |
||
2208 |
"/ (name includes:$:) ifTrue:[ |
|
2209 |
"/ idx := name indexOf:$:. |
|
2210 |
"/ ns := name copyTo:idx-1. |
|
2211 |
"/ ns := Smalltalk at:ns asSymbol. |
|
2212 |
"/ ns notNil ifTrue:[ |
|
2213 |
"/ |
|
2214 |
"/ ]. |
|
2215 |
"/ |
|
2216 |
"/ name := name copyFrom:idx+2. |
|
2217 |
"/ (Smalltalk at:ns asSymbol) notNil ifTrue:[ |
|
2218 |
"/ cls |
|
2219 |
"/ ]. |
|
2220 |
"/ ^ name copyWithoutLast:6 |
|
2221 |
"/ ]. |
|
2222 |
^ name |
|
2223 |
||
2224 |
"Modified: 6.12.1995 / 17:06:31 / cg" |
|
2225 |
! |
|
2226 |
||
3364 | 2227 |
realClassNameOfChange:changeNr |
2228 |
"return the classname of a change" |
|
2229 |
||
2230 |
|name| |
|
2231 |
||
2232 |
name := changeClassNames at:changeNr. |
|
2233 |
name isNil ifTrue:[ |
|
2234 |
name := self fullClassNameOfChange:changeNr. |
|
2235 |
]. |
|
2236 |
^ name |
|
2237 |
||
2238 |
"Modified: / 6.12.1995 / 17:06:31 / cg" |
|
2239 |
"Created: / 5.11.2001 / 18:09:46 / cg" |
|
2240 |
! |
|
2241 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2242 |
selectorOfMethodChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2243 |
"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
|
2244 |
|
3202 | 2245 |
|sel | |
2246 |
||
2247 |
changeSelectors size >= changeNr ifTrue:[ |
|
2248 |
sel := changeSelectors at:changeNr. |
|
2249 |
sel notNil ifTrue:[ ^ sel ]. |
|
2250 |
]. |
|
2251 |
||
2252 |
sel := self extractSelectorOfMethodChange:changeNr. |
|
2253 |
sel notNil ifTrue:[ |
|
2254 |
changeSelectors isNil ifTrue:[ |
|
2255 |
changeSelectors := OrderedCollection new |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2256 |
]. |
3202 | 2257 |
changeSelectors grow:changeNr. |
2258 |
changeSelectors at:changeNr put:sel. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2259 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2260 |
^ sel |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2261 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2262 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2263 |
sourceOfMethodChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2264 |
"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
|
2265 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2266 |
|aStream chunk sawExcla parseTree sourceChunk sel| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2267 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2268 |
aStream := self streamForChange:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2269 |
aStream isNil ifTrue:[^ nil]. |
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 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2272 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2273 |
chunk := aStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2274 |
] ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2275 |
chunk := (changeChunks at:changeNr). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2276 |
sawExcla := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2277 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2278 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2279 |
sawExcla ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2280 |
parseTree := Parser parseExpression:chunk. |
2797 | 2281 |
(parseTree notNil |
2282 |
and:[parseTree ~~ #Error |
|
2283 |
and:[parseTree isMessage]]) ifTrue:[ |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2284 |
sel := parseTree selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2285 |
(#( |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2286 |
#methodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2287 |
#privateMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2288 |
#publicMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2289 |
#ignoredMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2290 |
#protectedMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2291 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2292 |
#methodsFor:stamp: "/ Squeak support |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2293 |
#commentStamp:prior: "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
2294 |
#methodsFor "/ Dolphin support |
2606 | 2295 |
#methods "/ STV support |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2296 |
) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2297 |
includes:sel) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2298 |
sourceChunk := aStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2299 |
] |
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 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2302 |
aStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2303 |
^ sourceChunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2304 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2305 |
"Created: / 5.9.1996 / 17:11:32 / cg" |
2606 | 2306 |
"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
|
2307 |
! |
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 |
streamForChange:changeNr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2310 |
"answer a stream for change" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2311 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2312 |
|aStream| |
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 |
(changeNr between:1 and:changePositions size) ifFalse:[^ nil]. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2315 |
aStream := changeFileName asFilename readStreamOrNil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2316 |
aStream isNil ifTrue:[^ nil]. |
4599
9a95e5ae08ad
code rewritten to be independent of stream zero-base
Claus Gittinger <cg@exept.de>
parents:
4497
diff
changeset
|
2317 |
aStream position1Based:(changePositions at:changeNr). |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2318 |
^ aStream |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2319 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2320 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2321 |
!ChangesBrowser methodsFor:'private-changeFile access'! |
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 |
changeFileName:aFileName |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2324 |
"set the name of the changeFile" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2325 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2326 |
changeFileName := aFileName |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2327 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2328 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2329 |
checkIfFileHasChanged |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2330 |
"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
|
2331 |
install a timeout for rechecking after some time." |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2332 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2333 |
|f info | |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2334 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2335 |
Processor removeTimedBlock:checkBlock. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2336 |
f := changeFileName asFilename. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2337 |
(info := f info) isNil ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2338 |
self newLabel:'(unaccessable)' |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2339 |
] ifFalse:[ |
3962
3906b10c42fd
modified -> modificationTime
Claus Gittinger <cg@exept.de>
parents:
3930
diff
changeset
|
2340 |
(info modificationTime) > changeFileTimestamp ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2341 |
self newLabel:'(outdated)'. |
3202 | 2342 |
autoUpdate value ifTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2343 |
self doUpdate |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2344 |
] |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2345 |
] ifFalse:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2346 |
self newLabel:'' |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2347 |
] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2348 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2349 |
Processor addTimedBlock:checkBlock afterSeconds:5. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2350 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2351 |
"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
|
2352 |
"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
|
2353 |
"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
|
2354 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2355 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2356 |
readChangesFile |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2357 |
"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
|
2358 |
and a list of chunk-positions (changePositions)" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2359 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2360 |
^ self readChangesFileInBackground:false |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2361 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2362 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2363 |
readChangesFileInBackground:inBackground |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2364 |
"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
|
2365 |
and a list of chunk-positions (changePositions). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2366 |
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
|
2367 |
the cols are: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2368 |
1 delta (only if comparing) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2369 |
'+' -> new method (w.r.t. current state) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2370 |
'-' -> removed method (w.r.t. current state) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2371 |
'?' -> class does not exist currently |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2372 |
'=' -> change is same as current methods source |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2373 |
2 class/selector |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2374 |
3 type of change |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2375 |
doit |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2376 |
method |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2377 |
category change |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2378 |
4 timestamp |
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 |
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
|
2381 |
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
|
2382 |
|
2641 | 2383 |
|aStream maxLen i f chunkText fullChunkText askedForEditingClassSource |
2683 | 2384 |
excla timeStampInfo entry changeDelta changeString changeType |
3067
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2385 |
s changeClass sawExcla category |
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2386 |
chunkPos sel headerLine cls p rec clsName |
2683 | 2387 |
myProcess myPriority myPrioRange |
3472 | 2388 |
done first text methodPos |
2389 |
singleJunkOnly methodChunks classCategoryChunks methodCategoryChunks singleInfo |
|
2683 | 2390 |
ownerTree ownerName |
3472 | 2391 |
m currentText t1 t2 methodSelector nameAndClass| |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2392 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2393 |
editingClassSource := false. |
2641 | 2394 |
askedForEditingClassSource := false. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2395 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2396 |
maxLen := 60. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2397 |
|
3674 | 2398 |
self newLabel:'updating ...'. |
2399 |
||
2400 |
(self class isXMLFile:changeFileName) ifTrue:[ |
|
2401 |
^ self class readXMLChangesFromFile:changeFileName inBackground:inBackground |
|
2402 |
]. |
|
2403 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2404 |
f := changeFileName asFilename. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2405 |
aStream := f readStreamOrNil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2406 |
aStream isNil ifTrue:[^ nil]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2407 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2408 |
i := f info. |
3965
e499c0dae8fc
use #fileSize instead of #size
Claus Gittinger <cg@exept.de>
parents:
3962
diff
changeset
|
2409 |
changeFileSize := i fileSize. |
3962
3906b10c42fd
modified -> modificationTime
Claus Gittinger <cg@exept.de>
parents:
3930
diff
changeset
|
2410 |
changeFileTimestamp := i modificationTime. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2411 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2412 |
self withReadCursorDo:[ |
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 |
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
|
2415 |
NFS-mounted directory; therefore lower my priority ... |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2416 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2417 |
inBackground ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2418 |
myProcess := Processor activeProcess. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2419 |
myPriority := myProcess priority. |
2295
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2420 |
myPrioRange := myProcess priorityRange. |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2421 |
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
|
2422 |
"/ myProcess priority:(Processor userBackgroundPriority). |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2423 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2424 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2425 |
[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2426 |
changeChunks := OrderedCollection new. |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2427 |
changeClassNames := OrderedCollection new. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2428 |
changeHeaderLines := OrderedCollection new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2429 |
changePositions := OrderedCollection new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2430 |
changeTimeStamps := OrderedCollection new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2431 |
changeIsFollowupMethodChange := OrderedCollection new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2432 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2433 |
excla := aStream class chunkSeparator. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2434 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2435 |
[aStream atEnd] whileFalse:[ |
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 |
get a chunk (separated by excla) |
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 |
aStream skipSeparators. |
4599
9a95e5ae08ad
code rewritten to be independent of stream zero-base
Claus Gittinger <cg@exept.de>
parents:
4497
diff
changeset
|
2440 |
chunkPos := aStream position1Based. |
2263
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 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2443 |
sawExcla := aStream peekFor:excla. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2444 |
chunkText := fullChunkText := aStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2445 |
chunkText notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2446 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2447 |
(chunkText startsWith:'''---- timestamp ') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2448 |
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
|
2449 |
] ifFalse:[ |
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 |
only first line is saved in changeChunks ... |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2452 |
" |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2453 |
"/ index := chunkText indexOf:(Character cr). |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2454 |
"/ (index ~~ 0) ifTrue:[ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2455 |
"/ chunkText := chunkText copyTo:(index - 1). |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2456 |
"/ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2457 |
"/ "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
|
2458 |
"/ valid expression for classNameOfChange: to work" |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2459 |
"/ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2460 |
"/ (chunkText endsWith:'comment:''') ifTrue:[ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2461 |
"/ chunkText := chunkText , '...''' |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2462 |
"/ ]. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2463 |
"/ (chunkText endsWith:'primitiveDefinitions:''') ifTrue:[ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2464 |
"/ sel := 'primitiveDefinitions:'. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2465 |
"/ chunkText := chunkText copyWithoutLast:1 |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2466 |
"/ ]. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2467 |
"/ (chunkText endsWith:'primitiveVariables:''') ifTrue:[ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2468 |
"/ sel := 'primitiveVariables:'. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2469 |
"/ chunkText := chunkText copyWithoutLast:1 |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2470 |
"/ ]. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2471 |
"/ (chunkText endsWith:'primitiveFunctions:''') ifTrue:[ |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2472 |
"/ sel := 'primitiveFunctions:'. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2473 |
"/ chunkText := chunkText copyWithoutLast:1 |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2474 |
"/ ]. |
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2475 |
"/ ]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2476 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2477 |
changeChunks add:chunkText. |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2478 |
changeClassNames add:nil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2479 |
changePositions add:chunkPos. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2480 |
changeTimeStamps add:timeStampInfo. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2481 |
changeIsFollowupMethodChange add:false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2482 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2483 |
headerLine := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2484 |
changeDelta := ' '. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2485 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2486 |
sawExcla ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2487 |
(chunkText startsWith:'''---- snap') ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2488 |
changeType := ''. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2489 |
headerLine := chunkText. |
3598
fd6bf70c705f
remove trailing cr in changeLine of snap/fileIn
Claus Gittinger <cg@exept.de>
parents:
3597
diff
changeset
|
2490 |
changeString := (chunkText contractTo:maxLen) withoutSeparators. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2491 |
timeStampInfo := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2492 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2493 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2494 |
headerLine := chunkText , ' (doIt)'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2495 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2496 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2497 |
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
|
2498 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2499 |
((chunkText startsWith:'''---- file') |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2500 |
or:[(chunkText startsWith:'''---- check')]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2501 |
changeType := ''. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2502 |
timeStampInfo := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2503 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2504 |
changeType := '(doIt)'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2505 |
]. |
3598
fd6bf70c705f
remove trailing cr in changeLine of snap/fileIn
Claus Gittinger <cg@exept.de>
parents:
3597
diff
changeset
|
2506 |
changeString := (chunkText contractTo:maxLen) withoutSeparators. |
2263
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 |
p := Parser parseExpression:fullChunkText inNameSpace:Smalltalk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2509 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2510 |
p isMessage ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2511 |
sel := p selector. |
2292 | 2512 |
rec := p receiver. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2513 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2514 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2515 |
sel := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2516 |
(Scanner new scanTokens:fullChunkText) size == 0 ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2517 |
"/ a comment only |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2518 |
changeType := '(comment)'. |
2292 | 2519 |
NoColoring ~~ true ifTrue:[ |
3067
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2520 |
changeType := changeType allItalic. |
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2521 |
"/ changeString := changeString allItalic. |
2292 | 2522 |
changeType emphasisAllAdd:(#color -> UserPreferences current commentColor). |
2523 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2524 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2525 |
changeType := '(???)'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2526 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2527 |
]. |
3472 | 2528 |
|
2291 | 2529 |
(sel == #comment:) ifTrue:[ |
2530 |
changeType := '(comment)'. |
|
2292 | 2531 |
clsName := rec name. |
3472 | 2532 |
changeClass := (self nameSpaceForApply) classNamed:clsName. |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2533 |
changeClassNames at:changeClassNames size put:clsName. |
2292 | 2534 |
NoColoring ~~ true ifTrue:[ |
3067
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2535 |
changeType := changeType allItalic. |
2292 | 2536 |
changeType emphasisAllAdd:(#color -> UserPreferences current commentColor). |
3067
96387c6aa216
allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
2537 |
"/ changeString := clsName allItalic. |
2570 | 2538 |
]. |
3202 | 2539 |
autoCompare value ifTrue:[ |
2570 | 2540 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
2541 |
changeDelta := '?' |
|
2542 |
] ifFalse:[ |
|
2543 |
(changeClass comment = (p args at:1) evaluate) ifTrue:[ |
|
2544 |
changeDelta := '='. |
|
2545 |
] |
|
2546 |
] |
|
2573 | 2547 |
]. |
2548 |
sel := nil. |
|
2291 | 2549 |
]. |
2550 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2551 |
(sel == #removeSelector:) ifTrue:[ |
3472 | 2552 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec. |
2553 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
|
2554 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2555 |
sel := (p args at:1) evaluate. |
3472 | 2556 |
changeClassNames at:changeClassNames size put:clsName. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2557 |
|
3202 | 2558 |
autoCompare value ifTrue:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2559 |
(changeClass isNil or:[changeClass isLoaded not]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2560 |
changeDelta := '?' |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2561 |
] ifFalse:[ |
3586
b7d499c7ab7a
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
3554
diff
changeset
|
2562 |
(changeClass includesSelector:sel asSymbol) ifTrue:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2563 |
changeDelta := '-'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2564 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2565 |
changeDelta := '='. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2566 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2567 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2568 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2569 |
changeType := '(remove)'. |
3472 | 2570 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
2573 | 2571 |
sel := nil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2572 |
]. |
3472 | 2573 |
|
4426 | 2574 |
(p notNil |
2575 |
and:[p ~~ #Error |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2576 |
and:[p isMessage |
2292 | 2577 |
and:[rec isMessage |
4426 | 2578 |
and:[rec selector == #compiledMethodAt:]]]]) ifTrue:[ |
3472 | 2579 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec receiver. |
2580 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
|
2581 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2582 |
(sel == #category:) ifTrue:[ |
2292 | 2583 |
sel := (rec args at:1) evaluate. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2584 |
changeType := '(category change)'. |
3472 | 2585 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
2586 |
changeClassNames at:changeClassNames size put:clsName. |
|
3069
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2587 |
changeClass notNil ifTrue:[ |
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2588 |
m := changeClass compiledMethodAt:sel asSymbol. |
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2589 |
m notNil ifTrue:[ |
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2590 |
m category = (p args at:1) evaluate ifTrue:[ |
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2591 |
changeDelta := '='. |
4bc1b0f7b848
Fix for non-existant classes (cg)
Stefan Vogel <sv@exept.de>
parents:
3067
diff
changeset
|
2592 |
] |
3065 | 2593 |
] |
2594 |
]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2595 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2596 |
(sel == #privacy:) ifTrue:[ |
2292 | 2597 |
sel := (rec args at:1) evaluate. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2598 |
changeType := '(privacy change)'. |
3472 | 2599 |
changeString := self contractClass:clsName selector:sel to:maxLen. |
2600 |
changeClassNames at:changeClassNames size put:clsName. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2601 |
]. |
2573 | 2602 |
sel := nil. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2603 |
]. |
3472 | 2604 |
|
2290 | 2605 |
(Class definitionSelectors includes:sel) ifTrue:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2606 |
changeType := '(class definition)'. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2607 |
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
|
2608 |
changeClassNames at:changeClassNames size put:clsName. |
2683 | 2609 |
|
2610 |
"/ is it a private-class ? |
|
2611 |
('*privateIn:' match:sel) ifTrue:[ |
|
2612 |
ownerTree := p args last. |
|
2613 |
ownerName := ownerTree name asString. |
|
2614 |
clsName := ownerName , '::' , clsName |
|
2615 |
]. |
|
2616 |
||
2290 | 2617 |
changeString := clsName. |
2292 | 2618 |
NoColoring ~~ true ifTrue:[ |
2867 | 2619 |
changeType := changeType allBold. |
2620 |
changeString := changeString allBold. |
|
2573 | 2621 |
]. |
2622 |
||
3202 | 2623 |
autoCompare value ifTrue:[ |
3472 | 2624 |
cls := (self nameSpaceForApply) at:clsName asSymbol ifAbsent:nil. |
2573 | 2625 |
cls isNil ifTrue:[ |
2626 |
changeDelta := '+'. |
|
2627 |
] ifFalse:[ |
|
3472 | 2628 |
(cls definitionSelector = sel |
2629 |
or:[ |
|
2630 |
"/ could be an ST/V, VAge or Dolphin definition |
|
2631 |
cls definitionSelector = (sel , 'category:') |
|
2632 |
]) |
|
2633 |
ifTrue:[ |
|
2816 | 2634 |
((cls superclass isNil |
2635 |
and:[p receiver isConstant |
|
2636 |
and:[p receiver evaluate isNil]]) |
|
2637 |
or:[ |
|
2638 |
cls superclass notNil |
|
2639 |
and:[p receiver isConstant not |
|
2640 |
and:[cls superclass name = p receiver name]] |
|
2641 |
]) ifTrue:[ |
|
2642 |
cls instanceVariableString asCollectionOfWords = (p args at:2) evaluate asCollectionOfWords ifTrue:[ |
|
2643 |
cls classVariableString asCollectionOfWords = (p args at:3) evaluate asCollectionOfWords ifTrue:[ |
|
2644 |
(p args at:4) evaluate isEmpty ifTrue:[ |
|
3472 | 2645 |
cls definitionSelector = (sel , 'category:') |
2646 |
ifTrue:[ |
|
2647 |
"/ ST/V, VAge or Dolphin definition |
|
2816 | 2648 |
changeDelta := '='. |
2649 |
] ifFalse:[ |
|
3472 | 2650 |
cls category = (p args at:5) evaluate ifTrue:[ |
2651 |
changeDelta := '='. |
|
2652 |
] ifFalse:[ |
|
2653 |
changeType := '(class category change)'. |
|
2654 |
] |
|
2816 | 2655 |
] |
2656 |
] |
|
2657 |
] |
|
2658 |
] |
|
2659 |
] |
|
3472 | 2660 |
] |
2573 | 2661 |
] |
2662 |
]. |
|
2663 |
sel := nil. |
|
2265 | 2664 |
] ifFalse:[ |
2665 |
(#( |
|
2666 |
#'primitiveDefinitions:' |
|
2667 |
#'primitiveFunctions:' |
|
2668 |
#'primitiveVariables:' |
|
2669 |
) includes:sel) ifTrue:[ |
|
2670 |
changeType := '(class definition)'. |
|
2292 | 2671 |
clsName := rec evaluate. |
2816 | 2672 |
] ifFalse:[ |
2673 |
((sel == #instanceVariableNames:) |
|
2674 |
and:[rec isMessage |
|
2675 |
and:[rec selector == #class]]) ifTrue:[ |
|
2676 |
clsName := rec receiver name. |
|
3472 | 2677 |
changeClass := (self nameSpaceForApply) classNamed:clsName. |
2816 | 2678 |
changeType := '(class definition)'. |
2679 |
changeClassNames at:changeClassNames size put:clsName. |
|
2680 |
||
3202 | 2681 |
autoCompare value ifTrue:[ |
2816 | 2682 |
changeClass isNil ifTrue:[ |
2683 |
changeDelta := '?'. |
|
2684 |
] ifFalse:[ |
|
2685 |
s := (p args at:1) evaluate. |
|
2686 |
s = changeClass class instanceVariableString ifTrue:[ |
|
2687 |
changeDelta := '='. |
|
2688 |
] |
|
2689 |
] |
|
2690 |
]. |
|
2691 |
] |
|
2265 | 2692 |
] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2693 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2694 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2695 |
] ifTrue:[ "sawExcla" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2696 |
singleJunkOnly := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2697 |
methodChunks := false. |
3472 | 2698 |
classCategoryChunks := methodCategoryChunks := false. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2699 |
singleInfo := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2700 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2701 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2702 |
method definitions actually consist of |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2703 |
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
|
2704 |
up to an empty one. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2705 |
The system only writes one chunk, |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2706 |
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
|
2707 |
" |
3472 | 2708 |
clsName := nil. |
2709 |
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
|
2710 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2711 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
3472 | 2712 |
rec := p receiver. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2713 |
sel := p selector. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2714 |
(#( |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2715 |
#methodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2716 |
#privateMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2717 |
#publicMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2718 |
#ignoredMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2719 |
#protectedMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2720 |
#methodsFor:stamp: "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
2721 |
#'commentStamp:prior:' "/ Squeak support |
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
2722 |
#methodsFor "/ Dolphin support |
3472 | 2723 |
#categoriesForClass "/ Dolphin support |
2724 |
#categoriesFor: "/ Dolphin support |
|
2606 | 2725 |
#methods "/ STV support |
3487 | 2726 |
#publicMethods "/ STV support |
3676 | 2727 |
#methodsForUndefined: |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2728 |
) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2729 |
includes:sel) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2730 |
methodChunks := true. |
3472 | 2731 |
nameAndClass := self extractClassAndClassNameFromParseTree:rec. |
2732 |
clsName := nameAndClass key. changeClass := nameAndClass value. |
|
2733 |
||
2734 |
sel == #categoriesForClass ifTrue:[ |
|
2735 |
methodChunks := false. |
|
2736 |
classCategoryChunks := true. |
|
2737 |
changeType := '(class category change)'. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2738 |
] ifFalse:[ |
3472 | 2739 |
sel == #categoriesFor: ifTrue:[ |
2740 |
methodChunks := false. |
|
2741 |
methodCategoryChunks := true. |
|
2742 |
changeType := '(category change)'. |
|
2743 |
methodSelector := (p args at:1) evaluate. |
|
2744 |
] ifFalse:[ |
|
2745 |
(sel == #'methodsFor') ifTrue:[ |
|
2746 |
category := 'Dolphin methods'. |
|
2747 |
] ifFalse:[ |
|
3487 | 2748 |
((sel == #methods) or:[sel == #publicMethods]) ifTrue:[ |
3472 | 2749 |
category := 'STV methods'. |
2750 |
] ifFalse:[ |
|
2751 |
category := (p args at:1) evaluate. |
|
2752 |
] |
|
2753 |
]. |
|
2754 |
]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2755 |
]. |
3472 | 2756 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2757 |
sel == #'methodsFor:stamp:' ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2758 |
"/ Squeak timeStamp |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2759 |
timeStampInfo := (p args at:2) evaluate. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2760 |
singleInfo := true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2761 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2762 |
sel == #'commentStamp:prior:' ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2763 |
singleJunkOnly := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2764 |
methodChunks := false. |
2301 | 2765 |
] |
2766 |
] |
|
2767 |
] ifFalse:[ |
|
2768 |
sel == #reorganize ifTrue:[ |
|
2769 |
singleJunkOnly := true. |
|
2770 |
methodChunks := false. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2771 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2772 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2773 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2774 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2775 |
done := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2776 |
first := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2777 |
[done] whileFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2778 |
changeDelta := ' '. |
4599
9a95e5ae08ad
code rewritten to be independent of stream zero-base
Claus Gittinger <cg@exept.de>
parents:
4497
diff
changeset
|
2779 |
methodPos := aStream position1Based. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2780 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2781 |
text := aStream nextChunk. |
3472 | 2782 |
done := text isNil or:[text isEmpty]. |
2783 |
||
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2784 |
done ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2785 |
first ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2786 |
changeChunks add:chunkText. |
3472 | 2787 |
changeClassNames add:clsName. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2788 |
changePositions add:methodPos. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2789 |
changeTimeStamps add:timeStampInfo. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2790 |
changeIsFollowupMethodChange add:true. |
2641 | 2791 |
askedForEditingClassSource ifFalse:[ |
2863 | 2792 |
(changeFileName asFilename hasSuffix:'st') ifFalse:[ |
2641 | 2793 |
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
|
2794 |
Is this a class-file being browsed ?') |
2641 | 2795 |
] ifTrue:[ |
2796 |
editingClassSource := true. |
|
2797 |
]. |
|
2798 |
askedForEditingClassSource := true. |
|
2635
4ac62d4f2346
care for malformed changes file and ask
Claus Gittinger <cg@exept.de>
parents:
2606
diff
changeset
|
2799 |
] |
2664
541f43019451
fixed class-chunk remembering (remember the full chunk,
Claus Gittinger <cg@exept.de>
parents:
2641
diff
changeset
|
2800 |
] ifTrue:[ |
3472 | 2801 |
changeClassNames at:changeClassNames size put:clsName. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2802 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2803 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2804 |
first := false. |
3472 | 2805 |
|
2806 |
(classCategoryChunks or:[methodCategoryChunks]) ifTrue:[ |
|
2807 |
text := text asCollectionOfLines first asString. |
|
2808 |
classCategoryChunks ifTrue:[ |
|
2809 |
changeClass isNil ifTrue:[ |
|
2810 |
changeDelta := '?'. |
|
2811 |
] ifFalse:[ |
|
2812 |
changeClass category = text ifTrue:[ |
|
2813 |
changeDelta := '='. |
|
2814 |
] |
|
2815 |
]. |
|
2816 |
changeString := clsName , ' category: ' , text storeString. |
|
2817 |
]ifFalse:[ |
|
2818 |
changeString := '(' , clsName , ' compiledMethodAt:' , methodSelector storeString , ') category: ' , text storeString. |
|
2819 |
]. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2820 |
] ifFalse:[ |
3472 | 2821 |
" |
2822 |
try to find the selector |
|
2823 |
" |
|
2824 |
methodSelector := nil. |
|
2825 |
clsName notNil ifTrue:[ |
|
2826 |
methodChunks ifTrue:[ |
|
2827 |
p := Parser |
|
2828 |
parseMethodSpecification:text |
|
2829 |
in:nil |
|
2830 |
ignoreErrors:true |
|
2831 |
ignoreWarnings:true. |
|
2832 |
(p notNil and:[p ~~ #Error]) ifTrue:[ |
|
2833 |
methodSelector := p selector. |
|
2834 |
] |
|
2835 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2836 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2837 |
|
3472 | 2838 |
methodSelector isNil ifTrue:[ |
2839 |
changeString := (chunkText contractTo:maxLen). |
|
2840 |
changeType := '(change)'. |
|
2841 |
headerLine := chunkText , ' (change)'. |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2842 |
] ifFalse:[ |
3472 | 2843 |
changeString := self contractClass:clsName selector:methodSelector to:maxLen. |
2844 |
changeType := '{ ' , category , ' }'. |
|
2845 |
headerLine := clsName , ' ' , methodSelector , ' ' , '(change category: ''' , category , ''')'. |
|
2846 |
]. |
|
2847 |
||
2848 |
autoCompare value ifTrue:[ |
|
2849 |
changeClass isNil ifFalse:[ |
|
2850 |
cls := changeClass theNonMetaclass |
|
2851 |
]. |
|
2852 |
||
2853 |
(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
|
2854 |
changeClass isNil ifTrue:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
2855 |
changeDelta := '+' |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
2856 |
] ifFalse:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
2857 |
changeDelta := '?' |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
2858 |
] |
3472 | 2859 |
] ifFalse:[ |
3586
b7d499c7ab7a
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
3554
diff
changeset
|
2860 |
(changeClass includesSelector:methodSelector asSymbol) ifFalse:[ |
3472 | 2861 |
changeDelta := '+'. |
2862 |
] ifTrue:[ |
|
2863 |
m := changeClass compiledMethodAt:methodSelector asSymbol. |
|
2864 |
currentText := m source. |
|
2865 |
currentText notNil ifTrue:[ |
|
2866 |
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
|
2867 |
changeDelta := '=' |
3472 | 2868 |
] ifFalse:[ |
2869 |
t1 := currentText asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
2870 |
t2 := text asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
2871 |
t1 = t2 ifTrue:[ |
|
2872 |
changeDelta := '=' |
|
2873 |
] |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2874 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2875 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2876 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2877 |
] |
3472 | 2878 |
]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2879 |
]. |
3472 | 2880 |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2881 |
entry := MultiColListEntry new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2882 |
entry tabulatorSpecification:tabSpec. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2883 |
entry colAt:1 put:changeDelta. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2884 |
entry colAt:2 put:changeString. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2885 |
entry colAt:3 put:changeType. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2886 |
timeStampInfo notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2887 |
entry colAt:4 put:timeStampInfo. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2888 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2889 |
changeHeaderLines add:entry |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2890 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2891 |
changeString := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2892 |
headerLine := nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2893 |
singleJunkOnly ifTrue:[done := true] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2894 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2895 |
singleInfo ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2896 |
timeStampInfo := nil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2897 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2898 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2899 |
changeString notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2900 |
entry := MultiColListEntry new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2901 |
entry tabulatorSpecification:tabSpec. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2902 |
entry colAt:1 put:changeDelta. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2903 |
entry colAt:2 put:changeString. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2904 |
entry colAt:3 put:changeType. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2905 |
timeStampInfo notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2906 |
entry colAt:4 put:timeStampInfo. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2907 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2908 |
changeHeaderLines add:entry |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2909 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2910 |
headerLine notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2911 |
changeHeaderLines add:headerLine |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2912 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2913 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2914 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2915 |
] |
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 |
anyChanges := false |
3597
2e7fc0ae28c9
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3586
diff
changeset
|
2918 |
] ensure:[ |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2919 |
aStream close. |
2295
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2920 |
inBackground ifTrue:[ |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2921 |
myProcess priority:myPriority. |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2922 |
myProcess priorityRange:myPrioRange. |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
2923 |
]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2924 |
]. |
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 |
self checkIfFileHasChanged |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2928 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2929 |
"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
|
2930 |
"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
|
2931 |
! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2932 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2933 |
writeBackChanges |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2934 |
"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
|
2935 |
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
|
2936 |
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
|
2937 |
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
|
2938 |
tempfile back to the change-file. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2939 |
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
|
2940 |
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
|
2941 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2942 |
|inStream outStream tempfile stamp f| |
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 |
editingClassSource ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2945 |
(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
|
2946 |
ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2947 |
^ false |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2948 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2949 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2950 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2951 |
tempfile := Filename newTemporaryIn:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2952 |
tempfile exists ifTrue:[tempfile remove]. |
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2953 |
[ |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2954 |
outStream := tempfile writeStream. |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2955 |
inStream := changeFileName asFilename readStreamOrNil. |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2956 |
] on:FileStream openErrorSignal do:[:ex| |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
2957 |
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
|
2958 |
^ false |
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 |
self withCursor:(Cursor write) do:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2962 |
|excla sawExcla done first chunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2963 |
nChanges "{Class:SmallInteger}" | |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2964 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2965 |
Stream writeErrorSignal handle:[:ex | |
2835 | 2966 |
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
|
2967 |
tempfile exists ifTrue:[tempfile remove]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2968 |
^ false |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2969 |
] do:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2970 |
excla := inStream class chunkSeparator. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2971 |
nChanges := self numberOfChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2972 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2973 |
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
|
2974 |
inStream position1Based:(changePositions at:index). |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2975 |
sawExcla := inStream peekFor:excla. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2976 |
chunk := inStream nextChunk. |
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 |
(chunk notNil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2979 |
and:[(chunk startsWith:'''---- snap') not]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2980 |
(stamp := changeTimeStamps at:index) notNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2981 |
outStream nextPutAll:'''---- timestamp ' , stamp , ' ----'''. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2982 |
outStream nextPut:excla; cr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2983 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2984 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2985 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2986 |
sawExcla ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2987 |
outStream nextPut:excla. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2988 |
outStream nextChunkPut:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2989 |
outStream cr; cr. |
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 |
a method-definition chunk - output followups |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2992 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2993 |
done := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2994 |
first := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2995 |
[done] whileFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2996 |
chunk := inStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2997 |
chunk isNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2998 |
outStream cr; cr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
2999 |
done := true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3000 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3001 |
chunk isEmpty ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3002 |
outStream space; nextChunkPut:chunk; cr; cr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3003 |
done := true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3004 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3005 |
first ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3006 |
outStream cr; cr. |
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 |
outStream nextChunkPut:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3009 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3010 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3011 |
first := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3012 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3013 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3014 |
outStream nextChunkPut:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3015 |
outStream cr |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3016 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3017 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3018 |
outStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3019 |
inStream close. |
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 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3022 |
f := changeFileName asFilename. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3023 |
f renameTo:(f withSuffix:'bak'). |
2466
66842be773bd
care for cross-device rename
Claus Gittinger <cg@exept.de>
parents:
2451
diff
changeset
|
3024 |
tempfile renameOrCopyTo:changeFileName. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3025 |
anyChanges := false |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3026 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3027 |
^ true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3028 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3029 |
"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
|
3030 |
"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
|
3031 |
! ! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3032 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3033 |
!ChangesBrowser methodsFor:'private-user interaction ops'! |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3034 |
|
202 | 3035 |
appendChange:changeNr toFile:fileName |
3036 |
"append change to a file. return true if ok." |
|
3037 |
||
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3038 |
|aStream outStream chunk chunk2 sawExcla separator| |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3039 |
|
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3040 |
aStream := self streamForChange:changeNr. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3041 |
aStream isNil ifTrue:[ |
3991 | 3042 |
self warn:'Cannot read change'. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3043 |
^ false |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3044 |
]. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3045 |
aStream skipSeparators. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3046 |
|
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3047 |
separator := aStream class chunkSeparator. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3048 |
|
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3049 |
(self changeIsFollowupMethodChange:changeNr) ifTrue:[ |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3050 |
sawExcla := true. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3051 |
chunk := changeChunks at:changeNr. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3052 |
] ifFalse:[ |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3053 |
sawExcla := aStream peekFor:separator. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3054 |
chunk := aStream nextChunk. |
3991 | 3055 |
]. |
3056 |
chunk withoutSeparators isEmpty ifTrue:[ |
|
3057 |
self error:'empty chunk - should not happen'. |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3058 |
]. |
202 | 3059 |
|
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
3060 |
[ |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
3061 |
outStream := fileName asFilename readWriteStream. |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
3062 |
] on:FileStream openErrorSignal do:[:ex| |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
3063 |
self warn:'cannot update file ''%1''' with:fileName. |
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
3064 |
^ false |
73 | 3065 |
]. |
202 | 3066 |
|
3067 |
outStream setToEnd. |
|
3068 |
||
3069 |
sawExcla ifTrue:[ |
|
1472 | 3070 |
outStream nextPut:separator |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3071 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3072 |
outStream nextChunkPut:chunk; cr. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3073 |
sawExcla ifTrue:[ |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3074 |
chunk2 := aStream nextChunk. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3075 |
chunk2 withoutSeparators isEmpty ifTrue:[ |
3991 | 3076 |
self error:'empty chunk - should not happen'. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3077 |
]. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3078 |
outStream nextChunkPut:chunk2; space |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3079 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3080 |
sawExcla ifTrue:[ |
1472 | 3081 |
outStream nextPut:separator |
202 | 3082 |
]. |
3083 |
outStream cr. |
|
3084 |
aStream close. |
|
3085 |
outStream close. |
|
3086 |
^ true |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3087 |
|
1472 | 3088 |
"Modified: / 6.2.1998 / 13:03:54 / cg" |
73 | 3089 |
! |
3090 |
||
51 | 3091 |
applyChange:changeNr |
3092 |
"fileIn a change" |
|
3093 |
||
3091 | 3094 |
|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
|
3095 |
sig reader doItChunk methodsForChunk pkg |
4877 | 3096 |
alternativeClass shortName orgClassName nsClass aborted| |
45 | 3097 |
|
51 | 3098 |
aStream := self streamForChange:changeNr. |
3099 |
aStream isNil ifTrue:[^ self]. |
|
3100 |
||
2965 | 3101 |
className := self classNameOfChange:changeNr. |
3102 |
className notNil ifTrue:[ |
|
3472 | 3103 |
className := className asSymbol. |
3104 |
changeClass := Smalltalk at:className ifAbsent:[]. |
|
2965 | 3105 |
changeClass notNil ifTrue:[ |
3106 |
changeClass isLoaded ifFalse:[ |
|
3107 |
changeClass autoload |
|
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3108 |
] |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3109 |
] |
51 | 3110 |
]. |
45 | 3111 |
|
51 | 3112 |
changeNrProcessed := changeNr. |
4877 | 3113 |
aborted := false. |
45 | 3114 |
|
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3115 |
applyAction := [ |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3116 |
(skipSignal notNil) ifTrue:[ |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3117 |
sig := skipSignal |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3118 |
] ifFalse:[ |
3436
c4fe19deba58
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3406
diff
changeset
|
3119 |
sig := AbortOperationRequest |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3120 |
]. |
4877 | 3121 |
sig handle:[:ex | |
3122 |
aborted := true. |
|
3123 |
ex return. |
|
3124 |
] do:[ |
|
3472 | 3125 |
nameSpace := self nameSpaceForApply. |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3126 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3127 |
pkg := enforcedPackage ? Class packageQuerySignal query. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3128 |
Class packageQuerySignal answer:pkg |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3129 |
do:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3130 |
Class nameSpaceQuerySignal answer:nameSpace |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3131 |
do:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3132 |
"/ a followup methodsFor: chunk ... |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3133 |
(self changeIsFollowupMethodChange:changeNr) ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3134 |
methodsForChunk := (changeChunks at:changeNr). |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3135 |
] ifFalse:[ |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3136 |
doItChunk := aStream nextChunk. "/ an empty chunk sometimes ... |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3137 |
doItChunk notEmpty ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3138 |
Compiler evaluate:doItChunk notifying:self. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3139 |
] ifFalse:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3140 |
methodsForChunk := aStream nextChunk. "/ the real one |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3141 |
] |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3142 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3143 |
methodsForChunk notNil ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3144 |
changeClass isNil ifTrue:[ |
3339
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3145 |
orgClassName := className. |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3146 |
|
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3147 |
(className includes:$:) ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3148 |
ownerName := className copyTo:(className lastIndexOf:$:) - 1. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3149 |
(ownerName endsWith:$:) ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3150 |
ownerName := ownerName copyWithoutLast:1. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3151 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3152 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3153 |
ownerClass := Smalltalk at:(ownerName asSymbol) ifAbsent:[]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3154 |
ownerClass notNil ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3155 |
ownerClass isLoaded ifFalse:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3156 |
ownerClass autoload |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3157 |
] |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3158 |
]. |
2965 | 3159 |
]. |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3160 |
(nameSpace notNil and:[nameSpace ~~ Smalltalk]) ifTrue:[ |
3472 | 3161 |
changeClass := nameSpace at:className ifAbsent:[]. |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3162 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3163 |
changeClass isNil ifTrue:[ |
3472 | 3164 |
changeClass := Smalltalk at:className ifAbsent:[]. |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3165 |
]. |
3339
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3166 |
[changeClass isNil] whileTrue:[ |
3858 | 3167 |
(NameSpace allNamespaces |
3168 |
detect:[:ns | (nsClass := (ns at:className)) notNil] ifNone:nil) |
|
3169 |
notNil ifTrue:[ |
|
3170 |
shortName := nsClass name. |
|
3171 |
] ifFalse:[ |
|
3172 |
shortName := className copyFrom:(className lastIndexOf:$:) + 1. |
|
3173 |
shortName = className ifTrue:[ |
|
3174 |
shortName := '' |
|
3175 |
]. |
|
3339
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3176 |
]. |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3177 |
className := Dialog |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3178 |
request:'No class ''' , className , ''' for change. Add to which class ?' |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3179 |
initialAnswer:shortName. |
3858 | 3180 |
|
3339
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3181 |
className size == 0 ifTrue:[ |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3182 |
^ self |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3183 |
]. |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3184 |
alternativeClass := Smalltalk classNamed:className. |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3185 |
alternativeClass notNil ifTrue:[ |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3186 |
changeClass := alternativeClass |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3187 |
] |
2965 | 3188 |
]. |
3339
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3189 |
methodsForChunk := methodsForChunk copyFrom:(methodsForChunk indexOfSeparator). |
b4f4edeb8e4e
first attempt in supporting VW5i XML format reading
Claus Gittinger <cg@exept.de>
parents:
3330
diff
changeset
|
3190 |
methodsForChunk := changeClass name , methodsForChunk. |
2965 | 3191 |
]. |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3192 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3193 |
reader := Compiler evaluate:methodsForChunk notifying:self. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3194 |
reader fileInFrom:aStream notifying:self passChunk:false single:true. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
3195 |
] |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3196 |
] |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3197 |
] |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3198 |
]. |
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3199 |
changeNrProcessed := nil. |
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3200 |
]. |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3201 |
|
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3202 |
"/ |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3203 |
"/ 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
|
3204 |
"/ |
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3205 |
changeFileName = ObjectMemory nameForChanges ifTrue:[ |
3319 | 3206 |
Class withoutUpdatingChangesDo:[ |
4928 | 3207 |
Class updateChangeListQuerySignal answer:updateChangeSet value do:applyAction |
3319 | 3208 |
] |
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3209 |
] ifFalse:[ |
1427
0b2794583306
care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents:
1425
diff
changeset
|
3210 |
applyAction value |
45 | 3211 |
]. |
4877 | 3212 |
aStream close. |
3213 |
||
3214 |
^ aborted not |
|
358
a7546792f073
update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents:
326
diff
changeset
|
3215 |
|
3436
c4fe19deba58
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
3406
diff
changeset
|
3216 |
"Modified: / 16.11.2001 / 17:38:06 / cg" |
45 | 3217 |
! |
3218 |
||
255 | 3219 |
compareChange:changeNr |
2835 | 3220 |
"compare a change with the current (in-image) version; show the result of the compare (as dialog)" |
3221 |
||
3222 |
^ self compareChange:changeNr showResult:true |
|
3223 |
! |
|
3224 |
||
3225 |
compareChange:changeNr showResult:doShowResult |
|
3226 |
"compare a change with current version. |
|
3227 |
Return the result of the compare (same -> true, different -> false, uncomparable -> nil). |
|
3228 |
If doShowResult is true, the outcome is shown in a dialog/diffViewer." |
|
255 | 3229 |
|
3230 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
724
diff
changeset
|
3231 |
parser sel oldMethod outcome showDiff d t1 t2 selector isLoaded |
2835 | 3232 |
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
|
3233 |
isSame ownerClass superClassHere superClassInChange| |
255 | 3234 |
|
3235 |
aStream := self streamForChange:changeNr. |
|
2835 | 3236 |
aStream isNil ifTrue:[^ nil]. |
255 | 3237 |
|
275
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
3238 |
showDiff := false. |
604a906c0eb7
better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
3239 |
|
1472 | 3240 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
3241 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
|
3242 |
chunk := aStream nextChunk. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3243 |
] ifTrue:[ |
1472 | 3244 |
chunk := (changeChunks at:changeNr). |
3245 |
sawExcla := true. |
|
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3246 |
]. |
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
3247 |
|
2835 | 3248 |
isSame := nil. |
3249 |
||
761 | 3250 |
beep := false. |
255 | 3251 |
sawExcla ifFalse:[ |
1472 | 3252 |
outcome := 'cannot compare this change\\(i.e. this is not a method change).'. |
3253 |
||
3472 | 3254 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3255 |
do:[ |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3256 |
parseTree := Parser parseExpression:chunk. |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3257 |
]. |
2835 | 3258 |
(parseTree notNil and:[parseTree ~~ #Error and:[ parseTree isMessage ]]) ifTrue:[ |
2571 | 3259 |
selector := parseTree selector. |
3260 |
||
3261 |
selector == #'removeSelector:' ifTrue:[ |
|
1472 | 3262 |
thisClass := (parseTree receiver evaluate). |
3263 |
thisClass isBehavior ifTrue:[ |
|
3264 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
3265 |
selector := (parseTree arg1 evaluate). |
|
3266 |
(thisClass includesSelector:selector) ifTrue:[ |
|
3455 | 3267 |
outcome := 'Change removes the #' , selector , ' method from ' , thisClass name. |
2835 | 3268 |
isSame := false. |
1472 | 3269 |
] ifFalse:[ |
3455 | 3270 |
outcome := 'Change has no effect\\(there is no method for #' , selector , ' in ' , thisClass name , ')'. |
2835 | 3271 |
isSame := true. |
1472 | 3272 |
] |
3273 |
] ifFalse:[ |
|
3274 |
beep := true. |
|
3455 | 3275 |
outcome := 'Cannot compare this change (compare requires class to be loaded).'. |
2835 | 3276 |
isSame := nil. |
1472 | 3277 |
] |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3278 |
] ifFalse:[ |
3455 | 3279 |
outcome := 'Cannot compare this change (class not present)'. |
2835 | 3280 |
isSame := nil. |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3281 |
]. |
1472 | 3282 |
]. |
2571 | 3283 |
selector == #'category:' ifTrue:[ |
1472 | 3284 |
parseTree receiver isMessage ifTrue:[ |
3285 |
parseTree receiver selector == #compiledMethodAt: ifTrue:[ |
|
3286 |
(method := parseTree receiver evaluate) isMethod ifTrue:[ |
|
3287 |
method category = parseTree arg1 evaluate ifTrue:[ |
|
3455 | 3288 |
outcome := 'Change has no effect\\(same category)'. |
2835 | 3289 |
isSame := true. |
1472 | 3290 |
] ifFalse:[ |
3455 | 3291 |
outcome := 'Category is different (''' , method category , ''' vs. ''' , parseTree arg1 evaluate , ''')'. |
2835 | 3292 |
isSame := false. |
1472 | 3293 |
] |
3294 |
] ifFalse:[ |
|
3295 |
beep := true. |
|
3455 | 3296 |
outcome := 'There is no such method'. |
2835 | 3297 |
isSame := nil. |
1472 | 3298 |
] |
3299 |
] |
|
3300 |
] |
|
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3301 |
]. |
2571 | 3302 |
selector == #'comment:' ifTrue:[ |
2570 | 3303 |
thisClass := (parseTree receiver evaluate). |
3304 |
thisClass isBehavior ifTrue:[ |
|
3305 |
(self checkClassIsLoaded:thisClass) ifTrue:[ |
|
3306 |
(thisClass comment = parseTree arg1 evaluate) ifTrue:[ |
|
3455 | 3307 |
outcome := 'Change has no effect\\(same comment)'. |
2835 | 3308 |
isSame := true. |
2570 | 3309 |
] ifFalse:[ |
3455 | 3310 |
outcome := 'Comment is different'. |
2835 | 3311 |
isSame := false. |
2570 | 3312 |
] |
3313 |
] ifFalse:[ |
|
3314 |
beep := true. |
|
3455 | 3315 |
outcome := 'Cannot compare this change (compare requires class to be loaded).'. |
2835 | 3316 |
isSame := nil. |
2570 | 3317 |
] |
3318 |
] ifFalse:[ |
|
3455 | 3319 |
outcome := 'Cannot compare this change (class not present)'. |
2835 | 3320 |
isSame := nil. |
2570 | 3321 |
]. |
3322 |
]. |
|
2835 | 3323 |
|
3324 |
selector == #'instanceVariableNames:' ifTrue:[ |
|
3325 |
parseTree receiver isMessage ifTrue:[ |
|
3326 |
parseTree receiver selector == #class ifTrue:[ |
|
3327 |
thisClass := (parseTree receiver evaluate). |
|
3328 |
varsHere := thisClass instanceVariableString asCollectionOfWords. |
|
3329 |
varsInChange := (parseTree arguments at:1) evaluate asCollectionOfWords. |
|
3330 |
varsHere = varsInChange ifTrue:[ |
|
3455 | 3331 |
outcome := 'Change has no effect\\(same definition)'. |
2835 | 3332 |
isSame := true. |
3333 |
] ifFalse:[ |
|
3455 | 3334 |
outcome := 'Class-instanceVariable definition is different'. |
2835 | 3335 |
isSame := false. |
3336 |
]. |
|
3337 |
]. |
|
3338 |
] |
|
3339 |
]. |
|
3340 |
||
3534 | 3341 |
(Class definitionSelectors includes:selector) |
3342 |
"/ selector == #'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:' |
|
3343 |
ifTrue:[ |
|
2571 | 3344 |
superClass := (parseTree receiver evaluate). |
3543 | 3345 |
superClass isBehavior ifFalse:[ |
3346 |
outcome := 'Cannot compare this change\\(superclass not loaded).'. |
|
3347 |
isSame := nil. |
|
3348 |
] ifTrue:[ |
|
2571 | 3349 |
(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
|
3350 |
thisClassSym := (parseTree arguments at:1) evaluate. |
3534 | 3351 |
|
3352 |
(selector endsWith:':privateIn:') ifTrue:[ |
|
3353 |
ownerClass := (parseTree arguments at:5) evaluate. |
|
3354 |
thisClass := ownerClass privateClassesAt:thisClassSym. |
|
3355 |
] ifFalse:[ |
|
3356 |
thisClass := (self nameSpaceForApply) at:thisClassSym ifAbsent:nil. |
|
3357 |
]. |
|
3543 | 3358 |
thisClass isNil ifTrue:[ |
3930 | 3359 |
outcome := 'Change defines the class: ' , thisClassSym allBold. |
3543 | 3360 |
isSame := false. |
3361 |
] ifFalse:[ |
|
2816 | 3362 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
3455 | 3363 |
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'. |
2835 | 3364 |
isSame := nil. |
2816 | 3365 |
] ifTrue:[ |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3366 |
superClassHere := thisClass superclass name. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3367 |
superClassInChange := parseTree receiver name. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3368 |
superClassHere ~~ superClassInChange ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3369 |
outcome := 'Superclass is different.'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3370 |
isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3371 |
] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3372 |
varsHere := thisClass instanceVariableString asCollectionOfWords. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3373 |
varsInChange := (parseTree arguments at:2) evaluate asCollectionOfWords. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3374 |
varsHere = varsInChange ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3375 |
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
|
3376 |
((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
|
3377 |
((selector endsWith:':category:') |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3378 |
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
|
3379 |
outcome := 'Category is different'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3380 |
isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3381 |
] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3382 |
outcome := 'Change has no effect\\(same definition)'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3383 |
isSame := true. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3384 |
] |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3385 |
"/ thisClass category = (parseTree arguments at:5) evaluate ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3386 |
"/ outcome := 'Change has no effect\\(same definition)'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3387 |
"/ isSame := true. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3388 |
"/ ] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3389 |
"/ outcome := 'Category is different'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3390 |
"/ isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3391 |
"/ ] |
3534 | 3392 |
] ifFalse:[ |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3393 |
outcome := 'SharedPool definition is different'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3394 |
isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3395 |
]. |
2571 | 3396 |
] ifFalse:[ |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3397 |
outcome := 'ClassVariable definition is different'. |
2835 | 3398 |
isSame := false. |
3512 | 3399 |
] |
2834 | 3400 |
] ifFalse:[ |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3401 |
outcome := 'InstanceVariable definition is different'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3402 |
isSame := false. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3403 |
addedVars := varsInChange select:[:eachVar | (varsHere includes:eachVar) not]. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3404 |
removedVars := varsHere select:[:eachVar | (varsInChange includes:eachVar) not]. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3405 |
addedVars isEmpty ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3406 |
removedVars isEmpty ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3407 |
outcome := 'Change reorders instanceVariable(s)'. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3408 |
] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3409 |
removedVars := removedVars collect:[:eachVar | '''' , eachVar , '''']. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3410 |
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
|
3411 |
] |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3412 |
] ifFalse:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3413 |
removedVars isEmpty ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3414 |
addedVars := addedVars collect:[:eachVar | '''' , eachVar , '''']. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3415 |
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
|
3416 |
]. |
2834 | 3417 |
]. |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
3418 |
] |
1713
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3419 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3420 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3421 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3422 |
] |
f6a93c02e953
also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3423 |
] |
1472 | 3424 |
] |
3425 |
] |
|
255 | 3426 |
] ifTrue:[ |
3472 | 3427 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3428 |
do:[ |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3429 |
parseTree := Parser parseExpression:chunk. |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3430 |
]. |
1472 | 3431 |
(parseTree notNil |
3432 |
and:[parseTree ~~ #Error |
|
3433 |
and:[parseTree isMessage]]) ifTrue:[ |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3434 |
"/ Squeak support (#methodsFor:***) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3435 |
(#( |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3436 |
#methodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3437 |
#privateMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3438 |
#publicMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3439 |
#ignoredMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3440 |
#protectedMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3441 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3442 |
#methodsFor:stamp: "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3443 |
#methodsFor "/ Dolphin support |
2606 | 3444 |
#methods "/ STV support |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3445 |
) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3446 |
includes:parseTree selector) ifTrue:[ |
1472 | 3447 |
thisClass := (parseTree receiver evaluate). |
4956 | 3448 |
(thisClass notNil and:[thisClass isKindOf:UndefinedVariable]) ifTrue:[ |
3449 |
|thisName path| |
|
3450 |
||
3451 |
thisName := thisClass name. |
|
3452 |
path := thisName asCollectionOfSubstringsSeparatedByAll:'::'. |
|
3453 |
1 to:path size do:[:length | |
|
3454 |
|ownerName owner| |
|
3455 |
||
3456 |
ownerName := (path copyTo:length) asStringCollection asStringWith:'::'. |
|
3457 |
owner := Smalltalk classNamed:ownerName. |
|
3458 |
(owner notNil and:[owner isBehavior and:[owner isLoaded not]]) ifTrue:[ |
|
3459 |
self checkClassIsLoaded:owner. |
|
3460 |
]. |
|
3461 |
]. |
|
3462 |
thisClass := (parseTree receiver evaluate). |
|
3463 |
]. |
|
3464 |
||
1472 | 3465 |
thisClass isBehavior ifTrue:[ |
3466 |
(isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[ |
|
3455 | 3467 |
outcome := 'Cannot compare this change\\(compare requires class to be loaded).'. |
2835 | 3468 |
isSame := nil. |
1472 | 3469 |
]. |
3470 |
||
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3471 |
parseTree selector == #methodsFor ifTrue:[ |
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3472 |
cat := 'Dolphin methods'. |
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3473 |
] ifFalse:[ |
2606 | 3474 |
parseTree selector == #methods ifTrue:[ |
3475 |
cat := 'STV methods'. |
|
3476 |
] ifFalse:[ |
|
3477 |
cat := parseTree arg1 evaluate. |
|
3478 |
]. |
|
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3479 |
]. |
1472 | 3480 |
newSource := aStream nextChunk. |
3481 |
||
3472 | 3482 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
2286
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3483 |
do:[ |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3484 |
parser := Parser parseMethod:newSource in:thisClass. |
6da16a42e507
care for defaultNameSpace being set to something
Claus Gittinger <cg@exept.de>
parents:
2267
diff
changeset
|
3485 |
]. |
1472 | 3486 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
3487 |
sel := parser selector. |
|
3488 |
oldMethod := thisClass compiledMethodAt:sel. |
|
3489 |
oldMethod notNil ifTrue:[ |
|
3490 |
(oldMethod category = cat) ifFalse:[ |
|
3491 |
Transcript showCR:'category changed.'. |
|
3492 |
]. |
|
3493 |
oldSource := oldMethod source. |
|
3494 |
(oldSource = newSource) ifTrue:[ |
|
3455 | 3495 |
outcome := 'Same source'. |
2835 | 3496 |
isSame := true. |
1472 | 3497 |
] ifFalse:[ |
3498 |
oldSource isNil ifTrue:[ |
|
3499 |
beep := true. |
|
3455 | 3500 |
outcome := 'No source for compare.'. |
2835 | 3501 |
isSame := true. |
1472 | 3502 |
] ifFalse:[ |
3503 |
"/ |
|
3504 |
"/ compare for tabulator <-> space changes |
|
3505 |
"/ before showing diff ... |
|
3506 |
"/ |
|
3507 |
t1 := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
3508 |
t2 := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
3509 |
t1 = t2 ifTrue:[ |
|
3455 | 3510 |
outcome := 'Same source'. |
2835 | 3511 |
isSame := true. |
1472 | 3512 |
] ifFalse:[ |
3455 | 3513 |
outcome := 'Source changed.'. |
1472 | 3514 |
showDiff := true. |
2835 | 3515 |
isSame := false. |
1472 | 3516 |
|
3517 |
"/ |
|
3518 |
"/ check if only historyLine diffs |
|
3519 |
"/ |
|
3520 |
(HistoryManager notNil |
|
3521 |
and:[HistoryManager isActive]) ifTrue:[ |
|
3522 |
(HistoryManager withoutHistoryLines:newSource) |
|
3523 |
= |
|
3524 |
(HistoryManager withoutHistoryLines:oldSource) |
|
3525 |
ifTrue:[ |
|
3455 | 3526 |
outcome := 'Same source (history only)'. |
2835 | 3527 |
isSame := true. |
1472 | 3528 |
showDiff := false. |
3529 |
] |
|
3530 |
]. |
|
3531 |
] |
|
3532 |
] |
|
3533 |
] |
|
3534 |
] ifFalse:[ |
|
3535 |
isLoaded ifTrue:[ |
|
3536 |
beep := true. |
|
3455 | 3537 |
outcome := 'Method does not exist.'. |
2835 | 3538 |
isSame := nil. |
1472 | 3539 |
] |
3540 |
] |
|
3541 |
] ifFalse:[ |
|
3455 | 3542 |
outcome := 'Change is unparsable (parse error).'. |
2835 | 3543 |
isSame := nil. |
1472 | 3544 |
]. |
2835 | 3545 |
doShowResult ifTrue:[ |
3546 |
(showDiff and:[oldSource notNil and:[newSource notNil]]) ifTrue:[ |
|
3547 |
d := DiffTextView |
|
3548 |
openOn:oldSource label:(resources string:'current version (in image)') |
|
3549 |
and:newSource label:(resources string:'change version'). |
|
3550 |
d label:'method differences'. |
|
3551 |
] |
|
1472 | 3552 |
] |
3553 |
] ifFalse:[ |
|
3554 |
beep := true. |
|
3455 | 3555 |
outcome := 'Class does not exist.'. |
2835 | 3556 |
isSame := nil. |
1472 | 3557 |
] |
3558 |
] ifFalse:[ |
|
3559 |
beep := true. |
|
3455 | 3560 |
outcome := 'Not comparable.'. |
2835 | 3561 |
isSame := nil. |
1472 | 3562 |
] |
3563 |
] ifFalse:[ |
|
3564 |
beep := true. |
|
3455 | 3565 |
outcome := 'Not comparable.'. |
2835 | 3566 |
isSame := nil. |
1472 | 3567 |
] |
255 | 3568 |
]. |
3569 |
aStream close. |
|
2835 | 3570 |
|
3571 |
doShowResult ifTrue:[ |
|
3572 |
showDiff ifFalse:[ |
|
3573 |
outcome := (resources string:outcome) withCRs. |
|
3574 |
beep ifTrue:[ |
|
3575 |
self warn:outcome. |
|
3576 |
] ifFalse:[ |
|
3577 |
self information:outcome. |
|
3578 |
] |
|
553 | 3579 |
"/ Transcript showCR:outcome. |
2835 | 3580 |
]. |
255 | 3581 |
]. |
2835 | 3582 |
^ isSame. |
255 | 3583 |
|
1472 | 3584 |
"Created: / 24.11.1995 / 14:30:46 / cg" |
2606 | 3585 |
"Modified: / 13.2.2000 / 15:04:39 / cg" |
255 | 3586 |
! |
3587 |
||
1359 | 3588 |
compressForClass:aClassNameOrNil |
3589 |
"compress the change-set; |
|
3590 |
this replaces multiple method-changes by the last (i.e. the most recent) change. |
|
3591 |
If the class argument is nil, compress for all classes. |
|
3592 |
otherwise, only changes for that class are compressed." |
|
3593 |
||
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3594 |
self |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3595 |
compressForClass:aClassNameOrNil selector:nil |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3596 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3597 |
"Modified: / 19.11.2001 / 22:04:12 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3598 |
! |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3599 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3600 |
compressForClass:aClassNameOrNil selector:selectorToCompressOrNil |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3601 |
"compress the change-set; |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3602 |
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
|
3603 |
If the class argument is nil, compress for all classes. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3604 |
otherwise, only changes for that class are compressed." |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3605 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3606 |
|lbl aStream searchIndex anyMore deleteSet index |
1359 | 3607 |
str snapshotProto snapshotPrefix snapshotNameIndex fileName| |
3608 |
||
4632
c16dc83e3972
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4599
diff
changeset
|
3609 |
aStream := changeFileName asFilename readStreamOrNil. |
1359 | 3610 |
aStream isNil ifTrue:[^ self]. |
3611 |
||
4762 | 3612 |
lbl := 'compressing'. |
1359 | 3613 |
aClassNameOrNil isNil ifTrue:[ |
4762 | 3614 |
selectorToCompressOrNil notNil ifTrue:[ |
3615 |
lbl := lbl , ' for ' , selectorToCompressOrNil. |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3616 |
] |
1359 | 3617 |
] ifFalse:[ |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3618 |
selectorToCompressOrNil isNil ifTrue:[ |
4762 | 3619 |
lbl := lbl , ' for ' , aClassNameOrNil. |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3620 |
] ifFalse:[ |
4762 | 3621 |
lbl := lbl , ' for ' , aClassNameOrNil , '>>' , selectorToCompressOrNil. |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3622 |
] |
1359 | 3623 |
]. |
4762 | 3624 |
lbl := lbl , '...'. |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3625 |
self newLabel:lbl. |
1359 | 3626 |
|
3627 |
CompressSnapshotInfo == true ifTrue:[ |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3628 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3629 |
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
|
3630 |
the actual format .. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3631 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3632 |
str := WriteStream on:String new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3633 |
Class addChangeRecordForSnapshot:'foo' to:str. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3634 |
snapshotProto := str contents. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3635 |
snapshotPrefix := snapshotProto copyTo:10. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3636 |
snapshotNameIndex := snapshotProto findString:'foo'. |
1359 | 3637 |
]. |
3638 |
||
3639 |
self withExecuteCursorDo:[ |
|
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3640 |
|numChanges classes selectors types excla sawExcla |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3641 |
changeNr chunk aParseTree parseTreeChunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3642 |
thisClass thisSelector codeChunk codeParser |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3643 |
compressThis| |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3644 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3645 |
numChanges := self numberOfChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3646 |
classes := Array new:numChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3647 |
selectors := Array new:numChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3648 |
types := Array new:numChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3649 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3650 |
"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
|
3651 |
collect all in classes / selectors" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3652 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3653 |
changeNr := numChanges. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3654 |
excla := aStream class chunkSeparator. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3655 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3656 |
[changeNr >= 1] whileTrue:[ |
4599
9a95e5ae08ad
code rewritten to be independent of stream zero-base
Claus Gittinger <cg@exept.de>
parents:
4497
diff
changeset
|
3657 |
aStream position1Based:(changePositions at:changeNr). |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3658 |
sawExcla := aStream peekFor:excla. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3659 |
chunk := aStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3660 |
sawExcla ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3661 |
"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
|
3662 |
(chunk = parseTreeChunk) ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3663 |
aParseTree := Parser parseExpression:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3664 |
parseTreeChunk := chunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3665 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3666 |
(aParseTree notNil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3667 |
and:[(aParseTree ~~ #Error) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3668 |
and:[aParseTree isMessage]]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3669 |
(#( |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3670 |
#methodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3671 |
#privateMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3672 |
#publicMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3673 |
#ignoredMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3674 |
#protectedMethodsFor: |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3675 |
#methodsFor:stamp: "/ Squeak support |
2527
afa639104477
some support for dolphin source files
Claus Gittinger <cg@exept.de>
parents:
2511
diff
changeset
|
3676 |
#methodsFor "/ Dolphin support |
2606 | 3677 |
#methods "/ STV support |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3678 |
) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3679 |
includes:aParseTree selector) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3680 |
thisClass := (aParseTree receiver evaluate). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3681 |
codeChunk := aStream nextChunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3682 |
codeParser := Parser |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3683 |
parseMethodSpecification:codeChunk |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3684 |
in:thisClass |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3685 |
ignoreErrors:true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3686 |
ignoreWarnings:true. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3687 |
(codeParser notNil and:[codeParser ~~ #Error]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3688 |
selectors at:changeNr put:(codeParser selector). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3689 |
classes at:changeNr put:thisClass. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3690 |
types at:changeNr put:#methodsFor |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3691 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3692 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3693 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3694 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3695 |
aParseTree := Parser parseExpression:chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3696 |
parseTreeChunk := chunk. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3697 |
(aParseTree notNil |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3698 |
and:[(aParseTree ~~ #Error) |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3699 |
and:[aParseTree isMessage]]) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3700 |
(aParseTree selector == #removeSelector:) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3701 |
selectors at:changeNr put:(aParseTree arg1 value ). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3702 |
classes at:changeNr put:(aParseTree receiver evaluate). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3703 |
types at:changeNr put:#removeSelector |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3704 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3705 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3706 |
CompressSnapshotInfo == true ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3707 |
(chunk startsWith:snapshotPrefix) ifTrue:[ |
4599
9a95e5ae08ad
code rewritten to be independent of stream zero-base
Claus Gittinger <cg@exept.de>
parents:
4497
diff
changeset
|
3708 |
str := chunk readStream position1Based:snapshotNameIndex. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3709 |
fileName := str upTo:(Character space). |
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 |
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
|
3712 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3713 |
selectors at:changeNr put:snapshotPrefix. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3714 |
classes at:changeNr put:fileName. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3715 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3716 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3717 |
] |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3718 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3719 |
changeNr := changeNr - 1 |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3720 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3721 |
aStream close. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3722 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3723 |
"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
|
3724 |
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
|
3725 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3726 |
deleteSet := OrderedCollection new. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3727 |
changeNr := 1. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3728 |
[changeNr < self numberOfChanges] whileTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3729 |
thisClass := classes at:changeNr. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3730 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3731 |
compressThis := false. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3732 |
aClassNameOrNil isNil ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3733 |
compressThis := true |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3734 |
] ifFalse:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3735 |
"/ skipping unloaded/unknown classes |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3736 |
thisClass isBehavior ifTrue:[ |
3359
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
3737 |
compressThis := aClassNameOrNil = thisClass theNonMetaclass name. |
2263
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 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3740 |
compressThis ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3741 |
thisSelector := selectors at:changeNr. |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3742 |
compressThis := (selectorToCompressOrNil isNil or:[thisSelector == selectorToCompressOrNil]). |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3743 |
compressThis ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3744 |
searchIndex := changeNr. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3745 |
anyMore := true. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3746 |
[anyMore] whileTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3747 |
searchIndex := classes indexOf:thisClass startingAt:(searchIndex + 1). |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3748 |
(searchIndex ~~ 0) ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3749 |
((selectors at:searchIndex) == thisSelector) ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3750 |
thisClass notNil ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3751 |
deleteSet add:changeNr. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3752 |
anyMore := false |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3753 |
] |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3754 |
] |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3755 |
] ifFalse:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3756 |
anyMore := false |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3757 |
] |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3758 |
]. |
2263
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3759 |
]. |
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 |
changeNr := changeNr + 1 |
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 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3765 |
"finally delete what has been found" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3766 |
|
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3767 |
(deleteSet size > 0) ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3768 |
changeListView setSelection:nil. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3769 |
index := deleteSet size. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3770 |
[index > 0] whileTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3771 |
self silentDeleteChange:(deleteSet at:index). |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3772 |
index := index - 1 |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3773 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3774 |
self setChangeList. |
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 |
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
|
3777 |
" |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3778 |
changeListView firstLineShown > self numberOfChanges ifTrue:[ |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3779 |
changeListView makeLineVisible:self numberOfChanges |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3780 |
]. |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3781 |
self clearCodeView |
46fc2bb1b9c1
changes to allow browsing Sqeak fileOut format.
Claus Gittinger <cg@exept.de>
parents:
2214
diff
changeset
|
3782 |
] |
1359 | 3783 |
]. |
3784 |
self newLabel:''. |
|
3785 |
||
3359
2cc7eff866e4
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3341
diff
changeset
|
3786 |
"Modified: / 5.11.2001 / 16:34:53 / cg" |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
3787 |
"Created: / 19.11.2001 / 22:03:42 / cg" |
1359 | 3788 |
! |
3789 |
||
255 | 3790 |
deleteChange:changeNr |
3791 |
"delete a change" |
|
3792 |
||
3793 |
self deleteChangesFrom:changeNr to:changeNr |
|
3794 |
! |
|
3795 |
||
3796 |
deleteChangesFrom:start to:stop |
|
3797 |
"delete a range of changes" |
|
3798 |
||
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
3799 |
changeListView setSelection:nil. |
255 | 3800 |
stop to:start by:-1 do:[:changeNr | |
1648 | 3801 |
self silentDeleteInternalChange:changeNr. |
3802 |
changeListView removeIndex:changeNr. |
|
255 | 3803 |
]. |
744
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3804 |
|
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3805 |
"/ changeListView contentsChanged. |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3806 |
"/ changeListView redrawFromLine:start. |
255 | 3807 |
|
744
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3808 |
"/ self setChangeList |
cb962cb21e8c
faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3809 |
|
1648 | 3810 |
"Modified: / 18.5.1998 / 14:22:27 / cg" |
255 | 3811 |
! |
3812 |
||
202 | 3813 |
makeChangeAPatch:changeNr |
3814 |
"append change to patchfile" |
|
3815 |
||
3816 |
self appendChange:changeNr toFile:'patches' |
|
3817 |
! |
|
3818 |
||
3819 |
makeChangePermanent:changeNr |
|
3820 |
"rewrite the source file where change changeNr lies" |
|
3821 |
||
3822 |
self notify:'this is not yet implemented' |
|
3823 |
! |
|
3824 |
||
73 | 3825 |
silentDeleteChange:changeNr |
3826 |
"delete a change do not update changeListView" |
|
57 | 3827 |
|
73 | 3828 |
anyChanges := true. |
3829 |
changeChunks removeIndex:changeNr. |
|
3203 | 3830 |
changePositions size >= changeNr ifTrue:[ changePositions removeIndex:changeNr ]. |
3831 |
changeClassNames size >= changeNr ifTrue:[ changeClassNames removeIndex:changeNr ]. |
|
3832 |
changeSelectors size >= changeNr ifTrue:[ changeSelectors removeIndex:changeNr ]. |
|
3833 |
changeHeaderLines size >= changeNr ifTrue:[ changeHeaderLines removeIndex:changeNr ]. |
|
3834 |
changeTimeStamps size >= changeNr ifTrue:[ changeTimeStamps removeIndex:changeNr ]. |
|
3835 |
changeIsFollowupMethodChange size >= changeNr ifTrue:[ changeIsFollowupMethodChange removeIndex:changeNr ]. |
|
182
0c2f9214d531
handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3836 |
|
0c2f9214d531
handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3837 |
"Modified: 18.11.1995 / 17:08:44 / cg" |
45 | 3838 |
! |
3839 |
||
202 | 3840 |
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
|
3841 |
"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
|
3842 |
Return the number of deleted changes." |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3843 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3844 |
|thisClassName index numDeleted| |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3845 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3846 |
numDeleted := 0. |
202 | 3847 |
index := stop. |
3848 |
[index >= start] whileTrue:[ |
|
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3849 |
thisClassName := self classNameOfChange:index. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3850 |
thisClassName = aClassName ifTrue:[ |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3851 |
self silentDeleteChange:index. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3852 |
numDeleted := numDeleted + 1. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3853 |
]. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3854 |
index := index - 1 |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3855 |
]. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
3856 |
^ numDeleted |
51 | 3857 |
|
45 | 3858 |
! |
3859 |
||
3607 | 3860 |
silentDeleteChangesFor:aClassName selector:selector from:start to:stop |
3861 |
"delete changes for given class/selector in a range. |
|
3862 |
Return the number of deleted changes." |
|
3863 |
||
3864 |
|thisClassName index numDeleted| |
|
3865 |
||
3866 |
numDeleted := 0. |
|
3867 |
index := stop. |
|
3868 |
[index >= start] whileTrue:[ |
|
3869 |
thisClassName := self classNameOfChange:index. |
|
3870 |
thisClassName = aClassName ifTrue:[ |
|
3871 |
(self selectorOfMethodChange:index) == selector ifTrue:[ |
|
3872 |
self silentDeleteChange:index. |
|
3873 |
numDeleted := numDeleted + 1. |
|
3874 |
] |
|
3875 |
]. |
|
3876 |
index := index - 1 |
|
3877 |
]. |
|
3878 |
^ numDeleted |
|
3879 |
! |
|
3880 |
||
2511 | 3881 |
silentDeleteChangesForClassAndPrivateClasses:aClassName from:start to:stop |
3882 |
"delete changes for a given class and its private classes in a range. |
|
3883 |
Return the number of deleted changes." |
|
3884 |
||
3885 |
|thisClassName index numDeleted| |
|
3886 |
||
3887 |
numDeleted := 0. |
|
3888 |
index := stop. |
|
3889 |
[index >= start] whileTrue:[ |
|
3890 |
thisClassName := self ownerClassNameOfChange:index. |
|
3891 |
thisClassName = aClassName ifTrue:[ |
|
3892 |
self silentDeleteChange:index. |
|
3893 |
numDeleted := numDeleted + 1. |
|
3894 |
]. |
|
3895 |
index := index - 1 |
|
3896 |
]. |
|
3897 |
^ numDeleted |
|
3898 |
||
3899 |
! |
|
3900 |
||
1070
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3901 |
silentDeleteInternalChange:changeNr |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3902 |
"delete a change do not update changeListView" |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3903 |
|
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3904 |
anyChanges := true. |
cdf5cf202f3b
faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents:
1027
diff
changeset
|
3905 |
changeChunks removeIndex:changeNr. |
1473 | 3906 |
changePositions size >= changeNr ifTrue:[changePositions removeIndex:changeNr]. |
3907 |
changeClassNames size >= changeNr ifTrue:[changeClassNames removeIndex:changeNr]. |
|
3203 | 3908 |
changeSelectors size >= changeNr ifTrue:[ changeSelectors removeIndex:changeNr ]. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3909 |
changeTimeStamps size >= changeNr ifTrue:[changeTimeStamps removeIndex:changeNr]. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
3910 |
changeIsFollowupMethodChange size >= changeNr ifTrue:[changeIsFollowupMethodChange removeIndex:changeNr]. |
1473 | 3911 |
|
3912 |
"Created: / 7.3.1997 / 16:28:32 / cg" |
|
3913 |
"Modified: / 7.2.1998 / 19:59:11 / cg" |
|
1496
978b3c3565c9
#silentDeleteInternalChange: copy-paste error
Stefan Vogel <sv@exept.de>
parents:
1473
diff
changeset
|
3914 |
"Modified: / 26.2.1998 / 18:20:48 / stefan" |
4487 | 3915 |
! |
3916 |
||
3917 |
updateDiffView |
|
3918 |
self withSelectedChangesDo:[:changeNr | |
|
3919 |
self updateDiffViewFor:changeNr. |
|
3920 |
^ self. |
|
3921 |
]. |
|
3922 |
||
3923 |
diffView text1:'' text2:'' |
|
3924 |
! |
|
3925 |
||
3926 |
updateDiffViewFor:changeNr |
|
3927 |
|aStream chunk sawExcla parseTree thisClass cat oldSource newSource |
|
4857 | 3928 |
parser sel showDiff selector oldMethod| |
4487 | 3929 |
|
3930 |
aStream := self streamForChange:changeNr. |
|
3931 |
aStream isNil ifTrue:[^ self]. |
|
3932 |
||
3933 |
showDiff := false. |
|
3934 |
||
3935 |
(self changeIsFollowupMethodChange:changeNr) ifFalse:[ |
|
3936 |
sawExcla := aStream peekFor:(aStream class chunkSeparator). |
|
3937 |
chunk := aStream nextChunk. |
|
3938 |
] ifTrue:[ |
|
3939 |
chunk := (changeChunks at:changeNr). |
|
3940 |
sawExcla := true. |
|
3941 |
]. |
|
3942 |
||
4857 | 3943 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
3944 |
do:[ |
|
3945 |
parseTree := Parser parseExpression:chunk. |
|
4487 | 3946 |
(parseTree notNil and:[parseTree ~~ #Error and:[ parseTree isMessage ]]) ifTrue:[ |
3947 |
selector := parseTree selector. |
|
3948 |
] |
|
4857 | 3949 |
]. |
3950 |
||
3951 |
selector isNil ifTrue:[ |
|
4993 | 3952 |
newSource := chunk. |
4857 | 3953 |
oldSource := 'Not comparable.'. |
3954 |
] ifFalse:[ |
|
3955 |
sawExcla ifFalse:[ |
|
3956 |
"/ not a method-change |
|
3957 |
newSource := chunk. |
|
3958 |
oldSource := self oldSourceForParseTree:parseTree. |
|
3959 |
] ifTrue:[ |
|
3960 |
"/ a method-change |
|
3961 |
||
4487 | 3962 |
(#( |
3963 |
#methodsFor: |
|
3964 |
#privateMethodsFor: |
|
3965 |
#publicMethodsFor: |
|
3966 |
#ignoredMethodsFor: |
|
3967 |
#protectedMethodsFor: |
|
3968 |
||
3969 |
#methodsFor:stamp: "/ Squeak support |
|
3970 |
#methodsFor "/ Dolphin support |
|
3971 |
#methods "/ STV support |
|
3972 |
) |
|
4857 | 3973 |
includes:selector) ifTrue:[ |
4489 | 3974 |
newSource := aStream nextChunk. |
3975 |
||
4487 | 3976 |
thisClass := (parseTree receiver evaluate). |
3977 |
thisClass isBehavior ifTrue:[ |
|
4489 | 3978 |
thisClass isLoaded ifFalse:[ |
3979 |
oldSource := 'Cannot compare this change\\(compare requires class to be loaded).' withCRs. |
|
4487 | 3980 |
] ifTrue:[ |
4857 | 3981 |
selector == #methodsFor ifTrue:[ |
4487 | 3982 |
cat := 'Dolphin methods'. |
3983 |
] ifFalse:[ |
|
4857 | 3984 |
selector == #methods ifTrue:[ |
4487 | 3985 |
cat := 'STV methods'. |
3986 |
] ifFalse:[ |
|
3987 |
cat := parseTree arg1 evaluate. |
|
3988 |
]. |
|
3989 |
]. |
|
3990 |
Class nameSpaceQuerySignal answer:(self nameSpaceForApply) |
|
3991 |
do:[ |
|
5144 | 3992 |
Error handle:[:ex | |
3993 |
] do:[ |
|
3994 |
parser := Parser parseMethod:newSource in:thisClass. |
|
3995 |
] |
|
4487 | 3996 |
]. |
3997 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
3998 |
sel := parser selector. |
|
3999 |
oldMethod := thisClass compiledMethodAt:sel. |
|
4000 |
oldMethod notNil ifTrue:[ |
|
4001 |
(oldMethod category = cat) ifFalse:[ |
|
4002 |
Transcript showCR:'category changed.'. |
|
4003 |
]. |
|
4004 |
oldSource := oldMethod source. |
|
4005 |
(oldSource = newSource) ifFalse:[ |
|
4006 |
oldSource isNil ifTrue:[ |
|
4489 | 4007 |
oldSource := 'No source for compare.'. |
4487 | 4008 |
] ifFalse:[ |
4009 |
"/ |
|
4010 |
"/ compare for tabulator <-> space changes |
|
4011 |
"/ before showing diff ... |
|
4012 |
"/ |
|
4013 |
oldSource := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
4014 |
newSource := newSource asCollectionOfLines collect:[:s | s withTabsExpanded]. |
|
4015 |
oldSource = newSource ifFalse:[ |
|
4016 |
"/ |
|
4017 |
"/ check if only historyLine diffs |
|
4018 |
"/ |
|
4019 |
(HistoryManager notNil |
|
4020 |
and:[HistoryManager isActive]) ifTrue:[ |
|
4699
393443e15c9b
compare fix if historyManager is enabled.
Claus Gittinger <cg@exept.de>
parents:
4632
diff
changeset
|
4021 |
oldSource := oldSource asStringCollection asString. |
393443e15c9b
compare fix if historyManager is enabled.
Claus Gittinger <cg@exept.de>
parents:
4632
diff
changeset
|
4022 |
newSource := newSource asStringCollection asString. |
4489 | 4023 |
(HistoryManager withoutHistoryLines:oldSource) |
4487 | 4024 |
= |
4489 | 4025 |
(HistoryManager withoutHistoryLines:newSource) |
4487 | 4026 |
ifTrue:[ |
4027 |
oldSource := (HistoryManager withoutHistoryLines:oldSource). |
|
4028 |
newSource := (HistoryManager withoutHistoryLines:newSource). |
|
4029 |
] |
|
4030 |
]. |
|
4031 |
] |
|
4032 |
] |
|
4033 |
] |
|
4034 |
] ifFalse:[ |
|
4489 | 4035 |
oldSource := 'Method does not exist.'. |
4487 | 4036 |
] |
4037 |
] ifFalse:[ |
|
4489 | 4038 |
oldSource := 'Change is unparsable (parse error).'. |
4487 | 4039 |
]. |
4040 |
]. |
|
4041 |
] ifFalse:[ |
|
4489 | 4042 |
oldSource := 'Class does not exist.'. |
4487 | 4043 |
] |
4044 |
] ifFalse:[ |
|
4990 | 4045 |
newSource := aStream contents. |
4489 | 4046 |
oldSource := 'Not comparable.'. |
4487 | 4047 |
] |
4048 |
] |
|
4049 |
]. |
|
4050 |
aStream close. |
|
4051 |
||
4052 |
diffView text1:(oldSource ? '') text2:(newSource ? ''). |
|
4053 |
||
4054 |
"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
|
4055 |
"Modified: / 21.3.2003 / 14:26:58 / cg" |
202 | 4056 |
! ! |
0 | 4057 |
|
202 | 4058 |
!ChangesBrowser methodsFor:'termination'! |
51 | 4059 |
|
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4060 |
askIfChangesAreToBeWrittenBack |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4061 |
|action again| |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4062 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4063 |
anyChanges ifFalse:[^ self]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4064 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4065 |
again := true. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4066 |
[again] whileTrue:[ |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4067 |
action := OptionBox |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4068 |
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
|
4069 |
label:'ChangesBrowser' |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4070 |
form:(WarningBox iconBitmap) |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4071 |
buttonLabels:(resources array:#('Cancel' 'Don''t Write' 'Write')) |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4072 |
values:#(#abort #ignore #save) |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4073 |
default:#save |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4074 |
onCancel:#abort. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4075 |
|
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4076 |
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
|
4077 |
action == #abort ifTrue:[AbortSignal raise. ^ self]. |
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4078 |
action == #save ifTrue:[ |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4079 |
again := self writeBackChanges not |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4080 |
]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4081 |
]. |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4082 |
! |
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4083 |
|
1787 | 4084 |
closeRequest |
4085 |
"window manager wants us to go away" |
|
4086 |
||
3392
2dae85e52160
changeSetBrowsers writeBack fixed (when closing)
Claus Gittinger <cg@exept.de>
parents:
3378
diff
changeset
|
4087 |
self askIfChangesAreToBeWrittenBack. |
1787 | 4088 |
super closeRequest |
4089 |
! |
|
4090 |
||
202 | 4091 |
saveAndTerminate |
4092 |
"update the changes file and quit. |
|
4093 |
Dont depend on this being sent, not all window managers |
|
4094 |
send it; instead, they simply destroy the view." |
|
28 | 4095 |
|
202 | 4096 |
anyChanges ifTrue:[ |
1787 | 4097 |
self writeBackChanges. |
0 | 4098 |
]. |
1787 | 4099 |
super saveAndTerminate |
4100 |
||
4101 |
"Modified: / 3.8.1998 / 19:54:00 / cg" |
|
0 | 4102 |
! ! |
4103 |
||
73 | 4104 |
!ChangesBrowser methodsFor:'user interaction'! |
51 | 4105 |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4106 |
askForSearch:msg initialAnswer:initial thenSearchUsing:searchBlock2 onCancel:cancelBlock |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4107 |
|searchString directionHolder searchBlock| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4108 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4109 |
searchString := self |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4110 |
askForSearchString:msg |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4111 |
initialAnswer:initial |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4112 |
directionInto:(directionHolder := ValueHolder new). |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4113 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4114 |
searchString isNil ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4115 |
^ cancelBlock value |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4116 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4117 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4118 |
searchBlock := [:changeNr | searchBlock2 value:searchString value:changeNr]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4119 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4120 |
directionHolder value == #backward ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4121 |
changeNrShown isNil ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4122 |
changeNrShown := self numberOfChanges. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4123 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4124 |
self findPreviousForWhich:searchBlock |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4125 |
] ifFalse:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4126 |
changeNrShown isNil ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4127 |
changeNrShown := 0. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4128 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4129 |
self findNextForWhich:searchBlock |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4130 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4131 |
! |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4132 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4133 |
askForSearchString:msg initialAnswer:initial directionInto:aValueHolder |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4134 |
"common code to open a search box" |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4135 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4136 |
|searchString direction| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4137 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4138 |
direction := #forward. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4139 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4140 |
Dialog aboutToOpenBoxNotificationSignal handle:[:ex | |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4141 |
|box nextButton prevButton| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4142 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4143 |
box := ex parameter. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4144 |
nextButton := box okButton. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4145 |
prevButton := Button label:(resources string:'Previous'). |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4146 |
prevButton action:[direction := #backward. box okPressed.]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4147 |
box addButton:prevButton after:nextButton. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4148 |
nextButton label:(resources string:'Next'). |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4149 |
ex proceed. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4150 |
] do:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4151 |
searchString := Dialog |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4152 |
request:msg |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4153 |
initialAnswer:initial |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4154 |
onCancel:nil. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4155 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4156 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4157 |
searchString isNil ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4158 |
^ nil |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4159 |
]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4160 |
aValueHolder value:direction. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4161 |
^ searchString |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4162 |
! |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
4163 |
|
221 | 4164 |
autoUpdate:aBoolean |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4165 |
"enabled/disable automatic update from the change-file (for monitoring)" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
4166 |
|
221 | 4167 |
autoUpdate := aBoolean |
4168 |
||
4169 |
"Created: 3.12.1995 / 14:14:24 / cg" |
|
4170 |
"Modified: 3.12.1995 / 14:20:45 / cg" |
|
4171 |
! |
|
4172 |
||
3211 | 4173 |
changeSelection:lineNrCollection |
0 | 4174 |
"show a change in the codeView" |
4175 |
||
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
4176 |
|chunk lineNr| |
3211 | 4177 |
|
4178 |
lineNrCollection isInteger ifTrue:[ |
|
4179 |
lineNr := lineNrCollection |
|
4180 |
] ifFalse:[ |
|
4181 |
changeListView multipleSelectOk ifTrue:[ |
|
4182 |
lineNrCollection size == 1 ifTrue:[ |
|
4183 |
lineNr := lineNrCollection first. |
|
4184 |
] |
|
4185 |
] ifFalse:[ |
|
4186 |
lineNr := lineNrCollection |
|
4187 |
]. |
|
4188 |
]. |
|
0 | 4189 |
|
2293 | 4190 |
lineNr isNil ifTrue:[ |
4191 |
codeView contents:nil. |
|
4192 |
codeView initializeDoITAction. |
|
3211 | 4193 |
changeNrShown := nil. |
2293 | 4194 |
^ self |
4195 |
]. |
|
4196 |
||
3211 | 4197 |
"/ display the changes code |
3785
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
4198 |
chunk := self sourceOfChange:lineNr. |
741890c870a4
oops - exclas in changeSetBrowsers method source
Claus Gittinger <cg@exept.de>
parents:
3771
diff
changeset
|
4199 |
chunk isNil ifTrue:[ |
2093 | 4200 |
codeView initializeDoITAction. |
2044 | 4201 |
^ self |
4202 |
]. |
|
0 | 4203 |
codeView contents:chunk. |
13 | 4204 |
codeView acceptAction:[:theCode | self doApply "noChangesAllowed"]. |
2043
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4205 |
codeView doItAction:[:theCode | |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4206 |
|clsName cls| |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4207 |
|
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4208 |
clsName := self classNameOfChange:lineNr. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4209 |
clsName notNil ifTrue:[ |
4296
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4210 |
clsName := clsName asSymbolIfInterned. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4211 |
clsName notNil ifTrue:[ |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4212 |
cls := Smalltalk at:clsName ifAbsent:nil. |
4ad7dde4a3db
care for unknown class in doIt;
Claus Gittinger <cg@exept.de>
parents:
4283
diff
changeset
|
4213 |
] |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4214 |
]. |
2043
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4215 |
Compiler |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4216 |
evaluate:theCode |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4217 |
in:nil |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4218 |
receiver:cls |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4219 |
notifying:self |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4220 |
logged:true |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4221 |
ifFail:nil |
66b5276b2760
set self in changesBrowsers doIt.
Claus Gittinger <cg@exept.de>
parents:
1996
diff
changeset
|
4222 |
]. |
15 | 4223 |
changeNrShown := lineNr. |
0 | 4224 |
|
4487 | 4225 |
self showingDiffs value ifTrue:[ |
4917
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4226 |
AbortOperationRequest catch:[ |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4227 |
self updateDiffViewFor:changeNrShown. |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4228 |
] |
4487 | 4229 |
]. |
4230 |
||
2044 | 4231 |
"Modified: / 28.2.1999 / 15:26:46 / cg" |
51 | 4232 |
! |
4233 |
||
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4234 |
classOfChange:changeNr |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4235 |
^ self |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4236 |
classOfChange:changeNr |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4237 |
ifAbsent:[:className | |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4238 |
|msg| |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4239 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4240 |
className isNil ifTrue:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4241 |
msg := 'Could not extract classname from change'. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4242 |
] ifFalse:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4243 |
msg := 'Class not found: ''' , className , ''''. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4244 |
]. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4245 |
self warn:msg. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4246 |
nil |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4247 |
] |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4248 |
! |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4249 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4250 |
classOfChange:changeNr ifAbsent:exceptionBlock |
4271 | 4251 |
|className cls isMeta ownerClassName ownerClass| |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4252 |
|
5014 | 4253 |
className := self realClassNameOfChange:changeNr. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4254 |
className isNil ifTrue:[ |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4255 |
^ exceptionBlock value:nil |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4256 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4257 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4258 |
isMeta := false. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4259 |
(className endsWith:' class') ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4260 |
className := className copyWithoutLast:6. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4261 |
isMeta := true. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4262 |
]. |
3472 | 4263 |
|
4264 |
(cls := (self nameSpaceForApply) classNamed:className) isNil ifTrue:[ |
|
4265 |
cls := Smalltalk classNamed:className |
|
4266 |
]. |
|
4267 |
||
4268 |
cls isNil ifTrue:[ |
|
4271 | 4269 |
(className includes:$:) ifTrue:[ |
4270 |
ownerClassName := className copyTo:(className lastIndexOf:$:)-1. |
|
4271 |
(ownerClassName endsWith:$:) ifTrue:[ ownerClassName := ownerClassName copyWithoutLast:1 ]. |
|
4272 |
ownerClass := Smalltalk classNamed:ownerClassName. |
|
4273 |
ownerClass isBehavior ifTrue:[ |
|
4274 |
ownerClass isLoaded ifFalse:[ |
|
4275 |
"/ self halt. |
|
4276 |
]. |
|
4277 |
]. |
|
4278 |
]. |
|
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4279 |
^ exceptionBlock value:className |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4280 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4281 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4282 |
isMeta ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4283 |
cls := cls class |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4284 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4285 |
^ cls |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4286 |
! |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4287 |
|
202 | 4288 |
doApply |
4289 |
"user wants a change to be applied" |
|
45 | 4290 |
|
3211 | 4291 |
self withSelectedChangesDo:[:changeNr | |
4292 |
skipSignal := nil. |
|
4877 | 4293 |
(self applyChange:changeNr) ifFalse:[ |
4294 |
^ self "/ cancel |
|
4295 |
]. |
|
3211 | 4296 |
self autoSelect:(changeNr + 1) |
202 | 4297 |
] |
45 | 4298 |
! |
4299 |
||
202 | 4300 |
doApplyAll |
4301 |
"user wants all changes to be applied" |
|
37 | 4302 |
|
294 | 4303 |
self withExecuteCursorDo:[ |
4488 | 4304 |
|lastNr "{ Class: SmallInteger }" | |
4305 |
||
4306 |
self clearCodeView. |
|
4307 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
4308 |
lastNr := self numberOfChanges. |
|
4309 |
1 to:lastNr do:[:changeNr | |
|
4310 |
changeListView setSelection:changeNr. |
|
4311 |
self applyChange:changeNr |
|
4312 |
]. |
|
4313 |
self autoSelectLast |
|
202 | 4314 |
] |
294 | 4315 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
4316 |
"Modified: 21.1.1997 / 22:26:30 / cg" |
37 | 4317 |
! |
4318 |
||
3668 | 4319 |
doApplyClassFromBeginning |
4320 |
"user wants all changes for this class from 1 to changeNr to be applied" |
|
4321 |
||
4322 |
self withSingleSelectedChangeDo:[:changeNr | |
|
4323 |
|thisClassName classNameToApply lastChange |
|
4324 |
lastNr "{ Class: SmallInteger }" | |
|
4325 |
||
4326 |
classNameToApply := self classNameOfChange:changeNr. |
|
4327 |
classNameToApply notNil ifTrue:[ |
|
4328 |
self clearCodeView. |
|
4329 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
4330 |
||
4331 |
lastNr := self numberOfChanges. |
|
4332 |
1 to:changeNr do:[:changeNr | |
|
4333 |
thisClassName := self classNameOfChange:changeNr. |
|
4334 |
thisClassName = classNameToApply ifTrue:[ |
|
4335 |
changeListView setSelection:changeNr. |
|
4336 |
self applyChange:changeNr. |
|
4337 |
lastChange := changeNr |
|
4338 |
]. |
|
4339 |
]. |
|
4340 |
self autoSelect:changeNr+1. |
|
4341 |
] |
|
4342 |
] |
|
4343 |
||
4344 |
"Modified: 21.1.1997 / 22:26:04 / cg" |
|
4345 |
! |
|
4346 |
||
202 | 4347 |
doApplyClassRest |
4348 |
"user wants all changes for this class from changeNr to be applied" |
|
4349 |
||
3668 | 4350 |
self withSingleSelectedChangeDo:[:changeNr | |
3211 | 4351 |
|thisClassName classNameToApply lastChange |
4352 |
lastNr "{ Class: SmallInteger }" | |
|
4353 |
||
4354 |
classNameToApply := self classNameOfChange:changeNr. |
|
4355 |
classNameToApply notNil ifTrue:[ |
|
4356 |
self clearCodeView. |
|
4357 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
4358 |
||
4359 |
lastNr := self numberOfChanges. |
|
4360 |
changeNr to:lastNr do:[:changeNr | |
|
4361 |
thisClassName := self classNameOfChange:changeNr. |
|
4362 |
thisClassName = classNameToApply ifTrue:[ |
|
4363 |
changeListView setSelection:changeNr. |
|
4364 |
self applyChange:changeNr. |
|
4365 |
lastChange := changeNr |
|
4366 |
]. |
|
4367 |
]. |
|
4368 |
self autoSelect:lastChange. |
|
4369 |
] |
|
202 | 4370 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
4371 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
4372 |
"Modified: 21.1.1997 / 22:26:04 / cg" |
37 | 4373 |
! |
4374 |
||
3668 | 4375 |
doApplyFromBeginning |
4376 |
"user wants all changes from 1 to changeNr to be applied" |
|
4377 |
||
4378 |
self withSingleSelectedChangeDo:[:changeNr | |
|
4379 |
|lastNr "{ Class: SmallInteger }" | |
|
4380 |
||
4381 |
self clearCodeView. |
|
4382 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
4383 |
||
4384 |
1 to:changeNr do:[:changeNr | |
|
4385 |
changeListView setSelection:changeNr. |
|
4386 |
self applyChange:changeNr |
|
4387 |
]. |
|
4388 |
self autoSelect:changeNr+1. |
|
4389 |
] |
|
4390 |
! |
|
4391 |
||
202 | 4392 |
doApplyRest |
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4393 |
"apply all changes from changeNr to the end" |
28 | 4394 |
|
3668 | 4395 |
self withSingleSelectedChangeDo:[:changeNr | |
3211 | 4396 |
|lastNr "{ Class: SmallInteger }" | |
4397 |
||
4398 |
self clearCodeView. |
|
4399 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
|
4400 |
||
4401 |
lastNr := self numberOfChanges. |
|
4402 |
changeNr to:lastNr do:[:changeNr | |
|
4403 |
changeListView setSelection:changeNr. |
|
4404 |
self applyChange:changeNr |
|
4405 |
]. |
|
4406 |
self autoSelect:self numberOfChanges. |
|
37 | 4407 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
4408 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
4409 |
"Modified: 21.1.1997 / 22:25:29 / cg" |
37 | 4410 |
! |
4411 |
||
3806
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4412 |
doApplyToConflictOrEnd |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4413 |
"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
|
4414 |
or the end." |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4415 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4416 |
self withSingleSelectedChangeDo:[:changeNr | |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4417 |
|lastNr "{ Class: SmallInteger }"| |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4418 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4419 |
self clearCodeView. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4420 |
skipSignal isNil ifTrue:[skipSignal := Signal new]. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4421 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4422 |
lastNr := self numberOfChanges. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4423 |
changeNr to:lastNr do:[:changeNr | |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4424 |
| cls sel | |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4425 |
changeListView setSelection:changeNr. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4426 |
|
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4427 |
((cls := self classOfChange:changeNr ifAbsent:[:className| nil]) notNil |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4428 |
and:[(sel := self selectorOfMethodChange:changeNr) notNil]) |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4429 |
ifTrue:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4430 |
(cls implements:sel) ifTrue:[ |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4431 |
self autoSelect:changeNr. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4432 |
^ self |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4433 |
]. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4434 |
]. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4435 |
self applyChange:changeNr |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4436 |
]. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4437 |
self autoSelect:self numberOfChanges. |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4438 |
] |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4439 |
! |
46e459fdde4c
added "apply to next conflict"
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
4440 |
|
45 | 4441 |
doBrowse |
4442 |
"user wants a browser on the class of a change" |
|
4443 |
||
3668 | 4444 |
self withSingleSelectedChangeDo:[:changeNr | |
4445 |
|cls| |
|
4446 |
||
4447 |
cls := self classOfChange:changeNr. |
|
4448 |
cls notNil ifTrue:[ |
|
4449 |
UserPreferences systemBrowserClass |
|
4450 |
openInClass:cls |
|
4451 |
selector:(self selectorOfMethodChange:changeNr) |
|
4452 |
] |
|
37 | 4453 |
] |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4454 |
! |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4455 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4456 |
doBrowseImplementors |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4457 |
"open an implementors-browser" |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4458 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4459 |
|changeNr initial selector| |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4460 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4461 |
(changeNr := self theSingleSelection) notNil ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4462 |
initial := self selectorOfMethodChange:changeNr. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4463 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4464 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4465 |
selector := Dialog |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4466 |
request:'Selector to browse implementors of:' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4467 |
initialAnswer:(initial ? ''). |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4468 |
selector size ~~ 0 ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4469 |
UserPreferences systemBrowserClass |
4157 | 4470 |
browseImplementorsMatching:selector. |
3275
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4471 |
] |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4472 |
! |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4473 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4474 |
doBrowseSenders |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4475 |
"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
|
4476 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4477 |
|changeNr initial selector| |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4478 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4479 |
(changeNr := self theSingleSelection) notNil ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4480 |
initial := self selectorOfMethodChange:changeNr. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4481 |
]. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4482 |
|
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4483 |
selector := Dialog |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4484 |
request:'Selector to browse senders of:' |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4485 |
initialAnswer:(initial ? ''). |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4486 |
selector size ~~ 0 ifTrue:[ |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4487 |
UserPreferences systemBrowserClass |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4488 |
browseAllCallsOn:selector asSymbol. |
88c43d1cfc99
added browse-senders & browse implementors
Claus Gittinger <cg@exept.de>
parents:
3249
diff
changeset
|
4489 |
] |
37 | 4490 |
! |
4491 |
||
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4492 |
doCheckinAndDeleteClassAll |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4493 |
"first checkin the selected changes class then delete all changes |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4494 |
for it." |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4495 |
|
4917
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4496 |
|classes answer logTitle logMessage| |
3442 | 4497 |
|
4498 |
"/ self theSingleSelection isNil ifTrue:[ |
|
4499 |
"/ ^ self information:'Only possible if a single change is selected.'. |
|
4500 |
"/ ]. |
|
4501 |
||
4502 |
self withExecuteCursorDo:[ |
|
4503 |
classes := IdentitySet new. |
|
4504 |
||
4505 |
self withSelectedChangesDo:[:changeNr | |
|
4506 |
| className class | |
|
4507 |
||
4508 |
className := self classNameOfChange:changeNr. |
|
4509 |
className notNil ifTrue:[ |
|
4510 |
class := Smalltalk classNamed:className. |
|
4511 |
class isNil ifTrue:[ |
|
3991 | 4512 |
self error:'oops - no class: ', className mayProceed:true. |
3442 | 4513 |
]. |
4514 |
class notNil ifTrue:[ |
|
4515 |
class := class theNonMetaclass. |
|
4516 |
(classes includes:class) ifFalse:[ |
|
4517 |
class isPrivate ifTrue:[ |
|
4518 |
(classes includes:class owningClass) ifFalse:[ |
|
4519 |
answer := self confirmWithCancel:('This is a private class.\\CheckIn the owner ''%1'' and all of its private classes ?' |
|
4520 |
bindWith:class owningClass name allBold) withCRs. |
|
4521 |
answer isNil ifTrue:[^ self]. |
|
4522 |
answer ifTrue:[ |
|
4523 |
classes add:class owningClass |
|
4524 |
] |
|
4525 |
] |
|
4526 |
] ifFalse:[ |
|
4527 |
classes add:class |
|
4528 |
]. |
|
2682 | 4529 |
] |
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4530 |
] |
3442 | 4531 |
] |
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4532 |
]. |
3442 | 4533 |
|
4917
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4534 |
classes size == 1 ifTrue:[ |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4535 |
logTitle := classes first name. |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4536 |
] ifFalse:[ |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4537 |
logTitle := '%1 classes' bindWith:classes size. |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4538 |
]. |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4539 |
logMessage := SourceCodeManagerUtilities |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4540 |
getLogMessageFor:logTitle |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4541 |
initialAnswer:nil. |
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4542 |
|
3442 | 4543 |
changeListView setSelection:nil. |
4544 |
classes do:[:eachClass | |
|
4917
9f2476c53513
single logMessage query when checking in multiple classes
Claus Gittinger <cg@exept.de>
parents:
4897
diff
changeset
|
4545 |
(SourceCodeManagerUtilities checkinClass:eachClass withLog:logMessage) |
3442 | 4546 |
ifTrue:[ |
4547 |
self silentDeleteChangesForClassAndPrivateClasses:eachClass name |
|
4548 |
from:1 to:(self numberOfChanges). |
|
4549 |
] |
|
4550 |
]. |
|
4551 |
self setChangeList. |
|
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4552 |
] |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4553 |
|
3442 | 4554 |
"Modified: / 6.9.1995 / 17:11:16 / claus" |
4555 |
"Modified: / 17.11.2001 / 14:21:13 / cg" |
|
2541
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4556 |
! |
f8b6ae881564
experimental: checkIn & deleteForClass added.
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
4557 |
|
73 | 4558 |
doCompare |
4559 |
"compare change with current system version |
|
4560 |
- give a note in transcript" |
|
4561 |
||
3668 | 4562 |
self withSingleSelectedChangeDo:[:changeNr | |
4563 |
self withExecuteCursorDo:[ |
|
4564 |
self compareChange:changeNr |
|
4565 |
]. |
|
4566 |
self newLabel:'' |
|
3211 | 4567 |
]. |
4568 |
||
394 | 4569 |
"Modified: 24.2.1996 / 19:37:19 / cg" |
73 | 4570 |
! |
4571 |
||
2835 | 4572 |
doCompareAndCompress |
4573 |
"remove all changes, which are equivalent to the current image version" |
|
4574 |
||
4575 |
|toDelete| |
|
4576 |
||
4577 |
toDelete := OrderedCollection new. |
|
4578 |
self withExecuteCursorDo:[ |
|
4579 |
1 to:self numberOfChanges do:[:changeNr | |
|
4580 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
|
4581 |
toDelete add:changeNr |
|
4582 |
] |
|
4583 |
]. |
|
4584 |
]. |
|
4585 |
||
4586 |
toDelete reverseDo:[:changeNr | |
|
4587 |
self silentDeleteChange:changeNr. |
|
4588 |
]. |
|
4589 |
self setChangeList. |
|
4590 |
" |
|
4591 |
scroll back a bit, if we are left way behind the list |
|
4592 |
" |
|
4593 |
changeListView firstLineShown > self numberOfChanges ifTrue:[ |
|
4594 |
changeListView makeLineVisible:self numberOfChanges |
|
4595 |
]. |
|
4596 |
self clearCodeView. |
|
4597 |
||
4598 |
self newLabel:'' |
|
4599 |
! |
|
4600 |
||
45 | 4601 |
doCompress |
4602 |
"compress the change-set; this replaces multiple method-changes by the last |
|
4603 |
(i.e. the most recent) change" |
|
4604 |
||
1359 | 4605 |
self compressForClass:nil |
4606 |
||
4607 |
"Modified: / 29.10.1997 / 01:03:26 / cg" |
|
4608 |
! |
|
4609 |
||
4610 |
doCompressClass |
|
4611 |
"compress changes for the selected class. |
|
4612 |
this replaces multiple method-changes by the last (i.e. the most recent) change." |
|
4613 |
||
3211 | 4614 |
self theSingleSelection isNil ifTrue:[ |
4615 |
^ self information:'Only possible if a single change is selected.'. |
|
4616 |
]. |
|
4617 |
||
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4618 |
self selectedClassNames do:[:classNameToCompress | |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4619 |
self compressForClass:classNameToCompress. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4620 |
] |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4621 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4622 |
"Created: / 29.10.1997 / 01:05:16 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4623 |
"Modified: / 19.11.2001 / 21:55:17 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4624 |
! |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4625 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4626 |
doCompressSelector |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4627 |
"compress changes for the selected class & selector. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4628 |
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
|
4629 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4630 |
|classSelectorPairs| |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4631 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4632 |
self theSingleSelection isNil ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4633 |
^ self information:'Only possible if a single change is selected.'. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4634 |
]. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4635 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4636 |
classSelectorPairs := Set new. |
3211 | 4637 |
self withSelectedChangesDo:[:changeNr | |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4638 |
| classNameToCompress selector | |
3211 | 4639 |
|
4640 |
classNameToCompress := self classNameOfChange:changeNr. |
|
4641 |
classNameToCompress notNil ifTrue:[ |
|
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4642 |
selector := self selectorOfMethodChange:changeNr. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4643 |
selector notNil ifTrue:[ |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4644 |
classSelectorPairs add:(classNameToCompress -> selector). |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4645 |
] |
3211 | 4646 |
] |
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4647 |
]. |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4648 |
|
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4649 |
classSelectorPairs do:[:pair | |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4650 |
self compressForClass:pair key selector:pair value. |
1359 | 4651 |
] |
4652 |
||
3456
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4653 |
"Created: / 19.11.2001 / 21:50:59 / cg" |
080399eeaab1
added compressForClass-selector function
Claus Gittinger <cg@exept.de>
parents:
3455
diff
changeset
|
4654 |
"Modified: / 19.11.2001 / 22:10:08 / cg" |
45 | 4655 |
! |
4656 |
||
202 | 4657 |
doDelete |
3211 | 4658 |
"delete currently selected change(s)" |
4659 |
||
4660 |
self withSelectedChangesReverseDo:[:changeNr | |
|
4661 |
self deleteChange:changeNr. |
|
4283 | 4662 |
self autoSelectOrEnd:changeNr |
73 | 4663 |
] |
4664 |
! |
|
4665 |
||
3249 | 4666 |
doDeleteAndSelectPrevious |
4667 |
"delete currently selected change(s)" |
|
4668 |
||
4669 |
self withSelectedChangesReverseDo:[:changeNr | |
|
4670 |
self deleteChange:changeNr. |
|
4671 |
self autoSelectOrEnd:changeNr-1 |
|
4672 |
] |
|
4673 |
! |
|
4674 |
||
202 | 4675 |
doDeleteClassAll |
4676 |
"delete all changes with same class as currently selected change" |
|
4677 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4678 |
|classNamesToDelete lastChangeNr overAllNumDeletedBefore| |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4679 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4680 |
lastChangeNr := -1. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4681 |
classNamesToDelete := Set new. |
3211 | 4682 |
self withSelectedChangesDo:[:changeNr | |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4683 |
|classNameToDelete| |
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4684 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4685 |
classNameToDelete := self classNameOfChange:changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4686 |
classNameToDelete notNil ifTrue:[ |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4687 |
classNamesToDelete add:classNameToDelete. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4688 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4689 |
lastChangeNr := lastChangeNr max:changeNr. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4690 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4691 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4692 |
overAllNumDeletedBefore := 0. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4693 |
changeListView setSelection:nil. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4694 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4695 |
self withExecuteCursorDo:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4696 |
classNamesToDelete do:[:classNameToDelete | |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4697 |
|numDeletedBefore| |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4698 |
|
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4699 |
self silentDeleteChangesFor:classNameToDelete |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4700 |
from:lastChangeNr |
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4701 |
to:(self numberOfChanges). |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4702 |
numDeletedBefore := self |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4703 |
silentDeleteChangesFor:classNameToDelete |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4704 |
from:1 |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4705 |
to:(lastChangeNr-1). |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4706 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4707 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4708 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4709 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4710 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4711 |
self setChangeList. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
4712 |
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
|
4713 |
|
1431 | 4714 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
4715 |
"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
|
4716 |
! |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4717 |
|
2511 | 4718 |
doDeleteClassAndPrivateClassesAll |
4719 |
"delete all changes with same class and private classes |
|
4720 |
as currently selected change" |
|
4721 |
||
3211 | 4722 |
self theSingleSelection isNil ifTrue:[ |
4723 |
^ self information:'Only possible if a single change is selected.'. |
|
4724 |
]. |
|
4725 |
||
4726 |
self withSelectedChangesDo:[:changeNr | |
|
2511 | 4727 |
|classNameToDelete numDeletedBefore| |
4728 |
||
4729 |
classNameToDelete := self ownerClassNameOfChange:changeNr. |
|
4730 |
classNameToDelete notNil ifTrue:[ |
|
4731 |
changeListView setSelection:nil. |
|
4732 |
self silentDeleteChangesForClassAndPrivateClasses:classNameToDelete |
|
4733 |
from:changeNr |
|
4734 |
to:(self numberOfChanges). |
|
4735 |
numDeletedBefore := self |
|
4736 |
silentDeleteChangesForClassAndPrivateClasses:classNameToDelete |
|
4737 |
from:1 |
|
4738 |
to:(changeNr-1). |
|
4739 |
self setChangeList. |
|
4740 |
self autoSelectOrEnd:(changeNr - numDeletedBefore) |
|
4741 |
] |
|
4742 |
] |
|
4743 |
||
4744 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
|
4745 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
|
4746 |
! |
|
4747 |
||
286
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4748 |
doDeleteClassFromBeginning |
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4749 |
"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
|
4750 |
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
|
4751 |
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
|
4752 |
|
3668 | 4753 |
self withSingleSelectedChangeDo:[:changeNr | |
1428
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4754 |
|classNameToDelete prevSelection numDeleted| |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4755 |
|
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4756 |
classNameToDelete := self classNameOfChange:changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4757 |
classNameToDelete notNil ifTrue:[ |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4758 |
prevSelection := changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4759 |
changeListView setSelection:nil. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4760 |
numDeleted := self |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4761 |
silentDeleteChangesFor:classNameToDelete |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4762 |
from:1 |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4763 |
to:changeNr. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4764 |
self setChangeList. |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4765 |
self autoSelectOrEnd:(changeNr + 1 - numDeleted) |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4766 |
] |
180d03d00db4
fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents:
1427
diff
changeset
|
4767 |
]. |
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 |
|
96d31200b0c1
added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents:
276
diff
changeset
|
4769 |
"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
|
4770 |
"Modified: 25.5.1996 / 12:26:34 / cg" |
51 | 4771 |
! |
4772 |
||
73 | 4773 |
doDeleteClassRest |
4774 |
"delete rest of changes with same class as currently selected change" |
|
4775 |
||
3668 | 4776 |
self withSingleSelectedChangeDo:[:changeNr | |
1648 | 4777 |
| classNameToDelete | |
4778 |
||
4779 |
classNameToDelete := self classNameOfChange:changeNr. |
|
4780 |
classNameToDelete notNil ifTrue:[ |
|
4781 |
changeListView setSelection:nil. |
|
4782 |
self silentDeleteChangesFor:classNameToDelete |
|
4783 |
from:changeNr |
|
4784 |
to:(self numberOfChanges). |
|
4785 |
self setChangeList. |
|
4786 |
self autoSelectOrEnd:changeNr |
|
4787 |
] |
|
73 | 4788 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
4789 |
|
1648 | 4790 |
"Modified: / 18.5.1998 / 14:25:07 / cg" |
73 | 4791 |
! |
4792 |
||
3607 | 4793 |
doDeleteClassSelectorAll |
4794 |
"delete all changes with same class and selector as currently selected change" |
|
4795 |
||
4796 |
|classNameSelectorPairsToDelete lastChangeNr overAllNumDeletedBefore| |
|
4797 |
||
4798 |
lastChangeNr := -1. |
|
4799 |
classNameSelectorPairsToDelete := Set new. |
|
4800 |
self withSelectedChangesDo:[:changeNr | |
|
4801 |
|className selector| |
|
4802 |
||
4803 |
className := self classNameOfChange:changeNr. |
|
4804 |
selector := self selectorOfMethodChange:changeNr. |
|
4805 |
selector notNil ifTrue:[ |
|
4806 |
(className notNil and:[selector notNil]) ifTrue:[ |
|
4807 |
classNameSelectorPairsToDelete add:(className -> selector). |
|
4808 |
] |
|
4809 |
]. |
|
4810 |
lastChangeNr := lastChangeNr max:changeNr. |
|
4811 |
]. |
|
4812 |
||
4813 |
overAllNumDeletedBefore := 0. |
|
4814 |
changeListView setSelection:nil. |
|
4815 |
||
4816 |
self withExecuteCursorDo:[ |
|
4817 |
classNameSelectorPairsToDelete do:[:pair | |
|
4818 |
|numDeletedBefore className selector| |
|
4819 |
||
4820 |
className := pair key. |
|
4821 |
selector := pair value. |
|
4822 |
self silentDeleteChangesFor:className selector:selector |
|
4823 |
from:lastChangeNr |
|
4824 |
to:(self numberOfChanges). |
|
4825 |
numDeletedBefore := self |
|
4826 |
silentDeleteChangesFor:className selector:selector |
|
4827 |
from:1 |
|
4828 |
to:(lastChangeNr-1). |
|
4829 |
lastChangeNr := lastChangeNr - numDeletedBefore. |
|
4830 |
overAllNumDeletedBefore := overAllNumDeletedBefore + numDeletedBefore. |
|
4831 |
]. |
|
4832 |
]. |
|
4833 |
||
4834 |
self setChangeList. |
|
4835 |
self autoSelectOrEnd:lastChangeNr |
|
4836 |
||
4837 |
"Created: / 13.12.1995 / 16:07:14 / cg" |
|
4838 |
"Modified: / 28.1.1998 / 20:42:14 / cg" |
|
4839 |
! |
|
4840 |
||
4896 | 4841 |
doDeleteFromBeginning |
4842 |
"delete all changes from 1 to the current" |
|
4843 |
||
4844 |
self withSingleSelectedChangeDo:[:changeNr | |
|
4845 |
self deleteChangesFrom:1 to:changeNr. |
|
4846 |
self clearCodeView. |
|
4847 |
self autoSelectOrEnd:changeNr |
|
4848 |
] |
|
4849 |
! |
|
4850 |
||
202 | 4851 |
doDeleteRest |
4852 |
"delete all changes from current to the end" |
|
51 | 4853 |
|
3668 | 4854 |
self withSingleSelectedChangeDo:[:changeNr | |
4855 |
self deleteChangesFrom:changeNr to:(self numberOfChanges). |
|
4856 |
self clearCodeView. |
|
4857 |
self autoSelectOrEnd:changeNr-1 |
|
4858 |
] |
|
132 | 4859 |
! |
4860 |
||
4861 |
doFileoutAndDeleteClassAll |
|
4862 |
"first fileOut the selected changes class then delete all changes |
|
4863 |
for it." |
|
4864 |
||
3668 | 4865 |
self withSingleSelectedChangeDo:[:changeNr | |
2835 | 4866 |
| className class | |
4867 |
||
4868 |
className := self classNameOfChange:changeNr. |
|
4869 |
className notNil ifTrue:[ |
|
4870 |
class := Smalltalk classNamed:className. |
|
4871 |
class notNil ifTrue:[ |
|
4872 |
Class fileOutErrorSignal handle:[:ex | |
|
4873 |
self warn:('fileout failed: ' , ex description). |
|
4874 |
] do:[ |
|
4875 |
class fileOut. |
|
4876 |
self doDeleteClassAll |
|
4877 |
]. |
|
4878 |
]. |
|
4879 |
||
4880 |
]. |
|
132 | 4881 |
] |
4882 |
||
4883 |
"Modified: 6.9.1995 / 17:11:16 / claus" |
|
202 | 4884 |
! |
73 | 4885 |
|
202 | 4886 |
doMakePatch |
4887 |
"user wants a change to be made a patch |
|
4888 |
- copy it over to the patches file" |
|
89 | 4889 |
|
3211 | 4890 |
self withSelectedChangesDo:[:changeNr | |
4891 |
self makeChangeAPatch:changeNr. |
|
4892 |
self autoSelect:(changeNr + 1) |
|
202 | 4893 |
] |
73 | 4894 |
! |
4895 |
||
202 | 4896 |
doMakePermanent |
4897 |
"user wants a change to be made permanent |
|
4898 |
- rewrite the source file where this change has to go" |
|
4899 |
||
4900 |
|yesNoBox| |
|
73 | 4901 |
|
3211 | 4902 |
(self theSingleSelection) isNil ifTrue:[ |
4903 |
^ self information:'Only possible if a single change is selected.'. |
|
4904 |
]. |
|
4905 |
||
202 | 4906 |
yesNoBox := YesNoBox new. |
4907 |
yesNoBox title:(resources at:'Warning: this operation cannot be undone'). |
|
1378 | 4908 |
yesNoBox okText:(resources at:'continue') noText:(resources at:'abort'). |
202 | 4909 |
yesNoBox okAction:[ |changeNr| |
4910 |
||
3211 | 4911 |
changeNr := self theSingleSelection. |
4912 |
changeNr notNil ifTrue:[ |
|
4913 |
self makeChangePermanent:changeNr. |
|
4914 |
self autoSelect:(changeNr + 1) |
|
4915 |
] |
|
4916 |
]. |
|
917 | 4917 |
yesNoBox showAtPointer. |
4918 |
yesNoBox destroy |
|
4919 |
||
4920 |
"Modified: 7.1.1997 / 23:03:33 / cg" |
|
73 | 4921 |
! |
4922 |
||
202 | 4923 |
doSave |
4924 |
"user wants a change to be appended to a file" |
|
73 | 4925 |
|
3211 | 4926 |
|fileName| |
4927 |
||
4928 |
self withSelectedChangesDo:[:changeNr | |
|
1473 | 4929 |
fileName := Dialog |
4930 |
requestFileName:'append change to:' |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4931 |
default:(lastSaveFileName ? '') |
1473 | 4932 |
ok:'append' |
4933 |
abort:'abort' |
|
4934 |
pattern:'*.chg'. |
|
4935 |
||
4936 |
fileName notNil ifTrue:[ |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
4937 |
lastSaveFileName := fileName. |
1473 | 4938 |
self withCursor:(Cursor write) do:[ |
4939 |
self appendChange:changeNr toFile:fileName. |
|
4940 |
]. |
|
4941 |
self autoSelect:(changeNr + 1) |
|
4942 |
]. |
|
202 | 4943 |
] |
73 | 4944 |
! |
4945 |
||
202 | 4946 |
doSaveClass |
4947 |
"user wants changes for some class from current to end to be appended to a file" |
|
89 | 4948 |
|
3211 | 4949 |
(self theSingleSelection) isNil ifTrue:[ |
4950 |
^ self information:'Only possible if a single change is selected.'. |
|
4951 |
]. |
|
202 | 4952 |
self doSaveClassFrom:1 |
89 | 4953 |
! |
4954 |
||
202 | 4955 |
doSaveClassAll |
4956 |
"user wants changes for some class from current to end to be appended to a file" |
|
73 | 4957 |
|
3211 | 4958 |
(self theSingleSelection) isNil ifTrue:[ |
4959 |
^ self information:'Only possible if a single change is selected.'. |
|
4960 |
]. |
|
202 | 4961 |
self doSaveClassFrom:1 |
4962 |
! |
|
4963 |
||
4964 |
doSaveClassFrom:startNr |
|
4965 |
"user wants changes from current to end to be appended to a file" |
|
4966 |
||
4967 |
|changeNr classNameToSave| |
|
73 | 4968 |
|
3211 | 4969 |
(changeNr := self theSingleSelection) isNil ifTrue:[ |
4970 |
^ self information:'Only possible if a single change is selected.'. |
|
4971 |
]. |
|
4972 |
classNameToSave := self classNameOfChange:changeNr. |
|
4973 |
classNameToSave notNil ifTrue:[ |
|
4974 |
self saveClass:classNameToSave from:startNr |
|
202 | 4975 |
] |
4976 |
! |
|
73 | 4977 |
|
202 | 4978 |
doSaveClassRest |
4979 |
"user wants changes for some class from current to end to be appended to a file" |
|
73 | 4980 |
|
202 | 4981 |
|changeNr| |
132 | 4982 |
|
3211 | 4983 |
(changeNr := self theSingleSelection) isNil ifTrue:[ |
4984 |
^ self information:'Only possible if a single change is selected.'. |
|
4985 |
]. |
|
4986 |
self doSaveClassFrom:changeNr |
|
81 | 4987 |
! |
4988 |
||
202 | 4989 |
doSaveRest |
4990 |
"user wants changes from current to end to be appended to a file" |
|
73 | 4991 |
|
202 | 4992 |
|changeNr fileName| |
51 | 4993 |
|
3211 | 4994 |
(changeNr := self theSingleSelection) isNil ifTrue:[ |
4995 |
^ self information:'Only possible if a single change is selected.'. |
|
4996 |
]. |
|
4997 |
||
4998 |
fileName := Dialog |
|
4999 |
requestFileName:'append changes to:' |
|
5000 |
default:(lastSaveFileName ? '') |
|
5001 |
ok:'append' |
|
5002 |
abort:'abort' |
|
5003 |
pattern:'*.chg'. |
|
5004 |
||
5005 |
fileName notNil ifTrue:[ |
|
5006 |
lastSaveFileName := fileName. |
|
5007 |
self withCursor:(Cursor write) do:[ |
|
5008 |
changeNr to:(self numberOfChanges) do:[:changeNr | |
|
5009 |
changeListView setSelection:changeNr. |
|
5010 |
(self appendChange:changeNr toFile:fileName) ifFalse:[ |
|
5011 |
^ self |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5012 |
] |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5013 |
] |
3211 | 5014 |
] |
202 | 5015 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
5016 |
|
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
5017 |
"Modified: 25.5.1996 / 12:26:41 / cg" |
51 | 5018 |
! |
5019 |
||
202 | 5020 |
doUpdate |
5021 |
"reread the changes-file" |
|
51 | 5022 |
|
202 | 5023 |
self readChangesFileInBackground:true. |
5024 |
realized ifTrue:[ |
|
4488 | 5025 |
self setChangeList. |
202 | 5026 |
] |
5027 |
||
51 | 5028 |
! |
5029 |
||
202 | 5030 |
doWriteBack |
5031 |
"write back the list onto the changes file" |
|
51 | 5032 |
|
5033 |
anyChanges ifTrue:[ |
|
4488 | 5034 |
(self writeBackChanges) ifTrue:[ |
5035 |
realized ifTrue:[ |
|
5036 |
self readChangesFileInBackground:false. |
|
5037 |
realized ifTrue:[ |
|
5038 |
self setChangeList |
|
5039 |
] |
|
5040 |
] |
|
5041 |
] |
|
202 | 5042 |
] |
703
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
5043 |
|
1b3b008d9f19
fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents:
627
diff
changeset
|
5044 |
"Modified: 5.9.1996 / 17:19:46 / cg" |
202 | 5045 |
! |
126 | 5046 |
|
1471 | 5047 |
doubleClickOnChange:lineNr |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5048 |
"action performed when a change-list entry is doubleClicked" |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5049 |
|
1471 | 5050 |
self doBrowse |
5051 |
||
5052 |
"Created: / 6.2.1998 / 13:08:49 / cg" |
|
5053 |
! |
|
5054 |
||
1127 | 5055 |
findClass |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5056 |
"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
|
5057 |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5058 |
|current| |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5059 |
|
1127 | 5060 |
changeNrShown notNil ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5061 |
current := self classNameOfChange:changeNrShown. |
1127 | 5062 |
]. |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5063 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5064 |
self |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5065 |
askForSearch:'Class to search for:' |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5066 |
initialAnswer:current |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5067 |
thenSearchUsing:[:searchString :changeNr | |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5068 |
|thisClass| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5069 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5070 |
thisClass := self classNameOfChange:changeNr. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5071 |
(thisClass = searchString |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5072 |
or:[searchString includesMatchCharacters and:[searchString match:thisClass]]) |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5073 |
] |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5074 |
onCancel:[^ self]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5075 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5076 |
lastSearchType := #class. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5077 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5078 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5079 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5080 |
findNext |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5081 |
"findNext menu action: select the next change. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5082 |
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
|
5083 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5084 |
lastSearchType == #selector ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5085 |
^ self findNextForSelector |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5086 |
]. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5087 |
lastSearchType == #snapshot ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5088 |
^ self findNextSnapshot |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5089 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5090 |
lastSearchType == #string ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5091 |
^ self findNextForString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5092 |
]. |
3534 | 5093 |
lastSearchType == #difference ifTrue:[ |
5094 |
^ self findNextDifference |
|
5095 |
]. |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5096 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5097 |
^ self findNextForClass |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5098 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5099 |
"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
|
5100 |
"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
|
5101 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5102 |
|
3534 | 5103 |
findNextDifference |
5104 |
lastSearchType := #difference. |
|
5105 |
changeNrShown isNil ifTrue:[^ self]. |
|
5106 |
||
5107 |
self findNextForWhich:[:changeNr | |
|
5108 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
|
5109 |
"/ same |
|
5110 |
false |
|
5111 |
] ifFalse:[ |
|
5112 |
"/ different |
|
5113 |
true |
|
5114 |
] |
|
5115 |
] |
|
5116 |
! |
|
5117 |
||
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5118 |
findNextForClass |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5119 |
"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
|
5120 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5121 |
|cls| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5122 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5123 |
lastSearchType := #class. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5124 |
changeNrShown isNil ifTrue:[^ self]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5125 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5126 |
cls := self classNameOfChange:changeNrShown. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5127 |
cls isNil ifTrue:[^ self]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5128 |
|
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5129 |
self findNextForWhich:[:changeNr | |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5130 |
|thisClass| |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5131 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5132 |
thisClass := self classNameOfChange:changeNr. |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5133 |
(thisClass = cls |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5134 |
or:[cls includesMatchCharacters and:[cls match:thisClass]]) |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5135 |
] |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5136 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5137 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5138 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5139 |
findNextForSelector |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5140 |
"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
|
5141 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5142 |
|sel| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5143 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5144 |
lastSearchType := #selector. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5145 |
changeNrShown isNil ifTrue:[^ self]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5146 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5147 |
sel := self selectorOfMethodChange:changeNrShown. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5148 |
sel isNil ifTrue:[^ self]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5149 |
|
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5150 |
self findNextForWhich: [:changeNr | |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5151 |
|thisSelector| |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5152 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5153 |
thisSelector := self selectorOfMethodChange:changeNr. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5154 |
(thisSelector = sel or:[sel includesMatchCharacters and:[sel match:thisSelector]]) |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5155 |
] |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5156 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5157 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5158 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5159 |
findNextForString |
4458 | 5160 |
lastSearchString isNil ifTrue:[ |
5161 |
^ self findString |
|
5162 |
]. |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5163 |
self findNextWithString:lastSearchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5164 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5165 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5166 |
findNextForWhich:aBlock |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5167 |
"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
|
5168 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5169 |
self withCursor:Cursor questionMark do:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5170 |
Object userInterruptSignal handle:[:ex | |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5171 |
self beep. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5172 |
^ 0 |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5173 |
] do:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5174 |
|lastNr nr| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5175 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5176 |
lastNr := self numberOfChanges. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5177 |
nr := changeNrShown + 1. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5178 |
[nr <= lastNr] whileTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5179 |
(aBlock value:nr) ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5180 |
changeListView setSelection:nr . |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5181 |
self changeSelection:nr. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5182 |
^ nr |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5183 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5184 |
nr := nr + 1. |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5185 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5186 |
]. |
1127 | 5187 |
]. |
2132 | 5188 |
self showNotFound. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5189 |
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
|
5190 |
^ 0 |
1127 | 5191 |
! |
5192 |
||
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5193 |
findNextSnapshot |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5194 |
"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
|
5195 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5196 |
lastSearchType := #snapshot. |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5197 |
changeNrShown isNil ifTrue:[^ self]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5198 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5199 |
self findNextForWhich: [:changeNr | self changeIsSnapShotInfo:changeNr ] |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5200 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5201 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5202 |
findNextWithString:searchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5203 |
lastSearchType := #string. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5204 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5205 |
lastSearchString := searchString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5206 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5207 |
changeNrShown isNil ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5208 |
changeNrShown := 0. |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5209 |
]. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5210 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5211 |
self findNextForWhich: |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5212 |
[:changeNr | |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5213 |
|s| |
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 |
s := self sourceOfMethodChange:changeNr. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5216 |
s notNil and:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5217 |
(searchString includesMatchCharacters not |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5218 |
and:[(s findString:searchString) ~~ 0]) |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5219 |
or:[ searchString includesMatchCharacters |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5220 |
and:[('*' , searchString , '*') match:s ]]] |
2843
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 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5223 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5224 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5225 |
codeView setSearchPattern:searchString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5226 |
codeView |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5227 |
searchFwd:searchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5228 |
ignoreCase:false |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5229 |
startingAtLine:1 col:0 |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5230 |
ifAbsent:nil. |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5231 |
|
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5232 |
! |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5233 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5234 |
findPrevious |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5235 |
"findPrevious menu action: select the previous change. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5236 |
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
|
5237 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5238 |
lastSearchType == #selector ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5239 |
^ self findPreviousForSelector |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5240 |
]. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5241 |
lastSearchType == #snapshot ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5242 |
^ self findPreviousSnapshot |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5243 |
]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5244 |
lastSearchType == #string ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5245 |
^ self findPreviousForString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5246 |
]. |
3534 | 5247 |
lastSearchType == #difference ifTrue:[ |
5248 |
^ self findPreviousDifference |
|
5249 |
]. |
|
5250 |
||
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5251 |
^ self findPreviousForClass |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5252 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5253 |
"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
|
5254 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5255 |
|
3534 | 5256 |
findPreviousDifference |
5257 |
lastSearchType := #difference. |
|
5258 |
changeNrShown isNil ifTrue:[^ self]. |
|
5259 |
||
5260 |
self findPreviousForWhich:[:changeNr | |
|
5261 |
(self compareChange:changeNr showResult:false) == true ifTrue:[ |
|
5262 |
"/ same |
|
5263 |
false |
|
5264 |
] ifFalse:[ |
|
5265 |
"/ different |
|
5266 |
true |
|
5267 |
] |
|
5268 |
] |
|
5269 |
! |
|
5270 |
||
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5271 |
findPreviousForClass |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5272 |
"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
|
5273 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5274 |
|cls| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5275 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5276 |
lastSearchType := #class. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5277 |
changeNrShown isNil ifTrue:[^ self]. |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5278 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5279 |
cls := self classNameOfChange:changeNrShown. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5280 |
cls isNil ifTrue:[^ self]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5281 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5282 |
self findPreviousForWhich: |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5283 |
[:changeNr | |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5284 |
|thisClass| |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5285 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5286 |
thisClass := self classNameOfChange:changeNr. |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5287 |
(thisClass = cls |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5288 |
or:[cls includesMatchCharacters and:[cls match:thisClass]]) |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5289 |
] |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5290 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5291 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5292 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5293 |
findPreviousForSelector |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5294 |
"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
|
5295 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5296 |
|sel| |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5297 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5298 |
lastSearchType := #selector. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5299 |
changeNrShown isNil ifTrue:[^ self]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5300 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5301 |
sel := self selectorOfMethodChange:changeNrShown. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5302 |
sel isNil ifTrue:[^ self]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5303 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5304 |
self findPreviousForWhich: |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5305 |
[:changeNr | |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5306 |
|thisSelector| |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5307 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5308 |
thisSelector := self selectorOfMethodChange:changeNr. |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5309 |
(thisSelector = sel |
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5310 |
or:[sel includesMatchCharacters and:[sel match:thisSelector]]) |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5311 |
] |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5312 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5313 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5314 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5315 |
findPreviousForString |
4458 | 5316 |
lastSearchString isNil ifTrue:[ |
5317 |
^ self findString |
|
5318 |
]. |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5319 |
self findPreviousWithString:lastSearchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5320 |
! |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5321 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5322 |
findPreviousForWhich:aBlock |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5323 |
"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
|
5324 |
|
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5325 |
self withCursor:Cursor questionMark do:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5326 |
Object userInterruptSignal handle:[:ex | |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5327 |
self beep. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5328 |
^ 0 |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5329 |
] do:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5330 |
|nr| |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5331 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5332 |
nr := changeNrShown - 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5333 |
[nr >= 1] whileTrue:[ |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5334 |
(aBlock value:nr) ifTrue:[ |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5335 |
changeListView setSelection:nr . |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5336 |
self changeSelection:nr. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5337 |
^ nr |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5338 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5339 |
nr := nr - 1. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5340 |
]. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5341 |
] |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5342 |
]. |
2132 | 5343 |
self showNotFound. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5344 |
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
|
5345 |
^ 0 |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5346 |
! |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5347 |
|
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5348 |
findPreviousSnapshot |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5349 |
"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
|
5350 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5351 |
lastSearchType := #snapshot. |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5352 |
changeNrShown isNil ifTrue:[^ self]. |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5353 |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5354 |
self findPreviousForWhich: [:changeNr | self changeIsSnapShotInfo:changeNr ] |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5355 |
! |
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 |
findPreviousWithString:searchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5358 |
lastSearchType := #string. |
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 |
lastSearchString := searchString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5361 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5362 |
changeNrShown isNil ifTrue:[ |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5363 |
changeNrShown := 0. |
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5364 |
]. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5365 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5366 |
self findPreviousForWhich: |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5367 |
[:changeNr | |
3211 | 5368 |
|s includesMatchCharacters| |
5369 |
||
5370 |
includesMatchCharacters := searchString includesMatchCharacters. |
|
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5371 |
s := self sourceOfMethodChange:changeNr. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5372 |
s notNil and:[ |
3211 | 5373 |
(includesMatchCharacters not and:[(s findString:searchString) ~~ 0]) |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5374 |
or:[includesMatchCharacters and:[('*' , searchString , '*') match:s ]]] |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5375 |
]. |
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 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5378 |
|
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5379 |
codeView setSearchPattern:searchString. |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5380 |
codeView |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5381 |
searchFwd:searchString |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5382 |
ignoreCase:false |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5383 |
startingAtLine:1 col:0 |
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5384 |
ifAbsent:nil. |
3341
8f156ac559d5
fixed matching in find actions
Claus Gittinger <cg@exept.de>
parents:
3339
diff
changeset
|
5385 |
|
1848
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5386 |
! |
61054ff3d470
added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents:
1833
diff
changeset
|
5387 |
|
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5388 |
findSelector |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5389 |
"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
|
5390 |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5391 |
|current| |
1706
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5392 |
|
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5393 |
changeNrShown notNil ifTrue:[ |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5394 |
current := self selectorOfMethodChange:changeNrShown. |
dd888c645873
added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents:
1670
diff
changeset
|
5395 |
]. |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5396 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5397 |
self |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5398 |
askForSearch:'Selector to search for:' |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5399 |
initialAnswer:current |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5400 |
thenSearchUsing:[:searchString :changeNr | |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5401 |
|thisSelector| |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5402 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5403 |
thisSelector := self selectorOfMethodChange:changeNr. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5404 |
(thisSelector = searchString |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5405 |
or:[searchString includesMatchCharacters and:[searchString match:thisSelector]]) |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5406 |
] |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5407 |
onCancel:[^ self]. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5408 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5409 |
lastSearchType := #selector. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5410 |
changeNrShown == 0 ifTrue:[changeNrShown := nil]. |
975
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5411 |
! |
41a41f54874d
added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
5412 |
|
2576
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5413 |
findString |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5414 |
|searchString directionHolder| |
2576
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5415 |
|
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5416 |
lastSearchType := #string. |
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5417 |
|
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5418 |
searchString := codeView selection. |
2843
6e3fc30cd41f
commented; much better functionality
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
5419 |
searchString size == 0 ifTrue:[searchString := lastSearchString]. |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5420 |
|
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5421 |
searchString := self |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5422 |
askForSearchString:'String to search for:' |
3554 | 5423 |
initialAnswer:(searchString ? '') |
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5424 |
directionInto:(directionHolder := ValueHolder new). |
3554 | 5425 |
|
5426 |
searchString size == 0 ifTrue:[ |
|
2576
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5427 |
^ self |
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5428 |
]. |
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5429 |
|
3292
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5430 |
directionHolder value == #backward ifTrue:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5431 |
self findPreviousWithString:searchString. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5432 |
] ifFalse:[ |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5433 |
self findNextWithString:searchString. |
7eca3bb7b8cb
added previous buttons to searches
Claus Gittinger <cg@exept.de>
parents:
3275
diff
changeset
|
5434 |
] |
2576
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5435 |
! |
b5f0d32b09d3
added string search (in methods code)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5436 |
|
202 | 5437 |
noChangesAllowed |
5438 |
"show a warning that changes cannot be changed" |
|
93 | 5439 |
|
3211 | 5440 |
self warn:'Changes are not allowed to be changed.' |
0 | 5441 |
! |
5442 |
||
202 | 5443 |
saveClass:aClassName from:startNr |
5444 |
"user wants changes from current to end to be appended to a file" |
|
51 | 5445 |
|
202 | 5446 |
|changeNr fileName| |
51 | 5447 |
|
202 | 5448 |
changeNr := changeListView selection. |
5449 |
changeNr notNil ifTrue:[ |
|
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5450 |
fileName := Dialog |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5451 |
requestFileName:'append changes for class to:' |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5452 |
default:(lastSaveFileName ? '') |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5453 |
ok:'append' |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5454 |
abort:'abort' |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5455 |
pattern:'*.chg'. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5456 |
|
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5457 |
fileName notNil ifTrue:[ |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5458 |
lastSaveFileName := fileName. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5459 |
self withCursor:(Cursor write) do:[ |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5460 |
startNr to:(self numberOfChanges) do:[:changeNr | |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5461 |
|thisClassName| |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5462 |
|
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5463 |
thisClassName := self classNameOfChange:changeNr. |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5464 |
thisClassName = aClassName ifTrue:[ |
3211 | 5465 |
self setSingleSelection:changeNr. |
2394
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5466 |
(self appendChange:changeNr toFile:fileName) ifFalse:[ |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5467 |
^ self |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5468 |
] |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5469 |
] |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5470 |
] |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5471 |
] |
0841cfed6ec5
fixed delete followed by save-change
Claus Gittinger <cg@exept.de>
parents:
2353
diff
changeset
|
5472 |
]. |
202 | 5473 |
] |
562
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
5474 |
|
8f772068fd1a
#selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
5475 |
"Modified: 25.5.1996 / 12:26:44 / cg" |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5476 |
! |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5477 |
|
3472 | 5478 |
setEnforcedNameSpace |
5479 |
|nsName listOfKnownNameSpaces| |
|
5480 |
||
5481 |
listOfKnownNameSpaces := Set new. |
|
5482 |
NameSpace |
|
5483 |
allNamespaces |
|
5484 |
do:[:eachNameSpace | |
|
5485 |
listOfKnownNameSpaces add:eachNameSpace name |
|
5486 |
]. |
|
5487 |
listOfKnownNameSpaces := listOfKnownNameSpaces asOrderedCollection sort. |
|
5488 |
||
5489 |
nsName := Dialog |
|
5490 |
request:'When applying, new classes are created in nameSpace:' |
|
5491 |
initialAnswer:(enforcedNameSpace ? Class nameSpaceQuerySignal query name) |
|
5492 |
list:listOfKnownNameSpaces. |
|
5493 |
nsName size ~~ 0 ifTrue:[ |
|
4488 | 5494 |
enforcedNameSpace := NameSpace name:nsName. |
5495 |
autoCompare value ifTrue:[ |
|
5496 |
self doUpdate |
|
5497 |
]. |
|
3472 | 5498 |
] |
5499 |
! |
|
5500 |
||
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5501 |
setEnforcedPackage |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5502 |
|pkg listOfKnownPackages| |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5503 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5504 |
listOfKnownPackages := Set new. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5505 |
Smalltalk allClassesDo:[:eachClass | |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5506 |
|package| |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5507 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5508 |
package := eachClass package. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5509 |
package size > 0 ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5510 |
listOfKnownPackages add:package |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5511 |
] |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5512 |
]. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5513 |
listOfKnownPackages := listOfKnownPackages asOrderedCollection sort. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5514 |
|
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5515 |
pkg := Dialog |
3472 | 5516 |
request:'When applying, changes go into package:' |
3227
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5517 |
initialAnswer:(enforcedPackage ? Class packageQuerySignal query) |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5518 |
list:listOfKnownPackages. |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5519 |
pkg size ~~ 0 ifTrue:[ |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5520 |
enforcedPackage := pkg |
442696985817
deleteAllForClass - support multiple selection
Claus Gittinger <cg@exept.de>
parents:
3224
diff
changeset
|
5521 |
] |
202 | 5522 |
! ! |
0 | 5523 |
|
761 | 5524 |
!ChangesBrowser class methodsFor:'documentation'! |
202 | 5525 |
|
5526 |
version |
|
5145 | 5527 |
^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.308 2003-08-31 10:39:08 cg Exp $' |
276
017219e571e4
more stuff for autoloaded classes
Claus Gittinger <cg@exept.de>
parents:
275
diff
changeset
|
5528 |
! ! |